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
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PatchJobCompletedLog {
    /// The patch job name. For example:
    /// projects/PROJECT_ID/patchJobs/PATCH_JOB_ID
    #[prost(string, tag = "1")]
    pub patch_job: ::prost::alloc::string::String,
    /// The current state of the PatchJob.
    #[prost(enumeration = "patch_job_completed_log::State", tag = "2")]
    pub state: i32,
    /// Summary of instance details.
    #[prost(message, optional, tag = "3")]
    pub instance_details_summary: ::core::option::Option<
        patch_job_completed_log::InstanceDetailsSummary,
    >,
    /// If this patch job is a dry run, the agent will report that it has
    /// finished without running any updates on the VM.
    #[prost(bool, tag = "4")]
    pub dry_run: bool,
    /// If this patch job failed, this message will provide information about the
    /// failure.
    #[prost(string, tag = "5")]
    pub error_message: ::prost::alloc::string::String,
    /// Time this PatchJob was created.
    #[prost(message, optional, tag = "6")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Last time this PatchJob was updated.
    #[prost(message, optional, tag = "7")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `PatchJobCompletedLog`.
pub mod patch_job_completed_log {
    /// A summary of the current patch state across all instances this patch job
    /// affects. Contains counts of instances in different states. These states map
    /// to InstancePatchState. List patch job instance details to see the specific
    /// states of each instance.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct InstanceDetailsSummary {
        /// Number of instances pending patch job.
        #[prost(int64, tag = "1")]
        pub instances_pending: i64,
        /// Number of instances that are inactive.
        #[prost(int64, tag = "2")]
        pub instances_inactive: i64,
        /// Number of instances notified about patch job.
        #[prost(int64, tag = "3")]
        pub instances_notified: i64,
        /// Number of instances that have started.
        #[prost(int64, tag = "4")]
        pub instances_started: i64,
        /// Number of instances that are downloading patches.
        #[prost(int64, tag = "5")]
        pub instances_downloading_patches: i64,
        /// Number of instances that are applying patches.
        #[prost(int64, tag = "6")]
        pub instances_applying_patches: i64,
        /// Number of instances rebooting.
        #[prost(int64, tag = "7")]
        pub instances_rebooting: i64,
        /// Number of instances that have completed successfully.
        #[prost(int64, tag = "8")]
        pub instances_succeeded: i64,
        /// Number of instances that require reboot.
        #[prost(int64, tag = "9")]
        pub instances_succeeded_reboot_required: i64,
        /// Number of instances that failed.
        #[prost(int64, tag = "10")]
        pub instances_failed: i64,
        /// Number of instances that have acked and will start shortly.
        #[prost(int64, tag = "11")]
        pub instances_acked: i64,
        /// Number of instances that exceeded the time out while applying the patch.
        #[prost(int64, tag = "12")]
        pub instances_timed_out: i64,
        /// Number of instances that are running the pre-patch step.
        #[prost(int64, tag = "13")]
        pub instances_running_pre_patch_step: i64,
        /// Number of instances that are running the post-patch step.
        #[prost(int64, tag = "14")]
        pub instances_running_post_patch_step: i64,
    }
    /// Enumeration of the various states a patch job passes through as it
    /// executes.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// State must be specified.
        Unspecified = 0,
        /// The patch job was successfully initiated.
        Started = 1,
        /// The patch job is looking up instances to run the patch on.
        InstanceLookup = 2,
        /// Instances are being patched.
        Patching = 3,
        /// Patch job completed successfully.
        Succeeded = 4,
        /// Patch job completed but there were errors.
        CompletedWithErrors = 5,
        /// The patch job was canceled.
        Canceled = 6,
        /// The patch job has timed out.
        TimedOut = 7,
    }
    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::Started => "STARTED",
                State::InstanceLookup => "INSTANCE_LOOKUP",
                State::Patching => "PATCHING",
                State::Succeeded => "SUCCEEDED",
                State::CompletedWithErrors => "COMPLETED_WITH_ERRORS",
                State::Canceled => "CANCELED",
                State::TimedOut => "TIMED_OUT",
            }
        }
        /// 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),
                "STARTED" => Some(Self::Started),
                "INSTANCE_LOOKUP" => Some(Self::InstanceLookup),
                "PATCHING" => Some(Self::Patching),
                "SUCCEEDED" => Some(Self::Succeeded),
                "COMPLETED_WITH_ERRORS" => Some(Self::CompletedWithErrors),
                "CANCELED" => Some(Self::Canceled),
                "TIMED_OUT" => Some(Self::TimedOut),
                _ => None,
            }
        }
    }
}