google_cloudevents/google/events/firebase/testlab/v1/mod.rs
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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
// This file is @generated by prost-build.
/// The data within all Firebase test matrix events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestMatrixEventData {
/// Time the test matrix was created.
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// State of the test matrix.
#[prost(enumeration = "TestState", tag = "2")]
pub state: i32,
/// Code that describes why the test matrix is considered invalid. Only set for
/// matrices in the INVALID state.
#[prost(string, tag = "3")]
pub invalid_matrix_details: ::prost::alloc::string::String,
/// Outcome summary of the test matrix.
#[prost(enumeration = "OutcomeSummary", tag = "4")]
pub outcome_summary: i32,
/// Locations where test results are stored.
#[prost(message, optional, tag = "5")]
pub result_storage: ::core::option::Option<ResultStorage>,
/// Information provided by the client that created the test matrix.
#[prost(message, optional, tag = "6")]
pub client_info: ::core::option::Option<ClientInfo>,
/// ID of the test matrix this event belongs to.
#[prost(string, tag = "7")]
pub test_matrix_id: ::prost::alloc::string::String,
}
/// Information about the client which invoked the test.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientInfo {
/// Client name, such as "gcloud".
#[prost(string, tag = "1")]
pub client: ::prost::alloc::string::String,
/// Map of detailed information about the client.
#[prost(map = "string, string", tag = "2")]
pub details: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// Locations where test results are stored.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResultStorage {
/// Tool Results history resource containing test results. Format is
/// `projects/{project_id}/histories/{history_id}`.
/// See <https://firebase.google.com/docs/test-lab/reference/toolresults/rest>
/// for more information.
#[prost(string, tag = "1")]
pub tool_results_history: ::prost::alloc::string::String,
/// Tool Results execution resource containing test results. Format is
/// `projects/{project_id}/histories/{history_id}/executions/{execution_id}`.
/// Optional, can be omitted in erroneous test states.
/// See <https://firebase.google.com/docs/test-lab/reference/toolresults/rest>
/// for more information.
#[prost(string, tag = "2")]
pub tool_results_execution: ::prost::alloc::string::String,
/// URI to the test results in the Firebase Web Console.
#[prost(string, tag = "3")]
pub results_uri: ::prost::alloc::string::String,
/// Location in Google Cloud Storage where test results are written to.
/// In the form "gs://bucket/path/to/somewhere".
#[prost(string, tag = "4")]
pub gcs_path: ::prost::alloc::string::String,
}
/// Possible test states for a test matrix.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TestState {
/// The default value. This value is used if the state is omitted.
Unspecified = 0,
/// The test matrix is being validated.
Validating = 1,
/// The test matrix is waiting for resources to become available.
Pending = 2,
/// The test matrix has completed normally.
Finished = 3,
/// The test matrix has completed because of an infrastructure failure.
Error = 4,
/// The test matrix was not run because the provided inputs are not valid.
Invalid = 5,
}
impl TestState {
/// 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 => "TEST_STATE_UNSPECIFIED",
Self::Validating => "VALIDATING",
Self::Pending => "PENDING",
Self::Finished => "FINISHED",
Self::Error => "ERROR",
Self::Invalid => "INVALID",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TEST_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"VALIDATING" => Some(Self::Validating),
"PENDING" => Some(Self::Pending),
"FINISHED" => Some(Self::Finished),
"ERROR" => Some(Self::Error),
"INVALID" => Some(Self::Invalid),
_ => None,
}
}
}
/// Outcome summary for a finished test matrix.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OutcomeSummary {
/// The default value. This value is used if the state is omitted.
Unspecified = 0,
/// The test matrix run was successful, for instance:
/// - All test cases passed.
/// - No crash of the application under test was detected.
Success = 1,
/// A run failed, for instance:
/// - One or more test case failed.
/// - A test timed out.
/// - The application under test crashed.
Failure = 2,
/// Something unexpected happened. The test run should still be considered
/// unsuccessful but this is likely a transient problem and re-running the
/// test might be successful.
Inconclusive = 3,
/// All tests were skipped.
Skipped = 4,
}
impl OutcomeSummary {
/// 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 => "OUTCOME_SUMMARY_UNSPECIFIED",
Self::Success => "SUCCESS",
Self::Failure => "FAILURE",
Self::Inconclusive => "INCONCLUSIVE",
Self::Skipped => "SKIPPED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OUTCOME_SUMMARY_UNSPECIFIED" => Some(Self::Unspecified),
"SUCCESS" => Some(Self::Success),
"FAILURE" => Some(Self::Failure),
"INCONCLUSIVE" => Some(Self::Inconclusive),
"SKIPPED" => Some(Self::Skipped),
_ => None,
}
}
}
/// The CloudEvent raised when a TestMatrix is completed
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestMatrixCompletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<TestMatrixEventData>,
}