1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// This file is @generated by prost-build.
/// Represents the current state of an `Experiment` or `Validation` dry run.
/// String values are used in JSON.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
/// The state is not known or not set.
Unspecified = 0,
/// The system is identifying the target Google Cloud resources for the
/// `Experiment` or `Validation` and checking necessary permissions.
Preparing = 1,
/// The experiment is fully set up and ready to start.
Prepared = 2,
/// The system is actively applying the fault to the targeted
/// resources. Example: Slowing down responses, triggering errors.
Injecting = 3,
/// The fault is active on the targeted resources. The `Experiment` is
/// now running for its planned duration.
Injected = 4,
/// The `Experiment` is being stopped, and FIT is removing the fault
/// and restoring the resources to their normal operational state.
Reverting = 5,
/// The `Experiment` or `Validation` has finished, and the resources are back
/// to their normal state. No further actions will occur.
Completed = 6,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Preparing => "PREPARING",
Self::Prepared => "PREPARED",
Self::Injecting => "INJECTING",
Self::Injected => "INJECTED",
Self::Reverting => "REVERTING",
Self::Completed => "COMPLETED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"PREPARING" => Some(Self::Preparing),
"PREPARED" => Some(Self::Prepared),
"INJECTING" => Some(Self::Injecting),
"INJECTED" => Some(Self::Injected),
"REVERTING" => Some(Self::Reverting),
"COMPLETED" => Some(Self::Completed),
_ => None,
}
}
}
/// Represents the payload of a Platform Log.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FaultTestingLog {
/// Required. Indicates the time the event described by the log entry occurred.
#[prost(message, optional, tag = "1")]
pub event_time: ::core::option::Option<::prost_types::Timestamp>,
/// Required. Specifies the resource name of the experiment that this log entry
/// is associated with.
#[prost(string, tag = "2")]
pub experiment: ::prost::alloc::string::String,
/// Output only. Represents the state of the resource after the event.
/// Output only.
#[prost(enumeration = "State", tag = "3")]
pub state: i32,
/// Optional. Describes the reason for the state change.
#[prost(string, tag = "4")]
pub reason: ::prost::alloc::string::String,
/// Optional. Provides additional details about the event.
#[prost(message, optional, tag = "5")]
pub details: ::core::option::Option<::prost_types::Struct>,
}