google_cloudevents/google/events/cloud/memcache/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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
// This file is @generated by prost-build.
/// A Memorystore for Memcached instance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Instance {
    /// Required. Unique name of the resource in this scope including project and
    /// location using the form:
    ///      `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
    ///
    /// Note: Memcached instances are managed and addressed at the regional level
    /// so `location_id` here refers to a Google Cloud region; however, users may
    /// choose which zones Memcached nodes should be provisioned in within an
    /// instance. Refer to [zones][google.cloud.memcache.v1.Instance.zones] field
    /// for more details.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// User provided name for the instance, which is only used for display
    /// purposes. Cannot be more than 80 characters.
    #[prost(string, tag = "2")]
    pub display_name: ::prost::alloc::string::String,
    /// Resource labels to represent user-provided metadata.
    /// Refer to cloud documentation on labels for more details.
    /// <https://cloud.google.com/compute/docs/labeling-resources>
    #[prost(map = "string, string", tag = "3")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// The full name of the Google Compute Engine
    /// [network](/compute/docs/networks-and-firewalls#networks) to which the
    /// instance is connected. If left unspecified, the `default` network
    /// will be used.
    #[prost(string, tag = "4")]
    pub authorized_network: ::prost::alloc::string::String,
    /// Zones in which Memcached nodes should be provisioned.
    /// Memcached nodes will be equally distributed across these zones. If not
    /// provided, the service will by default create nodes in all zones in the
    /// region for the instance.
    #[prost(string, repeated, tag = "5")]
    pub zones: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Required. Number of nodes in the Memcached instance.
    #[prost(int32, tag = "6")]
    pub node_count: i32,
    /// Required. Configuration for Memcached nodes.
    #[prost(message, optional, tag = "7")]
    pub node_config: ::core::option::Option<instance::NodeConfig>,
    /// The major version of Memcached software.
    /// If not provided, latest supported version will be used. Currently the
    /// latest supported major version is `MEMCACHE_1_5`.
    /// The minor version will be automatically determined by our system based on
    /// the latest supported minor version.
    #[prost(enumeration = "MemcacheVersion", tag = "9")]
    pub memcache_version: i32,
    /// User defined parameters to apply to the memcached process
    /// on each node.
    #[prost(message, optional, tag = "11")]
    pub parameters: ::core::option::Option<MemcacheParameters>,
    /// Output only. List of Memcached nodes.
    /// Refer to [Node][google.cloud.memcache.v1.Instance.Node] message for more
    /// details.
    #[prost(message, repeated, tag = "12")]
    pub memcache_nodes: ::prost::alloc::vec::Vec<instance::Node>,
    /// Output only. The time the instance was created.
    #[prost(message, optional, tag = "13")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the instance was updated.
    #[prost(message, optional, tag = "14")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The state of this Memcached instance.
    #[prost(enumeration = "instance::State", tag = "15")]
    pub state: i32,
    /// Output only. The full version of memcached server running on this instance.
    /// System automatically determines the full memcached version for an instance
    /// based on the input MemcacheVersion.
    /// The full version format will be "memcached-1.5.16".
    #[prost(string, tag = "18")]
    pub memcache_full_version: ::prost::alloc::string::String,
    /// List of messages that describe the current state of the Memcached instance.
    #[prost(message, repeated, tag = "19")]
    pub instance_messages: ::prost::alloc::vec::Vec<instance::InstanceMessage>,
    /// Output only. Endpoint for the Discovery API.
    #[prost(string, tag = "20")]
    pub discovery_endpoint: ::prost::alloc::string::String,
    /// The maintenance policy for the instance. If not provided,
    /// the maintenance event will be performed based on Memorystore
    /// internal rollout schedule.
    #[prost(message, optional, tag = "21")]
    pub maintenance_policy: ::core::option::Option<MaintenancePolicy>,
    /// Output only. Published maintenance schedule.
    #[prost(message, optional, tag = "22")]
    pub maintenance_schedule: ::core::option::Option<MaintenanceSchedule>,
}
/// Nested message and enum types in `Instance`.
pub mod instance {
    /// Configuration for a Memcached Node.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct NodeConfig {
        /// Required. Number of cpus per Memcached node.
        #[prost(int32, tag = "1")]
        pub cpu_count: i32,
        /// Required. Memory size in MiB for each Memcached node.
        #[prost(int32, tag = "2")]
        pub memory_size_mb: i32,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Node {
        /// Output only. Identifier of the Memcached node. The node id does not
        /// include project or location like the Memcached instance name.
        #[prost(string, tag = "1")]
        pub node_id: ::prost::alloc::string::String,
        /// Output only. Location (GCP Zone) for the Memcached node.
        #[prost(string, tag = "2")]
        pub zone: ::prost::alloc::string::String,
        /// Output only. Current state of the Memcached node.
        #[prost(enumeration = "node::State", tag = "3")]
        pub state: i32,
        /// Output only. Hostname or IP address of the Memcached node used by the
        /// clients to connect to the Memcached server on this node.
        #[prost(string, tag = "4")]
        pub host: ::prost::alloc::string::String,
        /// Output only. The port number of the Memcached server on this node.
        #[prost(int32, tag = "5")]
        pub port: i32,
        /// User defined parameters currently applied to the node.
        #[prost(message, optional, tag = "6")]
        pub parameters: ::core::option::Option<super::MemcacheParameters>,
    }
    /// Nested message and enum types in `Node`.
    pub mod node {
        /// Different states of a Memcached node.
        #[derive(
            Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration,
        )]
        #[repr(i32)]
        pub enum State {
            /// Node state is not set.
            Unspecified = 0,
            /// Node is being created.
            Creating = 1,
            /// Node has been created and ready to be used.
            Ready = 2,
            /// Node is being deleted.
            Deleting = 3,
            /// Node is being updated.
            Updating = 4,
        }
        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::Creating => "CREATING",
                    Self::Ready => "READY",
                    Self::Deleting => "DELETING",
                    Self::Updating => "UPDATING",
                }
            }
            /// 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),
                    "CREATING" => Some(Self::Creating),
                    "READY" => Some(Self::Ready),
                    "DELETING" => Some(Self::Deleting),
                    "UPDATING" => Some(Self::Updating),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct InstanceMessage {
        /// A code that correspond to one type of user-facing message.
        #[prost(enumeration = "instance_message::Code", tag = "1")]
        pub code: i32,
        /// Message on memcached instance which will be exposed to users.
        #[prost(string, tag = "2")]
        pub message: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `InstanceMessage`.
    pub mod instance_message {
        #[derive(
            Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration,
        )]
        #[repr(i32)]
        pub enum Code {
            /// Message Code not set.
            Unspecified = 0,
            /// Memcached nodes are distributed unevenly.
            ZoneDistributionUnbalanced = 1,
        }
        impl Code {
            /// 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 => "CODE_UNSPECIFIED",
                    Self::ZoneDistributionUnbalanced => "ZONE_DISTRIBUTION_UNBALANCED",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "CODE_UNSPECIFIED" => Some(Self::Unspecified),
                    "ZONE_DISTRIBUTION_UNBALANCED" => Some(Self::ZoneDistributionUnbalanced),
                    _ => None,
                }
            }
        }
    }
    /// Different states of a Memcached instance.
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum State {
        /// State not set.
        Unspecified = 0,
        /// Memcached instance is being created.
        Creating = 1,
        /// Memcached instance has been created and ready to be used.
        Ready = 2,
        /// Memcached instance is updating configuration such as maintenance policy
        /// and schedule.
        Updating = 3,
        /// Memcached instance is being deleted.
        Deleting = 4,
        /// Memcached instance is going through maintenance, e.g. data plane rollout.
        PerformingMaintenance = 5,
    }
    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::Creating => "CREATING",
                Self::Ready => "READY",
                Self::Updating => "UPDATING",
                Self::Deleting => "DELETING",
                Self::PerformingMaintenance => "PERFORMING_MAINTENANCE",
            }
        }
        /// 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),
                "CREATING" => Some(Self::Creating),
                "READY" => Some(Self::Ready),
                "UPDATING" => Some(Self::Updating),
                "DELETING" => Some(Self::Deleting),
                "PERFORMING_MAINTENANCE" => Some(Self::PerformingMaintenance),
                _ => None,
            }
        }
    }
}
/// Maintenance policy per instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenancePolicy {
    /// Output only. The time when the policy was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the policy was updated.
    #[prost(message, optional, tag = "2")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Description of what this policy is for. Create/Update methods
    /// return INVALID_ARGUMENT if the length is greater than 512.
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// Required. Maintenance window that is applied to resources covered by this
    /// policy. Minimum 1. For the current version, the maximum number of
    /// weekly_maintenance_windows is expected to be one.
    #[prost(message, repeated, tag = "4")]
    pub weekly_maintenance_window: ::prost::alloc::vec::Vec<WeeklyMaintenanceWindow>,
}
/// Time window specified for weekly operations.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WeeklyMaintenanceWindow {
    /// Required. Allows to define schedule that runs specified day of the week.
    #[prost(
        enumeration = "super::super::super::super::r#type::DayOfWeek",
        tag = "1"
    )]
    pub day: i32,
    /// Required. Start time of the window in UTC.
    #[prost(message, optional, tag = "2")]
    pub start_time: ::core::option::Option<super::super::super::super::r#type::TimeOfDay>,
    /// Required. Duration of the time window.
    #[prost(message, optional, tag = "3")]
    pub duration: ::core::option::Option<::prost_types::Duration>,
}
/// Upcoming maintenance schedule.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MaintenanceSchedule {
    /// Output only. The start time of any upcoming scheduled maintenance for this
    /// instance.
    #[prost(message, optional, tag = "1")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The end time of any upcoming scheduled maintenance for this
    /// instance.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The deadline that the maintenance schedule start time can not
    /// go beyond, including reschedule.
    #[prost(message, optional, tag = "4")]
    pub schedule_deadline_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemcacheParameters {
    /// Output only. The unique ID associated with this set of parameters. Users
    /// can use this id to determine if the parameters associated with the instance
    /// differ from the parameters associated with the nodes. A discrepancy between
    /// parameter ids can inform users that they may need to take action to apply
    /// parameters on nodes.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// User defined set of parameters to use in the memcached process.
    #[prost(map = "string, string", tag = "3")]
    pub params:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
/// The data within all Instance events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstanceEventData {
    /// Optional. The Instance event payload. Unset for deletion events.
    #[prost(message, optional, tag = "1")]
    pub payload: ::core::option::Option<Instance>,
}
/// Memcached versions supported by our service.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MemcacheVersion {
    Unspecified = 0,
    /// Memcached 1.5 version.
    Memcache15 = 1,
}
impl MemcacheVersion {
    /// 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 => "MEMCACHE_VERSION_UNSPECIFIED",
            Self::Memcache15 => "MEMCACHE_1_5",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "MEMCACHE_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
            "MEMCACHE_1_5" => Some(Self::Memcache15),
            _ => None,
        }
    }
}
/// The CloudEvent raised when an Instance is created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstanceCreatedEvent {
    /// The data associated with the event.
    #[prost(message, optional, tag = "1")]
    pub data: ::core::option::Option<InstanceEventData>,
}
/// The CloudEvent raised when an Instance is updated.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstanceUpdatedEvent {
    /// The data associated with the event.
    #[prost(message, optional, tag = "1")]
    pub data: ::core::option::Option<InstanceEventData>,
}
/// The CloudEvent raised when an Instance is deleted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstanceDeletedEvent {
    /// The data associated with the event.
    #[prost(message, optional, tag = "1")]
    pub data: ::core::option::Option<InstanceEventData>,
}