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
// This file is @generated by prost-build.
/// JSON payload for the Cloud Logging event:
/// `organizations/\[organizationId\]/logs/cloudsetup.googleapis.com%2Fcomplete_deployment`.
/// This event gets emitted upon completion of a config deployment as part of the
/// Cloud Setup Checklist.
///
/// The deployment can fail even if it returns a
/// `config.googleapis.com/Deployment`. The state of that message will be
/// `FAILED`. Hence, if there is a `value` present, the `state` can still be,
/// `FAILED`. The message for the error or failure will be on the `error` or the
/// `value` if the Operation results in an error or if the `state` of the
/// Deployment is `FAILED`, respectively.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompleteDeploymentEvent {
/// The `state` of this deployment completion event.
#[prost(enumeration = "complete_deployment_event::State", tag = "3")]
pub state: i32,
/// Flag to indicate if deployment is preview only.
#[prost(bool, tag = "4")]
pub preview_only: bool,
#[prost(oneof = "complete_deployment_event::Result", tags = "1, 2")]
pub result: ::core::option::Option<complete_deployment_event::Result>,
}
/// Nested message and enum types in `CompleteDeploymentEvent`.
pub mod complete_deployment_event {
/// State of the completed deployment.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// The zero value. It is applied when `state` is unset. Do not use.
Unspecified = 0,
/// Indicates that a Deployment value was present when the config deployment
/// finished and the State was anything other than FAILED.
Succeeded = 1,
/// Indicates that the Operation result was an error or the Deployment
/// `state` was FAILED.
Failed = 2,
}
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 {
State::Unspecified => "STATE_UNSPECIFIED",
State::Succeeded => "SUCCEEDED",
State::Failed => "FAILED",
}
}
/// 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),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Result {
/// Result of the Deployment recorded upon completion.
#[prost(message, tag = "1")]
Value(super::CompleteDeploymentResult),
/// Result of the Deployment if the `Operation` results in an error.
#[prost(message, tag = "2")]
Error(super::super::super::super::super::rpc::Status),
}
}
/// This message is used when the CompleteDeploymentEvent has a value.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompleteDeploymentResult {
/// This is the Deployment that completed.
/// Format is projects/{project}/locations/{location}/deployments/{name}.
#[prost(string, tag = "1")]
pub deployment: ::prost::alloc::string::String,
/// This is the Preview that completed.
/// Format is projects/{project}/locations/{location}/previews/{preview}
#[prost(string, tag = "3")]
pub preview: ::prost::alloc::string::String,
/// The message that is returned when a deployment completes. This **can** be
/// an error message if the `Deployment` `state` is `FAILED`.
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}