google_cloud_oracledatabase_v1/model.rs
1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gaxi;
23extern crate google_cloud_gax;
24extern crate google_cloud_location;
25extern crate google_cloud_longrunning;
26extern crate google_cloud_lro;
27extern crate google_cloud_type;
28extern crate lazy_static;
29extern crate serde;
30extern crate serde_json;
31extern crate serde_with;
32extern crate std;
33extern crate tracing;
34extern crate wkt;
35
36mod debug;
37mod deserialize;
38mod serialize;
39
40/// Details of the Autonomous Database resource.
41/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabase/>
42#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct AutonomousDatabase {
45 /// Identifier. The name of the Autonomous Database resource in the following
46 /// format:
47 /// projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database}
48 pub name: std::string::String,
49
50 /// Optional. The name of the Autonomous Database. The database name must be
51 /// unique in the project. The name must begin with a letter and can contain a
52 /// maximum of 30 alphanumeric characters.
53 pub database: std::string::String,
54
55 /// Optional. The display name for the Autonomous Database. The name does not
56 /// have to be unique within your project.
57 pub display_name: std::string::String,
58
59 /// Output only. The ID of the subscription entitlement associated with the
60 /// Autonomous Database.
61 pub entitlement_id: std::string::String,
62
63 /// Optional. The password for the default ADMIN user.
64 pub admin_password: std::string::String,
65
66 /// Optional. The properties of the Autonomous Database.
67 pub properties: std::option::Option<crate::model::AutonomousDatabaseProperties>,
68
69 /// Optional. The labels or tags associated with the Autonomous Database.
70 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
71
72 /// Optional. The name of the VPC network used by the Autonomous Database in
73 /// the following format: projects/{project}/global/networks/{network}
74 pub network: std::string::String,
75
76 /// Optional. The subnet CIDR range for the Autonomous Database.
77 pub cidr: std::string::String,
78
79 /// Optional. The name of the OdbNetwork associated with the Autonomous
80 /// Database. Format:
81 /// projects/{project}/locations/{location}/odbNetworks/{odb_network} It is
82 /// optional but if specified, this should match the parent ODBNetwork of the
83 /// OdbSubnet.
84 pub odb_network: std::string::String,
85
86 /// Optional. The name of the OdbSubnet associated with the Autonomous
87 /// Database. Format:
88 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
89 pub odb_subnet: std::string::String,
90
91 /// Optional. The source Autonomous Database configuration for the standby
92 /// Autonomous Database. The source Autonomous Database is configured while
93 /// creating the Peer Autonomous Database and can't be updated after creation.
94 pub source_config: std::option::Option<crate::model::SourceConfig>,
95
96 /// Output only. The peer Autonomous Database names of the given Autonomous
97 /// Database.
98 pub peer_autonomous_databases: std::vec::Vec<std::string::String>,
99
100 /// Output only. The date and time that the Autonomous Database was created.
101 pub create_time: std::option::Option<wkt::Timestamp>,
102
103 /// Output only. List of supported GCP region to clone the Autonomous Database
104 /// for disaster recovery. Format: `project/{project}/locations/{location}`.
105 pub disaster_recovery_supported_locations: std::vec::Vec<std::string::String>,
106
107 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108}
109
110impl AutonomousDatabase {
111 pub fn new() -> Self {
112 std::default::Default::default()
113 }
114
115 /// Sets the value of [name][crate::model::AutonomousDatabase::name].
116 ///
117 /// # Example
118 /// ```ignore,no_run
119 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
120 /// let x = AutonomousDatabase::new().set_name("example");
121 /// ```
122 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
123 self.name = v.into();
124 self
125 }
126
127 /// Sets the value of [database][crate::model::AutonomousDatabase::database].
128 ///
129 /// # Example
130 /// ```ignore,no_run
131 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
132 /// let x = AutonomousDatabase::new().set_database("example");
133 /// ```
134 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
135 self.database = v.into();
136 self
137 }
138
139 /// Sets the value of [display_name][crate::model::AutonomousDatabase::display_name].
140 ///
141 /// # Example
142 /// ```ignore,no_run
143 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
144 /// let x = AutonomousDatabase::new().set_display_name("example");
145 /// ```
146 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
147 self.display_name = v.into();
148 self
149 }
150
151 /// Sets the value of [entitlement_id][crate::model::AutonomousDatabase::entitlement_id].
152 ///
153 /// # Example
154 /// ```ignore,no_run
155 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
156 /// let x = AutonomousDatabase::new().set_entitlement_id("example");
157 /// ```
158 pub fn set_entitlement_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
159 self.entitlement_id = v.into();
160 self
161 }
162
163 /// Sets the value of [admin_password][crate::model::AutonomousDatabase::admin_password].
164 ///
165 /// # Example
166 /// ```ignore,no_run
167 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
168 /// let x = AutonomousDatabase::new().set_admin_password("example");
169 /// ```
170 pub fn set_admin_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
171 self.admin_password = v.into();
172 self
173 }
174
175 /// Sets the value of [properties][crate::model::AutonomousDatabase::properties].
176 ///
177 /// # Example
178 /// ```ignore,no_run
179 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
180 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
181 /// let x = AutonomousDatabase::new().set_properties(AutonomousDatabaseProperties::default()/* use setters */);
182 /// ```
183 pub fn set_properties<T>(mut self, v: T) -> Self
184 where
185 T: std::convert::Into<crate::model::AutonomousDatabaseProperties>,
186 {
187 self.properties = std::option::Option::Some(v.into());
188 self
189 }
190
191 /// Sets or clears the value of [properties][crate::model::AutonomousDatabase::properties].
192 ///
193 /// # Example
194 /// ```ignore,no_run
195 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
196 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
197 /// let x = AutonomousDatabase::new().set_or_clear_properties(Some(AutonomousDatabaseProperties::default()/* use setters */));
198 /// let x = AutonomousDatabase::new().set_or_clear_properties(None::<AutonomousDatabaseProperties>);
199 /// ```
200 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
201 where
202 T: std::convert::Into<crate::model::AutonomousDatabaseProperties>,
203 {
204 self.properties = v.map(|x| x.into());
205 self
206 }
207
208 /// Sets the value of [labels][crate::model::AutonomousDatabase::labels].
209 ///
210 /// # Example
211 /// ```ignore,no_run
212 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
213 /// let x = AutonomousDatabase::new().set_labels([
214 /// ("key0", "abc"),
215 /// ("key1", "xyz"),
216 /// ]);
217 /// ```
218 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
219 where
220 T: std::iter::IntoIterator<Item = (K, V)>,
221 K: std::convert::Into<std::string::String>,
222 V: std::convert::Into<std::string::String>,
223 {
224 use std::iter::Iterator;
225 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
226 self
227 }
228
229 /// Sets the value of [network][crate::model::AutonomousDatabase::network].
230 ///
231 /// # Example
232 /// ```ignore,no_run
233 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
234 /// let x = AutonomousDatabase::new().set_network("example");
235 /// ```
236 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
237 self.network = v.into();
238 self
239 }
240
241 /// Sets the value of [cidr][crate::model::AutonomousDatabase::cidr].
242 ///
243 /// # Example
244 /// ```ignore,no_run
245 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
246 /// let x = AutonomousDatabase::new().set_cidr("example");
247 /// ```
248 pub fn set_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
249 self.cidr = v.into();
250 self
251 }
252
253 /// Sets the value of [odb_network][crate::model::AutonomousDatabase::odb_network].
254 ///
255 /// # Example
256 /// ```ignore,no_run
257 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
258 /// let x = AutonomousDatabase::new().set_odb_network("example");
259 /// ```
260 pub fn set_odb_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
261 self.odb_network = v.into();
262 self
263 }
264
265 /// Sets the value of [odb_subnet][crate::model::AutonomousDatabase::odb_subnet].
266 ///
267 /// # Example
268 /// ```ignore,no_run
269 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
270 /// let x = AutonomousDatabase::new().set_odb_subnet("example");
271 /// ```
272 pub fn set_odb_subnet<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
273 self.odb_subnet = v.into();
274 self
275 }
276
277 /// Sets the value of [source_config][crate::model::AutonomousDatabase::source_config].
278 ///
279 /// # Example
280 /// ```ignore,no_run
281 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
282 /// use google_cloud_oracledatabase_v1::model::SourceConfig;
283 /// let x = AutonomousDatabase::new().set_source_config(SourceConfig::default()/* use setters */);
284 /// ```
285 pub fn set_source_config<T>(mut self, v: T) -> Self
286 where
287 T: std::convert::Into<crate::model::SourceConfig>,
288 {
289 self.source_config = std::option::Option::Some(v.into());
290 self
291 }
292
293 /// Sets or clears the value of [source_config][crate::model::AutonomousDatabase::source_config].
294 ///
295 /// # Example
296 /// ```ignore,no_run
297 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
298 /// use google_cloud_oracledatabase_v1::model::SourceConfig;
299 /// let x = AutonomousDatabase::new().set_or_clear_source_config(Some(SourceConfig::default()/* use setters */));
300 /// let x = AutonomousDatabase::new().set_or_clear_source_config(None::<SourceConfig>);
301 /// ```
302 pub fn set_or_clear_source_config<T>(mut self, v: std::option::Option<T>) -> Self
303 where
304 T: std::convert::Into<crate::model::SourceConfig>,
305 {
306 self.source_config = v.map(|x| x.into());
307 self
308 }
309
310 /// Sets the value of [peer_autonomous_databases][crate::model::AutonomousDatabase::peer_autonomous_databases].
311 ///
312 /// # Example
313 /// ```ignore,no_run
314 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
315 /// let x = AutonomousDatabase::new().set_peer_autonomous_databases(["a", "b", "c"]);
316 /// ```
317 pub fn set_peer_autonomous_databases<T, V>(mut self, v: T) -> Self
318 where
319 T: std::iter::IntoIterator<Item = V>,
320 V: std::convert::Into<std::string::String>,
321 {
322 use std::iter::Iterator;
323 self.peer_autonomous_databases = v.into_iter().map(|i| i.into()).collect();
324 self
325 }
326
327 /// Sets the value of [create_time][crate::model::AutonomousDatabase::create_time].
328 ///
329 /// # Example
330 /// ```ignore,no_run
331 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
332 /// use wkt::Timestamp;
333 /// let x = AutonomousDatabase::new().set_create_time(Timestamp::default()/* use setters */);
334 /// ```
335 pub fn set_create_time<T>(mut self, v: T) -> Self
336 where
337 T: std::convert::Into<wkt::Timestamp>,
338 {
339 self.create_time = std::option::Option::Some(v.into());
340 self
341 }
342
343 /// Sets or clears the value of [create_time][crate::model::AutonomousDatabase::create_time].
344 ///
345 /// # Example
346 /// ```ignore,no_run
347 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
348 /// use wkt::Timestamp;
349 /// let x = AutonomousDatabase::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
350 /// let x = AutonomousDatabase::new().set_or_clear_create_time(None::<Timestamp>);
351 /// ```
352 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
353 where
354 T: std::convert::Into<wkt::Timestamp>,
355 {
356 self.create_time = v.map(|x| x.into());
357 self
358 }
359
360 /// Sets the value of [disaster_recovery_supported_locations][crate::model::AutonomousDatabase::disaster_recovery_supported_locations].
361 ///
362 /// # Example
363 /// ```ignore,no_run
364 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
365 /// let x = AutonomousDatabase::new().set_disaster_recovery_supported_locations(["a", "b", "c"]);
366 /// ```
367 pub fn set_disaster_recovery_supported_locations<T, V>(mut self, v: T) -> Self
368 where
369 T: std::iter::IntoIterator<Item = V>,
370 V: std::convert::Into<std::string::String>,
371 {
372 use std::iter::Iterator;
373 self.disaster_recovery_supported_locations = v.into_iter().map(|i| i.into()).collect();
374 self
375 }
376}
377
378impl wkt::message::Message for AutonomousDatabase {
379 fn typename() -> &'static str {
380 "type.googleapis.com/google.cloud.oracledatabase.v1.AutonomousDatabase"
381 }
382}
383
384/// The source configuration for the standby Autonomous Database.
385#[derive(Clone, Default, PartialEq)]
386#[non_exhaustive]
387pub struct SourceConfig {
388 /// Optional. The name of the primary Autonomous Database that is used to
389 /// create a Peer Autonomous Database from a source.
390 pub autonomous_database: std::string::String,
391
392 /// Optional. This field specifies if the replication of automatic backups is
393 /// enabled when creating a Data Guard.
394 pub automatic_backups_replication_enabled: bool,
395
396 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
397}
398
399impl SourceConfig {
400 pub fn new() -> Self {
401 std::default::Default::default()
402 }
403
404 /// Sets the value of [autonomous_database][crate::model::SourceConfig::autonomous_database].
405 ///
406 /// # Example
407 /// ```ignore,no_run
408 /// # use google_cloud_oracledatabase_v1::model::SourceConfig;
409 /// let x = SourceConfig::new().set_autonomous_database("example");
410 /// ```
411 pub fn set_autonomous_database<T: std::convert::Into<std::string::String>>(
412 mut self,
413 v: T,
414 ) -> Self {
415 self.autonomous_database = v.into();
416 self
417 }
418
419 /// Sets the value of [automatic_backups_replication_enabled][crate::model::SourceConfig::automatic_backups_replication_enabled].
420 ///
421 /// # Example
422 /// ```ignore,no_run
423 /// # use google_cloud_oracledatabase_v1::model::SourceConfig;
424 /// let x = SourceConfig::new().set_automatic_backups_replication_enabled(true);
425 /// ```
426 pub fn set_automatic_backups_replication_enabled<T: std::convert::Into<bool>>(
427 mut self,
428 v: T,
429 ) -> Self {
430 self.automatic_backups_replication_enabled = v.into();
431 self
432 }
433}
434
435impl wkt::message::Message for SourceConfig {
436 fn typename() -> &'static str {
437 "type.googleapis.com/google.cloud.oracledatabase.v1.SourceConfig"
438 }
439}
440
441/// The properties of an Autonomous Database.
442#[derive(Clone, Default, PartialEq)]
443#[non_exhaustive]
444pub struct AutonomousDatabaseProperties {
445 /// Output only. OCID of the Autonomous Database.
446 /// <https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle>
447 pub ocid: std::string::String,
448
449 /// Optional. The number of compute servers for the Autonomous Database.
450 pub compute_count: f32,
451
452 /// Optional. The number of CPU cores to be made available to the database.
453 pub cpu_core_count: i32,
454
455 /// Optional. The size of the data stored in the database, in terabytes.
456 pub data_storage_size_tb: i32,
457
458 /// Optional. The size of the data stored in the database, in gigabytes.
459 pub data_storage_size_gb: i32,
460
461 /// Required. The workload type of the Autonomous Database.
462 pub db_workload: crate::model::DBWorkload,
463
464 /// Optional. The edition of the Autonomous Databases.
465 pub db_edition: crate::model::autonomous_database_properties::DatabaseEdition,
466
467 /// Optional. The character set for the Autonomous Database. The default is
468 /// AL32UTF8.
469 pub character_set: std::string::String,
470
471 /// Optional. The national character set for the Autonomous Database. The
472 /// default is AL16UTF16.
473 pub n_character_set: std::string::String,
474
475 /// Optional. The private endpoint IP address for the Autonomous Database.
476 pub private_endpoint_ip: std::string::String,
477
478 /// Optional. The private endpoint label for the Autonomous Database.
479 pub private_endpoint_label: std::string::String,
480
481 /// Optional. The Oracle Database version for the Autonomous Database.
482 pub db_version: std::string::String,
483
484 /// Optional. This field indicates if auto scaling is enabled for the
485 /// Autonomous Database CPU core count.
486 pub is_auto_scaling_enabled: bool,
487
488 /// Optional. This field indicates if auto scaling is enabled for the
489 /// Autonomous Database storage.
490 pub is_storage_auto_scaling_enabled: bool,
491
492 /// Required. The license type used for the Autonomous Database.
493 pub license_type: crate::model::autonomous_database_properties::LicenseType,
494
495 /// Optional. The list of customer contacts.
496 pub customer_contacts: std::vec::Vec<crate::model::CustomerContact>,
497
498 /// Optional. The ID of the Oracle Cloud Infrastructure vault secret.
499 pub secret_id: std::string::String,
500
501 /// Optional. The ID of the Oracle Cloud Infrastructure vault.
502 pub vault_id: std::string::String,
503
504 /// Optional. The maintenance schedule of the Autonomous Database.
505 pub maintenance_schedule_type:
506 crate::model::autonomous_database_properties::MaintenanceScheduleType,
507
508 /// Optional. This field specifies if the Autonomous Database requires mTLS
509 /// connections.
510 pub mtls_connection_required: bool,
511
512 /// Optional. The retention period for the Autonomous Database. This field is
513 /// specified in days, can range from 1 day to 60 days, and has a default value
514 /// of 60 days.
515 pub backup_retention_period_days: i32,
516
517 /// Output only. The amount of storage currently being used for user and system
518 /// data, in terabytes.
519 pub actual_used_data_storage_size_tb: f64,
520
521 /// Output only. The amount of storage currently allocated for the database
522 /// tables and billed for, rounded up in terabytes.
523 pub allocated_storage_size_tb: f64,
524
525 /// Output only. The details for the Oracle APEX Application Development.
526 pub apex_details: std::option::Option<crate::model::AutonomousDatabaseApex>,
527
528 /// Output only. This field indicates the status of Data Guard and Access
529 /// control for the Autonomous Database. The field's value is null if Data
530 /// Guard is disabled or Access Control is disabled. The field's value is TRUE
531 /// if both Data Guard and Access Control are enabled, and the Autonomous
532 /// Database is using primary IP access control list (ACL) for standby. The
533 /// field's value is FALSE if both Data Guard and Access Control are enabled,
534 /// and the Autonomous Database is using a different IP access control list
535 /// (ACL) for standby compared to primary.
536 pub are_primary_allowlisted_ips_used: std::option::Option<bool>,
537
538 /// Output only. The details of the current lifestyle state of the Autonomous
539 /// Database.
540 pub lifecycle_details: std::string::String,
541
542 /// Output only. The current lifecycle state of the Autonomous Database.
543 pub state: crate::model::State,
544
545 /// Output only. The Autonomous Container Database OCID.
546 pub autonomous_container_database_id: std::string::String,
547
548 /// Output only. The list of available Oracle Database upgrade versions for an
549 /// Autonomous Database.
550 pub available_upgrade_versions: std::vec::Vec<std::string::String>,
551
552 /// Output only. The connection strings used to connect to an Autonomous
553 /// Database.
554 pub connection_strings: std::option::Option<crate::model::AutonomousDatabaseConnectionStrings>,
555
556 /// Output only. The Oracle Connection URLs for an Autonomous Database.
557 pub connection_urls: std::option::Option<crate::model::AutonomousDatabaseConnectionUrls>,
558
559 /// Output only. This field indicates the number of seconds of data loss during
560 /// a Data Guard failover.
561 pub failed_data_recovery_duration: std::option::Option<wkt::Duration>,
562
563 /// Output only. The memory assigned to in-memory tables in an Autonomous
564 /// Database.
565 pub memory_table_gbs: i32,
566
567 /// Output only. This field indicates whether the Autonomous Database has local
568 /// (in-region) Data Guard enabled.
569 pub is_local_data_guard_enabled: bool,
570
571 /// Output only. This field indicates the maximum data loss limit for an
572 /// Autonomous Database, in seconds.
573 pub local_adg_auto_failover_max_data_loss_limit: i32,
574
575 /// Output only. The details of the Autonomous Data Guard standby database.
576 pub local_standby_db: std::option::Option<crate::model::AutonomousDatabaseStandbySummary>,
577
578 /// Output only. The amount of memory enabled per ECPU, in gigabytes.
579 pub memory_per_oracle_compute_unit_gbs: i32,
580
581 /// Output only. This field indicates the local disaster recovery (DR) type of
582 /// an Autonomous Database.
583 pub local_disaster_recovery_type:
584 crate::model::autonomous_database_properties::LocalDisasterRecoveryType,
585
586 /// Output only. The current state of the Data Safe registration for the
587 /// Autonomous Database.
588 pub data_safe_state: crate::model::autonomous_database_properties::DataSafeState,
589
590 /// Output only. The current state of database management for the Autonomous
591 /// Database.
592 pub database_management_state:
593 crate::model::autonomous_database_properties::DatabaseManagementState,
594
595 /// Output only. This field indicates the current mode of the Autonomous
596 /// Database.
597 pub open_mode: crate::model::autonomous_database_properties::OpenMode,
598
599 /// Output only. This field indicates the state of Operations Insights for the
600 /// Autonomous Database.
601 pub operations_insights_state: crate::model::OperationsInsightsState,
602
603 /// Output only. The list of OCIDs of standby databases located in Autonomous
604 /// Data Guard remote regions that are associated with the source database.
605 pub peer_db_ids: std::vec::Vec<std::string::String>,
606
607 /// Output only. The permission level of the Autonomous Database.
608 pub permission_level: crate::model::autonomous_database_properties::PermissionLevel,
609
610 /// Output only. The private endpoint for the Autonomous Database.
611 pub private_endpoint: std::string::String,
612
613 /// Output only. The refresh mode of the cloned Autonomous Database.
614 pub refreshable_mode: crate::model::autonomous_database_properties::RefreshableMode,
615
616 /// Output only. The refresh State of the clone.
617 pub refreshable_state: crate::model::autonomous_database_properties::RefreshableState,
618
619 /// Output only. The Data Guard role of the Autonomous Database.
620 pub role: crate::model::autonomous_database_properties::Role,
621
622 /// Output only. The list and details of the scheduled operations of the
623 /// Autonomous Database.
624 pub scheduled_operation_details: std::vec::Vec<crate::model::ScheduledOperationDetails>,
625
626 /// Output only. The SQL Web Developer URL for the Autonomous Database.
627 pub sql_web_developer_url: std::string::String,
628
629 /// Output only. The list of available regions that can be used to create a
630 /// clone for the Autonomous Database.
631 pub supported_clone_regions: std::vec::Vec<std::string::String>,
632
633 /// Output only. The storage space used by Autonomous Database, in gigabytes.
634 pub used_data_storage_size_tbs: i32,
635
636 /// Output only. The Oracle Cloud Infrastructure link for the Autonomous
637 /// Database.
638 pub oci_url: std::string::String,
639
640 /// Output only. The storage space used by automatic backups of Autonomous
641 /// Database, in gigabytes.
642 pub total_auto_backup_storage_size_gbs: f32,
643
644 /// Output only. The long term backup schedule of the Autonomous Database.
645 pub next_long_term_backup_time: std::option::Option<wkt::Timestamp>,
646
647 /// Output only. The date and time the Autonomous Data Guard role was changed
648 /// for the standby Autonomous Database.
649 pub data_guard_role_changed_time: std::option::Option<wkt::Timestamp>,
650
651 /// Output only. The date and time the Disaster Recovery role was changed for
652 /// the standby Autonomous Database.
653 pub disaster_recovery_role_changed_time: std::option::Option<wkt::Timestamp>,
654
655 /// Output only. The date and time when maintenance will begin.
656 pub maintenance_begin_time: std::option::Option<wkt::Timestamp>,
657
658 /// Output only. The date and time when maintenance will end.
659 pub maintenance_end_time: std::option::Option<wkt::Timestamp>,
660
661 /// Optional. The list of allowlisted IP addresses for the Autonomous Database.
662 pub allowlisted_ips: std::vec::Vec<std::string::String>,
663
664 /// Optional. The encryption key used to encrypt the Autonomous Database.
665 /// Updating this field will add a new entry in the
666 /// `encryption_key_history_entries` field with the former version.
667 pub encryption_key: std::option::Option<crate::model::EncryptionKey>,
668
669 /// Output only. The history of the encryption keys used to encrypt the
670 /// Autonomous Database.
671 pub encryption_key_history_entries: std::vec::Vec<crate::model::EncryptionKeyHistoryEntry>,
672
673 /// Output only. An Oracle-managed Google Cloud service account on which
674 /// customers can grant roles to access resources in the customer project.
675 pub service_agent_email: std::string::String,
676
677 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
678}
679
680impl AutonomousDatabaseProperties {
681 pub fn new() -> Self {
682 std::default::Default::default()
683 }
684
685 /// Sets the value of [ocid][crate::model::AutonomousDatabaseProperties::ocid].
686 ///
687 /// # Example
688 /// ```ignore,no_run
689 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
690 /// let x = AutonomousDatabaseProperties::new().set_ocid("example");
691 /// ```
692 pub fn set_ocid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
693 self.ocid = v.into();
694 self
695 }
696
697 /// Sets the value of [compute_count][crate::model::AutonomousDatabaseProperties::compute_count].
698 ///
699 /// # Example
700 /// ```ignore,no_run
701 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
702 /// let x = AutonomousDatabaseProperties::new().set_compute_count(42.0);
703 /// ```
704 pub fn set_compute_count<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
705 self.compute_count = v.into();
706 self
707 }
708
709 /// Sets the value of [cpu_core_count][crate::model::AutonomousDatabaseProperties::cpu_core_count].
710 ///
711 /// # Example
712 /// ```ignore,no_run
713 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
714 /// let x = AutonomousDatabaseProperties::new().set_cpu_core_count(42);
715 /// ```
716 pub fn set_cpu_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
717 self.cpu_core_count = v.into();
718 self
719 }
720
721 /// Sets the value of [data_storage_size_tb][crate::model::AutonomousDatabaseProperties::data_storage_size_tb].
722 ///
723 /// # Example
724 /// ```ignore,no_run
725 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
726 /// let x = AutonomousDatabaseProperties::new().set_data_storage_size_tb(42);
727 /// ```
728 pub fn set_data_storage_size_tb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
729 self.data_storage_size_tb = v.into();
730 self
731 }
732
733 /// Sets the value of [data_storage_size_gb][crate::model::AutonomousDatabaseProperties::data_storage_size_gb].
734 ///
735 /// # Example
736 /// ```ignore,no_run
737 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
738 /// let x = AutonomousDatabaseProperties::new().set_data_storage_size_gb(42);
739 /// ```
740 pub fn set_data_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
741 self.data_storage_size_gb = v.into();
742 self
743 }
744
745 /// Sets the value of [db_workload][crate::model::AutonomousDatabaseProperties::db_workload].
746 ///
747 /// # Example
748 /// ```ignore,no_run
749 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
750 /// use google_cloud_oracledatabase_v1::model::DBWorkload;
751 /// let x0 = AutonomousDatabaseProperties::new().set_db_workload(DBWorkload::Oltp);
752 /// let x1 = AutonomousDatabaseProperties::new().set_db_workload(DBWorkload::Dw);
753 /// let x2 = AutonomousDatabaseProperties::new().set_db_workload(DBWorkload::Ajd);
754 /// ```
755 pub fn set_db_workload<T: std::convert::Into<crate::model::DBWorkload>>(
756 mut self,
757 v: T,
758 ) -> Self {
759 self.db_workload = v.into();
760 self
761 }
762
763 /// Sets the value of [db_edition][crate::model::AutonomousDatabaseProperties::db_edition].
764 ///
765 /// # Example
766 /// ```ignore,no_run
767 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
768 /// use google_cloud_oracledatabase_v1::model::autonomous_database_properties::DatabaseEdition;
769 /// let x0 = AutonomousDatabaseProperties::new().set_db_edition(DatabaseEdition::StandardEdition);
770 /// let x1 = AutonomousDatabaseProperties::new().set_db_edition(DatabaseEdition::EnterpriseEdition);
771 /// ```
772 pub fn set_db_edition<
773 T: std::convert::Into<crate::model::autonomous_database_properties::DatabaseEdition>,
774 >(
775 mut self,
776 v: T,
777 ) -> Self {
778 self.db_edition = v.into();
779 self
780 }
781
782 /// Sets the value of [character_set][crate::model::AutonomousDatabaseProperties::character_set].
783 ///
784 /// # Example
785 /// ```ignore,no_run
786 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
787 /// let x = AutonomousDatabaseProperties::new().set_character_set("example");
788 /// ```
789 pub fn set_character_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
790 self.character_set = v.into();
791 self
792 }
793
794 /// Sets the value of [n_character_set][crate::model::AutonomousDatabaseProperties::n_character_set].
795 ///
796 /// # Example
797 /// ```ignore,no_run
798 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
799 /// let x = AutonomousDatabaseProperties::new().set_n_character_set("example");
800 /// ```
801 pub fn set_n_character_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
802 self.n_character_set = v.into();
803 self
804 }
805
806 /// Sets the value of [private_endpoint_ip][crate::model::AutonomousDatabaseProperties::private_endpoint_ip].
807 ///
808 /// # Example
809 /// ```ignore,no_run
810 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
811 /// let x = AutonomousDatabaseProperties::new().set_private_endpoint_ip("example");
812 /// ```
813 pub fn set_private_endpoint_ip<T: std::convert::Into<std::string::String>>(
814 mut self,
815 v: T,
816 ) -> Self {
817 self.private_endpoint_ip = v.into();
818 self
819 }
820
821 /// Sets the value of [private_endpoint_label][crate::model::AutonomousDatabaseProperties::private_endpoint_label].
822 ///
823 /// # Example
824 /// ```ignore,no_run
825 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
826 /// let x = AutonomousDatabaseProperties::new().set_private_endpoint_label("example");
827 /// ```
828 pub fn set_private_endpoint_label<T: std::convert::Into<std::string::String>>(
829 mut self,
830 v: T,
831 ) -> Self {
832 self.private_endpoint_label = v.into();
833 self
834 }
835
836 /// Sets the value of [db_version][crate::model::AutonomousDatabaseProperties::db_version].
837 ///
838 /// # Example
839 /// ```ignore,no_run
840 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
841 /// let x = AutonomousDatabaseProperties::new().set_db_version("example");
842 /// ```
843 pub fn set_db_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
844 self.db_version = v.into();
845 self
846 }
847
848 /// Sets the value of [is_auto_scaling_enabled][crate::model::AutonomousDatabaseProperties::is_auto_scaling_enabled].
849 ///
850 /// # Example
851 /// ```ignore,no_run
852 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
853 /// let x = AutonomousDatabaseProperties::new().set_is_auto_scaling_enabled(true);
854 /// ```
855 pub fn set_is_auto_scaling_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
856 self.is_auto_scaling_enabled = v.into();
857 self
858 }
859
860 /// Sets the value of [is_storage_auto_scaling_enabled][crate::model::AutonomousDatabaseProperties::is_storage_auto_scaling_enabled].
861 ///
862 /// # Example
863 /// ```ignore,no_run
864 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
865 /// let x = AutonomousDatabaseProperties::new().set_is_storage_auto_scaling_enabled(true);
866 /// ```
867 pub fn set_is_storage_auto_scaling_enabled<T: std::convert::Into<bool>>(
868 mut self,
869 v: T,
870 ) -> Self {
871 self.is_storage_auto_scaling_enabled = v.into();
872 self
873 }
874
875 /// Sets the value of [license_type][crate::model::AutonomousDatabaseProperties::license_type].
876 ///
877 /// # Example
878 /// ```ignore,no_run
879 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
880 /// use google_cloud_oracledatabase_v1::model::autonomous_database_properties::LicenseType;
881 /// let x0 = AutonomousDatabaseProperties::new().set_license_type(LicenseType::LicenseIncluded);
882 /// let x1 = AutonomousDatabaseProperties::new().set_license_type(LicenseType::BringYourOwnLicense);
883 /// ```
884 pub fn set_license_type<
885 T: std::convert::Into<crate::model::autonomous_database_properties::LicenseType>,
886 >(
887 mut self,
888 v: T,
889 ) -> Self {
890 self.license_type = v.into();
891 self
892 }
893
894 /// Sets the value of [customer_contacts][crate::model::AutonomousDatabaseProperties::customer_contacts].
895 ///
896 /// # Example
897 /// ```ignore,no_run
898 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
899 /// use google_cloud_oracledatabase_v1::model::CustomerContact;
900 /// let x = AutonomousDatabaseProperties::new()
901 /// .set_customer_contacts([
902 /// CustomerContact::default()/* use setters */,
903 /// CustomerContact::default()/* use (different) setters */,
904 /// ]);
905 /// ```
906 pub fn set_customer_contacts<T, V>(mut self, v: T) -> Self
907 where
908 T: std::iter::IntoIterator<Item = V>,
909 V: std::convert::Into<crate::model::CustomerContact>,
910 {
911 use std::iter::Iterator;
912 self.customer_contacts = v.into_iter().map(|i| i.into()).collect();
913 self
914 }
915
916 /// Sets the value of [secret_id][crate::model::AutonomousDatabaseProperties::secret_id].
917 ///
918 /// # Example
919 /// ```ignore,no_run
920 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
921 /// let x = AutonomousDatabaseProperties::new().set_secret_id("example");
922 /// ```
923 pub fn set_secret_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
924 self.secret_id = v.into();
925 self
926 }
927
928 /// Sets the value of [vault_id][crate::model::AutonomousDatabaseProperties::vault_id].
929 ///
930 /// # Example
931 /// ```ignore,no_run
932 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
933 /// let x = AutonomousDatabaseProperties::new().set_vault_id("example");
934 /// ```
935 pub fn set_vault_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
936 self.vault_id = v.into();
937 self
938 }
939
940 /// Sets the value of [maintenance_schedule_type][crate::model::AutonomousDatabaseProperties::maintenance_schedule_type].
941 ///
942 /// # Example
943 /// ```ignore,no_run
944 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
945 /// use google_cloud_oracledatabase_v1::model::autonomous_database_properties::MaintenanceScheduleType;
946 /// let x0 = AutonomousDatabaseProperties::new().set_maintenance_schedule_type(MaintenanceScheduleType::Early);
947 /// let x1 = AutonomousDatabaseProperties::new().set_maintenance_schedule_type(MaintenanceScheduleType::Regular);
948 /// ```
949 pub fn set_maintenance_schedule_type<
950 T: std::convert::Into<crate::model::autonomous_database_properties::MaintenanceScheduleType>,
951 >(
952 mut self,
953 v: T,
954 ) -> Self {
955 self.maintenance_schedule_type = v.into();
956 self
957 }
958
959 /// Sets the value of [mtls_connection_required][crate::model::AutonomousDatabaseProperties::mtls_connection_required].
960 ///
961 /// # Example
962 /// ```ignore,no_run
963 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
964 /// let x = AutonomousDatabaseProperties::new().set_mtls_connection_required(true);
965 /// ```
966 pub fn set_mtls_connection_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
967 self.mtls_connection_required = v.into();
968 self
969 }
970
971 /// Sets the value of [backup_retention_period_days][crate::model::AutonomousDatabaseProperties::backup_retention_period_days].
972 ///
973 /// # Example
974 /// ```ignore,no_run
975 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
976 /// let x = AutonomousDatabaseProperties::new().set_backup_retention_period_days(42);
977 /// ```
978 pub fn set_backup_retention_period_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
979 self.backup_retention_period_days = v.into();
980 self
981 }
982
983 /// Sets the value of [actual_used_data_storage_size_tb][crate::model::AutonomousDatabaseProperties::actual_used_data_storage_size_tb].
984 ///
985 /// # Example
986 /// ```ignore,no_run
987 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
988 /// let x = AutonomousDatabaseProperties::new().set_actual_used_data_storage_size_tb(42.0);
989 /// ```
990 pub fn set_actual_used_data_storage_size_tb<T: std::convert::Into<f64>>(
991 mut self,
992 v: T,
993 ) -> Self {
994 self.actual_used_data_storage_size_tb = v.into();
995 self
996 }
997
998 /// Sets the value of [allocated_storage_size_tb][crate::model::AutonomousDatabaseProperties::allocated_storage_size_tb].
999 ///
1000 /// # Example
1001 /// ```ignore,no_run
1002 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1003 /// let x = AutonomousDatabaseProperties::new().set_allocated_storage_size_tb(42.0);
1004 /// ```
1005 pub fn set_allocated_storage_size_tb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
1006 self.allocated_storage_size_tb = v.into();
1007 self
1008 }
1009
1010 /// Sets the value of [apex_details][crate::model::AutonomousDatabaseProperties::apex_details].
1011 ///
1012 /// # Example
1013 /// ```ignore,no_run
1014 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1015 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseApex;
1016 /// let x = AutonomousDatabaseProperties::new().set_apex_details(AutonomousDatabaseApex::default()/* use setters */);
1017 /// ```
1018 pub fn set_apex_details<T>(mut self, v: T) -> Self
1019 where
1020 T: std::convert::Into<crate::model::AutonomousDatabaseApex>,
1021 {
1022 self.apex_details = std::option::Option::Some(v.into());
1023 self
1024 }
1025
1026 /// Sets or clears the value of [apex_details][crate::model::AutonomousDatabaseProperties::apex_details].
1027 ///
1028 /// # Example
1029 /// ```ignore,no_run
1030 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1031 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseApex;
1032 /// let x = AutonomousDatabaseProperties::new().set_or_clear_apex_details(Some(AutonomousDatabaseApex::default()/* use setters */));
1033 /// let x = AutonomousDatabaseProperties::new().set_or_clear_apex_details(None::<AutonomousDatabaseApex>);
1034 /// ```
1035 pub fn set_or_clear_apex_details<T>(mut self, v: std::option::Option<T>) -> Self
1036 where
1037 T: std::convert::Into<crate::model::AutonomousDatabaseApex>,
1038 {
1039 self.apex_details = v.map(|x| x.into());
1040 self
1041 }
1042
1043 /// Sets the value of [are_primary_allowlisted_ips_used][crate::model::AutonomousDatabaseProperties::are_primary_allowlisted_ips_used].
1044 ///
1045 /// # Example
1046 /// ```ignore,no_run
1047 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1048 /// let x = AutonomousDatabaseProperties::new().set_are_primary_allowlisted_ips_used(true);
1049 /// ```
1050 pub fn set_are_primary_allowlisted_ips_used<T>(mut self, v: T) -> Self
1051 where
1052 T: std::convert::Into<bool>,
1053 {
1054 self.are_primary_allowlisted_ips_used = std::option::Option::Some(v.into());
1055 self
1056 }
1057
1058 /// Sets or clears the value of [are_primary_allowlisted_ips_used][crate::model::AutonomousDatabaseProperties::are_primary_allowlisted_ips_used].
1059 ///
1060 /// # Example
1061 /// ```ignore,no_run
1062 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1063 /// let x = AutonomousDatabaseProperties::new().set_or_clear_are_primary_allowlisted_ips_used(Some(false));
1064 /// let x = AutonomousDatabaseProperties::new().set_or_clear_are_primary_allowlisted_ips_used(None::<bool>);
1065 /// ```
1066 pub fn set_or_clear_are_primary_allowlisted_ips_used<T>(
1067 mut self,
1068 v: std::option::Option<T>,
1069 ) -> Self
1070 where
1071 T: std::convert::Into<bool>,
1072 {
1073 self.are_primary_allowlisted_ips_used = v.map(|x| x.into());
1074 self
1075 }
1076
1077 /// Sets the value of [lifecycle_details][crate::model::AutonomousDatabaseProperties::lifecycle_details].
1078 ///
1079 /// # Example
1080 /// ```ignore,no_run
1081 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1082 /// let x = AutonomousDatabaseProperties::new().set_lifecycle_details("example");
1083 /// ```
1084 pub fn set_lifecycle_details<T: std::convert::Into<std::string::String>>(
1085 mut self,
1086 v: T,
1087 ) -> Self {
1088 self.lifecycle_details = v.into();
1089 self
1090 }
1091
1092 /// Sets the value of [state][crate::model::AutonomousDatabaseProperties::state].
1093 ///
1094 /// # Example
1095 /// ```ignore,no_run
1096 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1097 /// use google_cloud_oracledatabase_v1::model::State;
1098 /// let x0 = AutonomousDatabaseProperties::new().set_state(State::Provisioning);
1099 /// let x1 = AutonomousDatabaseProperties::new().set_state(State::Available);
1100 /// let x2 = AutonomousDatabaseProperties::new().set_state(State::Stopping);
1101 /// ```
1102 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
1103 self.state = v.into();
1104 self
1105 }
1106
1107 /// Sets the value of [autonomous_container_database_id][crate::model::AutonomousDatabaseProperties::autonomous_container_database_id].
1108 ///
1109 /// # Example
1110 /// ```ignore,no_run
1111 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1112 /// let x = AutonomousDatabaseProperties::new().set_autonomous_container_database_id("example");
1113 /// ```
1114 pub fn set_autonomous_container_database_id<T: std::convert::Into<std::string::String>>(
1115 mut self,
1116 v: T,
1117 ) -> Self {
1118 self.autonomous_container_database_id = v.into();
1119 self
1120 }
1121
1122 /// Sets the value of [available_upgrade_versions][crate::model::AutonomousDatabaseProperties::available_upgrade_versions].
1123 ///
1124 /// # Example
1125 /// ```ignore,no_run
1126 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1127 /// let x = AutonomousDatabaseProperties::new().set_available_upgrade_versions(["a", "b", "c"]);
1128 /// ```
1129 pub fn set_available_upgrade_versions<T, V>(mut self, v: T) -> Self
1130 where
1131 T: std::iter::IntoIterator<Item = V>,
1132 V: std::convert::Into<std::string::String>,
1133 {
1134 use std::iter::Iterator;
1135 self.available_upgrade_versions = v.into_iter().map(|i| i.into()).collect();
1136 self
1137 }
1138
1139 /// Sets the value of [connection_strings][crate::model::AutonomousDatabaseProperties::connection_strings].
1140 ///
1141 /// # Example
1142 /// ```ignore,no_run
1143 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1144 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionStrings;
1145 /// let x = AutonomousDatabaseProperties::new().set_connection_strings(AutonomousDatabaseConnectionStrings::default()/* use setters */);
1146 /// ```
1147 pub fn set_connection_strings<T>(mut self, v: T) -> Self
1148 where
1149 T: std::convert::Into<crate::model::AutonomousDatabaseConnectionStrings>,
1150 {
1151 self.connection_strings = std::option::Option::Some(v.into());
1152 self
1153 }
1154
1155 /// Sets or clears the value of [connection_strings][crate::model::AutonomousDatabaseProperties::connection_strings].
1156 ///
1157 /// # Example
1158 /// ```ignore,no_run
1159 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1160 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionStrings;
1161 /// let x = AutonomousDatabaseProperties::new().set_or_clear_connection_strings(Some(AutonomousDatabaseConnectionStrings::default()/* use setters */));
1162 /// let x = AutonomousDatabaseProperties::new().set_or_clear_connection_strings(None::<AutonomousDatabaseConnectionStrings>);
1163 /// ```
1164 pub fn set_or_clear_connection_strings<T>(mut self, v: std::option::Option<T>) -> Self
1165 where
1166 T: std::convert::Into<crate::model::AutonomousDatabaseConnectionStrings>,
1167 {
1168 self.connection_strings = v.map(|x| x.into());
1169 self
1170 }
1171
1172 /// Sets the value of [connection_urls][crate::model::AutonomousDatabaseProperties::connection_urls].
1173 ///
1174 /// # Example
1175 /// ```ignore,no_run
1176 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1177 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionUrls;
1178 /// let x = AutonomousDatabaseProperties::new().set_connection_urls(AutonomousDatabaseConnectionUrls::default()/* use setters */);
1179 /// ```
1180 pub fn set_connection_urls<T>(mut self, v: T) -> Self
1181 where
1182 T: std::convert::Into<crate::model::AutonomousDatabaseConnectionUrls>,
1183 {
1184 self.connection_urls = std::option::Option::Some(v.into());
1185 self
1186 }
1187
1188 /// Sets or clears the value of [connection_urls][crate::model::AutonomousDatabaseProperties::connection_urls].
1189 ///
1190 /// # Example
1191 /// ```ignore,no_run
1192 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1193 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionUrls;
1194 /// let x = AutonomousDatabaseProperties::new().set_or_clear_connection_urls(Some(AutonomousDatabaseConnectionUrls::default()/* use setters */));
1195 /// let x = AutonomousDatabaseProperties::new().set_or_clear_connection_urls(None::<AutonomousDatabaseConnectionUrls>);
1196 /// ```
1197 pub fn set_or_clear_connection_urls<T>(mut self, v: std::option::Option<T>) -> Self
1198 where
1199 T: std::convert::Into<crate::model::AutonomousDatabaseConnectionUrls>,
1200 {
1201 self.connection_urls = v.map(|x| x.into());
1202 self
1203 }
1204
1205 /// Sets the value of [failed_data_recovery_duration][crate::model::AutonomousDatabaseProperties::failed_data_recovery_duration].
1206 ///
1207 /// # Example
1208 /// ```ignore,no_run
1209 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1210 /// use wkt::Duration;
1211 /// let x = AutonomousDatabaseProperties::new().set_failed_data_recovery_duration(Duration::default()/* use setters */);
1212 /// ```
1213 pub fn set_failed_data_recovery_duration<T>(mut self, v: T) -> Self
1214 where
1215 T: std::convert::Into<wkt::Duration>,
1216 {
1217 self.failed_data_recovery_duration = std::option::Option::Some(v.into());
1218 self
1219 }
1220
1221 /// Sets or clears the value of [failed_data_recovery_duration][crate::model::AutonomousDatabaseProperties::failed_data_recovery_duration].
1222 ///
1223 /// # Example
1224 /// ```ignore,no_run
1225 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1226 /// use wkt::Duration;
1227 /// let x = AutonomousDatabaseProperties::new().set_or_clear_failed_data_recovery_duration(Some(Duration::default()/* use setters */));
1228 /// let x = AutonomousDatabaseProperties::new().set_or_clear_failed_data_recovery_duration(None::<Duration>);
1229 /// ```
1230 pub fn set_or_clear_failed_data_recovery_duration<T>(
1231 mut self,
1232 v: std::option::Option<T>,
1233 ) -> Self
1234 where
1235 T: std::convert::Into<wkt::Duration>,
1236 {
1237 self.failed_data_recovery_duration = v.map(|x| x.into());
1238 self
1239 }
1240
1241 /// Sets the value of [memory_table_gbs][crate::model::AutonomousDatabaseProperties::memory_table_gbs].
1242 ///
1243 /// # Example
1244 /// ```ignore,no_run
1245 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1246 /// let x = AutonomousDatabaseProperties::new().set_memory_table_gbs(42);
1247 /// ```
1248 pub fn set_memory_table_gbs<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1249 self.memory_table_gbs = v.into();
1250 self
1251 }
1252
1253 /// Sets the value of [is_local_data_guard_enabled][crate::model::AutonomousDatabaseProperties::is_local_data_guard_enabled].
1254 ///
1255 /// # Example
1256 /// ```ignore,no_run
1257 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1258 /// let x = AutonomousDatabaseProperties::new().set_is_local_data_guard_enabled(true);
1259 /// ```
1260 pub fn set_is_local_data_guard_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1261 self.is_local_data_guard_enabled = v.into();
1262 self
1263 }
1264
1265 /// Sets the value of [local_adg_auto_failover_max_data_loss_limit][crate::model::AutonomousDatabaseProperties::local_adg_auto_failover_max_data_loss_limit].
1266 ///
1267 /// # Example
1268 /// ```ignore,no_run
1269 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1270 /// let x = AutonomousDatabaseProperties::new().set_local_adg_auto_failover_max_data_loss_limit(42);
1271 /// ```
1272 pub fn set_local_adg_auto_failover_max_data_loss_limit<T: std::convert::Into<i32>>(
1273 mut self,
1274 v: T,
1275 ) -> Self {
1276 self.local_adg_auto_failover_max_data_loss_limit = v.into();
1277 self
1278 }
1279
1280 /// Sets the value of [local_standby_db][crate::model::AutonomousDatabaseProperties::local_standby_db].
1281 ///
1282 /// # Example
1283 /// ```ignore,no_run
1284 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1285 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseStandbySummary;
1286 /// let x = AutonomousDatabaseProperties::new().set_local_standby_db(AutonomousDatabaseStandbySummary::default()/* use setters */);
1287 /// ```
1288 pub fn set_local_standby_db<T>(mut self, v: T) -> Self
1289 where
1290 T: std::convert::Into<crate::model::AutonomousDatabaseStandbySummary>,
1291 {
1292 self.local_standby_db = std::option::Option::Some(v.into());
1293 self
1294 }
1295
1296 /// Sets or clears the value of [local_standby_db][crate::model::AutonomousDatabaseProperties::local_standby_db].
1297 ///
1298 /// # Example
1299 /// ```ignore,no_run
1300 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1301 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseStandbySummary;
1302 /// let x = AutonomousDatabaseProperties::new().set_or_clear_local_standby_db(Some(AutonomousDatabaseStandbySummary::default()/* use setters */));
1303 /// let x = AutonomousDatabaseProperties::new().set_or_clear_local_standby_db(None::<AutonomousDatabaseStandbySummary>);
1304 /// ```
1305 pub fn set_or_clear_local_standby_db<T>(mut self, v: std::option::Option<T>) -> Self
1306 where
1307 T: std::convert::Into<crate::model::AutonomousDatabaseStandbySummary>,
1308 {
1309 self.local_standby_db = v.map(|x| x.into());
1310 self
1311 }
1312
1313 /// Sets the value of [memory_per_oracle_compute_unit_gbs][crate::model::AutonomousDatabaseProperties::memory_per_oracle_compute_unit_gbs].
1314 ///
1315 /// # Example
1316 /// ```ignore,no_run
1317 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1318 /// let x = AutonomousDatabaseProperties::new().set_memory_per_oracle_compute_unit_gbs(42);
1319 /// ```
1320 pub fn set_memory_per_oracle_compute_unit_gbs<T: std::convert::Into<i32>>(
1321 mut self,
1322 v: T,
1323 ) -> Self {
1324 self.memory_per_oracle_compute_unit_gbs = v.into();
1325 self
1326 }
1327
1328 /// Sets the value of [local_disaster_recovery_type][crate::model::AutonomousDatabaseProperties::local_disaster_recovery_type].
1329 ///
1330 /// # Example
1331 /// ```ignore,no_run
1332 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1333 /// use google_cloud_oracledatabase_v1::model::autonomous_database_properties::LocalDisasterRecoveryType;
1334 /// let x0 = AutonomousDatabaseProperties::new().set_local_disaster_recovery_type(LocalDisasterRecoveryType::Adg);
1335 /// let x1 = AutonomousDatabaseProperties::new().set_local_disaster_recovery_type(LocalDisasterRecoveryType::BackupBased);
1336 /// ```
1337 pub fn set_local_disaster_recovery_type<
1338 T: std::convert::Into<crate::model::autonomous_database_properties::LocalDisasterRecoveryType>,
1339 >(
1340 mut self,
1341 v: T,
1342 ) -> Self {
1343 self.local_disaster_recovery_type = v.into();
1344 self
1345 }
1346
1347 /// Sets the value of [data_safe_state][crate::model::AutonomousDatabaseProperties::data_safe_state].
1348 ///
1349 /// # Example
1350 /// ```ignore,no_run
1351 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1352 /// use google_cloud_oracledatabase_v1::model::autonomous_database_properties::DataSafeState;
1353 /// let x0 = AutonomousDatabaseProperties::new().set_data_safe_state(DataSafeState::Registering);
1354 /// let x1 = AutonomousDatabaseProperties::new().set_data_safe_state(DataSafeState::Registered);
1355 /// let x2 = AutonomousDatabaseProperties::new().set_data_safe_state(DataSafeState::Deregistering);
1356 /// ```
1357 pub fn set_data_safe_state<
1358 T: std::convert::Into<crate::model::autonomous_database_properties::DataSafeState>,
1359 >(
1360 mut self,
1361 v: T,
1362 ) -> Self {
1363 self.data_safe_state = v.into();
1364 self
1365 }
1366
1367 /// Sets the value of [database_management_state][crate::model::AutonomousDatabaseProperties::database_management_state].
1368 ///
1369 /// # Example
1370 /// ```ignore,no_run
1371 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1372 /// use google_cloud_oracledatabase_v1::model::autonomous_database_properties::DatabaseManagementState;
1373 /// let x0 = AutonomousDatabaseProperties::new().set_database_management_state(DatabaseManagementState::Enabling);
1374 /// let x1 = AutonomousDatabaseProperties::new().set_database_management_state(DatabaseManagementState::Enabled);
1375 /// let x2 = AutonomousDatabaseProperties::new().set_database_management_state(DatabaseManagementState::Disabling);
1376 /// ```
1377 pub fn set_database_management_state<
1378 T: std::convert::Into<crate::model::autonomous_database_properties::DatabaseManagementState>,
1379 >(
1380 mut self,
1381 v: T,
1382 ) -> Self {
1383 self.database_management_state = v.into();
1384 self
1385 }
1386
1387 /// Sets the value of [open_mode][crate::model::AutonomousDatabaseProperties::open_mode].
1388 ///
1389 /// # Example
1390 /// ```ignore,no_run
1391 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1392 /// use google_cloud_oracledatabase_v1::model::autonomous_database_properties::OpenMode;
1393 /// let x0 = AutonomousDatabaseProperties::new().set_open_mode(OpenMode::ReadOnly);
1394 /// let x1 = AutonomousDatabaseProperties::new().set_open_mode(OpenMode::ReadWrite);
1395 /// ```
1396 pub fn set_open_mode<
1397 T: std::convert::Into<crate::model::autonomous_database_properties::OpenMode>,
1398 >(
1399 mut self,
1400 v: T,
1401 ) -> Self {
1402 self.open_mode = v.into();
1403 self
1404 }
1405
1406 /// Sets the value of [operations_insights_state][crate::model::AutonomousDatabaseProperties::operations_insights_state].
1407 ///
1408 /// # Example
1409 /// ```ignore,no_run
1410 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1411 /// use google_cloud_oracledatabase_v1::model::OperationsInsightsState;
1412 /// let x0 = AutonomousDatabaseProperties::new().set_operations_insights_state(OperationsInsightsState::Enabling);
1413 /// let x1 = AutonomousDatabaseProperties::new().set_operations_insights_state(OperationsInsightsState::Enabled);
1414 /// let x2 = AutonomousDatabaseProperties::new().set_operations_insights_state(OperationsInsightsState::Disabling);
1415 /// ```
1416 pub fn set_operations_insights_state<
1417 T: std::convert::Into<crate::model::OperationsInsightsState>,
1418 >(
1419 mut self,
1420 v: T,
1421 ) -> Self {
1422 self.operations_insights_state = v.into();
1423 self
1424 }
1425
1426 /// Sets the value of [peer_db_ids][crate::model::AutonomousDatabaseProperties::peer_db_ids].
1427 ///
1428 /// # Example
1429 /// ```ignore,no_run
1430 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1431 /// let x = AutonomousDatabaseProperties::new().set_peer_db_ids(["a", "b", "c"]);
1432 /// ```
1433 pub fn set_peer_db_ids<T, V>(mut self, v: T) -> Self
1434 where
1435 T: std::iter::IntoIterator<Item = V>,
1436 V: std::convert::Into<std::string::String>,
1437 {
1438 use std::iter::Iterator;
1439 self.peer_db_ids = v.into_iter().map(|i| i.into()).collect();
1440 self
1441 }
1442
1443 /// Sets the value of [permission_level][crate::model::AutonomousDatabaseProperties::permission_level].
1444 ///
1445 /// # Example
1446 /// ```ignore,no_run
1447 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1448 /// use google_cloud_oracledatabase_v1::model::autonomous_database_properties::PermissionLevel;
1449 /// let x0 = AutonomousDatabaseProperties::new().set_permission_level(PermissionLevel::Restricted);
1450 /// let x1 = AutonomousDatabaseProperties::new().set_permission_level(PermissionLevel::Unrestricted);
1451 /// ```
1452 pub fn set_permission_level<
1453 T: std::convert::Into<crate::model::autonomous_database_properties::PermissionLevel>,
1454 >(
1455 mut self,
1456 v: T,
1457 ) -> Self {
1458 self.permission_level = v.into();
1459 self
1460 }
1461
1462 /// Sets the value of [private_endpoint][crate::model::AutonomousDatabaseProperties::private_endpoint].
1463 ///
1464 /// # Example
1465 /// ```ignore,no_run
1466 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1467 /// let x = AutonomousDatabaseProperties::new().set_private_endpoint("example");
1468 /// ```
1469 pub fn set_private_endpoint<T: std::convert::Into<std::string::String>>(
1470 mut self,
1471 v: T,
1472 ) -> Self {
1473 self.private_endpoint = v.into();
1474 self
1475 }
1476
1477 /// Sets the value of [refreshable_mode][crate::model::AutonomousDatabaseProperties::refreshable_mode].
1478 ///
1479 /// # Example
1480 /// ```ignore,no_run
1481 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1482 /// use google_cloud_oracledatabase_v1::model::autonomous_database_properties::RefreshableMode;
1483 /// let x0 = AutonomousDatabaseProperties::new().set_refreshable_mode(RefreshableMode::Automatic);
1484 /// let x1 = AutonomousDatabaseProperties::new().set_refreshable_mode(RefreshableMode::Manual);
1485 /// ```
1486 pub fn set_refreshable_mode<
1487 T: std::convert::Into<crate::model::autonomous_database_properties::RefreshableMode>,
1488 >(
1489 mut self,
1490 v: T,
1491 ) -> Self {
1492 self.refreshable_mode = v.into();
1493 self
1494 }
1495
1496 /// Sets the value of [refreshable_state][crate::model::AutonomousDatabaseProperties::refreshable_state].
1497 ///
1498 /// # Example
1499 /// ```ignore,no_run
1500 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1501 /// use google_cloud_oracledatabase_v1::model::autonomous_database_properties::RefreshableState;
1502 /// let x0 = AutonomousDatabaseProperties::new().set_refreshable_state(RefreshableState::Refreshing);
1503 /// let x1 = AutonomousDatabaseProperties::new().set_refreshable_state(RefreshableState::NotRefreshing);
1504 /// ```
1505 pub fn set_refreshable_state<
1506 T: std::convert::Into<crate::model::autonomous_database_properties::RefreshableState>,
1507 >(
1508 mut self,
1509 v: T,
1510 ) -> Self {
1511 self.refreshable_state = v.into();
1512 self
1513 }
1514
1515 /// Sets the value of [role][crate::model::AutonomousDatabaseProperties::role].
1516 ///
1517 /// # Example
1518 /// ```ignore,no_run
1519 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1520 /// use google_cloud_oracledatabase_v1::model::autonomous_database_properties::Role;
1521 /// let x0 = AutonomousDatabaseProperties::new().set_role(Role::Primary);
1522 /// let x1 = AutonomousDatabaseProperties::new().set_role(Role::Standby);
1523 /// let x2 = AutonomousDatabaseProperties::new().set_role(Role::DisabledStandby);
1524 /// ```
1525 pub fn set_role<T: std::convert::Into<crate::model::autonomous_database_properties::Role>>(
1526 mut self,
1527 v: T,
1528 ) -> Self {
1529 self.role = v.into();
1530 self
1531 }
1532
1533 /// Sets the value of [scheduled_operation_details][crate::model::AutonomousDatabaseProperties::scheduled_operation_details].
1534 ///
1535 /// # Example
1536 /// ```ignore,no_run
1537 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1538 /// use google_cloud_oracledatabase_v1::model::ScheduledOperationDetails;
1539 /// let x = AutonomousDatabaseProperties::new()
1540 /// .set_scheduled_operation_details([
1541 /// ScheduledOperationDetails::default()/* use setters */,
1542 /// ScheduledOperationDetails::default()/* use (different) setters */,
1543 /// ]);
1544 /// ```
1545 pub fn set_scheduled_operation_details<T, V>(mut self, v: T) -> Self
1546 where
1547 T: std::iter::IntoIterator<Item = V>,
1548 V: std::convert::Into<crate::model::ScheduledOperationDetails>,
1549 {
1550 use std::iter::Iterator;
1551 self.scheduled_operation_details = v.into_iter().map(|i| i.into()).collect();
1552 self
1553 }
1554
1555 /// Sets the value of [sql_web_developer_url][crate::model::AutonomousDatabaseProperties::sql_web_developer_url].
1556 ///
1557 /// # Example
1558 /// ```ignore,no_run
1559 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1560 /// let x = AutonomousDatabaseProperties::new().set_sql_web_developer_url("example");
1561 /// ```
1562 pub fn set_sql_web_developer_url<T: std::convert::Into<std::string::String>>(
1563 mut self,
1564 v: T,
1565 ) -> Self {
1566 self.sql_web_developer_url = v.into();
1567 self
1568 }
1569
1570 /// Sets the value of [supported_clone_regions][crate::model::AutonomousDatabaseProperties::supported_clone_regions].
1571 ///
1572 /// # Example
1573 /// ```ignore,no_run
1574 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1575 /// let x = AutonomousDatabaseProperties::new().set_supported_clone_regions(["a", "b", "c"]);
1576 /// ```
1577 pub fn set_supported_clone_regions<T, V>(mut self, v: T) -> Self
1578 where
1579 T: std::iter::IntoIterator<Item = V>,
1580 V: std::convert::Into<std::string::String>,
1581 {
1582 use std::iter::Iterator;
1583 self.supported_clone_regions = v.into_iter().map(|i| i.into()).collect();
1584 self
1585 }
1586
1587 /// Sets the value of [used_data_storage_size_tbs][crate::model::AutonomousDatabaseProperties::used_data_storage_size_tbs].
1588 ///
1589 /// # Example
1590 /// ```ignore,no_run
1591 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1592 /// let x = AutonomousDatabaseProperties::new().set_used_data_storage_size_tbs(42);
1593 /// ```
1594 pub fn set_used_data_storage_size_tbs<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1595 self.used_data_storage_size_tbs = v.into();
1596 self
1597 }
1598
1599 /// Sets the value of [oci_url][crate::model::AutonomousDatabaseProperties::oci_url].
1600 ///
1601 /// # Example
1602 /// ```ignore,no_run
1603 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1604 /// let x = AutonomousDatabaseProperties::new().set_oci_url("example");
1605 /// ```
1606 pub fn set_oci_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1607 self.oci_url = v.into();
1608 self
1609 }
1610
1611 /// Sets the value of [total_auto_backup_storage_size_gbs][crate::model::AutonomousDatabaseProperties::total_auto_backup_storage_size_gbs].
1612 ///
1613 /// # Example
1614 /// ```ignore,no_run
1615 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1616 /// let x = AutonomousDatabaseProperties::new().set_total_auto_backup_storage_size_gbs(42.0);
1617 /// ```
1618 pub fn set_total_auto_backup_storage_size_gbs<T: std::convert::Into<f32>>(
1619 mut self,
1620 v: T,
1621 ) -> Self {
1622 self.total_auto_backup_storage_size_gbs = v.into();
1623 self
1624 }
1625
1626 /// Sets the value of [next_long_term_backup_time][crate::model::AutonomousDatabaseProperties::next_long_term_backup_time].
1627 ///
1628 /// # Example
1629 /// ```ignore,no_run
1630 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1631 /// use wkt::Timestamp;
1632 /// let x = AutonomousDatabaseProperties::new().set_next_long_term_backup_time(Timestamp::default()/* use setters */);
1633 /// ```
1634 pub fn set_next_long_term_backup_time<T>(mut self, v: T) -> Self
1635 where
1636 T: std::convert::Into<wkt::Timestamp>,
1637 {
1638 self.next_long_term_backup_time = std::option::Option::Some(v.into());
1639 self
1640 }
1641
1642 /// Sets or clears the value of [next_long_term_backup_time][crate::model::AutonomousDatabaseProperties::next_long_term_backup_time].
1643 ///
1644 /// # Example
1645 /// ```ignore,no_run
1646 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1647 /// use wkt::Timestamp;
1648 /// let x = AutonomousDatabaseProperties::new().set_or_clear_next_long_term_backup_time(Some(Timestamp::default()/* use setters */));
1649 /// let x = AutonomousDatabaseProperties::new().set_or_clear_next_long_term_backup_time(None::<Timestamp>);
1650 /// ```
1651 pub fn set_or_clear_next_long_term_backup_time<T>(mut self, v: std::option::Option<T>) -> Self
1652 where
1653 T: std::convert::Into<wkt::Timestamp>,
1654 {
1655 self.next_long_term_backup_time = v.map(|x| x.into());
1656 self
1657 }
1658
1659 /// Sets the value of [data_guard_role_changed_time][crate::model::AutonomousDatabaseProperties::data_guard_role_changed_time].
1660 ///
1661 /// # Example
1662 /// ```ignore,no_run
1663 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1664 /// use wkt::Timestamp;
1665 /// let x = AutonomousDatabaseProperties::new().set_data_guard_role_changed_time(Timestamp::default()/* use setters */);
1666 /// ```
1667 pub fn set_data_guard_role_changed_time<T>(mut self, v: T) -> Self
1668 where
1669 T: std::convert::Into<wkt::Timestamp>,
1670 {
1671 self.data_guard_role_changed_time = std::option::Option::Some(v.into());
1672 self
1673 }
1674
1675 /// Sets or clears the value of [data_guard_role_changed_time][crate::model::AutonomousDatabaseProperties::data_guard_role_changed_time].
1676 ///
1677 /// # Example
1678 /// ```ignore,no_run
1679 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1680 /// use wkt::Timestamp;
1681 /// let x = AutonomousDatabaseProperties::new().set_or_clear_data_guard_role_changed_time(Some(Timestamp::default()/* use setters */));
1682 /// let x = AutonomousDatabaseProperties::new().set_or_clear_data_guard_role_changed_time(None::<Timestamp>);
1683 /// ```
1684 pub fn set_or_clear_data_guard_role_changed_time<T>(mut self, v: std::option::Option<T>) -> Self
1685 where
1686 T: std::convert::Into<wkt::Timestamp>,
1687 {
1688 self.data_guard_role_changed_time = v.map(|x| x.into());
1689 self
1690 }
1691
1692 /// Sets the value of [disaster_recovery_role_changed_time][crate::model::AutonomousDatabaseProperties::disaster_recovery_role_changed_time].
1693 ///
1694 /// # Example
1695 /// ```ignore,no_run
1696 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1697 /// use wkt::Timestamp;
1698 /// let x = AutonomousDatabaseProperties::new().set_disaster_recovery_role_changed_time(Timestamp::default()/* use setters */);
1699 /// ```
1700 pub fn set_disaster_recovery_role_changed_time<T>(mut self, v: T) -> Self
1701 where
1702 T: std::convert::Into<wkt::Timestamp>,
1703 {
1704 self.disaster_recovery_role_changed_time = std::option::Option::Some(v.into());
1705 self
1706 }
1707
1708 /// Sets or clears the value of [disaster_recovery_role_changed_time][crate::model::AutonomousDatabaseProperties::disaster_recovery_role_changed_time].
1709 ///
1710 /// # Example
1711 /// ```ignore,no_run
1712 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1713 /// use wkt::Timestamp;
1714 /// let x = AutonomousDatabaseProperties::new().set_or_clear_disaster_recovery_role_changed_time(Some(Timestamp::default()/* use setters */));
1715 /// let x = AutonomousDatabaseProperties::new().set_or_clear_disaster_recovery_role_changed_time(None::<Timestamp>);
1716 /// ```
1717 pub fn set_or_clear_disaster_recovery_role_changed_time<T>(
1718 mut self,
1719 v: std::option::Option<T>,
1720 ) -> Self
1721 where
1722 T: std::convert::Into<wkt::Timestamp>,
1723 {
1724 self.disaster_recovery_role_changed_time = v.map(|x| x.into());
1725 self
1726 }
1727
1728 /// Sets the value of [maintenance_begin_time][crate::model::AutonomousDatabaseProperties::maintenance_begin_time].
1729 ///
1730 /// # Example
1731 /// ```ignore,no_run
1732 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1733 /// use wkt::Timestamp;
1734 /// let x = AutonomousDatabaseProperties::new().set_maintenance_begin_time(Timestamp::default()/* use setters */);
1735 /// ```
1736 pub fn set_maintenance_begin_time<T>(mut self, v: T) -> Self
1737 where
1738 T: std::convert::Into<wkt::Timestamp>,
1739 {
1740 self.maintenance_begin_time = std::option::Option::Some(v.into());
1741 self
1742 }
1743
1744 /// Sets or clears the value of [maintenance_begin_time][crate::model::AutonomousDatabaseProperties::maintenance_begin_time].
1745 ///
1746 /// # Example
1747 /// ```ignore,no_run
1748 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1749 /// use wkt::Timestamp;
1750 /// let x = AutonomousDatabaseProperties::new().set_or_clear_maintenance_begin_time(Some(Timestamp::default()/* use setters */));
1751 /// let x = AutonomousDatabaseProperties::new().set_or_clear_maintenance_begin_time(None::<Timestamp>);
1752 /// ```
1753 pub fn set_or_clear_maintenance_begin_time<T>(mut self, v: std::option::Option<T>) -> Self
1754 where
1755 T: std::convert::Into<wkt::Timestamp>,
1756 {
1757 self.maintenance_begin_time = v.map(|x| x.into());
1758 self
1759 }
1760
1761 /// Sets the value of [maintenance_end_time][crate::model::AutonomousDatabaseProperties::maintenance_end_time].
1762 ///
1763 /// # Example
1764 /// ```ignore,no_run
1765 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1766 /// use wkt::Timestamp;
1767 /// let x = AutonomousDatabaseProperties::new().set_maintenance_end_time(Timestamp::default()/* use setters */);
1768 /// ```
1769 pub fn set_maintenance_end_time<T>(mut self, v: T) -> Self
1770 where
1771 T: std::convert::Into<wkt::Timestamp>,
1772 {
1773 self.maintenance_end_time = std::option::Option::Some(v.into());
1774 self
1775 }
1776
1777 /// Sets or clears the value of [maintenance_end_time][crate::model::AutonomousDatabaseProperties::maintenance_end_time].
1778 ///
1779 /// # Example
1780 /// ```ignore,no_run
1781 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1782 /// use wkt::Timestamp;
1783 /// let x = AutonomousDatabaseProperties::new().set_or_clear_maintenance_end_time(Some(Timestamp::default()/* use setters */));
1784 /// let x = AutonomousDatabaseProperties::new().set_or_clear_maintenance_end_time(None::<Timestamp>);
1785 /// ```
1786 pub fn set_or_clear_maintenance_end_time<T>(mut self, v: std::option::Option<T>) -> Self
1787 where
1788 T: std::convert::Into<wkt::Timestamp>,
1789 {
1790 self.maintenance_end_time = v.map(|x| x.into());
1791 self
1792 }
1793
1794 /// Sets the value of [allowlisted_ips][crate::model::AutonomousDatabaseProperties::allowlisted_ips].
1795 ///
1796 /// # Example
1797 /// ```ignore,no_run
1798 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1799 /// let x = AutonomousDatabaseProperties::new().set_allowlisted_ips(["a", "b", "c"]);
1800 /// ```
1801 pub fn set_allowlisted_ips<T, V>(mut self, v: T) -> Self
1802 where
1803 T: std::iter::IntoIterator<Item = V>,
1804 V: std::convert::Into<std::string::String>,
1805 {
1806 use std::iter::Iterator;
1807 self.allowlisted_ips = v.into_iter().map(|i| i.into()).collect();
1808 self
1809 }
1810
1811 /// Sets the value of [encryption_key][crate::model::AutonomousDatabaseProperties::encryption_key].
1812 ///
1813 /// # Example
1814 /// ```ignore,no_run
1815 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1816 /// use google_cloud_oracledatabase_v1::model::EncryptionKey;
1817 /// let x = AutonomousDatabaseProperties::new().set_encryption_key(EncryptionKey::default()/* use setters */);
1818 /// ```
1819 pub fn set_encryption_key<T>(mut self, v: T) -> Self
1820 where
1821 T: std::convert::Into<crate::model::EncryptionKey>,
1822 {
1823 self.encryption_key = std::option::Option::Some(v.into());
1824 self
1825 }
1826
1827 /// Sets or clears the value of [encryption_key][crate::model::AutonomousDatabaseProperties::encryption_key].
1828 ///
1829 /// # Example
1830 /// ```ignore,no_run
1831 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1832 /// use google_cloud_oracledatabase_v1::model::EncryptionKey;
1833 /// let x = AutonomousDatabaseProperties::new().set_or_clear_encryption_key(Some(EncryptionKey::default()/* use setters */));
1834 /// let x = AutonomousDatabaseProperties::new().set_or_clear_encryption_key(None::<EncryptionKey>);
1835 /// ```
1836 pub fn set_or_clear_encryption_key<T>(mut self, v: std::option::Option<T>) -> Self
1837 where
1838 T: std::convert::Into<crate::model::EncryptionKey>,
1839 {
1840 self.encryption_key = v.map(|x| x.into());
1841 self
1842 }
1843
1844 /// Sets the value of [encryption_key_history_entries][crate::model::AutonomousDatabaseProperties::encryption_key_history_entries].
1845 ///
1846 /// # Example
1847 /// ```ignore,no_run
1848 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1849 /// use google_cloud_oracledatabase_v1::model::EncryptionKeyHistoryEntry;
1850 /// let x = AutonomousDatabaseProperties::new()
1851 /// .set_encryption_key_history_entries([
1852 /// EncryptionKeyHistoryEntry::default()/* use setters */,
1853 /// EncryptionKeyHistoryEntry::default()/* use (different) setters */,
1854 /// ]);
1855 /// ```
1856 pub fn set_encryption_key_history_entries<T, V>(mut self, v: T) -> Self
1857 where
1858 T: std::iter::IntoIterator<Item = V>,
1859 V: std::convert::Into<crate::model::EncryptionKeyHistoryEntry>,
1860 {
1861 use std::iter::Iterator;
1862 self.encryption_key_history_entries = v.into_iter().map(|i| i.into()).collect();
1863 self
1864 }
1865
1866 /// Sets the value of [service_agent_email][crate::model::AutonomousDatabaseProperties::service_agent_email].
1867 ///
1868 /// # Example
1869 /// ```ignore,no_run
1870 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseProperties;
1871 /// let x = AutonomousDatabaseProperties::new().set_service_agent_email("example");
1872 /// ```
1873 pub fn set_service_agent_email<T: std::convert::Into<std::string::String>>(
1874 mut self,
1875 v: T,
1876 ) -> Self {
1877 self.service_agent_email = v.into();
1878 self
1879 }
1880}
1881
1882impl wkt::message::Message for AutonomousDatabaseProperties {
1883 fn typename() -> &'static str {
1884 "type.googleapis.com/google.cloud.oracledatabase.v1.AutonomousDatabaseProperties"
1885 }
1886}
1887
1888/// Defines additional types related to [AutonomousDatabaseProperties].
1889pub mod autonomous_database_properties {
1890 #[allow(unused_imports)]
1891 use super::*;
1892
1893 /// The editions available for the Autonomous Database.
1894 ///
1895 /// # Working with unknown values
1896 ///
1897 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1898 /// additional enum variants at any time. Adding new variants is not considered
1899 /// a breaking change. Applications should write their code in anticipation of:
1900 ///
1901 /// - New values appearing in future releases of the client library, **and**
1902 /// - New values received dynamically, without application changes.
1903 ///
1904 /// Please consult the [Working with enums] section in the user guide for some
1905 /// guidelines.
1906 ///
1907 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1908 #[derive(Clone, Debug, PartialEq)]
1909 #[non_exhaustive]
1910 pub enum DatabaseEdition {
1911 /// Default unspecified value.
1912 Unspecified,
1913 /// Standard Database Edition
1914 StandardEdition,
1915 /// Enterprise Database Edition
1916 EnterpriseEdition,
1917 /// If set, the enum was initialized with an unknown value.
1918 ///
1919 /// Applications can examine the value using [DatabaseEdition::value] or
1920 /// [DatabaseEdition::name].
1921 UnknownValue(database_edition::UnknownValue),
1922 }
1923
1924 #[doc(hidden)]
1925 pub mod database_edition {
1926 #[allow(unused_imports)]
1927 use super::*;
1928 #[derive(Clone, Debug, PartialEq)]
1929 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1930 }
1931
1932 impl DatabaseEdition {
1933 /// Gets the enum value.
1934 ///
1935 /// Returns `None` if the enum contains an unknown value deserialized from
1936 /// the string representation of enums.
1937 pub fn value(&self) -> std::option::Option<i32> {
1938 match self {
1939 Self::Unspecified => std::option::Option::Some(0),
1940 Self::StandardEdition => std::option::Option::Some(1),
1941 Self::EnterpriseEdition => std::option::Option::Some(2),
1942 Self::UnknownValue(u) => u.0.value(),
1943 }
1944 }
1945
1946 /// Gets the enum value as a string.
1947 ///
1948 /// Returns `None` if the enum contains an unknown value deserialized from
1949 /// the integer representation of enums.
1950 pub fn name(&self) -> std::option::Option<&str> {
1951 match self {
1952 Self::Unspecified => std::option::Option::Some("DATABASE_EDITION_UNSPECIFIED"),
1953 Self::StandardEdition => std::option::Option::Some("STANDARD_EDITION"),
1954 Self::EnterpriseEdition => std::option::Option::Some("ENTERPRISE_EDITION"),
1955 Self::UnknownValue(u) => u.0.name(),
1956 }
1957 }
1958 }
1959
1960 impl std::default::Default for DatabaseEdition {
1961 fn default() -> Self {
1962 use std::convert::From;
1963 Self::from(0)
1964 }
1965 }
1966
1967 impl std::fmt::Display for DatabaseEdition {
1968 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1969 wkt::internal::display_enum(f, self.name(), self.value())
1970 }
1971 }
1972
1973 impl std::convert::From<i32> for DatabaseEdition {
1974 fn from(value: i32) -> Self {
1975 match value {
1976 0 => Self::Unspecified,
1977 1 => Self::StandardEdition,
1978 2 => Self::EnterpriseEdition,
1979 _ => Self::UnknownValue(database_edition::UnknownValue(
1980 wkt::internal::UnknownEnumValue::Integer(value),
1981 )),
1982 }
1983 }
1984 }
1985
1986 impl std::convert::From<&str> for DatabaseEdition {
1987 fn from(value: &str) -> Self {
1988 use std::string::ToString;
1989 match value {
1990 "DATABASE_EDITION_UNSPECIFIED" => Self::Unspecified,
1991 "STANDARD_EDITION" => Self::StandardEdition,
1992 "ENTERPRISE_EDITION" => Self::EnterpriseEdition,
1993 _ => Self::UnknownValue(database_edition::UnknownValue(
1994 wkt::internal::UnknownEnumValue::String(value.to_string()),
1995 )),
1996 }
1997 }
1998 }
1999
2000 impl serde::ser::Serialize for DatabaseEdition {
2001 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2002 where
2003 S: serde::Serializer,
2004 {
2005 match self {
2006 Self::Unspecified => serializer.serialize_i32(0),
2007 Self::StandardEdition => serializer.serialize_i32(1),
2008 Self::EnterpriseEdition => serializer.serialize_i32(2),
2009 Self::UnknownValue(u) => u.0.serialize(serializer),
2010 }
2011 }
2012 }
2013
2014 impl<'de> serde::de::Deserialize<'de> for DatabaseEdition {
2015 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2016 where
2017 D: serde::Deserializer<'de>,
2018 {
2019 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseEdition>::new(
2020 ".google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseEdition",
2021 ))
2022 }
2023 }
2024
2025 /// The license types available for the Autonomous Database.
2026 ///
2027 /// # Working with unknown values
2028 ///
2029 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2030 /// additional enum variants at any time. Adding new variants is not considered
2031 /// a breaking change. Applications should write their code in anticipation of:
2032 ///
2033 /// - New values appearing in future releases of the client library, **and**
2034 /// - New values received dynamically, without application changes.
2035 ///
2036 /// Please consult the [Working with enums] section in the user guide for some
2037 /// guidelines.
2038 ///
2039 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2040 #[derive(Clone, Debug, PartialEq)]
2041 #[non_exhaustive]
2042 pub enum LicenseType {
2043 /// Unspecified
2044 Unspecified,
2045 /// License included part of offer
2046 LicenseIncluded,
2047 /// Bring your own license
2048 BringYourOwnLicense,
2049 /// If set, the enum was initialized with an unknown value.
2050 ///
2051 /// Applications can examine the value using [LicenseType::value] or
2052 /// [LicenseType::name].
2053 UnknownValue(license_type::UnknownValue),
2054 }
2055
2056 #[doc(hidden)]
2057 pub mod license_type {
2058 #[allow(unused_imports)]
2059 use super::*;
2060 #[derive(Clone, Debug, PartialEq)]
2061 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2062 }
2063
2064 impl LicenseType {
2065 /// Gets the enum value.
2066 ///
2067 /// Returns `None` if the enum contains an unknown value deserialized from
2068 /// the string representation of enums.
2069 pub fn value(&self) -> std::option::Option<i32> {
2070 match self {
2071 Self::Unspecified => std::option::Option::Some(0),
2072 Self::LicenseIncluded => std::option::Option::Some(1),
2073 Self::BringYourOwnLicense => std::option::Option::Some(2),
2074 Self::UnknownValue(u) => u.0.value(),
2075 }
2076 }
2077
2078 /// Gets the enum value as a string.
2079 ///
2080 /// Returns `None` if the enum contains an unknown value deserialized from
2081 /// the integer representation of enums.
2082 pub fn name(&self) -> std::option::Option<&str> {
2083 match self {
2084 Self::Unspecified => std::option::Option::Some("LICENSE_TYPE_UNSPECIFIED"),
2085 Self::LicenseIncluded => std::option::Option::Some("LICENSE_INCLUDED"),
2086 Self::BringYourOwnLicense => std::option::Option::Some("BRING_YOUR_OWN_LICENSE"),
2087 Self::UnknownValue(u) => u.0.name(),
2088 }
2089 }
2090 }
2091
2092 impl std::default::Default for LicenseType {
2093 fn default() -> Self {
2094 use std::convert::From;
2095 Self::from(0)
2096 }
2097 }
2098
2099 impl std::fmt::Display for LicenseType {
2100 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2101 wkt::internal::display_enum(f, self.name(), self.value())
2102 }
2103 }
2104
2105 impl std::convert::From<i32> for LicenseType {
2106 fn from(value: i32) -> Self {
2107 match value {
2108 0 => Self::Unspecified,
2109 1 => Self::LicenseIncluded,
2110 2 => Self::BringYourOwnLicense,
2111 _ => Self::UnknownValue(license_type::UnknownValue(
2112 wkt::internal::UnknownEnumValue::Integer(value),
2113 )),
2114 }
2115 }
2116 }
2117
2118 impl std::convert::From<&str> for LicenseType {
2119 fn from(value: &str) -> Self {
2120 use std::string::ToString;
2121 match value {
2122 "LICENSE_TYPE_UNSPECIFIED" => Self::Unspecified,
2123 "LICENSE_INCLUDED" => Self::LicenseIncluded,
2124 "BRING_YOUR_OWN_LICENSE" => Self::BringYourOwnLicense,
2125 _ => Self::UnknownValue(license_type::UnknownValue(
2126 wkt::internal::UnknownEnumValue::String(value.to_string()),
2127 )),
2128 }
2129 }
2130 }
2131
2132 impl serde::ser::Serialize for LicenseType {
2133 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2134 where
2135 S: serde::Serializer,
2136 {
2137 match self {
2138 Self::Unspecified => serializer.serialize_i32(0),
2139 Self::LicenseIncluded => serializer.serialize_i32(1),
2140 Self::BringYourOwnLicense => serializer.serialize_i32(2),
2141 Self::UnknownValue(u) => u.0.serialize(serializer),
2142 }
2143 }
2144 }
2145
2146 impl<'de> serde::de::Deserialize<'de> for LicenseType {
2147 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2148 where
2149 D: serde::Deserializer<'de>,
2150 {
2151 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LicenseType>::new(
2152 ".google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LicenseType",
2153 ))
2154 }
2155 }
2156
2157 /// The available maintenance schedules for the Autonomous Database.
2158 ///
2159 /// # Working with unknown values
2160 ///
2161 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2162 /// additional enum variants at any time. Adding new variants is not considered
2163 /// a breaking change. Applications should write their code in anticipation of:
2164 ///
2165 /// - New values appearing in future releases of the client library, **and**
2166 /// - New values received dynamically, without application changes.
2167 ///
2168 /// Please consult the [Working with enums] section in the user guide for some
2169 /// guidelines.
2170 ///
2171 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2172 #[derive(Clone, Debug, PartialEq)]
2173 #[non_exhaustive]
2174 pub enum MaintenanceScheduleType {
2175 /// Default unspecified value.
2176 Unspecified,
2177 /// An EARLY maintenance schedule patches the database before
2178 /// the regular scheduled maintenance.
2179 Early,
2180 /// A REGULAR maintenance schedule follows the normal maintenance cycle.
2181 Regular,
2182 /// If set, the enum was initialized with an unknown value.
2183 ///
2184 /// Applications can examine the value using [MaintenanceScheduleType::value] or
2185 /// [MaintenanceScheduleType::name].
2186 UnknownValue(maintenance_schedule_type::UnknownValue),
2187 }
2188
2189 #[doc(hidden)]
2190 pub mod maintenance_schedule_type {
2191 #[allow(unused_imports)]
2192 use super::*;
2193 #[derive(Clone, Debug, PartialEq)]
2194 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2195 }
2196
2197 impl MaintenanceScheduleType {
2198 /// Gets the enum value.
2199 ///
2200 /// Returns `None` if the enum contains an unknown value deserialized from
2201 /// the string representation of enums.
2202 pub fn value(&self) -> std::option::Option<i32> {
2203 match self {
2204 Self::Unspecified => std::option::Option::Some(0),
2205 Self::Early => std::option::Option::Some(1),
2206 Self::Regular => std::option::Option::Some(2),
2207 Self::UnknownValue(u) => u.0.value(),
2208 }
2209 }
2210
2211 /// Gets the enum value as a string.
2212 ///
2213 /// Returns `None` if the enum contains an unknown value deserialized from
2214 /// the integer representation of enums.
2215 pub fn name(&self) -> std::option::Option<&str> {
2216 match self {
2217 Self::Unspecified => {
2218 std::option::Option::Some("MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED")
2219 }
2220 Self::Early => std::option::Option::Some("EARLY"),
2221 Self::Regular => std::option::Option::Some("REGULAR"),
2222 Self::UnknownValue(u) => u.0.name(),
2223 }
2224 }
2225 }
2226
2227 impl std::default::Default for MaintenanceScheduleType {
2228 fn default() -> Self {
2229 use std::convert::From;
2230 Self::from(0)
2231 }
2232 }
2233
2234 impl std::fmt::Display for MaintenanceScheduleType {
2235 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2236 wkt::internal::display_enum(f, self.name(), self.value())
2237 }
2238 }
2239
2240 impl std::convert::From<i32> for MaintenanceScheduleType {
2241 fn from(value: i32) -> Self {
2242 match value {
2243 0 => Self::Unspecified,
2244 1 => Self::Early,
2245 2 => Self::Regular,
2246 _ => Self::UnknownValue(maintenance_schedule_type::UnknownValue(
2247 wkt::internal::UnknownEnumValue::Integer(value),
2248 )),
2249 }
2250 }
2251 }
2252
2253 impl std::convert::From<&str> for MaintenanceScheduleType {
2254 fn from(value: &str) -> Self {
2255 use std::string::ToString;
2256 match value {
2257 "MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED" => Self::Unspecified,
2258 "EARLY" => Self::Early,
2259 "REGULAR" => Self::Regular,
2260 _ => Self::UnknownValue(maintenance_schedule_type::UnknownValue(
2261 wkt::internal::UnknownEnumValue::String(value.to_string()),
2262 )),
2263 }
2264 }
2265 }
2266
2267 impl serde::ser::Serialize for MaintenanceScheduleType {
2268 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2269 where
2270 S: serde::Serializer,
2271 {
2272 match self {
2273 Self::Unspecified => serializer.serialize_i32(0),
2274 Self::Early => serializer.serialize_i32(1),
2275 Self::Regular => serializer.serialize_i32(2),
2276 Self::UnknownValue(u) => u.0.serialize(serializer),
2277 }
2278 }
2279 }
2280
2281 impl<'de> serde::de::Deserialize<'de> for MaintenanceScheduleType {
2282 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2283 where
2284 D: serde::Deserializer<'de>,
2285 {
2286 deserializer.deserialize_any(wkt::internal::EnumVisitor::<MaintenanceScheduleType>::new(
2287 ".google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.MaintenanceScheduleType"))
2288 }
2289 }
2290
2291 /// The types of local disaster recovery available for an Autonomous Database.
2292 ///
2293 /// # Working with unknown values
2294 ///
2295 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2296 /// additional enum variants at any time. Adding new variants is not considered
2297 /// a breaking change. Applications should write their code in anticipation of:
2298 ///
2299 /// - New values appearing in future releases of the client library, **and**
2300 /// - New values received dynamically, without application changes.
2301 ///
2302 /// Please consult the [Working with enums] section in the user guide for some
2303 /// guidelines.
2304 ///
2305 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2306 #[derive(Clone, Debug, PartialEq)]
2307 #[non_exhaustive]
2308 pub enum LocalDisasterRecoveryType {
2309 /// Default unspecified value.
2310 Unspecified,
2311 /// Autonomous Data Guard recovery.
2312 Adg,
2313 /// Backup based recovery.
2314 BackupBased,
2315 /// If set, the enum was initialized with an unknown value.
2316 ///
2317 /// Applications can examine the value using [LocalDisasterRecoveryType::value] or
2318 /// [LocalDisasterRecoveryType::name].
2319 UnknownValue(local_disaster_recovery_type::UnknownValue),
2320 }
2321
2322 #[doc(hidden)]
2323 pub mod local_disaster_recovery_type {
2324 #[allow(unused_imports)]
2325 use super::*;
2326 #[derive(Clone, Debug, PartialEq)]
2327 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2328 }
2329
2330 impl LocalDisasterRecoveryType {
2331 /// Gets the enum value.
2332 ///
2333 /// Returns `None` if the enum contains an unknown value deserialized from
2334 /// the string representation of enums.
2335 pub fn value(&self) -> std::option::Option<i32> {
2336 match self {
2337 Self::Unspecified => std::option::Option::Some(0),
2338 Self::Adg => std::option::Option::Some(1),
2339 Self::BackupBased => std::option::Option::Some(2),
2340 Self::UnknownValue(u) => u.0.value(),
2341 }
2342 }
2343
2344 /// Gets the enum value as a string.
2345 ///
2346 /// Returns `None` if the enum contains an unknown value deserialized from
2347 /// the integer representation of enums.
2348 pub fn name(&self) -> std::option::Option<&str> {
2349 match self {
2350 Self::Unspecified => {
2351 std::option::Option::Some("LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED")
2352 }
2353 Self::Adg => std::option::Option::Some("ADG"),
2354 Self::BackupBased => std::option::Option::Some("BACKUP_BASED"),
2355 Self::UnknownValue(u) => u.0.name(),
2356 }
2357 }
2358 }
2359
2360 impl std::default::Default for LocalDisasterRecoveryType {
2361 fn default() -> Self {
2362 use std::convert::From;
2363 Self::from(0)
2364 }
2365 }
2366
2367 impl std::fmt::Display for LocalDisasterRecoveryType {
2368 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2369 wkt::internal::display_enum(f, self.name(), self.value())
2370 }
2371 }
2372
2373 impl std::convert::From<i32> for LocalDisasterRecoveryType {
2374 fn from(value: i32) -> Self {
2375 match value {
2376 0 => Self::Unspecified,
2377 1 => Self::Adg,
2378 2 => Self::BackupBased,
2379 _ => Self::UnknownValue(local_disaster_recovery_type::UnknownValue(
2380 wkt::internal::UnknownEnumValue::Integer(value),
2381 )),
2382 }
2383 }
2384 }
2385
2386 impl std::convert::From<&str> for LocalDisasterRecoveryType {
2387 fn from(value: &str) -> Self {
2388 use std::string::ToString;
2389 match value {
2390 "LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED" => Self::Unspecified,
2391 "ADG" => Self::Adg,
2392 "BACKUP_BASED" => Self::BackupBased,
2393 _ => Self::UnknownValue(local_disaster_recovery_type::UnknownValue(
2394 wkt::internal::UnknownEnumValue::String(value.to_string()),
2395 )),
2396 }
2397 }
2398 }
2399
2400 impl serde::ser::Serialize for LocalDisasterRecoveryType {
2401 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2402 where
2403 S: serde::Serializer,
2404 {
2405 match self {
2406 Self::Unspecified => serializer.serialize_i32(0),
2407 Self::Adg => serializer.serialize_i32(1),
2408 Self::BackupBased => serializer.serialize_i32(2),
2409 Self::UnknownValue(u) => u.0.serialize(serializer),
2410 }
2411 }
2412 }
2413
2414 impl<'de> serde::de::Deserialize<'de> for LocalDisasterRecoveryType {
2415 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2416 where
2417 D: serde::Deserializer<'de>,
2418 {
2419 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocalDisasterRecoveryType>::new(
2420 ".google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LocalDisasterRecoveryType"))
2421 }
2422 }
2423
2424 /// Varies states of the Data Safe registration for the Autonomous Database.
2425 ///
2426 /// # Working with unknown values
2427 ///
2428 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2429 /// additional enum variants at any time. Adding new variants is not considered
2430 /// a breaking change. Applications should write their code in anticipation of:
2431 ///
2432 /// - New values appearing in future releases of the client library, **and**
2433 /// - New values received dynamically, without application changes.
2434 ///
2435 /// Please consult the [Working with enums] section in the user guide for some
2436 /// guidelines.
2437 ///
2438 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2439 #[derive(Clone, Debug, PartialEq)]
2440 #[non_exhaustive]
2441 pub enum DataSafeState {
2442 /// Default unspecified value.
2443 Unspecified,
2444 /// Registering data safe state.
2445 Registering,
2446 /// Registered data safe state.
2447 Registered,
2448 /// Deregistering data safe state.
2449 Deregistering,
2450 /// Not registered data safe state.
2451 NotRegistered,
2452 /// Failed data safe state.
2453 Failed,
2454 /// If set, the enum was initialized with an unknown value.
2455 ///
2456 /// Applications can examine the value using [DataSafeState::value] or
2457 /// [DataSafeState::name].
2458 UnknownValue(data_safe_state::UnknownValue),
2459 }
2460
2461 #[doc(hidden)]
2462 pub mod data_safe_state {
2463 #[allow(unused_imports)]
2464 use super::*;
2465 #[derive(Clone, Debug, PartialEq)]
2466 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2467 }
2468
2469 impl DataSafeState {
2470 /// Gets the enum value.
2471 ///
2472 /// Returns `None` if the enum contains an unknown value deserialized from
2473 /// the string representation of enums.
2474 pub fn value(&self) -> std::option::Option<i32> {
2475 match self {
2476 Self::Unspecified => std::option::Option::Some(0),
2477 Self::Registering => std::option::Option::Some(1),
2478 Self::Registered => std::option::Option::Some(2),
2479 Self::Deregistering => std::option::Option::Some(3),
2480 Self::NotRegistered => std::option::Option::Some(4),
2481 Self::Failed => std::option::Option::Some(5),
2482 Self::UnknownValue(u) => u.0.value(),
2483 }
2484 }
2485
2486 /// Gets the enum value as a string.
2487 ///
2488 /// Returns `None` if the enum contains an unknown value deserialized from
2489 /// the integer representation of enums.
2490 pub fn name(&self) -> std::option::Option<&str> {
2491 match self {
2492 Self::Unspecified => std::option::Option::Some("DATA_SAFE_STATE_UNSPECIFIED"),
2493 Self::Registering => std::option::Option::Some("REGISTERING"),
2494 Self::Registered => std::option::Option::Some("REGISTERED"),
2495 Self::Deregistering => std::option::Option::Some("DEREGISTERING"),
2496 Self::NotRegistered => std::option::Option::Some("NOT_REGISTERED"),
2497 Self::Failed => std::option::Option::Some("FAILED"),
2498 Self::UnknownValue(u) => u.0.name(),
2499 }
2500 }
2501 }
2502
2503 impl std::default::Default for DataSafeState {
2504 fn default() -> Self {
2505 use std::convert::From;
2506 Self::from(0)
2507 }
2508 }
2509
2510 impl std::fmt::Display for DataSafeState {
2511 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2512 wkt::internal::display_enum(f, self.name(), self.value())
2513 }
2514 }
2515
2516 impl std::convert::From<i32> for DataSafeState {
2517 fn from(value: i32) -> Self {
2518 match value {
2519 0 => Self::Unspecified,
2520 1 => Self::Registering,
2521 2 => Self::Registered,
2522 3 => Self::Deregistering,
2523 4 => Self::NotRegistered,
2524 5 => Self::Failed,
2525 _ => Self::UnknownValue(data_safe_state::UnknownValue(
2526 wkt::internal::UnknownEnumValue::Integer(value),
2527 )),
2528 }
2529 }
2530 }
2531
2532 impl std::convert::From<&str> for DataSafeState {
2533 fn from(value: &str) -> Self {
2534 use std::string::ToString;
2535 match value {
2536 "DATA_SAFE_STATE_UNSPECIFIED" => Self::Unspecified,
2537 "REGISTERING" => Self::Registering,
2538 "REGISTERED" => Self::Registered,
2539 "DEREGISTERING" => Self::Deregistering,
2540 "NOT_REGISTERED" => Self::NotRegistered,
2541 "FAILED" => Self::Failed,
2542 _ => Self::UnknownValue(data_safe_state::UnknownValue(
2543 wkt::internal::UnknownEnumValue::String(value.to_string()),
2544 )),
2545 }
2546 }
2547 }
2548
2549 impl serde::ser::Serialize for DataSafeState {
2550 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2551 where
2552 S: serde::Serializer,
2553 {
2554 match self {
2555 Self::Unspecified => serializer.serialize_i32(0),
2556 Self::Registering => serializer.serialize_i32(1),
2557 Self::Registered => serializer.serialize_i32(2),
2558 Self::Deregistering => serializer.serialize_i32(3),
2559 Self::NotRegistered => serializer.serialize_i32(4),
2560 Self::Failed => serializer.serialize_i32(5),
2561 Self::UnknownValue(u) => u.0.serialize(serializer),
2562 }
2563 }
2564 }
2565
2566 impl<'de> serde::de::Deserialize<'de> for DataSafeState {
2567 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2568 where
2569 D: serde::Deserializer<'de>,
2570 {
2571 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataSafeState>::new(
2572 ".google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DataSafeState",
2573 ))
2574 }
2575 }
2576
2577 /// The different states of database management for an Autonomous Database.
2578 ///
2579 /// # Working with unknown values
2580 ///
2581 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2582 /// additional enum variants at any time. Adding new variants is not considered
2583 /// a breaking change. Applications should write their code in anticipation of:
2584 ///
2585 /// - New values appearing in future releases of the client library, **and**
2586 /// - New values received dynamically, without application changes.
2587 ///
2588 /// Please consult the [Working with enums] section in the user guide for some
2589 /// guidelines.
2590 ///
2591 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2592 #[derive(Clone, Debug, PartialEq)]
2593 #[non_exhaustive]
2594 pub enum DatabaseManagementState {
2595 /// Default unspecified value.
2596 Unspecified,
2597 /// Enabling Database Management state
2598 Enabling,
2599 /// Enabled Database Management state
2600 Enabled,
2601 /// Disabling Database Management state
2602 Disabling,
2603 /// Not Enabled Database Management state
2604 NotEnabled,
2605 /// Failed enabling Database Management state
2606 FailedEnabling,
2607 /// Failed disabling Database Management state
2608 FailedDisabling,
2609 /// If set, the enum was initialized with an unknown value.
2610 ///
2611 /// Applications can examine the value using [DatabaseManagementState::value] or
2612 /// [DatabaseManagementState::name].
2613 UnknownValue(database_management_state::UnknownValue),
2614 }
2615
2616 #[doc(hidden)]
2617 pub mod database_management_state {
2618 #[allow(unused_imports)]
2619 use super::*;
2620 #[derive(Clone, Debug, PartialEq)]
2621 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2622 }
2623
2624 impl DatabaseManagementState {
2625 /// Gets the enum value.
2626 ///
2627 /// Returns `None` if the enum contains an unknown value deserialized from
2628 /// the string representation of enums.
2629 pub fn value(&self) -> std::option::Option<i32> {
2630 match self {
2631 Self::Unspecified => std::option::Option::Some(0),
2632 Self::Enabling => std::option::Option::Some(1),
2633 Self::Enabled => std::option::Option::Some(2),
2634 Self::Disabling => std::option::Option::Some(3),
2635 Self::NotEnabled => std::option::Option::Some(4),
2636 Self::FailedEnabling => std::option::Option::Some(5),
2637 Self::FailedDisabling => std::option::Option::Some(6),
2638 Self::UnknownValue(u) => u.0.value(),
2639 }
2640 }
2641
2642 /// Gets the enum value as a string.
2643 ///
2644 /// Returns `None` if the enum contains an unknown value deserialized from
2645 /// the integer representation of enums.
2646 pub fn name(&self) -> std::option::Option<&str> {
2647 match self {
2648 Self::Unspecified => {
2649 std::option::Option::Some("DATABASE_MANAGEMENT_STATE_UNSPECIFIED")
2650 }
2651 Self::Enabling => std::option::Option::Some("ENABLING"),
2652 Self::Enabled => std::option::Option::Some("ENABLED"),
2653 Self::Disabling => std::option::Option::Some("DISABLING"),
2654 Self::NotEnabled => std::option::Option::Some("NOT_ENABLED"),
2655 Self::FailedEnabling => std::option::Option::Some("FAILED_ENABLING"),
2656 Self::FailedDisabling => std::option::Option::Some("FAILED_DISABLING"),
2657 Self::UnknownValue(u) => u.0.name(),
2658 }
2659 }
2660 }
2661
2662 impl std::default::Default for DatabaseManagementState {
2663 fn default() -> Self {
2664 use std::convert::From;
2665 Self::from(0)
2666 }
2667 }
2668
2669 impl std::fmt::Display for DatabaseManagementState {
2670 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2671 wkt::internal::display_enum(f, self.name(), self.value())
2672 }
2673 }
2674
2675 impl std::convert::From<i32> for DatabaseManagementState {
2676 fn from(value: i32) -> Self {
2677 match value {
2678 0 => Self::Unspecified,
2679 1 => Self::Enabling,
2680 2 => Self::Enabled,
2681 3 => Self::Disabling,
2682 4 => Self::NotEnabled,
2683 5 => Self::FailedEnabling,
2684 6 => Self::FailedDisabling,
2685 _ => Self::UnknownValue(database_management_state::UnknownValue(
2686 wkt::internal::UnknownEnumValue::Integer(value),
2687 )),
2688 }
2689 }
2690 }
2691
2692 impl std::convert::From<&str> for DatabaseManagementState {
2693 fn from(value: &str) -> Self {
2694 use std::string::ToString;
2695 match value {
2696 "DATABASE_MANAGEMENT_STATE_UNSPECIFIED" => Self::Unspecified,
2697 "ENABLING" => Self::Enabling,
2698 "ENABLED" => Self::Enabled,
2699 "DISABLING" => Self::Disabling,
2700 "NOT_ENABLED" => Self::NotEnabled,
2701 "FAILED_ENABLING" => Self::FailedEnabling,
2702 "FAILED_DISABLING" => Self::FailedDisabling,
2703 _ => Self::UnknownValue(database_management_state::UnknownValue(
2704 wkt::internal::UnknownEnumValue::String(value.to_string()),
2705 )),
2706 }
2707 }
2708 }
2709
2710 impl serde::ser::Serialize for DatabaseManagementState {
2711 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2712 where
2713 S: serde::Serializer,
2714 {
2715 match self {
2716 Self::Unspecified => serializer.serialize_i32(0),
2717 Self::Enabling => serializer.serialize_i32(1),
2718 Self::Enabled => serializer.serialize_i32(2),
2719 Self::Disabling => serializer.serialize_i32(3),
2720 Self::NotEnabled => serializer.serialize_i32(4),
2721 Self::FailedEnabling => serializer.serialize_i32(5),
2722 Self::FailedDisabling => serializer.serialize_i32(6),
2723 Self::UnknownValue(u) => u.0.serialize(serializer),
2724 }
2725 }
2726 }
2727
2728 impl<'de> serde::de::Deserialize<'de> for DatabaseManagementState {
2729 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2730 where
2731 D: serde::Deserializer<'de>,
2732 {
2733 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseManagementState>::new(
2734 ".google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseManagementState"))
2735 }
2736 }
2737
2738 /// This field indicates the modes of an Autonomous Database.
2739 ///
2740 /// # Working with unknown values
2741 ///
2742 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2743 /// additional enum variants at any time. Adding new variants is not considered
2744 /// a breaking change. Applications should write their code in anticipation of:
2745 ///
2746 /// - New values appearing in future releases of the client library, **and**
2747 /// - New values received dynamically, without application changes.
2748 ///
2749 /// Please consult the [Working with enums] section in the user guide for some
2750 /// guidelines.
2751 ///
2752 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2753 #[derive(Clone, Debug, PartialEq)]
2754 #[non_exhaustive]
2755 pub enum OpenMode {
2756 /// Default unspecified value.
2757 Unspecified,
2758 /// Read Only Mode
2759 ReadOnly,
2760 /// Read Write Mode
2761 ReadWrite,
2762 /// If set, the enum was initialized with an unknown value.
2763 ///
2764 /// Applications can examine the value using [OpenMode::value] or
2765 /// [OpenMode::name].
2766 UnknownValue(open_mode::UnknownValue),
2767 }
2768
2769 #[doc(hidden)]
2770 pub mod open_mode {
2771 #[allow(unused_imports)]
2772 use super::*;
2773 #[derive(Clone, Debug, PartialEq)]
2774 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2775 }
2776
2777 impl OpenMode {
2778 /// Gets the enum value.
2779 ///
2780 /// Returns `None` if the enum contains an unknown value deserialized from
2781 /// the string representation of enums.
2782 pub fn value(&self) -> std::option::Option<i32> {
2783 match self {
2784 Self::Unspecified => std::option::Option::Some(0),
2785 Self::ReadOnly => std::option::Option::Some(1),
2786 Self::ReadWrite => std::option::Option::Some(2),
2787 Self::UnknownValue(u) => u.0.value(),
2788 }
2789 }
2790
2791 /// Gets the enum value as a string.
2792 ///
2793 /// Returns `None` if the enum contains an unknown value deserialized from
2794 /// the integer representation of enums.
2795 pub fn name(&self) -> std::option::Option<&str> {
2796 match self {
2797 Self::Unspecified => std::option::Option::Some("OPEN_MODE_UNSPECIFIED"),
2798 Self::ReadOnly => std::option::Option::Some("READ_ONLY"),
2799 Self::ReadWrite => std::option::Option::Some("READ_WRITE"),
2800 Self::UnknownValue(u) => u.0.name(),
2801 }
2802 }
2803 }
2804
2805 impl std::default::Default for OpenMode {
2806 fn default() -> Self {
2807 use std::convert::From;
2808 Self::from(0)
2809 }
2810 }
2811
2812 impl std::fmt::Display for OpenMode {
2813 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2814 wkt::internal::display_enum(f, self.name(), self.value())
2815 }
2816 }
2817
2818 impl std::convert::From<i32> for OpenMode {
2819 fn from(value: i32) -> Self {
2820 match value {
2821 0 => Self::Unspecified,
2822 1 => Self::ReadOnly,
2823 2 => Self::ReadWrite,
2824 _ => Self::UnknownValue(open_mode::UnknownValue(
2825 wkt::internal::UnknownEnumValue::Integer(value),
2826 )),
2827 }
2828 }
2829 }
2830
2831 impl std::convert::From<&str> for OpenMode {
2832 fn from(value: &str) -> Self {
2833 use std::string::ToString;
2834 match value {
2835 "OPEN_MODE_UNSPECIFIED" => Self::Unspecified,
2836 "READ_ONLY" => Self::ReadOnly,
2837 "READ_WRITE" => Self::ReadWrite,
2838 _ => Self::UnknownValue(open_mode::UnknownValue(
2839 wkt::internal::UnknownEnumValue::String(value.to_string()),
2840 )),
2841 }
2842 }
2843 }
2844
2845 impl serde::ser::Serialize for OpenMode {
2846 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2847 where
2848 S: serde::Serializer,
2849 {
2850 match self {
2851 Self::Unspecified => serializer.serialize_i32(0),
2852 Self::ReadOnly => serializer.serialize_i32(1),
2853 Self::ReadWrite => serializer.serialize_i32(2),
2854 Self::UnknownValue(u) => u.0.serialize(serializer),
2855 }
2856 }
2857 }
2858
2859 impl<'de> serde::de::Deserialize<'de> for OpenMode {
2860 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2861 where
2862 D: serde::Deserializer<'de>,
2863 {
2864 deserializer.deserialize_any(wkt::internal::EnumVisitor::<OpenMode>::new(
2865 ".google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.OpenMode",
2866 ))
2867 }
2868 }
2869
2870 /// The types of permission levels for an Autonomous Database.
2871 ///
2872 /// # Working with unknown values
2873 ///
2874 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2875 /// additional enum variants at any time. Adding new variants is not considered
2876 /// a breaking change. Applications should write their code in anticipation of:
2877 ///
2878 /// - New values appearing in future releases of the client library, **and**
2879 /// - New values received dynamically, without application changes.
2880 ///
2881 /// Please consult the [Working with enums] section in the user guide for some
2882 /// guidelines.
2883 ///
2884 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2885 #[derive(Clone, Debug, PartialEq)]
2886 #[non_exhaustive]
2887 pub enum PermissionLevel {
2888 /// Default unspecified value.
2889 Unspecified,
2890 /// Restricted mode allows access only by admin users.
2891 Restricted,
2892 /// Normal access.
2893 Unrestricted,
2894 /// If set, the enum was initialized with an unknown value.
2895 ///
2896 /// Applications can examine the value using [PermissionLevel::value] or
2897 /// [PermissionLevel::name].
2898 UnknownValue(permission_level::UnknownValue),
2899 }
2900
2901 #[doc(hidden)]
2902 pub mod permission_level {
2903 #[allow(unused_imports)]
2904 use super::*;
2905 #[derive(Clone, Debug, PartialEq)]
2906 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2907 }
2908
2909 impl PermissionLevel {
2910 /// Gets the enum value.
2911 ///
2912 /// Returns `None` if the enum contains an unknown value deserialized from
2913 /// the string representation of enums.
2914 pub fn value(&self) -> std::option::Option<i32> {
2915 match self {
2916 Self::Unspecified => std::option::Option::Some(0),
2917 Self::Restricted => std::option::Option::Some(1),
2918 Self::Unrestricted => std::option::Option::Some(2),
2919 Self::UnknownValue(u) => u.0.value(),
2920 }
2921 }
2922
2923 /// Gets the enum value as a string.
2924 ///
2925 /// Returns `None` if the enum contains an unknown value deserialized from
2926 /// the integer representation of enums.
2927 pub fn name(&self) -> std::option::Option<&str> {
2928 match self {
2929 Self::Unspecified => std::option::Option::Some("PERMISSION_LEVEL_UNSPECIFIED"),
2930 Self::Restricted => std::option::Option::Some("RESTRICTED"),
2931 Self::Unrestricted => std::option::Option::Some("UNRESTRICTED"),
2932 Self::UnknownValue(u) => u.0.name(),
2933 }
2934 }
2935 }
2936
2937 impl std::default::Default for PermissionLevel {
2938 fn default() -> Self {
2939 use std::convert::From;
2940 Self::from(0)
2941 }
2942 }
2943
2944 impl std::fmt::Display for PermissionLevel {
2945 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2946 wkt::internal::display_enum(f, self.name(), self.value())
2947 }
2948 }
2949
2950 impl std::convert::From<i32> for PermissionLevel {
2951 fn from(value: i32) -> Self {
2952 match value {
2953 0 => Self::Unspecified,
2954 1 => Self::Restricted,
2955 2 => Self::Unrestricted,
2956 _ => Self::UnknownValue(permission_level::UnknownValue(
2957 wkt::internal::UnknownEnumValue::Integer(value),
2958 )),
2959 }
2960 }
2961 }
2962
2963 impl std::convert::From<&str> for PermissionLevel {
2964 fn from(value: &str) -> Self {
2965 use std::string::ToString;
2966 match value {
2967 "PERMISSION_LEVEL_UNSPECIFIED" => Self::Unspecified,
2968 "RESTRICTED" => Self::Restricted,
2969 "UNRESTRICTED" => Self::Unrestricted,
2970 _ => Self::UnknownValue(permission_level::UnknownValue(
2971 wkt::internal::UnknownEnumValue::String(value.to_string()),
2972 )),
2973 }
2974 }
2975 }
2976
2977 impl serde::ser::Serialize for PermissionLevel {
2978 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2979 where
2980 S: serde::Serializer,
2981 {
2982 match self {
2983 Self::Unspecified => serializer.serialize_i32(0),
2984 Self::Restricted => serializer.serialize_i32(1),
2985 Self::Unrestricted => serializer.serialize_i32(2),
2986 Self::UnknownValue(u) => u.0.serialize(serializer),
2987 }
2988 }
2989 }
2990
2991 impl<'de> serde::de::Deserialize<'de> for PermissionLevel {
2992 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2993 where
2994 D: serde::Deserializer<'de>,
2995 {
2996 deserializer.deserialize_any(wkt::internal::EnumVisitor::<PermissionLevel>::new(
2997 ".google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.PermissionLevel",
2998 ))
2999 }
3000 }
3001
3002 /// The refresh mode of the cloned Autonomous Database.
3003 ///
3004 /// # Working with unknown values
3005 ///
3006 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3007 /// additional enum variants at any time. Adding new variants is not considered
3008 /// a breaking change. Applications should write their code in anticipation of:
3009 ///
3010 /// - New values appearing in future releases of the client library, **and**
3011 /// - New values received dynamically, without application changes.
3012 ///
3013 /// Please consult the [Working with enums] section in the user guide for some
3014 /// guidelines.
3015 ///
3016 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3017 #[derive(Clone, Debug, PartialEq)]
3018 #[non_exhaustive]
3019 pub enum RefreshableMode {
3020 /// The default unspecified value.
3021 Unspecified,
3022 /// AUTOMATIC indicates that the cloned database is automatically
3023 /// refreshed with data from the source Autonomous Database.
3024 Automatic,
3025 /// MANUAL indicates that the cloned database is manually refreshed with
3026 /// data from the source Autonomous Database.
3027 Manual,
3028 /// If set, the enum was initialized with an unknown value.
3029 ///
3030 /// Applications can examine the value using [RefreshableMode::value] or
3031 /// [RefreshableMode::name].
3032 UnknownValue(refreshable_mode::UnknownValue),
3033 }
3034
3035 #[doc(hidden)]
3036 pub mod refreshable_mode {
3037 #[allow(unused_imports)]
3038 use super::*;
3039 #[derive(Clone, Debug, PartialEq)]
3040 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3041 }
3042
3043 impl RefreshableMode {
3044 /// Gets the enum value.
3045 ///
3046 /// Returns `None` if the enum contains an unknown value deserialized from
3047 /// the string representation of enums.
3048 pub fn value(&self) -> std::option::Option<i32> {
3049 match self {
3050 Self::Unspecified => std::option::Option::Some(0),
3051 Self::Automatic => std::option::Option::Some(1),
3052 Self::Manual => std::option::Option::Some(2),
3053 Self::UnknownValue(u) => u.0.value(),
3054 }
3055 }
3056
3057 /// Gets the enum value as a string.
3058 ///
3059 /// Returns `None` if the enum contains an unknown value deserialized from
3060 /// the integer representation of enums.
3061 pub fn name(&self) -> std::option::Option<&str> {
3062 match self {
3063 Self::Unspecified => std::option::Option::Some("REFRESHABLE_MODE_UNSPECIFIED"),
3064 Self::Automatic => std::option::Option::Some("AUTOMATIC"),
3065 Self::Manual => std::option::Option::Some("MANUAL"),
3066 Self::UnknownValue(u) => u.0.name(),
3067 }
3068 }
3069 }
3070
3071 impl std::default::Default for RefreshableMode {
3072 fn default() -> Self {
3073 use std::convert::From;
3074 Self::from(0)
3075 }
3076 }
3077
3078 impl std::fmt::Display for RefreshableMode {
3079 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3080 wkt::internal::display_enum(f, self.name(), self.value())
3081 }
3082 }
3083
3084 impl std::convert::From<i32> for RefreshableMode {
3085 fn from(value: i32) -> Self {
3086 match value {
3087 0 => Self::Unspecified,
3088 1 => Self::Automatic,
3089 2 => Self::Manual,
3090 _ => Self::UnknownValue(refreshable_mode::UnknownValue(
3091 wkt::internal::UnknownEnumValue::Integer(value),
3092 )),
3093 }
3094 }
3095 }
3096
3097 impl std::convert::From<&str> for RefreshableMode {
3098 fn from(value: &str) -> Self {
3099 use std::string::ToString;
3100 match value {
3101 "REFRESHABLE_MODE_UNSPECIFIED" => Self::Unspecified,
3102 "AUTOMATIC" => Self::Automatic,
3103 "MANUAL" => Self::Manual,
3104 _ => Self::UnknownValue(refreshable_mode::UnknownValue(
3105 wkt::internal::UnknownEnumValue::String(value.to_string()),
3106 )),
3107 }
3108 }
3109 }
3110
3111 impl serde::ser::Serialize for RefreshableMode {
3112 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3113 where
3114 S: serde::Serializer,
3115 {
3116 match self {
3117 Self::Unspecified => serializer.serialize_i32(0),
3118 Self::Automatic => serializer.serialize_i32(1),
3119 Self::Manual => serializer.serialize_i32(2),
3120 Self::UnknownValue(u) => u.0.serialize(serializer),
3121 }
3122 }
3123 }
3124
3125 impl<'de> serde::de::Deserialize<'de> for RefreshableMode {
3126 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3127 where
3128 D: serde::Deserializer<'de>,
3129 {
3130 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RefreshableMode>::new(
3131 ".google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableMode",
3132 ))
3133 }
3134 }
3135
3136 /// The refresh state of the cloned Autonomous Database.
3137 ///
3138 /// # Working with unknown values
3139 ///
3140 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3141 /// additional enum variants at any time. Adding new variants is not considered
3142 /// a breaking change. Applications should write their code in anticipation of:
3143 ///
3144 /// - New values appearing in future releases of the client library, **and**
3145 /// - New values received dynamically, without application changes.
3146 ///
3147 /// Please consult the [Working with enums] section in the user guide for some
3148 /// guidelines.
3149 ///
3150 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3151 #[derive(Clone, Debug, PartialEq)]
3152 #[non_exhaustive]
3153 pub enum RefreshableState {
3154 /// Default unspecified value.
3155 Unspecified,
3156 /// Refreshing
3157 Refreshing,
3158 /// Not refreshed
3159 NotRefreshing,
3160 /// If set, the enum was initialized with an unknown value.
3161 ///
3162 /// Applications can examine the value using [RefreshableState::value] or
3163 /// [RefreshableState::name].
3164 UnknownValue(refreshable_state::UnknownValue),
3165 }
3166
3167 #[doc(hidden)]
3168 pub mod refreshable_state {
3169 #[allow(unused_imports)]
3170 use super::*;
3171 #[derive(Clone, Debug, PartialEq)]
3172 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3173 }
3174
3175 impl RefreshableState {
3176 /// Gets the enum value.
3177 ///
3178 /// Returns `None` if the enum contains an unknown value deserialized from
3179 /// the string representation of enums.
3180 pub fn value(&self) -> std::option::Option<i32> {
3181 match self {
3182 Self::Unspecified => std::option::Option::Some(0),
3183 Self::Refreshing => std::option::Option::Some(1),
3184 Self::NotRefreshing => std::option::Option::Some(2),
3185 Self::UnknownValue(u) => u.0.value(),
3186 }
3187 }
3188
3189 /// Gets the enum value as a string.
3190 ///
3191 /// Returns `None` if the enum contains an unknown value deserialized from
3192 /// the integer representation of enums.
3193 pub fn name(&self) -> std::option::Option<&str> {
3194 match self {
3195 Self::Unspecified => std::option::Option::Some("REFRESHABLE_STATE_UNSPECIFIED"),
3196 Self::Refreshing => std::option::Option::Some("REFRESHING"),
3197 Self::NotRefreshing => std::option::Option::Some("NOT_REFRESHING"),
3198 Self::UnknownValue(u) => u.0.name(),
3199 }
3200 }
3201 }
3202
3203 impl std::default::Default for RefreshableState {
3204 fn default() -> Self {
3205 use std::convert::From;
3206 Self::from(0)
3207 }
3208 }
3209
3210 impl std::fmt::Display for RefreshableState {
3211 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3212 wkt::internal::display_enum(f, self.name(), self.value())
3213 }
3214 }
3215
3216 impl std::convert::From<i32> for RefreshableState {
3217 fn from(value: i32) -> Self {
3218 match value {
3219 0 => Self::Unspecified,
3220 1 => Self::Refreshing,
3221 2 => Self::NotRefreshing,
3222 _ => Self::UnknownValue(refreshable_state::UnknownValue(
3223 wkt::internal::UnknownEnumValue::Integer(value),
3224 )),
3225 }
3226 }
3227 }
3228
3229 impl std::convert::From<&str> for RefreshableState {
3230 fn from(value: &str) -> Self {
3231 use std::string::ToString;
3232 match value {
3233 "REFRESHABLE_STATE_UNSPECIFIED" => Self::Unspecified,
3234 "REFRESHING" => Self::Refreshing,
3235 "NOT_REFRESHING" => Self::NotRefreshing,
3236 _ => Self::UnknownValue(refreshable_state::UnknownValue(
3237 wkt::internal::UnknownEnumValue::String(value.to_string()),
3238 )),
3239 }
3240 }
3241 }
3242
3243 impl serde::ser::Serialize for RefreshableState {
3244 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3245 where
3246 S: serde::Serializer,
3247 {
3248 match self {
3249 Self::Unspecified => serializer.serialize_i32(0),
3250 Self::Refreshing => serializer.serialize_i32(1),
3251 Self::NotRefreshing => serializer.serialize_i32(2),
3252 Self::UnknownValue(u) => u.0.serialize(serializer),
3253 }
3254 }
3255 }
3256
3257 impl<'de> serde::de::Deserialize<'de> for RefreshableState {
3258 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3259 where
3260 D: serde::Deserializer<'de>,
3261 {
3262 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RefreshableState>::new(
3263 ".google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableState",
3264 ))
3265 }
3266 }
3267
3268 /// The Data Guard role of the Autonomous Database.
3269 ///
3270 /// # Working with unknown values
3271 ///
3272 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3273 /// additional enum variants at any time. Adding new variants is not considered
3274 /// a breaking change. Applications should write their code in anticipation of:
3275 ///
3276 /// - New values appearing in future releases of the client library, **and**
3277 /// - New values received dynamically, without application changes.
3278 ///
3279 /// Please consult the [Working with enums] section in the user guide for some
3280 /// guidelines.
3281 ///
3282 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3283 #[derive(Clone, Debug, PartialEq)]
3284 #[non_exhaustive]
3285 pub enum Role {
3286 /// Default unspecified value.
3287 Unspecified,
3288 /// Primary role
3289 Primary,
3290 /// Standby role
3291 Standby,
3292 /// Disabled standby role
3293 DisabledStandby,
3294 /// Backup copy role
3295 BackupCopy,
3296 /// Snapshot standby role
3297 SnapshotStandby,
3298 /// If set, the enum was initialized with an unknown value.
3299 ///
3300 /// Applications can examine the value using [Role::value] or
3301 /// [Role::name].
3302 UnknownValue(role::UnknownValue),
3303 }
3304
3305 #[doc(hidden)]
3306 pub mod role {
3307 #[allow(unused_imports)]
3308 use super::*;
3309 #[derive(Clone, Debug, PartialEq)]
3310 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3311 }
3312
3313 impl Role {
3314 /// Gets the enum value.
3315 ///
3316 /// Returns `None` if the enum contains an unknown value deserialized from
3317 /// the string representation of enums.
3318 pub fn value(&self) -> std::option::Option<i32> {
3319 match self {
3320 Self::Unspecified => std::option::Option::Some(0),
3321 Self::Primary => std::option::Option::Some(1),
3322 Self::Standby => std::option::Option::Some(2),
3323 Self::DisabledStandby => std::option::Option::Some(3),
3324 Self::BackupCopy => std::option::Option::Some(4),
3325 Self::SnapshotStandby => std::option::Option::Some(5),
3326 Self::UnknownValue(u) => u.0.value(),
3327 }
3328 }
3329
3330 /// Gets the enum value as a string.
3331 ///
3332 /// Returns `None` if the enum contains an unknown value deserialized from
3333 /// the integer representation of enums.
3334 pub fn name(&self) -> std::option::Option<&str> {
3335 match self {
3336 Self::Unspecified => std::option::Option::Some("ROLE_UNSPECIFIED"),
3337 Self::Primary => std::option::Option::Some("PRIMARY"),
3338 Self::Standby => std::option::Option::Some("STANDBY"),
3339 Self::DisabledStandby => std::option::Option::Some("DISABLED_STANDBY"),
3340 Self::BackupCopy => std::option::Option::Some("BACKUP_COPY"),
3341 Self::SnapshotStandby => std::option::Option::Some("SNAPSHOT_STANDBY"),
3342 Self::UnknownValue(u) => u.0.name(),
3343 }
3344 }
3345 }
3346
3347 impl std::default::Default for Role {
3348 fn default() -> Self {
3349 use std::convert::From;
3350 Self::from(0)
3351 }
3352 }
3353
3354 impl std::fmt::Display for Role {
3355 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3356 wkt::internal::display_enum(f, self.name(), self.value())
3357 }
3358 }
3359
3360 impl std::convert::From<i32> for Role {
3361 fn from(value: i32) -> Self {
3362 match value {
3363 0 => Self::Unspecified,
3364 1 => Self::Primary,
3365 2 => Self::Standby,
3366 3 => Self::DisabledStandby,
3367 4 => Self::BackupCopy,
3368 5 => Self::SnapshotStandby,
3369 _ => Self::UnknownValue(role::UnknownValue(
3370 wkt::internal::UnknownEnumValue::Integer(value),
3371 )),
3372 }
3373 }
3374 }
3375
3376 impl std::convert::From<&str> for Role {
3377 fn from(value: &str) -> Self {
3378 use std::string::ToString;
3379 match value {
3380 "ROLE_UNSPECIFIED" => Self::Unspecified,
3381 "PRIMARY" => Self::Primary,
3382 "STANDBY" => Self::Standby,
3383 "DISABLED_STANDBY" => Self::DisabledStandby,
3384 "BACKUP_COPY" => Self::BackupCopy,
3385 "SNAPSHOT_STANDBY" => Self::SnapshotStandby,
3386 _ => Self::UnknownValue(role::UnknownValue(
3387 wkt::internal::UnknownEnumValue::String(value.to_string()),
3388 )),
3389 }
3390 }
3391 }
3392
3393 impl serde::ser::Serialize for Role {
3394 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3395 where
3396 S: serde::Serializer,
3397 {
3398 match self {
3399 Self::Unspecified => serializer.serialize_i32(0),
3400 Self::Primary => serializer.serialize_i32(1),
3401 Self::Standby => serializer.serialize_i32(2),
3402 Self::DisabledStandby => serializer.serialize_i32(3),
3403 Self::BackupCopy => serializer.serialize_i32(4),
3404 Self::SnapshotStandby => serializer.serialize_i32(5),
3405 Self::UnknownValue(u) => u.0.serialize(serializer),
3406 }
3407 }
3408 }
3409
3410 impl<'de> serde::de::Deserialize<'de> for Role {
3411 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3412 where
3413 D: serde::Deserializer<'de>,
3414 {
3415 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Role>::new(
3416 ".google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.Role",
3417 ))
3418 }
3419 }
3420}
3421
3422/// The history of the encryption keys used to encrypt the Autonomous Database.
3423#[derive(Clone, Default, PartialEq)]
3424#[non_exhaustive]
3425pub struct EncryptionKeyHistoryEntry {
3426 /// Output only. The encryption key used to encrypt the Autonomous Database.
3427 pub encryption_key: std::option::Option<crate::model::EncryptionKey>,
3428
3429 /// Output only. The date and time when the encryption key was activated on the
3430 /// Autonomous Database..
3431 pub activation_time: std::option::Option<wkt::Timestamp>,
3432
3433 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3434}
3435
3436impl EncryptionKeyHistoryEntry {
3437 pub fn new() -> Self {
3438 std::default::Default::default()
3439 }
3440
3441 /// Sets the value of [encryption_key][crate::model::EncryptionKeyHistoryEntry::encryption_key].
3442 ///
3443 /// # Example
3444 /// ```ignore,no_run
3445 /// # use google_cloud_oracledatabase_v1::model::EncryptionKeyHistoryEntry;
3446 /// use google_cloud_oracledatabase_v1::model::EncryptionKey;
3447 /// let x = EncryptionKeyHistoryEntry::new().set_encryption_key(EncryptionKey::default()/* use setters */);
3448 /// ```
3449 pub fn set_encryption_key<T>(mut self, v: T) -> Self
3450 where
3451 T: std::convert::Into<crate::model::EncryptionKey>,
3452 {
3453 self.encryption_key = std::option::Option::Some(v.into());
3454 self
3455 }
3456
3457 /// Sets or clears the value of [encryption_key][crate::model::EncryptionKeyHistoryEntry::encryption_key].
3458 ///
3459 /// # Example
3460 /// ```ignore,no_run
3461 /// # use google_cloud_oracledatabase_v1::model::EncryptionKeyHistoryEntry;
3462 /// use google_cloud_oracledatabase_v1::model::EncryptionKey;
3463 /// let x = EncryptionKeyHistoryEntry::new().set_or_clear_encryption_key(Some(EncryptionKey::default()/* use setters */));
3464 /// let x = EncryptionKeyHistoryEntry::new().set_or_clear_encryption_key(None::<EncryptionKey>);
3465 /// ```
3466 pub fn set_or_clear_encryption_key<T>(mut self, v: std::option::Option<T>) -> Self
3467 where
3468 T: std::convert::Into<crate::model::EncryptionKey>,
3469 {
3470 self.encryption_key = v.map(|x| x.into());
3471 self
3472 }
3473
3474 /// Sets the value of [activation_time][crate::model::EncryptionKeyHistoryEntry::activation_time].
3475 ///
3476 /// # Example
3477 /// ```ignore,no_run
3478 /// # use google_cloud_oracledatabase_v1::model::EncryptionKeyHistoryEntry;
3479 /// use wkt::Timestamp;
3480 /// let x = EncryptionKeyHistoryEntry::new().set_activation_time(Timestamp::default()/* use setters */);
3481 /// ```
3482 pub fn set_activation_time<T>(mut self, v: T) -> Self
3483 where
3484 T: std::convert::Into<wkt::Timestamp>,
3485 {
3486 self.activation_time = std::option::Option::Some(v.into());
3487 self
3488 }
3489
3490 /// Sets or clears the value of [activation_time][crate::model::EncryptionKeyHistoryEntry::activation_time].
3491 ///
3492 /// # Example
3493 /// ```ignore,no_run
3494 /// # use google_cloud_oracledatabase_v1::model::EncryptionKeyHistoryEntry;
3495 /// use wkt::Timestamp;
3496 /// let x = EncryptionKeyHistoryEntry::new().set_or_clear_activation_time(Some(Timestamp::default()/* use setters */));
3497 /// let x = EncryptionKeyHistoryEntry::new().set_or_clear_activation_time(None::<Timestamp>);
3498 /// ```
3499 pub fn set_or_clear_activation_time<T>(mut self, v: std::option::Option<T>) -> Self
3500 where
3501 T: std::convert::Into<wkt::Timestamp>,
3502 {
3503 self.activation_time = v.map(|x| x.into());
3504 self
3505 }
3506}
3507
3508impl wkt::message::Message for EncryptionKeyHistoryEntry {
3509 fn typename() -> &'static str {
3510 "type.googleapis.com/google.cloud.oracledatabase.v1.EncryptionKeyHistoryEntry"
3511 }
3512}
3513
3514/// The encryption key used to encrypt the Autonomous Database.
3515#[derive(Clone, Default, PartialEq)]
3516#[non_exhaustive]
3517pub struct EncryptionKey {
3518 /// Optional. The provider of the encryption key.
3519 pub provider: crate::model::encryption_key::Provider,
3520
3521 /// Optional. The KMS key used to encrypt the Autonomous Database.
3522 /// This field is required if the provider is GOOGLE_MANAGED.
3523 /// The name of the KMS key resource in the following format:
3524 /// `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
3525 pub kms_key: std::string::String,
3526
3527 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3528}
3529
3530impl EncryptionKey {
3531 pub fn new() -> Self {
3532 std::default::Default::default()
3533 }
3534
3535 /// Sets the value of [provider][crate::model::EncryptionKey::provider].
3536 ///
3537 /// # Example
3538 /// ```ignore,no_run
3539 /// # use google_cloud_oracledatabase_v1::model::EncryptionKey;
3540 /// use google_cloud_oracledatabase_v1::model::encryption_key::Provider;
3541 /// let x0 = EncryptionKey::new().set_provider(Provider::GoogleManaged);
3542 /// let x1 = EncryptionKey::new().set_provider(Provider::OracleManaged);
3543 /// ```
3544 pub fn set_provider<T: std::convert::Into<crate::model::encryption_key::Provider>>(
3545 mut self,
3546 v: T,
3547 ) -> Self {
3548 self.provider = v.into();
3549 self
3550 }
3551
3552 /// Sets the value of [kms_key][crate::model::EncryptionKey::kms_key].
3553 ///
3554 /// # Example
3555 /// ```ignore,no_run
3556 /// # use google_cloud_oracledatabase_v1::model::EncryptionKey;
3557 /// let x = EncryptionKey::new().set_kms_key("example");
3558 /// ```
3559 pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3560 self.kms_key = v.into();
3561 self
3562 }
3563}
3564
3565impl wkt::message::Message for EncryptionKey {
3566 fn typename() -> &'static str {
3567 "type.googleapis.com/google.cloud.oracledatabase.v1.EncryptionKey"
3568 }
3569}
3570
3571/// Defines additional types related to [EncryptionKey].
3572pub mod encryption_key {
3573 #[allow(unused_imports)]
3574 use super::*;
3575
3576 /// The provider of the encryption key.
3577 ///
3578 /// # Working with unknown values
3579 ///
3580 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3581 /// additional enum variants at any time. Adding new variants is not considered
3582 /// a breaking change. Applications should write their code in anticipation of:
3583 ///
3584 /// - New values appearing in future releases of the client library, **and**
3585 /// - New values received dynamically, without application changes.
3586 ///
3587 /// Please consult the [Working with enums] section in the user guide for some
3588 /// guidelines.
3589 ///
3590 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3591 #[derive(Clone, Debug, PartialEq)]
3592 #[non_exhaustive]
3593 pub enum Provider {
3594 /// Default unspecified value.
3595 Unspecified,
3596 /// Google Managed KMS key, if selected, please provide the KMS key name.
3597 GoogleManaged,
3598 /// Oracle Managed.
3599 OracleManaged,
3600 /// If set, the enum was initialized with an unknown value.
3601 ///
3602 /// Applications can examine the value using [Provider::value] or
3603 /// [Provider::name].
3604 UnknownValue(provider::UnknownValue),
3605 }
3606
3607 #[doc(hidden)]
3608 pub mod provider {
3609 #[allow(unused_imports)]
3610 use super::*;
3611 #[derive(Clone, Debug, PartialEq)]
3612 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3613 }
3614
3615 impl Provider {
3616 /// Gets the enum value.
3617 ///
3618 /// Returns `None` if the enum contains an unknown value deserialized from
3619 /// the string representation of enums.
3620 pub fn value(&self) -> std::option::Option<i32> {
3621 match self {
3622 Self::Unspecified => std::option::Option::Some(0),
3623 Self::GoogleManaged => std::option::Option::Some(1),
3624 Self::OracleManaged => std::option::Option::Some(2),
3625 Self::UnknownValue(u) => u.0.value(),
3626 }
3627 }
3628
3629 /// Gets the enum value as a string.
3630 ///
3631 /// Returns `None` if the enum contains an unknown value deserialized from
3632 /// the integer representation of enums.
3633 pub fn name(&self) -> std::option::Option<&str> {
3634 match self {
3635 Self::Unspecified => std::option::Option::Some("PROVIDER_UNSPECIFIED"),
3636 Self::GoogleManaged => std::option::Option::Some("GOOGLE_MANAGED"),
3637 Self::OracleManaged => std::option::Option::Some("ORACLE_MANAGED"),
3638 Self::UnknownValue(u) => u.0.name(),
3639 }
3640 }
3641 }
3642
3643 impl std::default::Default for Provider {
3644 fn default() -> Self {
3645 use std::convert::From;
3646 Self::from(0)
3647 }
3648 }
3649
3650 impl std::fmt::Display for Provider {
3651 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3652 wkt::internal::display_enum(f, self.name(), self.value())
3653 }
3654 }
3655
3656 impl std::convert::From<i32> for Provider {
3657 fn from(value: i32) -> Self {
3658 match value {
3659 0 => Self::Unspecified,
3660 1 => Self::GoogleManaged,
3661 2 => Self::OracleManaged,
3662 _ => Self::UnknownValue(provider::UnknownValue(
3663 wkt::internal::UnknownEnumValue::Integer(value),
3664 )),
3665 }
3666 }
3667 }
3668
3669 impl std::convert::From<&str> for Provider {
3670 fn from(value: &str) -> Self {
3671 use std::string::ToString;
3672 match value {
3673 "PROVIDER_UNSPECIFIED" => Self::Unspecified,
3674 "GOOGLE_MANAGED" => Self::GoogleManaged,
3675 "ORACLE_MANAGED" => Self::OracleManaged,
3676 _ => Self::UnknownValue(provider::UnknownValue(
3677 wkt::internal::UnknownEnumValue::String(value.to_string()),
3678 )),
3679 }
3680 }
3681 }
3682
3683 impl serde::ser::Serialize for Provider {
3684 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3685 where
3686 S: serde::Serializer,
3687 {
3688 match self {
3689 Self::Unspecified => serializer.serialize_i32(0),
3690 Self::GoogleManaged => serializer.serialize_i32(1),
3691 Self::OracleManaged => serializer.serialize_i32(2),
3692 Self::UnknownValue(u) => u.0.serialize(serializer),
3693 }
3694 }
3695 }
3696
3697 impl<'de> serde::de::Deserialize<'de> for Provider {
3698 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3699 where
3700 D: serde::Deserializer<'de>,
3701 {
3702 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Provider>::new(
3703 ".google.cloud.oracledatabase.v1.EncryptionKey.Provider",
3704 ))
3705 }
3706 }
3707}
3708
3709/// Oracle APEX Application Development.
3710/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseApex>
3711#[derive(Clone, Default, PartialEq)]
3712#[non_exhaustive]
3713pub struct AutonomousDatabaseApex {
3714 /// Output only. The Oracle APEX Application Development version.
3715 pub apex_version: std::string::String,
3716
3717 /// Output only. The Oracle REST Data Services (ORDS) version.
3718 pub ords_version: std::string::String,
3719
3720 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3721}
3722
3723impl AutonomousDatabaseApex {
3724 pub fn new() -> Self {
3725 std::default::Default::default()
3726 }
3727
3728 /// Sets the value of [apex_version][crate::model::AutonomousDatabaseApex::apex_version].
3729 ///
3730 /// # Example
3731 /// ```ignore,no_run
3732 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseApex;
3733 /// let x = AutonomousDatabaseApex::new().set_apex_version("example");
3734 /// ```
3735 pub fn set_apex_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3736 self.apex_version = v.into();
3737 self
3738 }
3739
3740 /// Sets the value of [ords_version][crate::model::AutonomousDatabaseApex::ords_version].
3741 ///
3742 /// # Example
3743 /// ```ignore,no_run
3744 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseApex;
3745 /// let x = AutonomousDatabaseApex::new().set_ords_version("example");
3746 /// ```
3747 pub fn set_ords_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3748 self.ords_version = v.into();
3749 self
3750 }
3751}
3752
3753impl wkt::message::Message for AutonomousDatabaseApex {
3754 fn typename() -> &'static str {
3755 "type.googleapis.com/google.cloud.oracledatabase.v1.AutonomousDatabaseApex"
3756 }
3757}
3758
3759/// The connection string used to connect to the Autonomous Database.
3760/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseConnectionStrings>
3761#[derive(Clone, Default, PartialEq)]
3762#[non_exhaustive]
3763pub struct AutonomousDatabaseConnectionStrings {
3764 /// Output only. Returns all connection strings that can be used to connect to
3765 /// the Autonomous Database.
3766 pub all_connection_strings: std::option::Option<crate::model::AllConnectionStrings>,
3767
3768 /// Output only. The database service provides the least level of resources to
3769 /// each SQL statement, but supports the most number of concurrent SQL
3770 /// statements.
3771 pub dedicated: std::string::String,
3772
3773 /// Output only. The database service provides the highest level of resources
3774 /// to each SQL statement.
3775 pub high: std::string::String,
3776
3777 /// Output only. The database service provides the least level of resources to
3778 /// each SQL statement.
3779 pub low: std::string::String,
3780
3781 /// Output only. The database service provides a lower level of resources to
3782 /// each SQL statement.
3783 pub medium: std::string::String,
3784
3785 /// Output only. A list of connection string profiles to allow clients to
3786 /// group, filter, and select values based on the structured metadata.
3787 pub profiles: std::vec::Vec<crate::model::DatabaseConnectionStringProfile>,
3788
3789 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3790}
3791
3792impl AutonomousDatabaseConnectionStrings {
3793 pub fn new() -> Self {
3794 std::default::Default::default()
3795 }
3796
3797 /// Sets the value of [all_connection_strings][crate::model::AutonomousDatabaseConnectionStrings::all_connection_strings].
3798 ///
3799 /// # Example
3800 /// ```ignore,no_run
3801 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionStrings;
3802 /// use google_cloud_oracledatabase_v1::model::AllConnectionStrings;
3803 /// let x = AutonomousDatabaseConnectionStrings::new().set_all_connection_strings(AllConnectionStrings::default()/* use setters */);
3804 /// ```
3805 pub fn set_all_connection_strings<T>(mut self, v: T) -> Self
3806 where
3807 T: std::convert::Into<crate::model::AllConnectionStrings>,
3808 {
3809 self.all_connection_strings = std::option::Option::Some(v.into());
3810 self
3811 }
3812
3813 /// Sets or clears the value of [all_connection_strings][crate::model::AutonomousDatabaseConnectionStrings::all_connection_strings].
3814 ///
3815 /// # Example
3816 /// ```ignore,no_run
3817 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionStrings;
3818 /// use google_cloud_oracledatabase_v1::model::AllConnectionStrings;
3819 /// let x = AutonomousDatabaseConnectionStrings::new().set_or_clear_all_connection_strings(Some(AllConnectionStrings::default()/* use setters */));
3820 /// let x = AutonomousDatabaseConnectionStrings::new().set_or_clear_all_connection_strings(None::<AllConnectionStrings>);
3821 /// ```
3822 pub fn set_or_clear_all_connection_strings<T>(mut self, v: std::option::Option<T>) -> Self
3823 where
3824 T: std::convert::Into<crate::model::AllConnectionStrings>,
3825 {
3826 self.all_connection_strings = v.map(|x| x.into());
3827 self
3828 }
3829
3830 /// Sets the value of [dedicated][crate::model::AutonomousDatabaseConnectionStrings::dedicated].
3831 ///
3832 /// # Example
3833 /// ```ignore,no_run
3834 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionStrings;
3835 /// let x = AutonomousDatabaseConnectionStrings::new().set_dedicated("example");
3836 /// ```
3837 pub fn set_dedicated<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3838 self.dedicated = v.into();
3839 self
3840 }
3841
3842 /// Sets the value of [high][crate::model::AutonomousDatabaseConnectionStrings::high].
3843 ///
3844 /// # Example
3845 /// ```ignore,no_run
3846 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionStrings;
3847 /// let x = AutonomousDatabaseConnectionStrings::new().set_high("example");
3848 /// ```
3849 pub fn set_high<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3850 self.high = v.into();
3851 self
3852 }
3853
3854 /// Sets the value of [low][crate::model::AutonomousDatabaseConnectionStrings::low].
3855 ///
3856 /// # Example
3857 /// ```ignore,no_run
3858 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionStrings;
3859 /// let x = AutonomousDatabaseConnectionStrings::new().set_low("example");
3860 /// ```
3861 pub fn set_low<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3862 self.low = v.into();
3863 self
3864 }
3865
3866 /// Sets the value of [medium][crate::model::AutonomousDatabaseConnectionStrings::medium].
3867 ///
3868 /// # Example
3869 /// ```ignore,no_run
3870 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionStrings;
3871 /// let x = AutonomousDatabaseConnectionStrings::new().set_medium("example");
3872 /// ```
3873 pub fn set_medium<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3874 self.medium = v.into();
3875 self
3876 }
3877
3878 /// Sets the value of [profiles][crate::model::AutonomousDatabaseConnectionStrings::profiles].
3879 ///
3880 /// # Example
3881 /// ```ignore,no_run
3882 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionStrings;
3883 /// use google_cloud_oracledatabase_v1::model::DatabaseConnectionStringProfile;
3884 /// let x = AutonomousDatabaseConnectionStrings::new()
3885 /// .set_profiles([
3886 /// DatabaseConnectionStringProfile::default()/* use setters */,
3887 /// DatabaseConnectionStringProfile::default()/* use (different) setters */,
3888 /// ]);
3889 /// ```
3890 pub fn set_profiles<T, V>(mut self, v: T) -> Self
3891 where
3892 T: std::iter::IntoIterator<Item = V>,
3893 V: std::convert::Into<crate::model::DatabaseConnectionStringProfile>,
3894 {
3895 use std::iter::Iterator;
3896 self.profiles = v.into_iter().map(|i| i.into()).collect();
3897 self
3898 }
3899}
3900
3901impl wkt::message::Message for AutonomousDatabaseConnectionStrings {
3902 fn typename() -> &'static str {
3903 "type.googleapis.com/google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionStrings"
3904 }
3905}
3906
3907/// The connection string profile to allow clients to group.
3908/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/DatabaseConnectionStringProfile>
3909#[derive(Clone, Default, PartialEq)]
3910#[non_exhaustive]
3911pub struct DatabaseConnectionStringProfile {
3912 /// Output only. The current consumer group being used by the connection.
3913 pub consumer_group: crate::model::database_connection_string_profile::ConsumerGroup,
3914
3915 /// Output only. The display name for the database connection.
3916 pub display_name: std::string::String,
3917
3918 /// Output only. The host name format being currently used in connection
3919 /// string.
3920 pub host_format: crate::model::database_connection_string_profile::HostFormat,
3921
3922 /// Output only. This field indicates if the connection string is regional and
3923 /// is only applicable for cross-region Data Guard.
3924 pub is_regional: bool,
3925
3926 /// Output only. The protocol being used by the connection.
3927 pub protocol: crate::model::database_connection_string_profile::Protocol,
3928
3929 /// Output only. The current session mode of the connection.
3930 pub session_mode: crate::model::database_connection_string_profile::SessionMode,
3931
3932 /// Output only. The syntax of the connection string.
3933 pub syntax_format: crate::model::database_connection_string_profile::SyntaxFormat,
3934
3935 /// Output only. This field indicates the TLS authentication type of the
3936 /// connection.
3937 pub tls_authentication: crate::model::database_connection_string_profile::TLSAuthentication,
3938
3939 /// Output only. The value of the connection string.
3940 pub value: std::string::String,
3941
3942 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3943}
3944
3945impl DatabaseConnectionStringProfile {
3946 pub fn new() -> Self {
3947 std::default::Default::default()
3948 }
3949
3950 /// Sets the value of [consumer_group][crate::model::DatabaseConnectionStringProfile::consumer_group].
3951 ///
3952 /// # Example
3953 /// ```ignore,no_run
3954 /// # use google_cloud_oracledatabase_v1::model::DatabaseConnectionStringProfile;
3955 /// use google_cloud_oracledatabase_v1::model::database_connection_string_profile::ConsumerGroup;
3956 /// let x0 = DatabaseConnectionStringProfile::new().set_consumer_group(ConsumerGroup::High);
3957 /// let x1 = DatabaseConnectionStringProfile::new().set_consumer_group(ConsumerGroup::Medium);
3958 /// let x2 = DatabaseConnectionStringProfile::new().set_consumer_group(ConsumerGroup::Low);
3959 /// ```
3960 pub fn set_consumer_group<
3961 T: std::convert::Into<crate::model::database_connection_string_profile::ConsumerGroup>,
3962 >(
3963 mut self,
3964 v: T,
3965 ) -> Self {
3966 self.consumer_group = v.into();
3967 self
3968 }
3969
3970 /// Sets the value of [display_name][crate::model::DatabaseConnectionStringProfile::display_name].
3971 ///
3972 /// # Example
3973 /// ```ignore,no_run
3974 /// # use google_cloud_oracledatabase_v1::model::DatabaseConnectionStringProfile;
3975 /// let x = DatabaseConnectionStringProfile::new().set_display_name("example");
3976 /// ```
3977 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3978 self.display_name = v.into();
3979 self
3980 }
3981
3982 /// Sets the value of [host_format][crate::model::DatabaseConnectionStringProfile::host_format].
3983 ///
3984 /// # Example
3985 /// ```ignore,no_run
3986 /// # use google_cloud_oracledatabase_v1::model::DatabaseConnectionStringProfile;
3987 /// use google_cloud_oracledatabase_v1::model::database_connection_string_profile::HostFormat;
3988 /// let x0 = DatabaseConnectionStringProfile::new().set_host_format(HostFormat::Fqdn);
3989 /// let x1 = DatabaseConnectionStringProfile::new().set_host_format(HostFormat::Ip);
3990 /// ```
3991 pub fn set_host_format<
3992 T: std::convert::Into<crate::model::database_connection_string_profile::HostFormat>,
3993 >(
3994 mut self,
3995 v: T,
3996 ) -> Self {
3997 self.host_format = v.into();
3998 self
3999 }
4000
4001 /// Sets the value of [is_regional][crate::model::DatabaseConnectionStringProfile::is_regional].
4002 ///
4003 /// # Example
4004 /// ```ignore,no_run
4005 /// # use google_cloud_oracledatabase_v1::model::DatabaseConnectionStringProfile;
4006 /// let x = DatabaseConnectionStringProfile::new().set_is_regional(true);
4007 /// ```
4008 pub fn set_is_regional<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4009 self.is_regional = v.into();
4010 self
4011 }
4012
4013 /// Sets the value of [protocol][crate::model::DatabaseConnectionStringProfile::protocol].
4014 ///
4015 /// # Example
4016 /// ```ignore,no_run
4017 /// # use google_cloud_oracledatabase_v1::model::DatabaseConnectionStringProfile;
4018 /// use google_cloud_oracledatabase_v1::model::database_connection_string_profile::Protocol;
4019 /// let x0 = DatabaseConnectionStringProfile::new().set_protocol(Protocol::Tcp);
4020 /// let x1 = DatabaseConnectionStringProfile::new().set_protocol(Protocol::Tcps);
4021 /// ```
4022 pub fn set_protocol<
4023 T: std::convert::Into<crate::model::database_connection_string_profile::Protocol>,
4024 >(
4025 mut self,
4026 v: T,
4027 ) -> Self {
4028 self.protocol = v.into();
4029 self
4030 }
4031
4032 /// Sets the value of [session_mode][crate::model::DatabaseConnectionStringProfile::session_mode].
4033 ///
4034 /// # Example
4035 /// ```ignore,no_run
4036 /// # use google_cloud_oracledatabase_v1::model::DatabaseConnectionStringProfile;
4037 /// use google_cloud_oracledatabase_v1::model::database_connection_string_profile::SessionMode;
4038 /// let x0 = DatabaseConnectionStringProfile::new().set_session_mode(SessionMode::Direct);
4039 /// let x1 = DatabaseConnectionStringProfile::new().set_session_mode(SessionMode::Indirect);
4040 /// ```
4041 pub fn set_session_mode<
4042 T: std::convert::Into<crate::model::database_connection_string_profile::SessionMode>,
4043 >(
4044 mut self,
4045 v: T,
4046 ) -> Self {
4047 self.session_mode = v.into();
4048 self
4049 }
4050
4051 /// Sets the value of [syntax_format][crate::model::DatabaseConnectionStringProfile::syntax_format].
4052 ///
4053 /// # Example
4054 /// ```ignore,no_run
4055 /// # use google_cloud_oracledatabase_v1::model::DatabaseConnectionStringProfile;
4056 /// use google_cloud_oracledatabase_v1::model::database_connection_string_profile::SyntaxFormat;
4057 /// let x0 = DatabaseConnectionStringProfile::new().set_syntax_format(SyntaxFormat::Long);
4058 /// let x1 = DatabaseConnectionStringProfile::new().set_syntax_format(SyntaxFormat::Ezconnect);
4059 /// let x2 = DatabaseConnectionStringProfile::new().set_syntax_format(SyntaxFormat::Ezconnectplus);
4060 /// ```
4061 pub fn set_syntax_format<
4062 T: std::convert::Into<crate::model::database_connection_string_profile::SyntaxFormat>,
4063 >(
4064 mut self,
4065 v: T,
4066 ) -> Self {
4067 self.syntax_format = v.into();
4068 self
4069 }
4070
4071 /// Sets the value of [tls_authentication][crate::model::DatabaseConnectionStringProfile::tls_authentication].
4072 ///
4073 /// # Example
4074 /// ```ignore,no_run
4075 /// # use google_cloud_oracledatabase_v1::model::DatabaseConnectionStringProfile;
4076 /// use google_cloud_oracledatabase_v1::model::database_connection_string_profile::TLSAuthentication;
4077 /// let x0 = DatabaseConnectionStringProfile::new().set_tls_authentication(TLSAuthentication::Server);
4078 /// let x1 = DatabaseConnectionStringProfile::new().set_tls_authentication(TLSAuthentication::Mutual);
4079 /// ```
4080 pub fn set_tls_authentication<
4081 T: std::convert::Into<crate::model::database_connection_string_profile::TLSAuthentication>,
4082 >(
4083 mut self,
4084 v: T,
4085 ) -> Self {
4086 self.tls_authentication = v.into();
4087 self
4088 }
4089
4090 /// Sets the value of [value][crate::model::DatabaseConnectionStringProfile::value].
4091 ///
4092 /// # Example
4093 /// ```ignore,no_run
4094 /// # use google_cloud_oracledatabase_v1::model::DatabaseConnectionStringProfile;
4095 /// let x = DatabaseConnectionStringProfile::new().set_value("example");
4096 /// ```
4097 pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4098 self.value = v.into();
4099 self
4100 }
4101}
4102
4103impl wkt::message::Message for DatabaseConnectionStringProfile {
4104 fn typename() -> &'static str {
4105 "type.googleapis.com/google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile"
4106 }
4107}
4108
4109/// Defines additional types related to [DatabaseConnectionStringProfile].
4110pub mod database_connection_string_profile {
4111 #[allow(unused_imports)]
4112 use super::*;
4113
4114 /// The various consumer groups available in the connection string profile.
4115 ///
4116 /// # Working with unknown values
4117 ///
4118 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4119 /// additional enum variants at any time. Adding new variants is not considered
4120 /// a breaking change. Applications should write their code in anticipation of:
4121 ///
4122 /// - New values appearing in future releases of the client library, **and**
4123 /// - New values received dynamically, without application changes.
4124 ///
4125 /// Please consult the [Working with enums] section in the user guide for some
4126 /// guidelines.
4127 ///
4128 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4129 #[derive(Clone, Debug, PartialEq)]
4130 #[non_exhaustive]
4131 pub enum ConsumerGroup {
4132 /// Default unspecified value.
4133 Unspecified,
4134 /// High consumer group.
4135 High,
4136 /// Medium consumer group.
4137 Medium,
4138 /// Low consumer group.
4139 Low,
4140 /// TP consumer group.
4141 Tp,
4142 /// TPURGENT consumer group.
4143 Tpurgent,
4144 /// If set, the enum was initialized with an unknown value.
4145 ///
4146 /// Applications can examine the value using [ConsumerGroup::value] or
4147 /// [ConsumerGroup::name].
4148 UnknownValue(consumer_group::UnknownValue),
4149 }
4150
4151 #[doc(hidden)]
4152 pub mod consumer_group {
4153 #[allow(unused_imports)]
4154 use super::*;
4155 #[derive(Clone, Debug, PartialEq)]
4156 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4157 }
4158
4159 impl ConsumerGroup {
4160 /// Gets the enum value.
4161 ///
4162 /// Returns `None` if the enum contains an unknown value deserialized from
4163 /// the string representation of enums.
4164 pub fn value(&self) -> std::option::Option<i32> {
4165 match self {
4166 Self::Unspecified => std::option::Option::Some(0),
4167 Self::High => std::option::Option::Some(1),
4168 Self::Medium => std::option::Option::Some(2),
4169 Self::Low => std::option::Option::Some(3),
4170 Self::Tp => std::option::Option::Some(4),
4171 Self::Tpurgent => std::option::Option::Some(5),
4172 Self::UnknownValue(u) => u.0.value(),
4173 }
4174 }
4175
4176 /// Gets the enum value as a string.
4177 ///
4178 /// Returns `None` if the enum contains an unknown value deserialized from
4179 /// the integer representation of enums.
4180 pub fn name(&self) -> std::option::Option<&str> {
4181 match self {
4182 Self::Unspecified => std::option::Option::Some("CONSUMER_GROUP_UNSPECIFIED"),
4183 Self::High => std::option::Option::Some("HIGH"),
4184 Self::Medium => std::option::Option::Some("MEDIUM"),
4185 Self::Low => std::option::Option::Some("LOW"),
4186 Self::Tp => std::option::Option::Some("TP"),
4187 Self::Tpurgent => std::option::Option::Some("TPURGENT"),
4188 Self::UnknownValue(u) => u.0.name(),
4189 }
4190 }
4191 }
4192
4193 impl std::default::Default for ConsumerGroup {
4194 fn default() -> Self {
4195 use std::convert::From;
4196 Self::from(0)
4197 }
4198 }
4199
4200 impl std::fmt::Display for ConsumerGroup {
4201 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4202 wkt::internal::display_enum(f, self.name(), self.value())
4203 }
4204 }
4205
4206 impl std::convert::From<i32> for ConsumerGroup {
4207 fn from(value: i32) -> Self {
4208 match value {
4209 0 => Self::Unspecified,
4210 1 => Self::High,
4211 2 => Self::Medium,
4212 3 => Self::Low,
4213 4 => Self::Tp,
4214 5 => Self::Tpurgent,
4215 _ => Self::UnknownValue(consumer_group::UnknownValue(
4216 wkt::internal::UnknownEnumValue::Integer(value),
4217 )),
4218 }
4219 }
4220 }
4221
4222 impl std::convert::From<&str> for ConsumerGroup {
4223 fn from(value: &str) -> Self {
4224 use std::string::ToString;
4225 match value {
4226 "CONSUMER_GROUP_UNSPECIFIED" => Self::Unspecified,
4227 "HIGH" => Self::High,
4228 "MEDIUM" => Self::Medium,
4229 "LOW" => Self::Low,
4230 "TP" => Self::Tp,
4231 "TPURGENT" => Self::Tpurgent,
4232 _ => Self::UnknownValue(consumer_group::UnknownValue(
4233 wkt::internal::UnknownEnumValue::String(value.to_string()),
4234 )),
4235 }
4236 }
4237 }
4238
4239 impl serde::ser::Serialize for ConsumerGroup {
4240 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4241 where
4242 S: serde::Serializer,
4243 {
4244 match self {
4245 Self::Unspecified => serializer.serialize_i32(0),
4246 Self::High => serializer.serialize_i32(1),
4247 Self::Medium => serializer.serialize_i32(2),
4248 Self::Low => serializer.serialize_i32(3),
4249 Self::Tp => serializer.serialize_i32(4),
4250 Self::Tpurgent => serializer.serialize_i32(5),
4251 Self::UnknownValue(u) => u.0.serialize(serializer),
4252 }
4253 }
4254 }
4255
4256 impl<'de> serde::de::Deserialize<'de> for ConsumerGroup {
4257 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4258 where
4259 D: serde::Deserializer<'de>,
4260 {
4261 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ConsumerGroup>::new(
4262 ".google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.ConsumerGroup",
4263 ))
4264 }
4265 }
4266
4267 /// The host name format being used in the connection string.
4268 ///
4269 /// # Working with unknown values
4270 ///
4271 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4272 /// additional enum variants at any time. Adding new variants is not considered
4273 /// a breaking change. Applications should write their code in anticipation of:
4274 ///
4275 /// - New values appearing in future releases of the client library, **and**
4276 /// - New values received dynamically, without application changes.
4277 ///
4278 /// Please consult the [Working with enums] section in the user guide for some
4279 /// guidelines.
4280 ///
4281 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4282 #[derive(Clone, Debug, PartialEq)]
4283 #[non_exhaustive]
4284 pub enum HostFormat {
4285 /// Default unspecified value.
4286 Unspecified,
4287 /// FQDN
4288 Fqdn,
4289 /// IP
4290 Ip,
4291 /// If set, the enum was initialized with an unknown value.
4292 ///
4293 /// Applications can examine the value using [HostFormat::value] or
4294 /// [HostFormat::name].
4295 UnknownValue(host_format::UnknownValue),
4296 }
4297
4298 #[doc(hidden)]
4299 pub mod host_format {
4300 #[allow(unused_imports)]
4301 use super::*;
4302 #[derive(Clone, Debug, PartialEq)]
4303 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4304 }
4305
4306 impl HostFormat {
4307 /// Gets the enum value.
4308 ///
4309 /// Returns `None` if the enum contains an unknown value deserialized from
4310 /// the string representation of enums.
4311 pub fn value(&self) -> std::option::Option<i32> {
4312 match self {
4313 Self::Unspecified => std::option::Option::Some(0),
4314 Self::Fqdn => std::option::Option::Some(1),
4315 Self::Ip => std::option::Option::Some(2),
4316 Self::UnknownValue(u) => u.0.value(),
4317 }
4318 }
4319
4320 /// Gets the enum value as a string.
4321 ///
4322 /// Returns `None` if the enum contains an unknown value deserialized from
4323 /// the integer representation of enums.
4324 pub fn name(&self) -> std::option::Option<&str> {
4325 match self {
4326 Self::Unspecified => std::option::Option::Some("HOST_FORMAT_UNSPECIFIED"),
4327 Self::Fqdn => std::option::Option::Some("FQDN"),
4328 Self::Ip => std::option::Option::Some("IP"),
4329 Self::UnknownValue(u) => u.0.name(),
4330 }
4331 }
4332 }
4333
4334 impl std::default::Default for HostFormat {
4335 fn default() -> Self {
4336 use std::convert::From;
4337 Self::from(0)
4338 }
4339 }
4340
4341 impl std::fmt::Display for HostFormat {
4342 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4343 wkt::internal::display_enum(f, self.name(), self.value())
4344 }
4345 }
4346
4347 impl std::convert::From<i32> for HostFormat {
4348 fn from(value: i32) -> Self {
4349 match value {
4350 0 => Self::Unspecified,
4351 1 => Self::Fqdn,
4352 2 => Self::Ip,
4353 _ => Self::UnknownValue(host_format::UnknownValue(
4354 wkt::internal::UnknownEnumValue::Integer(value),
4355 )),
4356 }
4357 }
4358 }
4359
4360 impl std::convert::From<&str> for HostFormat {
4361 fn from(value: &str) -> Self {
4362 use std::string::ToString;
4363 match value {
4364 "HOST_FORMAT_UNSPECIFIED" => Self::Unspecified,
4365 "FQDN" => Self::Fqdn,
4366 "IP" => Self::Ip,
4367 _ => Self::UnknownValue(host_format::UnknownValue(
4368 wkt::internal::UnknownEnumValue::String(value.to_string()),
4369 )),
4370 }
4371 }
4372 }
4373
4374 impl serde::ser::Serialize for HostFormat {
4375 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4376 where
4377 S: serde::Serializer,
4378 {
4379 match self {
4380 Self::Unspecified => serializer.serialize_i32(0),
4381 Self::Fqdn => serializer.serialize_i32(1),
4382 Self::Ip => serializer.serialize_i32(2),
4383 Self::UnknownValue(u) => u.0.serialize(serializer),
4384 }
4385 }
4386 }
4387
4388 impl<'de> serde::de::Deserialize<'de> for HostFormat {
4389 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4390 where
4391 D: serde::Deserializer<'de>,
4392 {
4393 deserializer.deserialize_any(wkt::internal::EnumVisitor::<HostFormat>::new(
4394 ".google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.HostFormat",
4395 ))
4396 }
4397 }
4398
4399 /// The protocol being used by the connection.
4400 ///
4401 /// # Working with unknown values
4402 ///
4403 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4404 /// additional enum variants at any time. Adding new variants is not considered
4405 /// a breaking change. Applications should write their code in anticipation of:
4406 ///
4407 /// - New values appearing in future releases of the client library, **and**
4408 /// - New values received dynamically, without application changes.
4409 ///
4410 /// Please consult the [Working with enums] section in the user guide for some
4411 /// guidelines.
4412 ///
4413 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4414 #[derive(Clone, Debug, PartialEq)]
4415 #[non_exhaustive]
4416 pub enum Protocol {
4417 /// Default unspecified value.
4418 Unspecified,
4419 /// Tcp
4420 Tcp,
4421 /// Tcps
4422 Tcps,
4423 /// If set, the enum was initialized with an unknown value.
4424 ///
4425 /// Applications can examine the value using [Protocol::value] or
4426 /// [Protocol::name].
4427 UnknownValue(protocol::UnknownValue),
4428 }
4429
4430 #[doc(hidden)]
4431 pub mod protocol {
4432 #[allow(unused_imports)]
4433 use super::*;
4434 #[derive(Clone, Debug, PartialEq)]
4435 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4436 }
4437
4438 impl Protocol {
4439 /// Gets the enum value.
4440 ///
4441 /// Returns `None` if the enum contains an unknown value deserialized from
4442 /// the string representation of enums.
4443 pub fn value(&self) -> std::option::Option<i32> {
4444 match self {
4445 Self::Unspecified => std::option::Option::Some(0),
4446 Self::Tcp => std::option::Option::Some(1),
4447 Self::Tcps => std::option::Option::Some(2),
4448 Self::UnknownValue(u) => u.0.value(),
4449 }
4450 }
4451
4452 /// Gets the enum value as a string.
4453 ///
4454 /// Returns `None` if the enum contains an unknown value deserialized from
4455 /// the integer representation of enums.
4456 pub fn name(&self) -> std::option::Option<&str> {
4457 match self {
4458 Self::Unspecified => std::option::Option::Some("PROTOCOL_UNSPECIFIED"),
4459 Self::Tcp => std::option::Option::Some("TCP"),
4460 Self::Tcps => std::option::Option::Some("TCPS"),
4461 Self::UnknownValue(u) => u.0.name(),
4462 }
4463 }
4464 }
4465
4466 impl std::default::Default for Protocol {
4467 fn default() -> Self {
4468 use std::convert::From;
4469 Self::from(0)
4470 }
4471 }
4472
4473 impl std::fmt::Display for Protocol {
4474 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4475 wkt::internal::display_enum(f, self.name(), self.value())
4476 }
4477 }
4478
4479 impl std::convert::From<i32> for Protocol {
4480 fn from(value: i32) -> Self {
4481 match value {
4482 0 => Self::Unspecified,
4483 1 => Self::Tcp,
4484 2 => Self::Tcps,
4485 _ => Self::UnknownValue(protocol::UnknownValue(
4486 wkt::internal::UnknownEnumValue::Integer(value),
4487 )),
4488 }
4489 }
4490 }
4491
4492 impl std::convert::From<&str> for Protocol {
4493 fn from(value: &str) -> Self {
4494 use std::string::ToString;
4495 match value {
4496 "PROTOCOL_UNSPECIFIED" => Self::Unspecified,
4497 "TCP" => Self::Tcp,
4498 "TCPS" => Self::Tcps,
4499 _ => Self::UnknownValue(protocol::UnknownValue(
4500 wkt::internal::UnknownEnumValue::String(value.to_string()),
4501 )),
4502 }
4503 }
4504 }
4505
4506 impl serde::ser::Serialize for Protocol {
4507 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4508 where
4509 S: serde::Serializer,
4510 {
4511 match self {
4512 Self::Unspecified => serializer.serialize_i32(0),
4513 Self::Tcp => serializer.serialize_i32(1),
4514 Self::Tcps => serializer.serialize_i32(2),
4515 Self::UnknownValue(u) => u.0.serialize(serializer),
4516 }
4517 }
4518 }
4519
4520 impl<'de> serde::de::Deserialize<'de> for Protocol {
4521 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4522 where
4523 D: serde::Deserializer<'de>,
4524 {
4525 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Protocol>::new(
4526 ".google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.Protocol",
4527 ))
4528 }
4529 }
4530
4531 /// The session mode of the connection.
4532 ///
4533 /// # Working with unknown values
4534 ///
4535 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4536 /// additional enum variants at any time. Adding new variants is not considered
4537 /// a breaking change. Applications should write their code in anticipation of:
4538 ///
4539 /// - New values appearing in future releases of the client library, **and**
4540 /// - New values received dynamically, without application changes.
4541 ///
4542 /// Please consult the [Working with enums] section in the user guide for some
4543 /// guidelines.
4544 ///
4545 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4546 #[derive(Clone, Debug, PartialEq)]
4547 #[non_exhaustive]
4548 pub enum SessionMode {
4549 /// Default unspecified value.
4550 Unspecified,
4551 /// Direct
4552 Direct,
4553 /// Indirect
4554 Indirect,
4555 /// If set, the enum was initialized with an unknown value.
4556 ///
4557 /// Applications can examine the value using [SessionMode::value] or
4558 /// [SessionMode::name].
4559 UnknownValue(session_mode::UnknownValue),
4560 }
4561
4562 #[doc(hidden)]
4563 pub mod session_mode {
4564 #[allow(unused_imports)]
4565 use super::*;
4566 #[derive(Clone, Debug, PartialEq)]
4567 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4568 }
4569
4570 impl SessionMode {
4571 /// Gets the enum value.
4572 ///
4573 /// Returns `None` if the enum contains an unknown value deserialized from
4574 /// the string representation of enums.
4575 pub fn value(&self) -> std::option::Option<i32> {
4576 match self {
4577 Self::Unspecified => std::option::Option::Some(0),
4578 Self::Direct => std::option::Option::Some(1),
4579 Self::Indirect => std::option::Option::Some(2),
4580 Self::UnknownValue(u) => u.0.value(),
4581 }
4582 }
4583
4584 /// Gets the enum value as a string.
4585 ///
4586 /// Returns `None` if the enum contains an unknown value deserialized from
4587 /// the integer representation of enums.
4588 pub fn name(&self) -> std::option::Option<&str> {
4589 match self {
4590 Self::Unspecified => std::option::Option::Some("SESSION_MODE_UNSPECIFIED"),
4591 Self::Direct => std::option::Option::Some("DIRECT"),
4592 Self::Indirect => std::option::Option::Some("INDIRECT"),
4593 Self::UnknownValue(u) => u.0.name(),
4594 }
4595 }
4596 }
4597
4598 impl std::default::Default for SessionMode {
4599 fn default() -> Self {
4600 use std::convert::From;
4601 Self::from(0)
4602 }
4603 }
4604
4605 impl std::fmt::Display for SessionMode {
4606 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4607 wkt::internal::display_enum(f, self.name(), self.value())
4608 }
4609 }
4610
4611 impl std::convert::From<i32> for SessionMode {
4612 fn from(value: i32) -> Self {
4613 match value {
4614 0 => Self::Unspecified,
4615 1 => Self::Direct,
4616 2 => Self::Indirect,
4617 _ => Self::UnknownValue(session_mode::UnknownValue(
4618 wkt::internal::UnknownEnumValue::Integer(value),
4619 )),
4620 }
4621 }
4622 }
4623
4624 impl std::convert::From<&str> for SessionMode {
4625 fn from(value: &str) -> Self {
4626 use std::string::ToString;
4627 match value {
4628 "SESSION_MODE_UNSPECIFIED" => Self::Unspecified,
4629 "DIRECT" => Self::Direct,
4630 "INDIRECT" => Self::Indirect,
4631 _ => Self::UnknownValue(session_mode::UnknownValue(
4632 wkt::internal::UnknownEnumValue::String(value.to_string()),
4633 )),
4634 }
4635 }
4636 }
4637
4638 impl serde::ser::Serialize for SessionMode {
4639 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4640 where
4641 S: serde::Serializer,
4642 {
4643 match self {
4644 Self::Unspecified => serializer.serialize_i32(0),
4645 Self::Direct => serializer.serialize_i32(1),
4646 Self::Indirect => serializer.serialize_i32(2),
4647 Self::UnknownValue(u) => u.0.serialize(serializer),
4648 }
4649 }
4650 }
4651
4652 impl<'de> serde::de::Deserialize<'de> for SessionMode {
4653 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4654 where
4655 D: serde::Deserializer<'de>,
4656 {
4657 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SessionMode>::new(
4658 ".google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SessionMode",
4659 ))
4660 }
4661 }
4662
4663 /// Specifies syntax of the connection string.
4664 ///
4665 /// # Working with unknown values
4666 ///
4667 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4668 /// additional enum variants at any time. Adding new variants is not considered
4669 /// a breaking change. Applications should write their code in anticipation of:
4670 ///
4671 /// - New values appearing in future releases of the client library, **and**
4672 /// - New values received dynamically, without application changes.
4673 ///
4674 /// Please consult the [Working with enums] section in the user guide for some
4675 /// guidelines.
4676 ///
4677 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4678 #[derive(Clone, Debug, PartialEq)]
4679 #[non_exhaustive]
4680 pub enum SyntaxFormat {
4681 /// Default unspecified value.
4682 Unspecified,
4683 /// Long
4684 Long,
4685 /// Ezconnect
4686 Ezconnect,
4687 /// Ezconnectplus
4688 Ezconnectplus,
4689 /// If set, the enum was initialized with an unknown value.
4690 ///
4691 /// Applications can examine the value using [SyntaxFormat::value] or
4692 /// [SyntaxFormat::name].
4693 UnknownValue(syntax_format::UnknownValue),
4694 }
4695
4696 #[doc(hidden)]
4697 pub mod syntax_format {
4698 #[allow(unused_imports)]
4699 use super::*;
4700 #[derive(Clone, Debug, PartialEq)]
4701 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4702 }
4703
4704 impl SyntaxFormat {
4705 /// Gets the enum value.
4706 ///
4707 /// Returns `None` if the enum contains an unknown value deserialized from
4708 /// the string representation of enums.
4709 pub fn value(&self) -> std::option::Option<i32> {
4710 match self {
4711 Self::Unspecified => std::option::Option::Some(0),
4712 Self::Long => std::option::Option::Some(1),
4713 Self::Ezconnect => std::option::Option::Some(2),
4714 Self::Ezconnectplus => std::option::Option::Some(3),
4715 Self::UnknownValue(u) => u.0.value(),
4716 }
4717 }
4718
4719 /// Gets the enum value as a string.
4720 ///
4721 /// Returns `None` if the enum contains an unknown value deserialized from
4722 /// the integer representation of enums.
4723 pub fn name(&self) -> std::option::Option<&str> {
4724 match self {
4725 Self::Unspecified => std::option::Option::Some("SYNTAX_FORMAT_UNSPECIFIED"),
4726 Self::Long => std::option::Option::Some("LONG"),
4727 Self::Ezconnect => std::option::Option::Some("EZCONNECT"),
4728 Self::Ezconnectplus => std::option::Option::Some("EZCONNECTPLUS"),
4729 Self::UnknownValue(u) => u.0.name(),
4730 }
4731 }
4732 }
4733
4734 impl std::default::Default for SyntaxFormat {
4735 fn default() -> Self {
4736 use std::convert::From;
4737 Self::from(0)
4738 }
4739 }
4740
4741 impl std::fmt::Display for SyntaxFormat {
4742 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4743 wkt::internal::display_enum(f, self.name(), self.value())
4744 }
4745 }
4746
4747 impl std::convert::From<i32> for SyntaxFormat {
4748 fn from(value: i32) -> Self {
4749 match value {
4750 0 => Self::Unspecified,
4751 1 => Self::Long,
4752 2 => Self::Ezconnect,
4753 3 => Self::Ezconnectplus,
4754 _ => Self::UnknownValue(syntax_format::UnknownValue(
4755 wkt::internal::UnknownEnumValue::Integer(value),
4756 )),
4757 }
4758 }
4759 }
4760
4761 impl std::convert::From<&str> for SyntaxFormat {
4762 fn from(value: &str) -> Self {
4763 use std::string::ToString;
4764 match value {
4765 "SYNTAX_FORMAT_UNSPECIFIED" => Self::Unspecified,
4766 "LONG" => Self::Long,
4767 "EZCONNECT" => Self::Ezconnect,
4768 "EZCONNECTPLUS" => Self::Ezconnectplus,
4769 _ => Self::UnknownValue(syntax_format::UnknownValue(
4770 wkt::internal::UnknownEnumValue::String(value.to_string()),
4771 )),
4772 }
4773 }
4774 }
4775
4776 impl serde::ser::Serialize for SyntaxFormat {
4777 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4778 where
4779 S: serde::Serializer,
4780 {
4781 match self {
4782 Self::Unspecified => serializer.serialize_i32(0),
4783 Self::Long => serializer.serialize_i32(1),
4784 Self::Ezconnect => serializer.serialize_i32(2),
4785 Self::Ezconnectplus => serializer.serialize_i32(3),
4786 Self::UnknownValue(u) => u.0.serialize(serializer),
4787 }
4788 }
4789 }
4790
4791 impl<'de> serde::de::Deserialize<'de> for SyntaxFormat {
4792 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4793 where
4794 D: serde::Deserializer<'de>,
4795 {
4796 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SyntaxFormat>::new(
4797 ".google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SyntaxFormat",
4798 ))
4799 }
4800 }
4801
4802 /// This field indicates the TLS authentication type of the connection.
4803 ///
4804 /// # Working with unknown values
4805 ///
4806 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4807 /// additional enum variants at any time. Adding new variants is not considered
4808 /// a breaking change. Applications should write their code in anticipation of:
4809 ///
4810 /// - New values appearing in future releases of the client library, **and**
4811 /// - New values received dynamically, without application changes.
4812 ///
4813 /// Please consult the [Working with enums] section in the user guide for some
4814 /// guidelines.
4815 ///
4816 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4817 #[derive(Clone, Debug, PartialEq)]
4818 #[non_exhaustive]
4819 pub enum TLSAuthentication {
4820 /// Default unspecified value.
4821 Unspecified,
4822 /// Server
4823 Server,
4824 /// Mutual
4825 Mutual,
4826 /// If set, the enum was initialized with an unknown value.
4827 ///
4828 /// Applications can examine the value using [TLSAuthentication::value] or
4829 /// [TLSAuthentication::name].
4830 UnknownValue(tls_authentication::UnknownValue),
4831 }
4832
4833 #[doc(hidden)]
4834 pub mod tls_authentication {
4835 #[allow(unused_imports)]
4836 use super::*;
4837 #[derive(Clone, Debug, PartialEq)]
4838 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4839 }
4840
4841 impl TLSAuthentication {
4842 /// Gets the enum value.
4843 ///
4844 /// Returns `None` if the enum contains an unknown value deserialized from
4845 /// the string representation of enums.
4846 pub fn value(&self) -> std::option::Option<i32> {
4847 match self {
4848 Self::Unspecified => std::option::Option::Some(0),
4849 Self::Server => std::option::Option::Some(1),
4850 Self::Mutual => std::option::Option::Some(2),
4851 Self::UnknownValue(u) => u.0.value(),
4852 }
4853 }
4854
4855 /// Gets the enum value as a string.
4856 ///
4857 /// Returns `None` if the enum contains an unknown value deserialized from
4858 /// the integer representation of enums.
4859 pub fn name(&self) -> std::option::Option<&str> {
4860 match self {
4861 Self::Unspecified => std::option::Option::Some("TLS_AUTHENTICATION_UNSPECIFIED"),
4862 Self::Server => std::option::Option::Some("SERVER"),
4863 Self::Mutual => std::option::Option::Some("MUTUAL"),
4864 Self::UnknownValue(u) => u.0.name(),
4865 }
4866 }
4867 }
4868
4869 impl std::default::Default for TLSAuthentication {
4870 fn default() -> Self {
4871 use std::convert::From;
4872 Self::from(0)
4873 }
4874 }
4875
4876 impl std::fmt::Display for TLSAuthentication {
4877 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4878 wkt::internal::display_enum(f, self.name(), self.value())
4879 }
4880 }
4881
4882 impl std::convert::From<i32> for TLSAuthentication {
4883 fn from(value: i32) -> Self {
4884 match value {
4885 0 => Self::Unspecified,
4886 1 => Self::Server,
4887 2 => Self::Mutual,
4888 _ => Self::UnknownValue(tls_authentication::UnknownValue(
4889 wkt::internal::UnknownEnumValue::Integer(value),
4890 )),
4891 }
4892 }
4893 }
4894
4895 impl std::convert::From<&str> for TLSAuthentication {
4896 fn from(value: &str) -> Self {
4897 use std::string::ToString;
4898 match value {
4899 "TLS_AUTHENTICATION_UNSPECIFIED" => Self::Unspecified,
4900 "SERVER" => Self::Server,
4901 "MUTUAL" => Self::Mutual,
4902 _ => Self::UnknownValue(tls_authentication::UnknownValue(
4903 wkt::internal::UnknownEnumValue::String(value.to_string()),
4904 )),
4905 }
4906 }
4907 }
4908
4909 impl serde::ser::Serialize for TLSAuthentication {
4910 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4911 where
4912 S: serde::Serializer,
4913 {
4914 match self {
4915 Self::Unspecified => serializer.serialize_i32(0),
4916 Self::Server => serializer.serialize_i32(1),
4917 Self::Mutual => serializer.serialize_i32(2),
4918 Self::UnknownValue(u) => u.0.serialize(serializer),
4919 }
4920 }
4921 }
4922
4923 impl<'de> serde::de::Deserialize<'de> for TLSAuthentication {
4924 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4925 where
4926 D: serde::Deserializer<'de>,
4927 {
4928 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TLSAuthentication>::new(
4929 ".google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.TLSAuthentication",
4930 ))
4931 }
4932 }
4933}
4934
4935/// A list of all connection strings that can be used to connect to the
4936/// Autonomous Database.
4937#[derive(Clone, Default, PartialEq)]
4938#[non_exhaustive]
4939pub struct AllConnectionStrings {
4940 /// Output only. The database service provides the highest level of resources
4941 /// to each SQL statement.
4942 pub high: std::string::String,
4943
4944 /// Output only. The database service provides the least level of resources to
4945 /// each SQL statement.
4946 pub low: std::string::String,
4947
4948 /// Output only. The database service provides a lower level of resources to
4949 /// each SQL statement.
4950 pub medium: std::string::String,
4951
4952 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4953}
4954
4955impl AllConnectionStrings {
4956 pub fn new() -> Self {
4957 std::default::Default::default()
4958 }
4959
4960 /// Sets the value of [high][crate::model::AllConnectionStrings::high].
4961 ///
4962 /// # Example
4963 /// ```ignore,no_run
4964 /// # use google_cloud_oracledatabase_v1::model::AllConnectionStrings;
4965 /// let x = AllConnectionStrings::new().set_high("example");
4966 /// ```
4967 pub fn set_high<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4968 self.high = v.into();
4969 self
4970 }
4971
4972 /// Sets the value of [low][crate::model::AllConnectionStrings::low].
4973 ///
4974 /// # Example
4975 /// ```ignore,no_run
4976 /// # use google_cloud_oracledatabase_v1::model::AllConnectionStrings;
4977 /// let x = AllConnectionStrings::new().set_low("example");
4978 /// ```
4979 pub fn set_low<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4980 self.low = v.into();
4981 self
4982 }
4983
4984 /// Sets the value of [medium][crate::model::AllConnectionStrings::medium].
4985 ///
4986 /// # Example
4987 /// ```ignore,no_run
4988 /// # use google_cloud_oracledatabase_v1::model::AllConnectionStrings;
4989 /// let x = AllConnectionStrings::new().set_medium("example");
4990 /// ```
4991 pub fn set_medium<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4992 self.medium = v.into();
4993 self
4994 }
4995}
4996
4997impl wkt::message::Message for AllConnectionStrings {
4998 fn typename() -> &'static str {
4999 "type.googleapis.com/google.cloud.oracledatabase.v1.AllConnectionStrings"
5000 }
5001}
5002
5003/// The URLs for accessing Oracle Application Express (APEX) and SQL Developer
5004/// Web with a browser from a Compute instance.
5005/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseConnectionUrls>
5006#[derive(Clone, Default, PartialEq)]
5007#[non_exhaustive]
5008pub struct AutonomousDatabaseConnectionUrls {
5009 /// Output only. Oracle Application Express (APEX) URL.
5010 pub apex_uri: std::string::String,
5011
5012 /// Output only. The URL of the Database Transforms for the Autonomous
5013 /// Database.
5014 pub database_transforms_uri: std::string::String,
5015
5016 /// Output only. The URL of the Graph Studio for the Autonomous Database.
5017 pub graph_studio_uri: std::string::String,
5018
5019 /// Output only. The URL of the Oracle Machine Learning (OML) Notebook for the
5020 /// Autonomous Database.
5021 pub machine_learning_notebook_uri: std::string::String,
5022
5023 /// Output only. The URL of Machine Learning user management the Autonomous
5024 /// Database.
5025 pub machine_learning_user_management_uri: std::string::String,
5026
5027 /// Output only. The URL of the MongoDB API for the Autonomous Database.
5028 pub mongo_db_uri: std::string::String,
5029
5030 /// Output only. The Oracle REST Data Services (ORDS) URL of the Web Access for
5031 /// the Autonomous Database.
5032 pub ords_uri: std::string::String,
5033
5034 /// Output only. The URL of the Oracle SQL Developer Web for the Autonomous
5035 /// Database.
5036 pub sql_dev_web_uri: std::string::String,
5037
5038 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5039}
5040
5041impl AutonomousDatabaseConnectionUrls {
5042 pub fn new() -> Self {
5043 std::default::Default::default()
5044 }
5045
5046 /// Sets the value of [apex_uri][crate::model::AutonomousDatabaseConnectionUrls::apex_uri].
5047 ///
5048 /// # Example
5049 /// ```ignore,no_run
5050 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionUrls;
5051 /// let x = AutonomousDatabaseConnectionUrls::new().set_apex_uri("example");
5052 /// ```
5053 pub fn set_apex_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5054 self.apex_uri = v.into();
5055 self
5056 }
5057
5058 /// Sets the value of [database_transforms_uri][crate::model::AutonomousDatabaseConnectionUrls::database_transforms_uri].
5059 ///
5060 /// # Example
5061 /// ```ignore,no_run
5062 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionUrls;
5063 /// let x = AutonomousDatabaseConnectionUrls::new().set_database_transforms_uri("example");
5064 /// ```
5065 pub fn set_database_transforms_uri<T: std::convert::Into<std::string::String>>(
5066 mut self,
5067 v: T,
5068 ) -> Self {
5069 self.database_transforms_uri = v.into();
5070 self
5071 }
5072
5073 /// Sets the value of [graph_studio_uri][crate::model::AutonomousDatabaseConnectionUrls::graph_studio_uri].
5074 ///
5075 /// # Example
5076 /// ```ignore,no_run
5077 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionUrls;
5078 /// let x = AutonomousDatabaseConnectionUrls::new().set_graph_studio_uri("example");
5079 /// ```
5080 pub fn set_graph_studio_uri<T: std::convert::Into<std::string::String>>(
5081 mut self,
5082 v: T,
5083 ) -> Self {
5084 self.graph_studio_uri = v.into();
5085 self
5086 }
5087
5088 /// Sets the value of [machine_learning_notebook_uri][crate::model::AutonomousDatabaseConnectionUrls::machine_learning_notebook_uri].
5089 ///
5090 /// # Example
5091 /// ```ignore,no_run
5092 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionUrls;
5093 /// let x = AutonomousDatabaseConnectionUrls::new().set_machine_learning_notebook_uri("example");
5094 /// ```
5095 pub fn set_machine_learning_notebook_uri<T: std::convert::Into<std::string::String>>(
5096 mut self,
5097 v: T,
5098 ) -> Self {
5099 self.machine_learning_notebook_uri = v.into();
5100 self
5101 }
5102
5103 /// Sets the value of [machine_learning_user_management_uri][crate::model::AutonomousDatabaseConnectionUrls::machine_learning_user_management_uri].
5104 ///
5105 /// # Example
5106 /// ```ignore,no_run
5107 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionUrls;
5108 /// let x = AutonomousDatabaseConnectionUrls::new().set_machine_learning_user_management_uri("example");
5109 /// ```
5110 pub fn set_machine_learning_user_management_uri<T: std::convert::Into<std::string::String>>(
5111 mut self,
5112 v: T,
5113 ) -> Self {
5114 self.machine_learning_user_management_uri = v.into();
5115 self
5116 }
5117
5118 /// Sets the value of [mongo_db_uri][crate::model::AutonomousDatabaseConnectionUrls::mongo_db_uri].
5119 ///
5120 /// # Example
5121 /// ```ignore,no_run
5122 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionUrls;
5123 /// let x = AutonomousDatabaseConnectionUrls::new().set_mongo_db_uri("example");
5124 /// ```
5125 pub fn set_mongo_db_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5126 self.mongo_db_uri = v.into();
5127 self
5128 }
5129
5130 /// Sets the value of [ords_uri][crate::model::AutonomousDatabaseConnectionUrls::ords_uri].
5131 ///
5132 /// # Example
5133 /// ```ignore,no_run
5134 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionUrls;
5135 /// let x = AutonomousDatabaseConnectionUrls::new().set_ords_uri("example");
5136 /// ```
5137 pub fn set_ords_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5138 self.ords_uri = v.into();
5139 self
5140 }
5141
5142 /// Sets the value of [sql_dev_web_uri][crate::model::AutonomousDatabaseConnectionUrls::sql_dev_web_uri].
5143 ///
5144 /// # Example
5145 /// ```ignore,no_run
5146 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseConnectionUrls;
5147 /// let x = AutonomousDatabaseConnectionUrls::new().set_sql_dev_web_uri("example");
5148 /// ```
5149 pub fn set_sql_dev_web_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5150 self.sql_dev_web_uri = v.into();
5151 self
5152 }
5153}
5154
5155impl wkt::message::Message for AutonomousDatabaseConnectionUrls {
5156 fn typename() -> &'static str {
5157 "type.googleapis.com/google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionUrls"
5158 }
5159}
5160
5161/// Autonomous Data Guard standby database details.
5162/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseStandbySummary>
5163#[derive(Clone, Default, PartialEq)]
5164#[non_exhaustive]
5165pub struct AutonomousDatabaseStandbySummary {
5166 /// Output only. The amount of time, in seconds, that the data of the standby
5167 /// database lags in comparison to the data of the primary database.
5168 pub lag_time_duration: std::option::Option<wkt::Duration>,
5169
5170 /// Output only. The additional details about the current lifecycle state of
5171 /// the Autonomous Database.
5172 pub lifecycle_details: std::string::String,
5173
5174 /// Output only. The current lifecycle state of the Autonomous Database.
5175 pub state: crate::model::State,
5176
5177 /// Output only. The date and time the Autonomous Data Guard role was switched
5178 /// for the standby Autonomous Database.
5179 pub data_guard_role_changed_time: std::option::Option<wkt::Timestamp>,
5180
5181 /// Output only. The date and time the Disaster Recovery role was switched for
5182 /// the standby Autonomous Database.
5183 pub disaster_recovery_role_changed_time: std::option::Option<wkt::Timestamp>,
5184
5185 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5186}
5187
5188impl AutonomousDatabaseStandbySummary {
5189 pub fn new() -> Self {
5190 std::default::Default::default()
5191 }
5192
5193 /// Sets the value of [lag_time_duration][crate::model::AutonomousDatabaseStandbySummary::lag_time_duration].
5194 ///
5195 /// # Example
5196 /// ```ignore,no_run
5197 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseStandbySummary;
5198 /// use wkt::Duration;
5199 /// let x = AutonomousDatabaseStandbySummary::new().set_lag_time_duration(Duration::default()/* use setters */);
5200 /// ```
5201 pub fn set_lag_time_duration<T>(mut self, v: T) -> Self
5202 where
5203 T: std::convert::Into<wkt::Duration>,
5204 {
5205 self.lag_time_duration = std::option::Option::Some(v.into());
5206 self
5207 }
5208
5209 /// Sets or clears the value of [lag_time_duration][crate::model::AutonomousDatabaseStandbySummary::lag_time_duration].
5210 ///
5211 /// # Example
5212 /// ```ignore,no_run
5213 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseStandbySummary;
5214 /// use wkt::Duration;
5215 /// let x = AutonomousDatabaseStandbySummary::new().set_or_clear_lag_time_duration(Some(Duration::default()/* use setters */));
5216 /// let x = AutonomousDatabaseStandbySummary::new().set_or_clear_lag_time_duration(None::<Duration>);
5217 /// ```
5218 pub fn set_or_clear_lag_time_duration<T>(mut self, v: std::option::Option<T>) -> Self
5219 where
5220 T: std::convert::Into<wkt::Duration>,
5221 {
5222 self.lag_time_duration = v.map(|x| x.into());
5223 self
5224 }
5225
5226 /// Sets the value of [lifecycle_details][crate::model::AutonomousDatabaseStandbySummary::lifecycle_details].
5227 ///
5228 /// # Example
5229 /// ```ignore,no_run
5230 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseStandbySummary;
5231 /// let x = AutonomousDatabaseStandbySummary::new().set_lifecycle_details("example");
5232 /// ```
5233 pub fn set_lifecycle_details<T: std::convert::Into<std::string::String>>(
5234 mut self,
5235 v: T,
5236 ) -> Self {
5237 self.lifecycle_details = v.into();
5238 self
5239 }
5240
5241 /// Sets the value of [state][crate::model::AutonomousDatabaseStandbySummary::state].
5242 ///
5243 /// # Example
5244 /// ```ignore,no_run
5245 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseStandbySummary;
5246 /// use google_cloud_oracledatabase_v1::model::State;
5247 /// let x0 = AutonomousDatabaseStandbySummary::new().set_state(State::Provisioning);
5248 /// let x1 = AutonomousDatabaseStandbySummary::new().set_state(State::Available);
5249 /// let x2 = AutonomousDatabaseStandbySummary::new().set_state(State::Stopping);
5250 /// ```
5251 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
5252 self.state = v.into();
5253 self
5254 }
5255
5256 /// Sets the value of [data_guard_role_changed_time][crate::model::AutonomousDatabaseStandbySummary::data_guard_role_changed_time].
5257 ///
5258 /// # Example
5259 /// ```ignore,no_run
5260 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseStandbySummary;
5261 /// use wkt::Timestamp;
5262 /// let x = AutonomousDatabaseStandbySummary::new().set_data_guard_role_changed_time(Timestamp::default()/* use setters */);
5263 /// ```
5264 pub fn set_data_guard_role_changed_time<T>(mut self, v: T) -> Self
5265 where
5266 T: std::convert::Into<wkt::Timestamp>,
5267 {
5268 self.data_guard_role_changed_time = std::option::Option::Some(v.into());
5269 self
5270 }
5271
5272 /// Sets or clears the value of [data_guard_role_changed_time][crate::model::AutonomousDatabaseStandbySummary::data_guard_role_changed_time].
5273 ///
5274 /// # Example
5275 /// ```ignore,no_run
5276 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseStandbySummary;
5277 /// use wkt::Timestamp;
5278 /// let x = AutonomousDatabaseStandbySummary::new().set_or_clear_data_guard_role_changed_time(Some(Timestamp::default()/* use setters */));
5279 /// let x = AutonomousDatabaseStandbySummary::new().set_or_clear_data_guard_role_changed_time(None::<Timestamp>);
5280 /// ```
5281 pub fn set_or_clear_data_guard_role_changed_time<T>(mut self, v: std::option::Option<T>) -> Self
5282 where
5283 T: std::convert::Into<wkt::Timestamp>,
5284 {
5285 self.data_guard_role_changed_time = v.map(|x| x.into());
5286 self
5287 }
5288
5289 /// Sets the value of [disaster_recovery_role_changed_time][crate::model::AutonomousDatabaseStandbySummary::disaster_recovery_role_changed_time].
5290 ///
5291 /// # Example
5292 /// ```ignore,no_run
5293 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseStandbySummary;
5294 /// use wkt::Timestamp;
5295 /// let x = AutonomousDatabaseStandbySummary::new().set_disaster_recovery_role_changed_time(Timestamp::default()/* use setters */);
5296 /// ```
5297 pub fn set_disaster_recovery_role_changed_time<T>(mut self, v: T) -> Self
5298 where
5299 T: std::convert::Into<wkt::Timestamp>,
5300 {
5301 self.disaster_recovery_role_changed_time = std::option::Option::Some(v.into());
5302 self
5303 }
5304
5305 /// Sets or clears the value of [disaster_recovery_role_changed_time][crate::model::AutonomousDatabaseStandbySummary::disaster_recovery_role_changed_time].
5306 ///
5307 /// # Example
5308 /// ```ignore,no_run
5309 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseStandbySummary;
5310 /// use wkt::Timestamp;
5311 /// let x = AutonomousDatabaseStandbySummary::new().set_or_clear_disaster_recovery_role_changed_time(Some(Timestamp::default()/* use setters */));
5312 /// let x = AutonomousDatabaseStandbySummary::new().set_or_clear_disaster_recovery_role_changed_time(None::<Timestamp>);
5313 /// ```
5314 pub fn set_or_clear_disaster_recovery_role_changed_time<T>(
5315 mut self,
5316 v: std::option::Option<T>,
5317 ) -> Self
5318 where
5319 T: std::convert::Into<wkt::Timestamp>,
5320 {
5321 self.disaster_recovery_role_changed_time = v.map(|x| x.into());
5322 self
5323 }
5324}
5325
5326impl wkt::message::Message for AutonomousDatabaseStandbySummary {
5327 fn typename() -> &'static str {
5328 "type.googleapis.com/google.cloud.oracledatabase.v1.AutonomousDatabaseStandbySummary"
5329 }
5330}
5331
5332/// Details of scheduled operation.
5333/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/ScheduledOperationDetails>
5334#[derive(Clone, Default, PartialEq)]
5335#[non_exhaustive]
5336pub struct ScheduledOperationDetails {
5337 /// Output only. Day of week.
5338 pub day_of_week: google_cloud_type::model::DayOfWeek,
5339
5340 /// Output only. Auto start time.
5341 pub start_time: std::option::Option<google_cloud_type::model::TimeOfDay>,
5342
5343 /// Output only. Auto stop time.
5344 pub stop_time: std::option::Option<google_cloud_type::model::TimeOfDay>,
5345
5346 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5347}
5348
5349impl ScheduledOperationDetails {
5350 pub fn new() -> Self {
5351 std::default::Default::default()
5352 }
5353
5354 /// Sets the value of [day_of_week][crate::model::ScheduledOperationDetails::day_of_week].
5355 ///
5356 /// # Example
5357 /// ```ignore,no_run
5358 /// # use google_cloud_oracledatabase_v1::model::ScheduledOperationDetails;
5359 /// use google_cloud_type::model::DayOfWeek;
5360 /// let x0 = ScheduledOperationDetails::new().set_day_of_week(DayOfWeek::Monday);
5361 /// let x1 = ScheduledOperationDetails::new().set_day_of_week(DayOfWeek::Tuesday);
5362 /// let x2 = ScheduledOperationDetails::new().set_day_of_week(DayOfWeek::Wednesday);
5363 /// ```
5364 pub fn set_day_of_week<T: std::convert::Into<google_cloud_type::model::DayOfWeek>>(
5365 mut self,
5366 v: T,
5367 ) -> Self {
5368 self.day_of_week = v.into();
5369 self
5370 }
5371
5372 /// Sets the value of [start_time][crate::model::ScheduledOperationDetails::start_time].
5373 ///
5374 /// # Example
5375 /// ```ignore,no_run
5376 /// # use google_cloud_oracledatabase_v1::model::ScheduledOperationDetails;
5377 /// use google_cloud_type::model::TimeOfDay;
5378 /// let x = ScheduledOperationDetails::new().set_start_time(TimeOfDay::default()/* use setters */);
5379 /// ```
5380 pub fn set_start_time<T>(mut self, v: T) -> Self
5381 where
5382 T: std::convert::Into<google_cloud_type::model::TimeOfDay>,
5383 {
5384 self.start_time = std::option::Option::Some(v.into());
5385 self
5386 }
5387
5388 /// Sets or clears the value of [start_time][crate::model::ScheduledOperationDetails::start_time].
5389 ///
5390 /// # Example
5391 /// ```ignore,no_run
5392 /// # use google_cloud_oracledatabase_v1::model::ScheduledOperationDetails;
5393 /// use google_cloud_type::model::TimeOfDay;
5394 /// let x = ScheduledOperationDetails::new().set_or_clear_start_time(Some(TimeOfDay::default()/* use setters */));
5395 /// let x = ScheduledOperationDetails::new().set_or_clear_start_time(None::<TimeOfDay>);
5396 /// ```
5397 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5398 where
5399 T: std::convert::Into<google_cloud_type::model::TimeOfDay>,
5400 {
5401 self.start_time = v.map(|x| x.into());
5402 self
5403 }
5404
5405 /// Sets the value of [stop_time][crate::model::ScheduledOperationDetails::stop_time].
5406 ///
5407 /// # Example
5408 /// ```ignore,no_run
5409 /// # use google_cloud_oracledatabase_v1::model::ScheduledOperationDetails;
5410 /// use google_cloud_type::model::TimeOfDay;
5411 /// let x = ScheduledOperationDetails::new().set_stop_time(TimeOfDay::default()/* use setters */);
5412 /// ```
5413 pub fn set_stop_time<T>(mut self, v: T) -> Self
5414 where
5415 T: std::convert::Into<google_cloud_type::model::TimeOfDay>,
5416 {
5417 self.stop_time = std::option::Option::Some(v.into());
5418 self
5419 }
5420
5421 /// Sets or clears the value of [stop_time][crate::model::ScheduledOperationDetails::stop_time].
5422 ///
5423 /// # Example
5424 /// ```ignore,no_run
5425 /// # use google_cloud_oracledatabase_v1::model::ScheduledOperationDetails;
5426 /// use google_cloud_type::model::TimeOfDay;
5427 /// let x = ScheduledOperationDetails::new().set_or_clear_stop_time(Some(TimeOfDay::default()/* use setters */));
5428 /// let x = ScheduledOperationDetails::new().set_or_clear_stop_time(None::<TimeOfDay>);
5429 /// ```
5430 pub fn set_or_clear_stop_time<T>(mut self, v: std::option::Option<T>) -> Self
5431 where
5432 T: std::convert::Into<google_cloud_type::model::TimeOfDay>,
5433 {
5434 self.stop_time = v.map(|x| x.into());
5435 self
5436 }
5437}
5438
5439impl wkt::message::Message for ScheduledOperationDetails {
5440 fn typename() -> &'static str {
5441 "type.googleapis.com/google.cloud.oracledatabase.v1.ScheduledOperationDetails"
5442 }
5443}
5444
5445/// Details of the Autonomous Database character set resource.
5446/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabaseCharacterSets/>
5447#[derive(Clone, Default, PartialEq)]
5448#[non_exhaustive]
5449pub struct AutonomousDatabaseCharacterSet {
5450 /// Identifier. The name of the Autonomous Database Character Set resource in
5451 /// the following format:
5452 /// projects/{project}/locations/{region}/autonomousDatabaseCharacterSets/{autonomous_database_character_set}
5453 pub name: std::string::String,
5454
5455 /// Output only. The character set type for the Autonomous Database.
5456 pub character_set_type: crate::model::autonomous_database_character_set::CharacterSetType,
5457
5458 /// Output only. The character set name for the Autonomous Database which is
5459 /// the ID in the resource name.
5460 pub character_set: std::string::String,
5461
5462 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5463}
5464
5465impl AutonomousDatabaseCharacterSet {
5466 pub fn new() -> Self {
5467 std::default::Default::default()
5468 }
5469
5470 /// Sets the value of [name][crate::model::AutonomousDatabaseCharacterSet::name].
5471 ///
5472 /// # Example
5473 /// ```ignore,no_run
5474 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseCharacterSet;
5475 /// let x = AutonomousDatabaseCharacterSet::new().set_name("example");
5476 /// ```
5477 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5478 self.name = v.into();
5479 self
5480 }
5481
5482 /// Sets the value of [character_set_type][crate::model::AutonomousDatabaseCharacterSet::character_set_type].
5483 ///
5484 /// # Example
5485 /// ```ignore,no_run
5486 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseCharacterSet;
5487 /// use google_cloud_oracledatabase_v1::model::autonomous_database_character_set::CharacterSetType;
5488 /// let x0 = AutonomousDatabaseCharacterSet::new().set_character_set_type(CharacterSetType::Database);
5489 /// let x1 = AutonomousDatabaseCharacterSet::new().set_character_set_type(CharacterSetType::National);
5490 /// ```
5491 pub fn set_character_set_type<
5492 T: std::convert::Into<crate::model::autonomous_database_character_set::CharacterSetType>,
5493 >(
5494 mut self,
5495 v: T,
5496 ) -> Self {
5497 self.character_set_type = v.into();
5498 self
5499 }
5500
5501 /// Sets the value of [character_set][crate::model::AutonomousDatabaseCharacterSet::character_set].
5502 ///
5503 /// # Example
5504 /// ```ignore,no_run
5505 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseCharacterSet;
5506 /// let x = AutonomousDatabaseCharacterSet::new().set_character_set("example");
5507 /// ```
5508 pub fn set_character_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5509 self.character_set = v.into();
5510 self
5511 }
5512}
5513
5514impl wkt::message::Message for AutonomousDatabaseCharacterSet {
5515 fn typename() -> &'static str {
5516 "type.googleapis.com/google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet"
5517 }
5518}
5519
5520/// Defines additional types related to [AutonomousDatabaseCharacterSet].
5521pub mod autonomous_database_character_set {
5522 #[allow(unused_imports)]
5523 use super::*;
5524
5525 /// The type of character set an Autonomous Database can have.
5526 ///
5527 /// # Working with unknown values
5528 ///
5529 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5530 /// additional enum variants at any time. Adding new variants is not considered
5531 /// a breaking change. Applications should write their code in anticipation of:
5532 ///
5533 /// - New values appearing in future releases of the client library, **and**
5534 /// - New values received dynamically, without application changes.
5535 ///
5536 /// Please consult the [Working with enums] section in the user guide for some
5537 /// guidelines.
5538 ///
5539 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
5540 #[derive(Clone, Debug, PartialEq)]
5541 #[non_exhaustive]
5542 pub enum CharacterSetType {
5543 /// Character set type is not specified.
5544 Unspecified,
5545 /// Character set type is set to database.
5546 Database,
5547 /// Character set type is set to national.
5548 National,
5549 /// If set, the enum was initialized with an unknown value.
5550 ///
5551 /// Applications can examine the value using [CharacterSetType::value] or
5552 /// [CharacterSetType::name].
5553 UnknownValue(character_set_type::UnknownValue),
5554 }
5555
5556 #[doc(hidden)]
5557 pub mod character_set_type {
5558 #[allow(unused_imports)]
5559 use super::*;
5560 #[derive(Clone, Debug, PartialEq)]
5561 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5562 }
5563
5564 impl CharacterSetType {
5565 /// Gets the enum value.
5566 ///
5567 /// Returns `None` if the enum contains an unknown value deserialized from
5568 /// the string representation of enums.
5569 pub fn value(&self) -> std::option::Option<i32> {
5570 match self {
5571 Self::Unspecified => std::option::Option::Some(0),
5572 Self::Database => std::option::Option::Some(1),
5573 Self::National => std::option::Option::Some(2),
5574 Self::UnknownValue(u) => u.0.value(),
5575 }
5576 }
5577
5578 /// Gets the enum value as a string.
5579 ///
5580 /// Returns `None` if the enum contains an unknown value deserialized from
5581 /// the integer representation of enums.
5582 pub fn name(&self) -> std::option::Option<&str> {
5583 match self {
5584 Self::Unspecified => std::option::Option::Some("CHARACTER_SET_TYPE_UNSPECIFIED"),
5585 Self::Database => std::option::Option::Some("DATABASE"),
5586 Self::National => std::option::Option::Some("NATIONAL"),
5587 Self::UnknownValue(u) => u.0.name(),
5588 }
5589 }
5590 }
5591
5592 impl std::default::Default for CharacterSetType {
5593 fn default() -> Self {
5594 use std::convert::From;
5595 Self::from(0)
5596 }
5597 }
5598
5599 impl std::fmt::Display for CharacterSetType {
5600 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5601 wkt::internal::display_enum(f, self.name(), self.value())
5602 }
5603 }
5604
5605 impl std::convert::From<i32> for CharacterSetType {
5606 fn from(value: i32) -> Self {
5607 match value {
5608 0 => Self::Unspecified,
5609 1 => Self::Database,
5610 2 => Self::National,
5611 _ => Self::UnknownValue(character_set_type::UnknownValue(
5612 wkt::internal::UnknownEnumValue::Integer(value),
5613 )),
5614 }
5615 }
5616 }
5617
5618 impl std::convert::From<&str> for CharacterSetType {
5619 fn from(value: &str) -> Self {
5620 use std::string::ToString;
5621 match value {
5622 "CHARACTER_SET_TYPE_UNSPECIFIED" => Self::Unspecified,
5623 "DATABASE" => Self::Database,
5624 "NATIONAL" => Self::National,
5625 _ => Self::UnknownValue(character_set_type::UnknownValue(
5626 wkt::internal::UnknownEnumValue::String(value.to_string()),
5627 )),
5628 }
5629 }
5630 }
5631
5632 impl serde::ser::Serialize for CharacterSetType {
5633 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5634 where
5635 S: serde::Serializer,
5636 {
5637 match self {
5638 Self::Unspecified => serializer.serialize_i32(0),
5639 Self::Database => serializer.serialize_i32(1),
5640 Self::National => serializer.serialize_i32(2),
5641 Self::UnknownValue(u) => u.0.serialize(serializer),
5642 }
5643 }
5644 }
5645
5646 impl<'de> serde::de::Deserialize<'de> for CharacterSetType {
5647 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5648 where
5649 D: serde::Deserializer<'de>,
5650 {
5651 deserializer.deserialize_any(wkt::internal::EnumVisitor::<CharacterSetType>::new(
5652 ".google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet.CharacterSetType",
5653 ))
5654 }
5655 }
5656}
5657
5658/// Details of the Autonomous Database Backup resource.
5659/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabaseBackup/>
5660#[derive(Clone, Default, PartialEq)]
5661#[non_exhaustive]
5662pub struct AutonomousDatabaseBackup {
5663 /// Identifier. The name of the Autonomous Database Backup resource with the
5664 /// format:
5665 /// projects/{project}/locations/{region}/autonomousDatabaseBackups/{autonomous_database_backup}
5666 pub name: std::string::String,
5667
5668 /// Required. The name of the Autonomous Database resource for which the backup
5669 /// is being created. Format:
5670 /// projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database}
5671 pub autonomous_database: std::string::String,
5672
5673 /// Optional. User friendly name for the Backup. The name does not have to be
5674 /// unique.
5675 pub display_name: std::string::String,
5676
5677 /// Optional. Various properties of the backup.
5678 pub properties: std::option::Option<crate::model::AutonomousDatabaseBackupProperties>,
5679
5680 /// Optional. labels or tags associated with the resource.
5681 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5682
5683 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5684}
5685
5686impl AutonomousDatabaseBackup {
5687 pub fn new() -> Self {
5688 std::default::Default::default()
5689 }
5690
5691 /// Sets the value of [name][crate::model::AutonomousDatabaseBackup::name].
5692 ///
5693 /// # Example
5694 /// ```ignore,no_run
5695 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackup;
5696 /// let x = AutonomousDatabaseBackup::new().set_name("example");
5697 /// ```
5698 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5699 self.name = v.into();
5700 self
5701 }
5702
5703 /// Sets the value of [autonomous_database][crate::model::AutonomousDatabaseBackup::autonomous_database].
5704 ///
5705 /// # Example
5706 /// ```ignore,no_run
5707 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackup;
5708 /// let x = AutonomousDatabaseBackup::new().set_autonomous_database("example");
5709 /// ```
5710 pub fn set_autonomous_database<T: std::convert::Into<std::string::String>>(
5711 mut self,
5712 v: T,
5713 ) -> Self {
5714 self.autonomous_database = v.into();
5715 self
5716 }
5717
5718 /// Sets the value of [display_name][crate::model::AutonomousDatabaseBackup::display_name].
5719 ///
5720 /// # Example
5721 /// ```ignore,no_run
5722 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackup;
5723 /// let x = AutonomousDatabaseBackup::new().set_display_name("example");
5724 /// ```
5725 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5726 self.display_name = v.into();
5727 self
5728 }
5729
5730 /// Sets the value of [properties][crate::model::AutonomousDatabaseBackup::properties].
5731 ///
5732 /// # Example
5733 /// ```ignore,no_run
5734 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackup;
5735 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5736 /// let x = AutonomousDatabaseBackup::new().set_properties(AutonomousDatabaseBackupProperties::default()/* use setters */);
5737 /// ```
5738 pub fn set_properties<T>(mut self, v: T) -> Self
5739 where
5740 T: std::convert::Into<crate::model::AutonomousDatabaseBackupProperties>,
5741 {
5742 self.properties = std::option::Option::Some(v.into());
5743 self
5744 }
5745
5746 /// Sets or clears the value of [properties][crate::model::AutonomousDatabaseBackup::properties].
5747 ///
5748 /// # Example
5749 /// ```ignore,no_run
5750 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackup;
5751 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5752 /// let x = AutonomousDatabaseBackup::new().set_or_clear_properties(Some(AutonomousDatabaseBackupProperties::default()/* use setters */));
5753 /// let x = AutonomousDatabaseBackup::new().set_or_clear_properties(None::<AutonomousDatabaseBackupProperties>);
5754 /// ```
5755 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
5756 where
5757 T: std::convert::Into<crate::model::AutonomousDatabaseBackupProperties>,
5758 {
5759 self.properties = v.map(|x| x.into());
5760 self
5761 }
5762
5763 /// Sets the value of [labels][crate::model::AutonomousDatabaseBackup::labels].
5764 ///
5765 /// # Example
5766 /// ```ignore,no_run
5767 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackup;
5768 /// let x = AutonomousDatabaseBackup::new().set_labels([
5769 /// ("key0", "abc"),
5770 /// ("key1", "xyz"),
5771 /// ]);
5772 /// ```
5773 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5774 where
5775 T: std::iter::IntoIterator<Item = (K, V)>,
5776 K: std::convert::Into<std::string::String>,
5777 V: std::convert::Into<std::string::String>,
5778 {
5779 use std::iter::Iterator;
5780 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5781 self
5782 }
5783}
5784
5785impl wkt::message::Message for AutonomousDatabaseBackup {
5786 fn typename() -> &'static str {
5787 "type.googleapis.com/google.cloud.oracledatabase.v1.AutonomousDatabaseBackup"
5788 }
5789}
5790
5791/// Properties of the Autonomous Database Backup resource.
5792#[derive(Clone, Default, PartialEq)]
5793#[non_exhaustive]
5794pub struct AutonomousDatabaseBackupProperties {
5795 /// Output only. OCID of the Autonomous Database backup.
5796 /// <https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle>
5797 pub ocid: std::string::String,
5798
5799 /// Optional. Retention period in days for the backup.
5800 pub retention_period_days: i32,
5801
5802 /// Output only. The OCID of the compartment.
5803 pub compartment_id: std::string::String,
5804
5805 /// Output only. The quantity of data in the database, in terabytes.
5806 pub database_size_tb: f32,
5807
5808 /// Output only. A valid Oracle Database version for Autonomous Database.
5809 pub db_version: std::string::String,
5810
5811 /// Output only. Indicates if the backup is long term backup.
5812 pub is_long_term_backup: bool,
5813
5814 /// Output only. Indicates if the backup is automatic or user initiated.
5815 pub is_automatic_backup: bool,
5816
5817 /// Output only. Indicates if the backup can be used to restore the Autonomous
5818 /// Database.
5819 pub is_restorable: bool,
5820
5821 /// Optional. The OCID of the key store of Oracle Vault.
5822 pub key_store_id: std::string::String,
5823
5824 /// Optional. The wallet name for Oracle Key Vault.
5825 pub key_store_wallet: std::string::String,
5826
5827 /// Optional. The OCID of the key container that is used as the master
5828 /// encryption key in database transparent data encryption (TDE) operations.
5829 pub kms_key_id: std::string::String,
5830
5831 /// Optional. The OCID of the key container version that is used in database
5832 /// transparent data encryption (TDE) operations KMS Key can have multiple key
5833 /// versions. If none is specified, the current key version (latest) of the Key
5834 /// Id is used for the operation. Autonomous Database Serverless does not use
5835 /// key versions, hence is not applicable for Autonomous Database Serverless
5836 /// instances.
5837 pub kms_key_version_id: std::string::String,
5838
5839 /// Output only. Additional information about the current lifecycle state.
5840 pub lifecycle_details: std::string::String,
5841
5842 /// Output only. The lifecycle state of the backup.
5843 pub lifecycle_state: crate::model::autonomous_database_backup_properties::State,
5844
5845 /// Output only. The backup size in terabytes.
5846 pub size_tb: f32,
5847
5848 /// Output only. Timestamp until when the backup will be available.
5849 pub available_till_time: std::option::Option<wkt::Timestamp>,
5850
5851 /// Output only. The date and time the backup completed.
5852 pub end_time: std::option::Option<wkt::Timestamp>,
5853
5854 /// Output only. The date and time the backup started.
5855 pub start_time: std::option::Option<wkt::Timestamp>,
5856
5857 /// Output only. The type of the backup.
5858 pub r#type: crate::model::autonomous_database_backup_properties::Type,
5859
5860 /// Optional. The OCID of the vault.
5861 pub vault_id: std::string::String,
5862
5863 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5864}
5865
5866impl AutonomousDatabaseBackupProperties {
5867 pub fn new() -> Self {
5868 std::default::Default::default()
5869 }
5870
5871 /// Sets the value of [ocid][crate::model::AutonomousDatabaseBackupProperties::ocid].
5872 ///
5873 /// # Example
5874 /// ```ignore,no_run
5875 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5876 /// let x = AutonomousDatabaseBackupProperties::new().set_ocid("example");
5877 /// ```
5878 pub fn set_ocid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5879 self.ocid = v.into();
5880 self
5881 }
5882
5883 /// Sets the value of [retention_period_days][crate::model::AutonomousDatabaseBackupProperties::retention_period_days].
5884 ///
5885 /// # Example
5886 /// ```ignore,no_run
5887 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5888 /// let x = AutonomousDatabaseBackupProperties::new().set_retention_period_days(42);
5889 /// ```
5890 pub fn set_retention_period_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5891 self.retention_period_days = v.into();
5892 self
5893 }
5894
5895 /// Sets the value of [compartment_id][crate::model::AutonomousDatabaseBackupProperties::compartment_id].
5896 ///
5897 /// # Example
5898 /// ```ignore,no_run
5899 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5900 /// let x = AutonomousDatabaseBackupProperties::new().set_compartment_id("example");
5901 /// ```
5902 pub fn set_compartment_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5903 self.compartment_id = v.into();
5904 self
5905 }
5906
5907 /// Sets the value of [database_size_tb][crate::model::AutonomousDatabaseBackupProperties::database_size_tb].
5908 ///
5909 /// # Example
5910 /// ```ignore,no_run
5911 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5912 /// let x = AutonomousDatabaseBackupProperties::new().set_database_size_tb(42.0);
5913 /// ```
5914 pub fn set_database_size_tb<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
5915 self.database_size_tb = v.into();
5916 self
5917 }
5918
5919 /// Sets the value of [db_version][crate::model::AutonomousDatabaseBackupProperties::db_version].
5920 ///
5921 /// # Example
5922 /// ```ignore,no_run
5923 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5924 /// let x = AutonomousDatabaseBackupProperties::new().set_db_version("example");
5925 /// ```
5926 pub fn set_db_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5927 self.db_version = v.into();
5928 self
5929 }
5930
5931 /// Sets the value of [is_long_term_backup][crate::model::AutonomousDatabaseBackupProperties::is_long_term_backup].
5932 ///
5933 /// # Example
5934 /// ```ignore,no_run
5935 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5936 /// let x = AutonomousDatabaseBackupProperties::new().set_is_long_term_backup(true);
5937 /// ```
5938 pub fn set_is_long_term_backup<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5939 self.is_long_term_backup = v.into();
5940 self
5941 }
5942
5943 /// Sets the value of [is_automatic_backup][crate::model::AutonomousDatabaseBackupProperties::is_automatic_backup].
5944 ///
5945 /// # Example
5946 /// ```ignore,no_run
5947 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5948 /// let x = AutonomousDatabaseBackupProperties::new().set_is_automatic_backup(true);
5949 /// ```
5950 pub fn set_is_automatic_backup<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5951 self.is_automatic_backup = v.into();
5952 self
5953 }
5954
5955 /// Sets the value of [is_restorable][crate::model::AutonomousDatabaseBackupProperties::is_restorable].
5956 ///
5957 /// # Example
5958 /// ```ignore,no_run
5959 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5960 /// let x = AutonomousDatabaseBackupProperties::new().set_is_restorable(true);
5961 /// ```
5962 pub fn set_is_restorable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5963 self.is_restorable = v.into();
5964 self
5965 }
5966
5967 /// Sets the value of [key_store_id][crate::model::AutonomousDatabaseBackupProperties::key_store_id].
5968 ///
5969 /// # Example
5970 /// ```ignore,no_run
5971 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5972 /// let x = AutonomousDatabaseBackupProperties::new().set_key_store_id("example");
5973 /// ```
5974 pub fn set_key_store_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5975 self.key_store_id = v.into();
5976 self
5977 }
5978
5979 /// Sets the value of [key_store_wallet][crate::model::AutonomousDatabaseBackupProperties::key_store_wallet].
5980 ///
5981 /// # Example
5982 /// ```ignore,no_run
5983 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5984 /// let x = AutonomousDatabaseBackupProperties::new().set_key_store_wallet("example");
5985 /// ```
5986 pub fn set_key_store_wallet<T: std::convert::Into<std::string::String>>(
5987 mut self,
5988 v: T,
5989 ) -> Self {
5990 self.key_store_wallet = v.into();
5991 self
5992 }
5993
5994 /// Sets the value of [kms_key_id][crate::model::AutonomousDatabaseBackupProperties::kms_key_id].
5995 ///
5996 /// # Example
5997 /// ```ignore,no_run
5998 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
5999 /// let x = AutonomousDatabaseBackupProperties::new().set_kms_key_id("example");
6000 /// ```
6001 pub fn set_kms_key_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6002 self.kms_key_id = v.into();
6003 self
6004 }
6005
6006 /// Sets the value of [kms_key_version_id][crate::model::AutonomousDatabaseBackupProperties::kms_key_version_id].
6007 ///
6008 /// # Example
6009 /// ```ignore,no_run
6010 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6011 /// let x = AutonomousDatabaseBackupProperties::new().set_kms_key_version_id("example");
6012 /// ```
6013 pub fn set_kms_key_version_id<T: std::convert::Into<std::string::String>>(
6014 mut self,
6015 v: T,
6016 ) -> Self {
6017 self.kms_key_version_id = v.into();
6018 self
6019 }
6020
6021 /// Sets the value of [lifecycle_details][crate::model::AutonomousDatabaseBackupProperties::lifecycle_details].
6022 ///
6023 /// # Example
6024 /// ```ignore,no_run
6025 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6026 /// let x = AutonomousDatabaseBackupProperties::new().set_lifecycle_details("example");
6027 /// ```
6028 pub fn set_lifecycle_details<T: std::convert::Into<std::string::String>>(
6029 mut self,
6030 v: T,
6031 ) -> Self {
6032 self.lifecycle_details = v.into();
6033 self
6034 }
6035
6036 /// Sets the value of [lifecycle_state][crate::model::AutonomousDatabaseBackupProperties::lifecycle_state].
6037 ///
6038 /// # Example
6039 /// ```ignore,no_run
6040 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6041 /// use google_cloud_oracledatabase_v1::model::autonomous_database_backup_properties::State;
6042 /// let x0 = AutonomousDatabaseBackupProperties::new().set_lifecycle_state(State::Creating);
6043 /// let x1 = AutonomousDatabaseBackupProperties::new().set_lifecycle_state(State::Active);
6044 /// let x2 = AutonomousDatabaseBackupProperties::new().set_lifecycle_state(State::Deleting);
6045 /// ```
6046 pub fn set_lifecycle_state<
6047 T: std::convert::Into<crate::model::autonomous_database_backup_properties::State>,
6048 >(
6049 mut self,
6050 v: T,
6051 ) -> Self {
6052 self.lifecycle_state = v.into();
6053 self
6054 }
6055
6056 /// Sets the value of [size_tb][crate::model::AutonomousDatabaseBackupProperties::size_tb].
6057 ///
6058 /// # Example
6059 /// ```ignore,no_run
6060 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6061 /// let x = AutonomousDatabaseBackupProperties::new().set_size_tb(42.0);
6062 /// ```
6063 pub fn set_size_tb<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
6064 self.size_tb = v.into();
6065 self
6066 }
6067
6068 /// Sets the value of [available_till_time][crate::model::AutonomousDatabaseBackupProperties::available_till_time].
6069 ///
6070 /// # Example
6071 /// ```ignore,no_run
6072 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6073 /// use wkt::Timestamp;
6074 /// let x = AutonomousDatabaseBackupProperties::new().set_available_till_time(Timestamp::default()/* use setters */);
6075 /// ```
6076 pub fn set_available_till_time<T>(mut self, v: T) -> Self
6077 where
6078 T: std::convert::Into<wkt::Timestamp>,
6079 {
6080 self.available_till_time = std::option::Option::Some(v.into());
6081 self
6082 }
6083
6084 /// Sets or clears the value of [available_till_time][crate::model::AutonomousDatabaseBackupProperties::available_till_time].
6085 ///
6086 /// # Example
6087 /// ```ignore,no_run
6088 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6089 /// use wkt::Timestamp;
6090 /// let x = AutonomousDatabaseBackupProperties::new().set_or_clear_available_till_time(Some(Timestamp::default()/* use setters */));
6091 /// let x = AutonomousDatabaseBackupProperties::new().set_or_clear_available_till_time(None::<Timestamp>);
6092 /// ```
6093 pub fn set_or_clear_available_till_time<T>(mut self, v: std::option::Option<T>) -> Self
6094 where
6095 T: std::convert::Into<wkt::Timestamp>,
6096 {
6097 self.available_till_time = v.map(|x| x.into());
6098 self
6099 }
6100
6101 /// Sets the value of [end_time][crate::model::AutonomousDatabaseBackupProperties::end_time].
6102 ///
6103 /// # Example
6104 /// ```ignore,no_run
6105 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6106 /// use wkt::Timestamp;
6107 /// let x = AutonomousDatabaseBackupProperties::new().set_end_time(Timestamp::default()/* use setters */);
6108 /// ```
6109 pub fn set_end_time<T>(mut self, v: T) -> Self
6110 where
6111 T: std::convert::Into<wkt::Timestamp>,
6112 {
6113 self.end_time = std::option::Option::Some(v.into());
6114 self
6115 }
6116
6117 /// Sets or clears the value of [end_time][crate::model::AutonomousDatabaseBackupProperties::end_time].
6118 ///
6119 /// # Example
6120 /// ```ignore,no_run
6121 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6122 /// use wkt::Timestamp;
6123 /// let x = AutonomousDatabaseBackupProperties::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
6124 /// let x = AutonomousDatabaseBackupProperties::new().set_or_clear_end_time(None::<Timestamp>);
6125 /// ```
6126 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6127 where
6128 T: std::convert::Into<wkt::Timestamp>,
6129 {
6130 self.end_time = v.map(|x| x.into());
6131 self
6132 }
6133
6134 /// Sets the value of [start_time][crate::model::AutonomousDatabaseBackupProperties::start_time].
6135 ///
6136 /// # Example
6137 /// ```ignore,no_run
6138 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6139 /// use wkt::Timestamp;
6140 /// let x = AutonomousDatabaseBackupProperties::new().set_start_time(Timestamp::default()/* use setters */);
6141 /// ```
6142 pub fn set_start_time<T>(mut self, v: T) -> Self
6143 where
6144 T: std::convert::Into<wkt::Timestamp>,
6145 {
6146 self.start_time = std::option::Option::Some(v.into());
6147 self
6148 }
6149
6150 /// Sets or clears the value of [start_time][crate::model::AutonomousDatabaseBackupProperties::start_time].
6151 ///
6152 /// # Example
6153 /// ```ignore,no_run
6154 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6155 /// use wkt::Timestamp;
6156 /// let x = AutonomousDatabaseBackupProperties::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
6157 /// let x = AutonomousDatabaseBackupProperties::new().set_or_clear_start_time(None::<Timestamp>);
6158 /// ```
6159 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6160 where
6161 T: std::convert::Into<wkt::Timestamp>,
6162 {
6163 self.start_time = v.map(|x| x.into());
6164 self
6165 }
6166
6167 /// Sets the value of [r#type][crate::model::AutonomousDatabaseBackupProperties::type].
6168 ///
6169 /// # Example
6170 /// ```ignore,no_run
6171 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6172 /// use google_cloud_oracledatabase_v1::model::autonomous_database_backup_properties::Type;
6173 /// let x0 = AutonomousDatabaseBackupProperties::new().set_type(Type::Incremental);
6174 /// let x1 = AutonomousDatabaseBackupProperties::new().set_type(Type::Full);
6175 /// let x2 = AutonomousDatabaseBackupProperties::new().set_type(Type::LongTerm);
6176 /// ```
6177 pub fn set_type<
6178 T: std::convert::Into<crate::model::autonomous_database_backup_properties::Type>,
6179 >(
6180 mut self,
6181 v: T,
6182 ) -> Self {
6183 self.r#type = v.into();
6184 self
6185 }
6186
6187 /// Sets the value of [vault_id][crate::model::AutonomousDatabaseBackupProperties::vault_id].
6188 ///
6189 /// # Example
6190 /// ```ignore,no_run
6191 /// # use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackupProperties;
6192 /// let x = AutonomousDatabaseBackupProperties::new().set_vault_id("example");
6193 /// ```
6194 pub fn set_vault_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6195 self.vault_id = v.into();
6196 self
6197 }
6198}
6199
6200impl wkt::message::Message for AutonomousDatabaseBackupProperties {
6201 fn typename() -> &'static str {
6202 "type.googleapis.com/google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties"
6203 }
6204}
6205
6206/// Defines additional types related to [AutonomousDatabaseBackupProperties].
6207pub mod autonomous_database_backup_properties {
6208 #[allow(unused_imports)]
6209 use super::*;
6210
6211 /// // The various lifecycle states of the Autonomous Database Backup.
6212 ///
6213 /// # Working with unknown values
6214 ///
6215 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6216 /// additional enum variants at any time. Adding new variants is not considered
6217 /// a breaking change. Applications should write their code in anticipation of:
6218 ///
6219 /// - New values appearing in future releases of the client library, **and**
6220 /// - New values received dynamically, without application changes.
6221 ///
6222 /// Please consult the [Working with enums] section in the user guide for some
6223 /// guidelines.
6224 ///
6225 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6226 #[derive(Clone, Debug, PartialEq)]
6227 #[non_exhaustive]
6228 pub enum State {
6229 /// Default unspecified value.
6230 Unspecified,
6231 /// Indicates that the resource is in creating state.
6232 Creating,
6233 /// Indicates that the resource is in active state.
6234 Active,
6235 /// Indicates that the resource is in deleting state.
6236 Deleting,
6237 /// Indicates that the resource is in deleted state.
6238 Deleted,
6239 /// Indicates that the resource is in failed state.
6240 Failed,
6241 /// Indicates that the resource is in updating state.
6242 Updating,
6243 /// If set, the enum was initialized with an unknown value.
6244 ///
6245 /// Applications can examine the value using [State::value] or
6246 /// [State::name].
6247 UnknownValue(state::UnknownValue),
6248 }
6249
6250 #[doc(hidden)]
6251 pub mod state {
6252 #[allow(unused_imports)]
6253 use super::*;
6254 #[derive(Clone, Debug, PartialEq)]
6255 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6256 }
6257
6258 impl State {
6259 /// Gets the enum value.
6260 ///
6261 /// Returns `None` if the enum contains an unknown value deserialized from
6262 /// the string representation of enums.
6263 pub fn value(&self) -> std::option::Option<i32> {
6264 match self {
6265 Self::Unspecified => std::option::Option::Some(0),
6266 Self::Creating => std::option::Option::Some(1),
6267 Self::Active => std::option::Option::Some(2),
6268 Self::Deleting => std::option::Option::Some(3),
6269 Self::Deleted => std::option::Option::Some(4),
6270 Self::Failed => std::option::Option::Some(6),
6271 Self::Updating => std::option::Option::Some(7),
6272 Self::UnknownValue(u) => u.0.value(),
6273 }
6274 }
6275
6276 /// Gets the enum value as a string.
6277 ///
6278 /// Returns `None` if the enum contains an unknown value deserialized from
6279 /// the integer representation of enums.
6280 pub fn name(&self) -> std::option::Option<&str> {
6281 match self {
6282 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
6283 Self::Creating => std::option::Option::Some("CREATING"),
6284 Self::Active => std::option::Option::Some("ACTIVE"),
6285 Self::Deleting => std::option::Option::Some("DELETING"),
6286 Self::Deleted => std::option::Option::Some("DELETED"),
6287 Self::Failed => std::option::Option::Some("FAILED"),
6288 Self::Updating => std::option::Option::Some("UPDATING"),
6289 Self::UnknownValue(u) => u.0.name(),
6290 }
6291 }
6292 }
6293
6294 impl std::default::Default for State {
6295 fn default() -> Self {
6296 use std::convert::From;
6297 Self::from(0)
6298 }
6299 }
6300
6301 impl std::fmt::Display for State {
6302 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6303 wkt::internal::display_enum(f, self.name(), self.value())
6304 }
6305 }
6306
6307 impl std::convert::From<i32> for State {
6308 fn from(value: i32) -> Self {
6309 match value {
6310 0 => Self::Unspecified,
6311 1 => Self::Creating,
6312 2 => Self::Active,
6313 3 => Self::Deleting,
6314 4 => Self::Deleted,
6315 6 => Self::Failed,
6316 7 => Self::Updating,
6317 _ => Self::UnknownValue(state::UnknownValue(
6318 wkt::internal::UnknownEnumValue::Integer(value),
6319 )),
6320 }
6321 }
6322 }
6323
6324 impl std::convert::From<&str> for State {
6325 fn from(value: &str) -> Self {
6326 use std::string::ToString;
6327 match value {
6328 "STATE_UNSPECIFIED" => Self::Unspecified,
6329 "CREATING" => Self::Creating,
6330 "ACTIVE" => Self::Active,
6331 "DELETING" => Self::Deleting,
6332 "DELETED" => Self::Deleted,
6333 "FAILED" => Self::Failed,
6334 "UPDATING" => Self::Updating,
6335 _ => Self::UnknownValue(state::UnknownValue(
6336 wkt::internal::UnknownEnumValue::String(value.to_string()),
6337 )),
6338 }
6339 }
6340 }
6341
6342 impl serde::ser::Serialize for State {
6343 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6344 where
6345 S: serde::Serializer,
6346 {
6347 match self {
6348 Self::Unspecified => serializer.serialize_i32(0),
6349 Self::Creating => serializer.serialize_i32(1),
6350 Self::Active => serializer.serialize_i32(2),
6351 Self::Deleting => serializer.serialize_i32(3),
6352 Self::Deleted => serializer.serialize_i32(4),
6353 Self::Failed => serializer.serialize_i32(6),
6354 Self::Updating => serializer.serialize_i32(7),
6355 Self::UnknownValue(u) => u.0.serialize(serializer),
6356 }
6357 }
6358 }
6359
6360 impl<'de> serde::de::Deserialize<'de> for State {
6361 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6362 where
6363 D: serde::Deserializer<'de>,
6364 {
6365 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
6366 ".google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.State",
6367 ))
6368 }
6369 }
6370
6371 /// The type of the backup.
6372 ///
6373 /// # Working with unknown values
6374 ///
6375 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6376 /// additional enum variants at any time. Adding new variants is not considered
6377 /// a breaking change. Applications should write their code in anticipation of:
6378 ///
6379 /// - New values appearing in future releases of the client library, **and**
6380 /// - New values received dynamically, without application changes.
6381 ///
6382 /// Please consult the [Working with enums] section in the user guide for some
6383 /// guidelines.
6384 ///
6385 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6386 #[derive(Clone, Debug, PartialEq)]
6387 #[non_exhaustive]
6388 pub enum Type {
6389 /// Default unspecified value.
6390 Unspecified,
6391 /// Incremental backups.
6392 Incremental,
6393 /// Full backups.
6394 Full,
6395 /// Long term backups.
6396 LongTerm,
6397 /// If set, the enum was initialized with an unknown value.
6398 ///
6399 /// Applications can examine the value using [Type::value] or
6400 /// [Type::name].
6401 UnknownValue(r#type::UnknownValue),
6402 }
6403
6404 #[doc(hidden)]
6405 pub mod r#type {
6406 #[allow(unused_imports)]
6407 use super::*;
6408 #[derive(Clone, Debug, PartialEq)]
6409 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6410 }
6411
6412 impl Type {
6413 /// Gets the enum value.
6414 ///
6415 /// Returns `None` if the enum contains an unknown value deserialized from
6416 /// the string representation of enums.
6417 pub fn value(&self) -> std::option::Option<i32> {
6418 match self {
6419 Self::Unspecified => std::option::Option::Some(0),
6420 Self::Incremental => std::option::Option::Some(1),
6421 Self::Full => std::option::Option::Some(2),
6422 Self::LongTerm => std::option::Option::Some(3),
6423 Self::UnknownValue(u) => u.0.value(),
6424 }
6425 }
6426
6427 /// Gets the enum value as a string.
6428 ///
6429 /// Returns `None` if the enum contains an unknown value deserialized from
6430 /// the integer representation of enums.
6431 pub fn name(&self) -> std::option::Option<&str> {
6432 match self {
6433 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
6434 Self::Incremental => std::option::Option::Some("INCREMENTAL"),
6435 Self::Full => std::option::Option::Some("FULL"),
6436 Self::LongTerm => std::option::Option::Some("LONG_TERM"),
6437 Self::UnknownValue(u) => u.0.name(),
6438 }
6439 }
6440 }
6441
6442 impl std::default::Default for Type {
6443 fn default() -> Self {
6444 use std::convert::From;
6445 Self::from(0)
6446 }
6447 }
6448
6449 impl std::fmt::Display for Type {
6450 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6451 wkt::internal::display_enum(f, self.name(), self.value())
6452 }
6453 }
6454
6455 impl std::convert::From<i32> for Type {
6456 fn from(value: i32) -> Self {
6457 match value {
6458 0 => Self::Unspecified,
6459 1 => Self::Incremental,
6460 2 => Self::Full,
6461 3 => Self::LongTerm,
6462 _ => Self::UnknownValue(r#type::UnknownValue(
6463 wkt::internal::UnknownEnumValue::Integer(value),
6464 )),
6465 }
6466 }
6467 }
6468
6469 impl std::convert::From<&str> for Type {
6470 fn from(value: &str) -> Self {
6471 use std::string::ToString;
6472 match value {
6473 "TYPE_UNSPECIFIED" => Self::Unspecified,
6474 "INCREMENTAL" => Self::Incremental,
6475 "FULL" => Self::Full,
6476 "LONG_TERM" => Self::LongTerm,
6477 _ => Self::UnknownValue(r#type::UnknownValue(
6478 wkt::internal::UnknownEnumValue::String(value.to_string()),
6479 )),
6480 }
6481 }
6482 }
6483
6484 impl serde::ser::Serialize for Type {
6485 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6486 where
6487 S: serde::Serializer,
6488 {
6489 match self {
6490 Self::Unspecified => serializer.serialize_i32(0),
6491 Self::Incremental => serializer.serialize_i32(1),
6492 Self::Full => serializer.serialize_i32(2),
6493 Self::LongTerm => serializer.serialize_i32(3),
6494 Self::UnknownValue(u) => u.0.serialize(serializer),
6495 }
6496 }
6497 }
6498
6499 impl<'de> serde::de::Deserialize<'de> for Type {
6500 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6501 where
6502 D: serde::Deserializer<'de>,
6503 {
6504 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
6505 ".google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.Type",
6506 ))
6507 }
6508 }
6509}
6510
6511/// Details of the Autonomous Database version.
6512/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDbVersionSummary/>
6513#[derive(Clone, Default, PartialEq)]
6514#[non_exhaustive]
6515pub struct AutonomousDbVersion {
6516 /// Identifier. The name of the Autonomous Database Version resource with the
6517 /// format:
6518 /// projects/{project}/locations/{region}/autonomousDbVersions/{autonomous_db_version}
6519 pub name: std::string::String,
6520
6521 /// Output only. An Oracle Database version for Autonomous Database.
6522 pub version: std::string::String,
6523
6524 /// Output only. The Autonomous Database workload type.
6525 pub db_workload: crate::model::DBWorkload,
6526
6527 /// Output only. A URL that points to a detailed description of the Autonomous
6528 /// Database version.
6529 pub workload_uri: std::string::String,
6530
6531 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6532}
6533
6534impl AutonomousDbVersion {
6535 pub fn new() -> Self {
6536 std::default::Default::default()
6537 }
6538
6539 /// Sets the value of [name][crate::model::AutonomousDbVersion::name].
6540 ///
6541 /// # Example
6542 /// ```ignore,no_run
6543 /// # use google_cloud_oracledatabase_v1::model::AutonomousDbVersion;
6544 /// let x = AutonomousDbVersion::new().set_name("example");
6545 /// ```
6546 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6547 self.name = v.into();
6548 self
6549 }
6550
6551 /// Sets the value of [version][crate::model::AutonomousDbVersion::version].
6552 ///
6553 /// # Example
6554 /// ```ignore,no_run
6555 /// # use google_cloud_oracledatabase_v1::model::AutonomousDbVersion;
6556 /// let x = AutonomousDbVersion::new().set_version("example");
6557 /// ```
6558 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6559 self.version = v.into();
6560 self
6561 }
6562
6563 /// Sets the value of [db_workload][crate::model::AutonomousDbVersion::db_workload].
6564 ///
6565 /// # Example
6566 /// ```ignore,no_run
6567 /// # use google_cloud_oracledatabase_v1::model::AutonomousDbVersion;
6568 /// use google_cloud_oracledatabase_v1::model::DBWorkload;
6569 /// let x0 = AutonomousDbVersion::new().set_db_workload(DBWorkload::Oltp);
6570 /// let x1 = AutonomousDbVersion::new().set_db_workload(DBWorkload::Dw);
6571 /// let x2 = AutonomousDbVersion::new().set_db_workload(DBWorkload::Ajd);
6572 /// ```
6573 pub fn set_db_workload<T: std::convert::Into<crate::model::DBWorkload>>(
6574 mut self,
6575 v: T,
6576 ) -> Self {
6577 self.db_workload = v.into();
6578 self
6579 }
6580
6581 /// Sets the value of [workload_uri][crate::model::AutonomousDbVersion::workload_uri].
6582 ///
6583 /// # Example
6584 /// ```ignore,no_run
6585 /// # use google_cloud_oracledatabase_v1::model::AutonomousDbVersion;
6586 /// let x = AutonomousDbVersion::new().set_workload_uri("example");
6587 /// ```
6588 pub fn set_workload_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6589 self.workload_uri = v.into();
6590 self
6591 }
6592}
6593
6594impl wkt::message::Message for AutonomousDbVersion {
6595 fn typename() -> &'static str {
6596 "type.googleapis.com/google.cloud.oracledatabase.v1.AutonomousDbVersion"
6597 }
6598}
6599
6600/// The CustomerContact reference as defined by Oracle.
6601/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/CustomerContact>
6602#[derive(Clone, Default, PartialEq)]
6603#[non_exhaustive]
6604pub struct CustomerContact {
6605 /// Required. The email address used by Oracle to send notifications regarding
6606 /// databases and infrastructure.
6607 pub email: std::string::String,
6608
6609 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6610}
6611
6612impl CustomerContact {
6613 pub fn new() -> Self {
6614 std::default::Default::default()
6615 }
6616
6617 /// Sets the value of [email][crate::model::CustomerContact::email].
6618 ///
6619 /// # Example
6620 /// ```ignore,no_run
6621 /// # use google_cloud_oracledatabase_v1::model::CustomerContact;
6622 /// let x = CustomerContact::new().set_email("example");
6623 /// ```
6624 pub fn set_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6625 self.email = v.into();
6626 self
6627 }
6628}
6629
6630impl wkt::message::Message for CustomerContact {
6631 fn typename() -> &'static str {
6632 "type.googleapis.com/google.cloud.oracledatabase.v1.CustomerContact"
6633 }
6634}
6635
6636/// The identity connector details which will allow OCI to securely access
6637/// the resources in the customer project.
6638#[derive(Clone, Default, PartialEq)]
6639#[non_exhaustive]
6640pub struct IdentityConnector {
6641 /// Output only. A google managed service account on which customers can grant
6642 /// roles to access resources in the customer project. Example:
6643 /// `p176944527254-55-75119d87fd8f@gcp-sa-oci.iam.gserviceaccount.com`
6644 pub service_agent_email: std::string::String,
6645
6646 /// Output only. The connection state of the identity connector.
6647 pub connection_state: crate::model::identity_connector::ConnectionState,
6648
6649 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6650}
6651
6652impl IdentityConnector {
6653 pub fn new() -> Self {
6654 std::default::Default::default()
6655 }
6656
6657 /// Sets the value of [service_agent_email][crate::model::IdentityConnector::service_agent_email].
6658 ///
6659 /// # Example
6660 /// ```ignore,no_run
6661 /// # use google_cloud_oracledatabase_v1::model::IdentityConnector;
6662 /// let x = IdentityConnector::new().set_service_agent_email("example");
6663 /// ```
6664 pub fn set_service_agent_email<T: std::convert::Into<std::string::String>>(
6665 mut self,
6666 v: T,
6667 ) -> Self {
6668 self.service_agent_email = v.into();
6669 self
6670 }
6671
6672 /// Sets the value of [connection_state][crate::model::IdentityConnector::connection_state].
6673 ///
6674 /// # Example
6675 /// ```ignore,no_run
6676 /// # use google_cloud_oracledatabase_v1::model::IdentityConnector;
6677 /// use google_cloud_oracledatabase_v1::model::identity_connector::ConnectionState;
6678 /// let x0 = IdentityConnector::new().set_connection_state(ConnectionState::Connected);
6679 /// let x1 = IdentityConnector::new().set_connection_state(ConnectionState::PartiallyConnected);
6680 /// let x2 = IdentityConnector::new().set_connection_state(ConnectionState::Disconnected);
6681 /// ```
6682 pub fn set_connection_state<
6683 T: std::convert::Into<crate::model::identity_connector::ConnectionState>,
6684 >(
6685 mut self,
6686 v: T,
6687 ) -> Self {
6688 self.connection_state = v.into();
6689 self
6690 }
6691}
6692
6693impl wkt::message::Message for IdentityConnector {
6694 fn typename() -> &'static str {
6695 "type.googleapis.com/google.cloud.oracledatabase.v1.IdentityConnector"
6696 }
6697}
6698
6699/// Defines additional types related to [IdentityConnector].
6700pub mod identity_connector {
6701 #[allow(unused_imports)]
6702 use super::*;
6703
6704 /// The various connection states of the WorkloadIdentityPoolConnection.
6705 ///
6706 /// # Working with unknown values
6707 ///
6708 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6709 /// additional enum variants at any time. Adding new variants is not considered
6710 /// a breaking change. Applications should write their code in anticipation of:
6711 ///
6712 /// - New values appearing in future releases of the client library, **and**
6713 /// - New values received dynamically, without application changes.
6714 ///
6715 /// Please consult the [Working with enums] section in the user guide for some
6716 /// guidelines.
6717 ///
6718 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6719 #[derive(Clone, Debug, PartialEq)]
6720 #[non_exhaustive]
6721 pub enum ConnectionState {
6722 /// Default unspecified value.
6723 Unspecified,
6724 /// The identity pool connection is connected.
6725 Connected,
6726 /// The identity pool connection is partially connected.
6727 PartiallyConnected,
6728 /// The identity pool connection is disconnected.
6729 Disconnected,
6730 /// The identity pool connection is in an unknown state.
6731 Unknown,
6732 /// If set, the enum was initialized with an unknown value.
6733 ///
6734 /// Applications can examine the value using [ConnectionState::value] or
6735 /// [ConnectionState::name].
6736 UnknownValue(connection_state::UnknownValue),
6737 }
6738
6739 #[doc(hidden)]
6740 pub mod connection_state {
6741 #[allow(unused_imports)]
6742 use super::*;
6743 #[derive(Clone, Debug, PartialEq)]
6744 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6745 }
6746
6747 impl ConnectionState {
6748 /// Gets the enum value.
6749 ///
6750 /// Returns `None` if the enum contains an unknown value deserialized from
6751 /// the string representation of enums.
6752 pub fn value(&self) -> std::option::Option<i32> {
6753 match self {
6754 Self::Unspecified => std::option::Option::Some(0),
6755 Self::Connected => std::option::Option::Some(1),
6756 Self::PartiallyConnected => std::option::Option::Some(2),
6757 Self::Disconnected => std::option::Option::Some(3),
6758 Self::Unknown => std::option::Option::Some(4),
6759 Self::UnknownValue(u) => u.0.value(),
6760 }
6761 }
6762
6763 /// Gets the enum value as a string.
6764 ///
6765 /// Returns `None` if the enum contains an unknown value deserialized from
6766 /// the integer representation of enums.
6767 pub fn name(&self) -> std::option::Option<&str> {
6768 match self {
6769 Self::Unspecified => std::option::Option::Some("CONNECTION_STATE_UNSPECIFIED"),
6770 Self::Connected => std::option::Option::Some("CONNECTED"),
6771 Self::PartiallyConnected => std::option::Option::Some("PARTIALLY_CONNECTED"),
6772 Self::Disconnected => std::option::Option::Some("DISCONNECTED"),
6773 Self::Unknown => std::option::Option::Some("UNKNOWN"),
6774 Self::UnknownValue(u) => u.0.name(),
6775 }
6776 }
6777 }
6778
6779 impl std::default::Default for ConnectionState {
6780 fn default() -> Self {
6781 use std::convert::From;
6782 Self::from(0)
6783 }
6784 }
6785
6786 impl std::fmt::Display for ConnectionState {
6787 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6788 wkt::internal::display_enum(f, self.name(), self.value())
6789 }
6790 }
6791
6792 impl std::convert::From<i32> for ConnectionState {
6793 fn from(value: i32) -> Self {
6794 match value {
6795 0 => Self::Unspecified,
6796 1 => Self::Connected,
6797 2 => Self::PartiallyConnected,
6798 3 => Self::Disconnected,
6799 4 => Self::Unknown,
6800 _ => Self::UnknownValue(connection_state::UnknownValue(
6801 wkt::internal::UnknownEnumValue::Integer(value),
6802 )),
6803 }
6804 }
6805 }
6806
6807 impl std::convert::From<&str> for ConnectionState {
6808 fn from(value: &str) -> Self {
6809 use std::string::ToString;
6810 match value {
6811 "CONNECTION_STATE_UNSPECIFIED" => Self::Unspecified,
6812 "CONNECTED" => Self::Connected,
6813 "PARTIALLY_CONNECTED" => Self::PartiallyConnected,
6814 "DISCONNECTED" => Self::Disconnected,
6815 "UNKNOWN" => Self::Unknown,
6816 _ => Self::UnknownValue(connection_state::UnknownValue(
6817 wkt::internal::UnknownEnumValue::String(value.to_string()),
6818 )),
6819 }
6820 }
6821 }
6822
6823 impl serde::ser::Serialize for ConnectionState {
6824 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6825 where
6826 S: serde::Serializer,
6827 {
6828 match self {
6829 Self::Unspecified => serializer.serialize_i32(0),
6830 Self::Connected => serializer.serialize_i32(1),
6831 Self::PartiallyConnected => serializer.serialize_i32(2),
6832 Self::Disconnected => serializer.serialize_i32(3),
6833 Self::Unknown => serializer.serialize_i32(4),
6834 Self::UnknownValue(u) => u.0.serialize(serializer),
6835 }
6836 }
6837 }
6838
6839 impl<'de> serde::de::Deserialize<'de> for ConnectionState {
6840 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6841 where
6842 D: serde::Deserializer<'de>,
6843 {
6844 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ConnectionState>::new(
6845 ".google.cloud.oracledatabase.v1.IdentityConnector.ConnectionState",
6846 ))
6847 }
6848 }
6849}
6850
6851/// Data collection options for diagnostics.
6852/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/DataCollectionOptions>
6853#[derive(Clone, Default, PartialEq)]
6854#[non_exhaustive]
6855pub struct DataCollectionOptionsCommon {
6856 /// Optional. Indicates whether to enable data collection for diagnostics.
6857 pub is_diagnostics_events_enabled: bool,
6858
6859 /// Optional. Indicates whether to enable health monitoring.
6860 pub is_health_monitoring_enabled: bool,
6861
6862 /// Optional. Indicates whether to enable incident logs and trace collection.
6863 pub is_incident_logs_enabled: bool,
6864
6865 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6866}
6867
6868impl DataCollectionOptionsCommon {
6869 pub fn new() -> Self {
6870 std::default::Default::default()
6871 }
6872
6873 /// Sets the value of [is_diagnostics_events_enabled][crate::model::DataCollectionOptionsCommon::is_diagnostics_events_enabled].
6874 ///
6875 /// # Example
6876 /// ```ignore,no_run
6877 /// # use google_cloud_oracledatabase_v1::model::DataCollectionOptionsCommon;
6878 /// let x = DataCollectionOptionsCommon::new().set_is_diagnostics_events_enabled(true);
6879 /// ```
6880 pub fn set_is_diagnostics_events_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6881 self.is_diagnostics_events_enabled = v.into();
6882 self
6883 }
6884
6885 /// Sets the value of [is_health_monitoring_enabled][crate::model::DataCollectionOptionsCommon::is_health_monitoring_enabled].
6886 ///
6887 /// # Example
6888 /// ```ignore,no_run
6889 /// # use google_cloud_oracledatabase_v1::model::DataCollectionOptionsCommon;
6890 /// let x = DataCollectionOptionsCommon::new().set_is_health_monitoring_enabled(true);
6891 /// ```
6892 pub fn set_is_health_monitoring_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6893 self.is_health_monitoring_enabled = v.into();
6894 self
6895 }
6896
6897 /// Sets the value of [is_incident_logs_enabled][crate::model::DataCollectionOptionsCommon::is_incident_logs_enabled].
6898 ///
6899 /// # Example
6900 /// ```ignore,no_run
6901 /// # use google_cloud_oracledatabase_v1::model::DataCollectionOptionsCommon;
6902 /// let x = DataCollectionOptionsCommon::new().set_is_incident_logs_enabled(true);
6903 /// ```
6904 pub fn set_is_incident_logs_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6905 self.is_incident_logs_enabled = v.into();
6906 self
6907 }
6908}
6909
6910impl wkt::message::Message for DataCollectionOptionsCommon {
6911 fn typename() -> &'static str {
6912 "type.googleapis.com/google.cloud.oracledatabase.v1.DataCollectionOptionsCommon"
6913 }
6914}
6915
6916/// Details of the Database resource.
6917/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/Database/>
6918#[derive(Clone, Default, PartialEq)]
6919#[non_exhaustive]
6920pub struct Database {
6921 /// Identifier. The name of the Database resource in the following format:
6922 /// projects/{project}/locations/{region}/databases/{database}
6923 pub name: std::string::String,
6924
6925 /// Optional. The database name. The name must begin with an alphabetic
6926 /// character and can contain a maximum of eight alphanumeric characters.
6927 /// Special characters are not permitted.
6928 pub db_name: std::string::String,
6929
6930 /// Optional. The DB_UNIQUE_NAME of the Oracle Database being backed up.
6931 pub db_unique_name: std::string::String,
6932
6933 /// Required. The password for the default ADMIN user.
6934 pub admin_password: std::string::String,
6935
6936 /// Optional. The TDE wallet password for the database.
6937 pub tde_wallet_password: std::string::String,
6938
6939 /// Optional. The character set for the database. The default is AL32UTF8.
6940 pub character_set: std::string::String,
6941
6942 /// Optional. The national character set for the database. The default is
6943 /// AL16UTF16.
6944 pub ncharacter_set: std::string::String,
6945
6946 /// Output only. HTTPS link to OCI resources exposed to Customer via UI
6947 /// Interface.
6948 pub oci_url: std::string::String,
6949
6950 /// Output only. The date and time that the Database was created.
6951 pub create_time: std::option::Option<wkt::Timestamp>,
6952
6953 /// Optional. The properties of the Database.
6954 pub properties: std::option::Option<crate::model::DatabaseProperties>,
6955
6956 /// Optional. The database ID of the Database.
6957 pub database_id: std::string::String,
6958
6959 /// Optional. The name of the DbHome resource associated with the Database.
6960 pub db_home_name: std::string::String,
6961
6962 /// Output only. The GCP Oracle zone where the Database is created.
6963 pub gcp_oracle_zone: std::string::String,
6964
6965 /// Output only. The Status of Operations Insights for this Database.
6966 pub ops_insights_status: crate::model::database::OperationsInsightsStatus,
6967
6968 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6969}
6970
6971impl Database {
6972 pub fn new() -> Self {
6973 std::default::Default::default()
6974 }
6975
6976 /// Sets the value of [name][crate::model::Database::name].
6977 ///
6978 /// # Example
6979 /// ```ignore,no_run
6980 /// # use google_cloud_oracledatabase_v1::model::Database;
6981 /// let x = Database::new().set_name("example");
6982 /// ```
6983 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6984 self.name = v.into();
6985 self
6986 }
6987
6988 /// Sets the value of [db_name][crate::model::Database::db_name].
6989 ///
6990 /// # Example
6991 /// ```ignore,no_run
6992 /// # use google_cloud_oracledatabase_v1::model::Database;
6993 /// let x = Database::new().set_db_name("example");
6994 /// ```
6995 pub fn set_db_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6996 self.db_name = v.into();
6997 self
6998 }
6999
7000 /// Sets the value of [db_unique_name][crate::model::Database::db_unique_name].
7001 ///
7002 /// # Example
7003 /// ```ignore,no_run
7004 /// # use google_cloud_oracledatabase_v1::model::Database;
7005 /// let x = Database::new().set_db_unique_name("example");
7006 /// ```
7007 pub fn set_db_unique_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7008 self.db_unique_name = v.into();
7009 self
7010 }
7011
7012 /// Sets the value of [admin_password][crate::model::Database::admin_password].
7013 ///
7014 /// # Example
7015 /// ```ignore,no_run
7016 /// # use google_cloud_oracledatabase_v1::model::Database;
7017 /// let x = Database::new().set_admin_password("example");
7018 /// ```
7019 pub fn set_admin_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7020 self.admin_password = v.into();
7021 self
7022 }
7023
7024 /// Sets the value of [tde_wallet_password][crate::model::Database::tde_wallet_password].
7025 ///
7026 /// # Example
7027 /// ```ignore,no_run
7028 /// # use google_cloud_oracledatabase_v1::model::Database;
7029 /// let x = Database::new().set_tde_wallet_password("example");
7030 /// ```
7031 pub fn set_tde_wallet_password<T: std::convert::Into<std::string::String>>(
7032 mut self,
7033 v: T,
7034 ) -> Self {
7035 self.tde_wallet_password = v.into();
7036 self
7037 }
7038
7039 /// Sets the value of [character_set][crate::model::Database::character_set].
7040 ///
7041 /// # Example
7042 /// ```ignore,no_run
7043 /// # use google_cloud_oracledatabase_v1::model::Database;
7044 /// let x = Database::new().set_character_set("example");
7045 /// ```
7046 pub fn set_character_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7047 self.character_set = v.into();
7048 self
7049 }
7050
7051 /// Sets the value of [ncharacter_set][crate::model::Database::ncharacter_set].
7052 ///
7053 /// # Example
7054 /// ```ignore,no_run
7055 /// # use google_cloud_oracledatabase_v1::model::Database;
7056 /// let x = Database::new().set_ncharacter_set("example");
7057 /// ```
7058 pub fn set_ncharacter_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7059 self.ncharacter_set = v.into();
7060 self
7061 }
7062
7063 /// Sets the value of [oci_url][crate::model::Database::oci_url].
7064 ///
7065 /// # Example
7066 /// ```ignore,no_run
7067 /// # use google_cloud_oracledatabase_v1::model::Database;
7068 /// let x = Database::new().set_oci_url("example");
7069 /// ```
7070 pub fn set_oci_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7071 self.oci_url = v.into();
7072 self
7073 }
7074
7075 /// Sets the value of [create_time][crate::model::Database::create_time].
7076 ///
7077 /// # Example
7078 /// ```ignore,no_run
7079 /// # use google_cloud_oracledatabase_v1::model::Database;
7080 /// use wkt::Timestamp;
7081 /// let x = Database::new().set_create_time(Timestamp::default()/* use setters */);
7082 /// ```
7083 pub fn set_create_time<T>(mut self, v: T) -> Self
7084 where
7085 T: std::convert::Into<wkt::Timestamp>,
7086 {
7087 self.create_time = std::option::Option::Some(v.into());
7088 self
7089 }
7090
7091 /// Sets or clears the value of [create_time][crate::model::Database::create_time].
7092 ///
7093 /// # Example
7094 /// ```ignore,no_run
7095 /// # use google_cloud_oracledatabase_v1::model::Database;
7096 /// use wkt::Timestamp;
7097 /// let x = Database::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
7098 /// let x = Database::new().set_or_clear_create_time(None::<Timestamp>);
7099 /// ```
7100 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7101 where
7102 T: std::convert::Into<wkt::Timestamp>,
7103 {
7104 self.create_time = v.map(|x| x.into());
7105 self
7106 }
7107
7108 /// Sets the value of [properties][crate::model::Database::properties].
7109 ///
7110 /// # Example
7111 /// ```ignore,no_run
7112 /// # use google_cloud_oracledatabase_v1::model::Database;
7113 /// use google_cloud_oracledatabase_v1::model::DatabaseProperties;
7114 /// let x = Database::new().set_properties(DatabaseProperties::default()/* use setters */);
7115 /// ```
7116 pub fn set_properties<T>(mut self, v: T) -> Self
7117 where
7118 T: std::convert::Into<crate::model::DatabaseProperties>,
7119 {
7120 self.properties = std::option::Option::Some(v.into());
7121 self
7122 }
7123
7124 /// Sets or clears the value of [properties][crate::model::Database::properties].
7125 ///
7126 /// # Example
7127 /// ```ignore,no_run
7128 /// # use google_cloud_oracledatabase_v1::model::Database;
7129 /// use google_cloud_oracledatabase_v1::model::DatabaseProperties;
7130 /// let x = Database::new().set_or_clear_properties(Some(DatabaseProperties::default()/* use setters */));
7131 /// let x = Database::new().set_or_clear_properties(None::<DatabaseProperties>);
7132 /// ```
7133 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
7134 where
7135 T: std::convert::Into<crate::model::DatabaseProperties>,
7136 {
7137 self.properties = v.map(|x| x.into());
7138 self
7139 }
7140
7141 /// Sets the value of [database_id][crate::model::Database::database_id].
7142 ///
7143 /// # Example
7144 /// ```ignore,no_run
7145 /// # use google_cloud_oracledatabase_v1::model::Database;
7146 /// let x = Database::new().set_database_id("example");
7147 /// ```
7148 pub fn set_database_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7149 self.database_id = v.into();
7150 self
7151 }
7152
7153 /// Sets the value of [db_home_name][crate::model::Database::db_home_name].
7154 ///
7155 /// # Example
7156 /// ```ignore,no_run
7157 /// # use google_cloud_oracledatabase_v1::model::Database;
7158 /// let x = Database::new().set_db_home_name("example");
7159 /// ```
7160 pub fn set_db_home_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7161 self.db_home_name = v.into();
7162 self
7163 }
7164
7165 /// Sets the value of [gcp_oracle_zone][crate::model::Database::gcp_oracle_zone].
7166 ///
7167 /// # Example
7168 /// ```ignore,no_run
7169 /// # use google_cloud_oracledatabase_v1::model::Database;
7170 /// let x = Database::new().set_gcp_oracle_zone("example");
7171 /// ```
7172 pub fn set_gcp_oracle_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7173 self.gcp_oracle_zone = v.into();
7174 self
7175 }
7176
7177 /// Sets the value of [ops_insights_status][crate::model::Database::ops_insights_status].
7178 ///
7179 /// # Example
7180 /// ```ignore,no_run
7181 /// # use google_cloud_oracledatabase_v1::model::Database;
7182 /// use google_cloud_oracledatabase_v1::model::database::OperationsInsightsStatus;
7183 /// let x0 = Database::new().set_ops_insights_status(OperationsInsightsStatus::Enabling);
7184 /// let x1 = Database::new().set_ops_insights_status(OperationsInsightsStatus::Enabled);
7185 /// let x2 = Database::new().set_ops_insights_status(OperationsInsightsStatus::Disabling);
7186 /// ```
7187 pub fn set_ops_insights_status<
7188 T: std::convert::Into<crate::model::database::OperationsInsightsStatus>,
7189 >(
7190 mut self,
7191 v: T,
7192 ) -> Self {
7193 self.ops_insights_status = v.into();
7194 self
7195 }
7196}
7197
7198impl wkt::message::Message for Database {
7199 fn typename() -> &'static str {
7200 "type.googleapis.com/google.cloud.oracledatabase.v1.Database"
7201 }
7202}
7203
7204/// Defines additional types related to [Database].
7205pub mod database {
7206 #[allow(unused_imports)]
7207 use super::*;
7208
7209 /// The Status of Operations Insights for this Database.
7210 ///
7211 /// # Working with unknown values
7212 ///
7213 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7214 /// additional enum variants at any time. Adding new variants is not considered
7215 /// a breaking change. Applications should write their code in anticipation of:
7216 ///
7217 /// - New values appearing in future releases of the client library, **and**
7218 /// - New values received dynamically, without application changes.
7219 ///
7220 /// Please consult the [Working with enums] section in the user guide for some
7221 /// guidelines.
7222 ///
7223 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7224 #[derive(Clone, Debug, PartialEq)]
7225 #[non_exhaustive]
7226 pub enum OperationsInsightsStatus {
7227 /// Default unspecified value.
7228 Unspecified,
7229 /// Indicates that the operations insights are being enabled.
7230 Enabling,
7231 /// Indicates that the operations insights are enabled.
7232 Enabled,
7233 /// Indicates that the operations insights are being disabled.
7234 Disabling,
7235 /// Indicates that the operations insights are not enabled.
7236 NotEnabled,
7237 /// Indicates that the operations insights failed to enable.
7238 FailedEnabling,
7239 /// Indicates that the operations insights failed to disable.
7240 FailedDisabling,
7241 /// If set, the enum was initialized with an unknown value.
7242 ///
7243 /// Applications can examine the value using [OperationsInsightsStatus::value] or
7244 /// [OperationsInsightsStatus::name].
7245 UnknownValue(operations_insights_status::UnknownValue),
7246 }
7247
7248 #[doc(hidden)]
7249 pub mod operations_insights_status {
7250 #[allow(unused_imports)]
7251 use super::*;
7252 #[derive(Clone, Debug, PartialEq)]
7253 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7254 }
7255
7256 impl OperationsInsightsStatus {
7257 /// Gets the enum value.
7258 ///
7259 /// Returns `None` if the enum contains an unknown value deserialized from
7260 /// the string representation of enums.
7261 pub fn value(&self) -> std::option::Option<i32> {
7262 match self {
7263 Self::Unspecified => std::option::Option::Some(0),
7264 Self::Enabling => std::option::Option::Some(1),
7265 Self::Enabled => std::option::Option::Some(2),
7266 Self::Disabling => std::option::Option::Some(3),
7267 Self::NotEnabled => std::option::Option::Some(4),
7268 Self::FailedEnabling => std::option::Option::Some(5),
7269 Self::FailedDisabling => std::option::Option::Some(6),
7270 Self::UnknownValue(u) => u.0.value(),
7271 }
7272 }
7273
7274 /// Gets the enum value as a string.
7275 ///
7276 /// Returns `None` if the enum contains an unknown value deserialized from
7277 /// the integer representation of enums.
7278 pub fn name(&self) -> std::option::Option<&str> {
7279 match self {
7280 Self::Unspecified => {
7281 std::option::Option::Some("OPERATIONS_INSIGHTS_STATUS_UNSPECIFIED")
7282 }
7283 Self::Enabling => std::option::Option::Some("ENABLING"),
7284 Self::Enabled => std::option::Option::Some("ENABLED"),
7285 Self::Disabling => std::option::Option::Some("DISABLING"),
7286 Self::NotEnabled => std::option::Option::Some("NOT_ENABLED"),
7287 Self::FailedEnabling => std::option::Option::Some("FAILED_ENABLING"),
7288 Self::FailedDisabling => std::option::Option::Some("FAILED_DISABLING"),
7289 Self::UnknownValue(u) => u.0.name(),
7290 }
7291 }
7292 }
7293
7294 impl std::default::Default for OperationsInsightsStatus {
7295 fn default() -> Self {
7296 use std::convert::From;
7297 Self::from(0)
7298 }
7299 }
7300
7301 impl std::fmt::Display for OperationsInsightsStatus {
7302 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7303 wkt::internal::display_enum(f, self.name(), self.value())
7304 }
7305 }
7306
7307 impl std::convert::From<i32> for OperationsInsightsStatus {
7308 fn from(value: i32) -> Self {
7309 match value {
7310 0 => Self::Unspecified,
7311 1 => Self::Enabling,
7312 2 => Self::Enabled,
7313 3 => Self::Disabling,
7314 4 => Self::NotEnabled,
7315 5 => Self::FailedEnabling,
7316 6 => Self::FailedDisabling,
7317 _ => Self::UnknownValue(operations_insights_status::UnknownValue(
7318 wkt::internal::UnknownEnumValue::Integer(value),
7319 )),
7320 }
7321 }
7322 }
7323
7324 impl std::convert::From<&str> for OperationsInsightsStatus {
7325 fn from(value: &str) -> Self {
7326 use std::string::ToString;
7327 match value {
7328 "OPERATIONS_INSIGHTS_STATUS_UNSPECIFIED" => Self::Unspecified,
7329 "ENABLING" => Self::Enabling,
7330 "ENABLED" => Self::Enabled,
7331 "DISABLING" => Self::Disabling,
7332 "NOT_ENABLED" => Self::NotEnabled,
7333 "FAILED_ENABLING" => Self::FailedEnabling,
7334 "FAILED_DISABLING" => Self::FailedDisabling,
7335 _ => Self::UnknownValue(operations_insights_status::UnknownValue(
7336 wkt::internal::UnknownEnumValue::String(value.to_string()),
7337 )),
7338 }
7339 }
7340 }
7341
7342 impl serde::ser::Serialize for OperationsInsightsStatus {
7343 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7344 where
7345 S: serde::Serializer,
7346 {
7347 match self {
7348 Self::Unspecified => serializer.serialize_i32(0),
7349 Self::Enabling => serializer.serialize_i32(1),
7350 Self::Enabled => serializer.serialize_i32(2),
7351 Self::Disabling => serializer.serialize_i32(3),
7352 Self::NotEnabled => serializer.serialize_i32(4),
7353 Self::FailedEnabling => serializer.serialize_i32(5),
7354 Self::FailedDisabling => serializer.serialize_i32(6),
7355 Self::UnknownValue(u) => u.0.serialize(serializer),
7356 }
7357 }
7358 }
7359
7360 impl<'de> serde::de::Deserialize<'de> for OperationsInsightsStatus {
7361 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7362 where
7363 D: serde::Deserializer<'de>,
7364 {
7365 deserializer.deserialize_any(
7366 wkt::internal::EnumVisitor::<OperationsInsightsStatus>::new(
7367 ".google.cloud.oracledatabase.v1.Database.OperationsInsightsStatus",
7368 ),
7369 )
7370 }
7371 }
7372}
7373
7374/// The properties of a Database.
7375#[derive(Clone, Default, PartialEq)]
7376#[non_exhaustive]
7377pub struct DatabaseProperties {
7378 /// Output only. State of the Database.
7379 pub state: crate::model::database_properties::DatabaseLifecycleState,
7380
7381 /// Required. The Oracle Database version.
7382 pub db_version: std::string::String,
7383
7384 /// Optional. Backup options for the Database.
7385 pub db_backup_config: std::option::Option<crate::model::DbBackupConfig>,
7386
7387 /// Output only. The Database Management config.
7388 pub database_management_config: std::option::Option<crate::model::DatabaseManagementConfig>,
7389
7390 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7391}
7392
7393impl DatabaseProperties {
7394 pub fn new() -> Self {
7395 std::default::Default::default()
7396 }
7397
7398 /// Sets the value of [state][crate::model::DatabaseProperties::state].
7399 ///
7400 /// # Example
7401 /// ```ignore,no_run
7402 /// # use google_cloud_oracledatabase_v1::model::DatabaseProperties;
7403 /// use google_cloud_oracledatabase_v1::model::database_properties::DatabaseLifecycleState;
7404 /// let x0 = DatabaseProperties::new().set_state(DatabaseLifecycleState::Provisioning);
7405 /// let x1 = DatabaseProperties::new().set_state(DatabaseLifecycleState::Available);
7406 /// let x2 = DatabaseProperties::new().set_state(DatabaseLifecycleState::Updating);
7407 /// ```
7408 pub fn set_state<
7409 T: std::convert::Into<crate::model::database_properties::DatabaseLifecycleState>,
7410 >(
7411 mut self,
7412 v: T,
7413 ) -> Self {
7414 self.state = v.into();
7415 self
7416 }
7417
7418 /// Sets the value of [db_version][crate::model::DatabaseProperties::db_version].
7419 ///
7420 /// # Example
7421 /// ```ignore,no_run
7422 /// # use google_cloud_oracledatabase_v1::model::DatabaseProperties;
7423 /// let x = DatabaseProperties::new().set_db_version("example");
7424 /// ```
7425 pub fn set_db_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7426 self.db_version = v.into();
7427 self
7428 }
7429
7430 /// Sets the value of [db_backup_config][crate::model::DatabaseProperties::db_backup_config].
7431 ///
7432 /// # Example
7433 /// ```ignore,no_run
7434 /// # use google_cloud_oracledatabase_v1::model::DatabaseProperties;
7435 /// use google_cloud_oracledatabase_v1::model::DbBackupConfig;
7436 /// let x = DatabaseProperties::new().set_db_backup_config(DbBackupConfig::default()/* use setters */);
7437 /// ```
7438 pub fn set_db_backup_config<T>(mut self, v: T) -> Self
7439 where
7440 T: std::convert::Into<crate::model::DbBackupConfig>,
7441 {
7442 self.db_backup_config = std::option::Option::Some(v.into());
7443 self
7444 }
7445
7446 /// Sets or clears the value of [db_backup_config][crate::model::DatabaseProperties::db_backup_config].
7447 ///
7448 /// # Example
7449 /// ```ignore,no_run
7450 /// # use google_cloud_oracledatabase_v1::model::DatabaseProperties;
7451 /// use google_cloud_oracledatabase_v1::model::DbBackupConfig;
7452 /// let x = DatabaseProperties::new().set_or_clear_db_backup_config(Some(DbBackupConfig::default()/* use setters */));
7453 /// let x = DatabaseProperties::new().set_or_clear_db_backup_config(None::<DbBackupConfig>);
7454 /// ```
7455 pub fn set_or_clear_db_backup_config<T>(mut self, v: std::option::Option<T>) -> Self
7456 where
7457 T: std::convert::Into<crate::model::DbBackupConfig>,
7458 {
7459 self.db_backup_config = v.map(|x| x.into());
7460 self
7461 }
7462
7463 /// Sets the value of [database_management_config][crate::model::DatabaseProperties::database_management_config].
7464 ///
7465 /// # Example
7466 /// ```ignore,no_run
7467 /// # use google_cloud_oracledatabase_v1::model::DatabaseProperties;
7468 /// use google_cloud_oracledatabase_v1::model::DatabaseManagementConfig;
7469 /// let x = DatabaseProperties::new().set_database_management_config(DatabaseManagementConfig::default()/* use setters */);
7470 /// ```
7471 pub fn set_database_management_config<T>(mut self, v: T) -> Self
7472 where
7473 T: std::convert::Into<crate::model::DatabaseManagementConfig>,
7474 {
7475 self.database_management_config = std::option::Option::Some(v.into());
7476 self
7477 }
7478
7479 /// Sets or clears the value of [database_management_config][crate::model::DatabaseProperties::database_management_config].
7480 ///
7481 /// # Example
7482 /// ```ignore,no_run
7483 /// # use google_cloud_oracledatabase_v1::model::DatabaseProperties;
7484 /// use google_cloud_oracledatabase_v1::model::DatabaseManagementConfig;
7485 /// let x = DatabaseProperties::new().set_or_clear_database_management_config(Some(DatabaseManagementConfig::default()/* use setters */));
7486 /// let x = DatabaseProperties::new().set_or_clear_database_management_config(None::<DatabaseManagementConfig>);
7487 /// ```
7488 pub fn set_or_clear_database_management_config<T>(mut self, v: std::option::Option<T>) -> Self
7489 where
7490 T: std::convert::Into<crate::model::DatabaseManagementConfig>,
7491 {
7492 self.database_management_config = v.map(|x| x.into());
7493 self
7494 }
7495}
7496
7497impl wkt::message::Message for DatabaseProperties {
7498 fn typename() -> &'static str {
7499 "type.googleapis.com/google.cloud.oracledatabase.v1.DatabaseProperties"
7500 }
7501}
7502
7503/// Defines additional types related to [DatabaseProperties].
7504pub mod database_properties {
7505 #[allow(unused_imports)]
7506 use super::*;
7507
7508 /// The various lifecycle states of the Database.
7509 ///
7510 /// # Working with unknown values
7511 ///
7512 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7513 /// additional enum variants at any time. Adding new variants is not considered
7514 /// a breaking change. Applications should write their code in anticipation of:
7515 ///
7516 /// - New values appearing in future releases of the client library, **and**
7517 /// - New values received dynamically, without application changes.
7518 ///
7519 /// Please consult the [Working with enums] section in the user guide for some
7520 /// guidelines.
7521 ///
7522 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7523 #[derive(Clone, Debug, PartialEq)]
7524 #[non_exhaustive]
7525 pub enum DatabaseLifecycleState {
7526 /// Default unspecified value.
7527 Unspecified,
7528 /// Indicates that the resource is in provisioning state.
7529 Provisioning,
7530 /// Indicates that the resource is in available state.
7531 Available,
7532 /// Indicates that the resource is in updating state.
7533 Updating,
7534 /// Indicates that the resource is in backup in progress state.
7535 BackupInProgress,
7536 /// Indicates that the resource is in upgrading state.
7537 Upgrading,
7538 /// Indicates that the resource is in converting state.
7539 Converting,
7540 /// Indicates that the resource is in terminating state.
7541 Terminating,
7542 /// Indicates that the resource is in terminated state.
7543 Terminated,
7544 /// Indicates that the resource is in restore failed state.
7545 RestoreFailed,
7546 /// Indicates that the resource is in failed state.
7547 Failed,
7548 /// If set, the enum was initialized with an unknown value.
7549 ///
7550 /// Applications can examine the value using [DatabaseLifecycleState::value] or
7551 /// [DatabaseLifecycleState::name].
7552 UnknownValue(database_lifecycle_state::UnknownValue),
7553 }
7554
7555 #[doc(hidden)]
7556 pub mod database_lifecycle_state {
7557 #[allow(unused_imports)]
7558 use super::*;
7559 #[derive(Clone, Debug, PartialEq)]
7560 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7561 }
7562
7563 impl DatabaseLifecycleState {
7564 /// Gets the enum value.
7565 ///
7566 /// Returns `None` if the enum contains an unknown value deserialized from
7567 /// the string representation of enums.
7568 pub fn value(&self) -> std::option::Option<i32> {
7569 match self {
7570 Self::Unspecified => std::option::Option::Some(0),
7571 Self::Provisioning => std::option::Option::Some(1),
7572 Self::Available => std::option::Option::Some(2),
7573 Self::Updating => std::option::Option::Some(3),
7574 Self::BackupInProgress => std::option::Option::Some(4),
7575 Self::Upgrading => std::option::Option::Some(5),
7576 Self::Converting => std::option::Option::Some(6),
7577 Self::Terminating => std::option::Option::Some(7),
7578 Self::Terminated => std::option::Option::Some(8),
7579 Self::RestoreFailed => std::option::Option::Some(9),
7580 Self::Failed => std::option::Option::Some(10),
7581 Self::UnknownValue(u) => u.0.value(),
7582 }
7583 }
7584
7585 /// Gets the enum value as a string.
7586 ///
7587 /// Returns `None` if the enum contains an unknown value deserialized from
7588 /// the integer representation of enums.
7589 pub fn name(&self) -> std::option::Option<&str> {
7590 match self {
7591 Self::Unspecified => {
7592 std::option::Option::Some("DATABASE_LIFECYCLE_STATE_UNSPECIFIED")
7593 }
7594 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
7595 Self::Available => std::option::Option::Some("AVAILABLE"),
7596 Self::Updating => std::option::Option::Some("UPDATING"),
7597 Self::BackupInProgress => std::option::Option::Some("BACKUP_IN_PROGRESS"),
7598 Self::Upgrading => std::option::Option::Some("UPGRADING"),
7599 Self::Converting => std::option::Option::Some("CONVERTING"),
7600 Self::Terminating => std::option::Option::Some("TERMINATING"),
7601 Self::Terminated => std::option::Option::Some("TERMINATED"),
7602 Self::RestoreFailed => std::option::Option::Some("RESTORE_FAILED"),
7603 Self::Failed => std::option::Option::Some("FAILED"),
7604 Self::UnknownValue(u) => u.0.name(),
7605 }
7606 }
7607 }
7608
7609 impl std::default::Default for DatabaseLifecycleState {
7610 fn default() -> Self {
7611 use std::convert::From;
7612 Self::from(0)
7613 }
7614 }
7615
7616 impl std::fmt::Display for DatabaseLifecycleState {
7617 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7618 wkt::internal::display_enum(f, self.name(), self.value())
7619 }
7620 }
7621
7622 impl std::convert::From<i32> for DatabaseLifecycleState {
7623 fn from(value: i32) -> Self {
7624 match value {
7625 0 => Self::Unspecified,
7626 1 => Self::Provisioning,
7627 2 => Self::Available,
7628 3 => Self::Updating,
7629 4 => Self::BackupInProgress,
7630 5 => Self::Upgrading,
7631 6 => Self::Converting,
7632 7 => Self::Terminating,
7633 8 => Self::Terminated,
7634 9 => Self::RestoreFailed,
7635 10 => Self::Failed,
7636 _ => Self::UnknownValue(database_lifecycle_state::UnknownValue(
7637 wkt::internal::UnknownEnumValue::Integer(value),
7638 )),
7639 }
7640 }
7641 }
7642
7643 impl std::convert::From<&str> for DatabaseLifecycleState {
7644 fn from(value: &str) -> Self {
7645 use std::string::ToString;
7646 match value {
7647 "DATABASE_LIFECYCLE_STATE_UNSPECIFIED" => Self::Unspecified,
7648 "PROVISIONING" => Self::Provisioning,
7649 "AVAILABLE" => Self::Available,
7650 "UPDATING" => Self::Updating,
7651 "BACKUP_IN_PROGRESS" => Self::BackupInProgress,
7652 "UPGRADING" => Self::Upgrading,
7653 "CONVERTING" => Self::Converting,
7654 "TERMINATING" => Self::Terminating,
7655 "TERMINATED" => Self::Terminated,
7656 "RESTORE_FAILED" => Self::RestoreFailed,
7657 "FAILED" => Self::Failed,
7658 _ => Self::UnknownValue(database_lifecycle_state::UnknownValue(
7659 wkt::internal::UnknownEnumValue::String(value.to_string()),
7660 )),
7661 }
7662 }
7663 }
7664
7665 impl serde::ser::Serialize for DatabaseLifecycleState {
7666 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7667 where
7668 S: serde::Serializer,
7669 {
7670 match self {
7671 Self::Unspecified => serializer.serialize_i32(0),
7672 Self::Provisioning => serializer.serialize_i32(1),
7673 Self::Available => serializer.serialize_i32(2),
7674 Self::Updating => serializer.serialize_i32(3),
7675 Self::BackupInProgress => serializer.serialize_i32(4),
7676 Self::Upgrading => serializer.serialize_i32(5),
7677 Self::Converting => serializer.serialize_i32(6),
7678 Self::Terminating => serializer.serialize_i32(7),
7679 Self::Terminated => serializer.serialize_i32(8),
7680 Self::RestoreFailed => serializer.serialize_i32(9),
7681 Self::Failed => serializer.serialize_i32(10),
7682 Self::UnknownValue(u) => u.0.serialize(serializer),
7683 }
7684 }
7685 }
7686
7687 impl<'de> serde::de::Deserialize<'de> for DatabaseLifecycleState {
7688 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7689 where
7690 D: serde::Deserializer<'de>,
7691 {
7692 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseLifecycleState>::new(
7693 ".google.cloud.oracledatabase.v1.DatabaseProperties.DatabaseLifecycleState",
7694 ))
7695 }
7696 }
7697}
7698
7699/// Backup Options for the Database.
7700#[derive(Clone, Default, PartialEq)]
7701#[non_exhaustive]
7702pub struct DbBackupConfig {
7703 /// Optional. If set to true, enables automatic backups on the database.
7704 pub auto_backup_enabled: bool,
7705
7706 /// Optional. Details of the database backup destinations.
7707 pub backup_destination_details:
7708 std::vec::Vec<crate::model::db_backup_config::BackupDestinationDetails>,
7709
7710 /// Optional. The number of days an automatic backup is retained before being
7711 /// automatically deleted. This value determines the earliest point in time to
7712 /// which a database can be restored. Min: 1, Max: 60.
7713 pub retention_period_days: i32,
7714
7715 /// Optional. This defines when the backups will be deleted after Database
7716 /// termination.
7717 pub backup_deletion_policy: crate::model::db_backup_config::BackupDeletionPolicy,
7718
7719 /// Optional. The day of the week on which the full backup should be performed
7720 /// on the database. If no value is provided, it will default to Sunday.
7721 pub auto_full_backup_day: google_cloud_type::model::DayOfWeek,
7722
7723 /// Optional. The window in which the full backup should be performed on the
7724 /// database. If no value is provided, the default is anytime.
7725 pub auto_full_backup_window: crate::model::db_backup_config::BackupWindow,
7726
7727 /// Optional. The window in which the incremental backup should be performed on
7728 /// the database. If no value is provided, the default is anytime except the
7729 /// auto full backup day.
7730 pub auto_incremental_backup_window: crate::model::db_backup_config::BackupWindow,
7731
7732 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7733}
7734
7735impl DbBackupConfig {
7736 pub fn new() -> Self {
7737 std::default::Default::default()
7738 }
7739
7740 /// Sets the value of [auto_backup_enabled][crate::model::DbBackupConfig::auto_backup_enabled].
7741 ///
7742 /// # Example
7743 /// ```ignore,no_run
7744 /// # use google_cloud_oracledatabase_v1::model::DbBackupConfig;
7745 /// let x = DbBackupConfig::new().set_auto_backup_enabled(true);
7746 /// ```
7747 pub fn set_auto_backup_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7748 self.auto_backup_enabled = v.into();
7749 self
7750 }
7751
7752 /// Sets the value of [backup_destination_details][crate::model::DbBackupConfig::backup_destination_details].
7753 ///
7754 /// # Example
7755 /// ```ignore,no_run
7756 /// # use google_cloud_oracledatabase_v1::model::DbBackupConfig;
7757 /// use google_cloud_oracledatabase_v1::model::db_backup_config::BackupDestinationDetails;
7758 /// let x = DbBackupConfig::new()
7759 /// .set_backup_destination_details([
7760 /// BackupDestinationDetails::default()/* use setters */,
7761 /// BackupDestinationDetails::default()/* use (different) setters */,
7762 /// ]);
7763 /// ```
7764 pub fn set_backup_destination_details<T, V>(mut self, v: T) -> Self
7765 where
7766 T: std::iter::IntoIterator<Item = V>,
7767 V: std::convert::Into<crate::model::db_backup_config::BackupDestinationDetails>,
7768 {
7769 use std::iter::Iterator;
7770 self.backup_destination_details = v.into_iter().map(|i| i.into()).collect();
7771 self
7772 }
7773
7774 /// Sets the value of [retention_period_days][crate::model::DbBackupConfig::retention_period_days].
7775 ///
7776 /// # Example
7777 /// ```ignore,no_run
7778 /// # use google_cloud_oracledatabase_v1::model::DbBackupConfig;
7779 /// let x = DbBackupConfig::new().set_retention_period_days(42);
7780 /// ```
7781 pub fn set_retention_period_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7782 self.retention_period_days = v.into();
7783 self
7784 }
7785
7786 /// Sets the value of [backup_deletion_policy][crate::model::DbBackupConfig::backup_deletion_policy].
7787 ///
7788 /// # Example
7789 /// ```ignore,no_run
7790 /// # use google_cloud_oracledatabase_v1::model::DbBackupConfig;
7791 /// use google_cloud_oracledatabase_v1::model::db_backup_config::BackupDeletionPolicy;
7792 /// let x0 = DbBackupConfig::new().set_backup_deletion_policy(BackupDeletionPolicy::DeleteImmediately);
7793 /// let x1 = DbBackupConfig::new().set_backup_deletion_policy(BackupDeletionPolicy::DeleteAfterRetentionPeriod);
7794 /// ```
7795 pub fn set_backup_deletion_policy<
7796 T: std::convert::Into<crate::model::db_backup_config::BackupDeletionPolicy>,
7797 >(
7798 mut self,
7799 v: T,
7800 ) -> Self {
7801 self.backup_deletion_policy = v.into();
7802 self
7803 }
7804
7805 /// Sets the value of [auto_full_backup_day][crate::model::DbBackupConfig::auto_full_backup_day].
7806 ///
7807 /// # Example
7808 /// ```ignore,no_run
7809 /// # use google_cloud_oracledatabase_v1::model::DbBackupConfig;
7810 /// use google_cloud_type::model::DayOfWeek;
7811 /// let x0 = DbBackupConfig::new().set_auto_full_backup_day(DayOfWeek::Monday);
7812 /// let x1 = DbBackupConfig::new().set_auto_full_backup_day(DayOfWeek::Tuesday);
7813 /// let x2 = DbBackupConfig::new().set_auto_full_backup_day(DayOfWeek::Wednesday);
7814 /// ```
7815 pub fn set_auto_full_backup_day<T: std::convert::Into<google_cloud_type::model::DayOfWeek>>(
7816 mut self,
7817 v: T,
7818 ) -> Self {
7819 self.auto_full_backup_day = v.into();
7820 self
7821 }
7822
7823 /// Sets the value of [auto_full_backup_window][crate::model::DbBackupConfig::auto_full_backup_window].
7824 ///
7825 /// # Example
7826 /// ```ignore,no_run
7827 /// # use google_cloud_oracledatabase_v1::model::DbBackupConfig;
7828 /// use google_cloud_oracledatabase_v1::model::db_backup_config::BackupWindow;
7829 /// let x0 = DbBackupConfig::new().set_auto_full_backup_window(BackupWindow::SlotOne);
7830 /// let x1 = DbBackupConfig::new().set_auto_full_backup_window(BackupWindow::SlotTwo);
7831 /// let x2 = DbBackupConfig::new().set_auto_full_backup_window(BackupWindow::SlotThree);
7832 /// ```
7833 pub fn set_auto_full_backup_window<
7834 T: std::convert::Into<crate::model::db_backup_config::BackupWindow>,
7835 >(
7836 mut self,
7837 v: T,
7838 ) -> Self {
7839 self.auto_full_backup_window = v.into();
7840 self
7841 }
7842
7843 /// Sets the value of [auto_incremental_backup_window][crate::model::DbBackupConfig::auto_incremental_backup_window].
7844 ///
7845 /// # Example
7846 /// ```ignore,no_run
7847 /// # use google_cloud_oracledatabase_v1::model::DbBackupConfig;
7848 /// use google_cloud_oracledatabase_v1::model::db_backup_config::BackupWindow;
7849 /// let x0 = DbBackupConfig::new().set_auto_incremental_backup_window(BackupWindow::SlotOne);
7850 /// let x1 = DbBackupConfig::new().set_auto_incremental_backup_window(BackupWindow::SlotTwo);
7851 /// let x2 = DbBackupConfig::new().set_auto_incremental_backup_window(BackupWindow::SlotThree);
7852 /// ```
7853 pub fn set_auto_incremental_backup_window<
7854 T: std::convert::Into<crate::model::db_backup_config::BackupWindow>,
7855 >(
7856 mut self,
7857 v: T,
7858 ) -> Self {
7859 self.auto_incremental_backup_window = v.into();
7860 self
7861 }
7862}
7863
7864impl wkt::message::Message for DbBackupConfig {
7865 fn typename() -> &'static str {
7866 "type.googleapis.com/google.cloud.oracledatabase.v1.DbBackupConfig"
7867 }
7868}
7869
7870/// Defines additional types related to [DbBackupConfig].
7871pub mod db_backup_config {
7872 #[allow(unused_imports)]
7873 use super::*;
7874
7875 /// The details of the database backup destination.
7876 #[derive(Clone, Default, PartialEq)]
7877 #[non_exhaustive]
7878 pub struct BackupDestinationDetails {
7879 /// Optional. The type of the database backup destination.
7880 pub r#type: crate::model::db_backup_config::BackupDestinationType,
7881
7882 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7883 }
7884
7885 impl BackupDestinationDetails {
7886 pub fn new() -> Self {
7887 std::default::Default::default()
7888 }
7889
7890 /// Sets the value of [r#type][crate::model::db_backup_config::BackupDestinationDetails::type].
7891 ///
7892 /// # Example
7893 /// ```ignore,no_run
7894 /// # use google_cloud_oracledatabase_v1::model::db_backup_config::BackupDestinationDetails;
7895 /// use google_cloud_oracledatabase_v1::model::db_backup_config::BackupDestinationType;
7896 /// let x0 = BackupDestinationDetails::new().set_type(BackupDestinationType::Nfs);
7897 /// let x1 = BackupDestinationDetails::new().set_type(BackupDestinationType::RecoveryAppliance);
7898 /// let x2 = BackupDestinationDetails::new().set_type(BackupDestinationType::ObjectStore);
7899 /// ```
7900 pub fn set_type<
7901 T: std::convert::Into<crate::model::db_backup_config::BackupDestinationType>,
7902 >(
7903 mut self,
7904 v: T,
7905 ) -> Self {
7906 self.r#type = v.into();
7907 self
7908 }
7909 }
7910
7911 impl wkt::message::Message for BackupDestinationDetails {
7912 fn typename() -> &'static str {
7913 "type.googleapis.com/google.cloud.oracledatabase.v1.DbBackupConfig.BackupDestinationDetails"
7914 }
7915 }
7916
7917 /// The type of the database backup destination.
7918 ///
7919 /// # Working with unknown values
7920 ///
7921 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7922 /// additional enum variants at any time. Adding new variants is not considered
7923 /// a breaking change. Applications should write their code in anticipation of:
7924 ///
7925 /// - New values appearing in future releases of the client library, **and**
7926 /// - New values received dynamically, without application changes.
7927 ///
7928 /// Please consult the [Working with enums] section in the user guide for some
7929 /// guidelines.
7930 ///
7931 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7932 #[derive(Clone, Debug, PartialEq)]
7933 #[non_exhaustive]
7934 pub enum BackupDestinationType {
7935 /// Default unspecified value.
7936 Unspecified,
7937 /// Backup destination type is NFS.
7938 Nfs,
7939 /// Backup destination type is Recovery Appliance.
7940 RecoveryAppliance,
7941 /// Backup destination type is Object Store.
7942 ObjectStore,
7943 /// Backup destination type is Local.
7944 Local,
7945 /// Backup destination type is DBRS.
7946 Dbrs,
7947 /// If set, the enum was initialized with an unknown value.
7948 ///
7949 /// Applications can examine the value using [BackupDestinationType::value] or
7950 /// [BackupDestinationType::name].
7951 UnknownValue(backup_destination_type::UnknownValue),
7952 }
7953
7954 #[doc(hidden)]
7955 pub mod backup_destination_type {
7956 #[allow(unused_imports)]
7957 use super::*;
7958 #[derive(Clone, Debug, PartialEq)]
7959 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7960 }
7961
7962 impl BackupDestinationType {
7963 /// Gets the enum value.
7964 ///
7965 /// Returns `None` if the enum contains an unknown value deserialized from
7966 /// the string representation of enums.
7967 pub fn value(&self) -> std::option::Option<i32> {
7968 match self {
7969 Self::Unspecified => std::option::Option::Some(0),
7970 Self::Nfs => std::option::Option::Some(1),
7971 Self::RecoveryAppliance => std::option::Option::Some(2),
7972 Self::ObjectStore => std::option::Option::Some(3),
7973 Self::Local => std::option::Option::Some(4),
7974 Self::Dbrs => std::option::Option::Some(5),
7975 Self::UnknownValue(u) => u.0.value(),
7976 }
7977 }
7978
7979 /// Gets the enum value as a string.
7980 ///
7981 /// Returns `None` if the enum contains an unknown value deserialized from
7982 /// the integer representation of enums.
7983 pub fn name(&self) -> std::option::Option<&str> {
7984 match self {
7985 Self::Unspecified => {
7986 std::option::Option::Some("BACKUP_DESTINATION_TYPE_UNSPECIFIED")
7987 }
7988 Self::Nfs => std::option::Option::Some("NFS"),
7989 Self::RecoveryAppliance => std::option::Option::Some("RECOVERY_APPLIANCE"),
7990 Self::ObjectStore => std::option::Option::Some("OBJECT_STORE"),
7991 Self::Local => std::option::Option::Some("LOCAL"),
7992 Self::Dbrs => std::option::Option::Some("DBRS"),
7993 Self::UnknownValue(u) => u.0.name(),
7994 }
7995 }
7996 }
7997
7998 impl std::default::Default for BackupDestinationType {
7999 fn default() -> Self {
8000 use std::convert::From;
8001 Self::from(0)
8002 }
8003 }
8004
8005 impl std::fmt::Display for BackupDestinationType {
8006 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8007 wkt::internal::display_enum(f, self.name(), self.value())
8008 }
8009 }
8010
8011 impl std::convert::From<i32> for BackupDestinationType {
8012 fn from(value: i32) -> Self {
8013 match value {
8014 0 => Self::Unspecified,
8015 1 => Self::Nfs,
8016 2 => Self::RecoveryAppliance,
8017 3 => Self::ObjectStore,
8018 4 => Self::Local,
8019 5 => Self::Dbrs,
8020 _ => Self::UnknownValue(backup_destination_type::UnknownValue(
8021 wkt::internal::UnknownEnumValue::Integer(value),
8022 )),
8023 }
8024 }
8025 }
8026
8027 impl std::convert::From<&str> for BackupDestinationType {
8028 fn from(value: &str) -> Self {
8029 use std::string::ToString;
8030 match value {
8031 "BACKUP_DESTINATION_TYPE_UNSPECIFIED" => Self::Unspecified,
8032 "NFS" => Self::Nfs,
8033 "RECOVERY_APPLIANCE" => Self::RecoveryAppliance,
8034 "OBJECT_STORE" => Self::ObjectStore,
8035 "LOCAL" => Self::Local,
8036 "DBRS" => Self::Dbrs,
8037 _ => Self::UnknownValue(backup_destination_type::UnknownValue(
8038 wkt::internal::UnknownEnumValue::String(value.to_string()),
8039 )),
8040 }
8041 }
8042 }
8043
8044 impl serde::ser::Serialize for BackupDestinationType {
8045 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8046 where
8047 S: serde::Serializer,
8048 {
8049 match self {
8050 Self::Unspecified => serializer.serialize_i32(0),
8051 Self::Nfs => serializer.serialize_i32(1),
8052 Self::RecoveryAppliance => serializer.serialize_i32(2),
8053 Self::ObjectStore => serializer.serialize_i32(3),
8054 Self::Local => serializer.serialize_i32(4),
8055 Self::Dbrs => serializer.serialize_i32(5),
8056 Self::UnknownValue(u) => u.0.serialize(serializer),
8057 }
8058 }
8059 }
8060
8061 impl<'de> serde::de::Deserialize<'de> for BackupDestinationType {
8062 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8063 where
8064 D: serde::Deserializer<'de>,
8065 {
8066 deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackupDestinationType>::new(
8067 ".google.cloud.oracledatabase.v1.DbBackupConfig.BackupDestinationType",
8068 ))
8069 }
8070 }
8071
8072 /// The 2 hour window in which the backup should be performed on the database.
8073 ///
8074 /// # Working with unknown values
8075 ///
8076 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8077 /// additional enum variants at any time. Adding new variants is not considered
8078 /// a breaking change. Applications should write their code in anticipation of:
8079 ///
8080 /// - New values appearing in future releases of the client library, **and**
8081 /// - New values received dynamically, without application changes.
8082 ///
8083 /// Please consult the [Working with enums] section in the user guide for some
8084 /// guidelines.
8085 ///
8086 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8087 #[derive(Clone, Debug, PartialEq)]
8088 #[non_exhaustive]
8089 pub enum BackupWindow {
8090 /// Default unspecified value.
8091 Unspecified,
8092 /// 12:00 AM - 2:00 AM
8093 SlotOne,
8094 /// 2:00 AM - 4:00 AM
8095 SlotTwo,
8096 /// 4:00 AM - 6:00 AM
8097 SlotThree,
8098 /// 6:00 AM - 8:00 AM
8099 SlotFour,
8100 /// 8:00 AM - 10:00 AM
8101 SlotFive,
8102 /// 10:00 AM - 12:00 PM
8103 SlotSix,
8104 /// 12:00 PM - 2:00 PM
8105 SlotSeven,
8106 /// 2:00 PM - 4:00 PM
8107 SlotEight,
8108 /// 4:00 PM - 6:00 PM
8109 SlotNine,
8110 /// 6:00 PM - 8:00 PM
8111 SlotTen,
8112 /// 8:00 PM - 10:00 PM
8113 SlotEleven,
8114 /// 10:00 PM - 12:00 AM
8115 SlotTwelve,
8116 /// If set, the enum was initialized with an unknown value.
8117 ///
8118 /// Applications can examine the value using [BackupWindow::value] or
8119 /// [BackupWindow::name].
8120 UnknownValue(backup_window::UnknownValue),
8121 }
8122
8123 #[doc(hidden)]
8124 pub mod backup_window {
8125 #[allow(unused_imports)]
8126 use super::*;
8127 #[derive(Clone, Debug, PartialEq)]
8128 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8129 }
8130
8131 impl BackupWindow {
8132 /// Gets the enum value.
8133 ///
8134 /// Returns `None` if the enum contains an unknown value deserialized from
8135 /// the string representation of enums.
8136 pub fn value(&self) -> std::option::Option<i32> {
8137 match self {
8138 Self::Unspecified => std::option::Option::Some(0),
8139 Self::SlotOne => std::option::Option::Some(1),
8140 Self::SlotTwo => std::option::Option::Some(2),
8141 Self::SlotThree => std::option::Option::Some(3),
8142 Self::SlotFour => std::option::Option::Some(4),
8143 Self::SlotFive => std::option::Option::Some(5),
8144 Self::SlotSix => std::option::Option::Some(6),
8145 Self::SlotSeven => std::option::Option::Some(7),
8146 Self::SlotEight => std::option::Option::Some(8),
8147 Self::SlotNine => std::option::Option::Some(9),
8148 Self::SlotTen => std::option::Option::Some(10),
8149 Self::SlotEleven => std::option::Option::Some(11),
8150 Self::SlotTwelve => std::option::Option::Some(12),
8151 Self::UnknownValue(u) => u.0.value(),
8152 }
8153 }
8154
8155 /// Gets the enum value as a string.
8156 ///
8157 /// Returns `None` if the enum contains an unknown value deserialized from
8158 /// the integer representation of enums.
8159 pub fn name(&self) -> std::option::Option<&str> {
8160 match self {
8161 Self::Unspecified => std::option::Option::Some("BACKUP_WINDOW_UNSPECIFIED"),
8162 Self::SlotOne => std::option::Option::Some("SLOT_ONE"),
8163 Self::SlotTwo => std::option::Option::Some("SLOT_TWO"),
8164 Self::SlotThree => std::option::Option::Some("SLOT_THREE"),
8165 Self::SlotFour => std::option::Option::Some("SLOT_FOUR"),
8166 Self::SlotFive => std::option::Option::Some("SLOT_FIVE"),
8167 Self::SlotSix => std::option::Option::Some("SLOT_SIX"),
8168 Self::SlotSeven => std::option::Option::Some("SLOT_SEVEN"),
8169 Self::SlotEight => std::option::Option::Some("SLOT_EIGHT"),
8170 Self::SlotNine => std::option::Option::Some("SLOT_NINE"),
8171 Self::SlotTen => std::option::Option::Some("SLOT_TEN"),
8172 Self::SlotEleven => std::option::Option::Some("SLOT_ELEVEN"),
8173 Self::SlotTwelve => std::option::Option::Some("SLOT_TWELVE"),
8174 Self::UnknownValue(u) => u.0.name(),
8175 }
8176 }
8177 }
8178
8179 impl std::default::Default for BackupWindow {
8180 fn default() -> Self {
8181 use std::convert::From;
8182 Self::from(0)
8183 }
8184 }
8185
8186 impl std::fmt::Display for BackupWindow {
8187 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8188 wkt::internal::display_enum(f, self.name(), self.value())
8189 }
8190 }
8191
8192 impl std::convert::From<i32> for BackupWindow {
8193 fn from(value: i32) -> Self {
8194 match value {
8195 0 => Self::Unspecified,
8196 1 => Self::SlotOne,
8197 2 => Self::SlotTwo,
8198 3 => Self::SlotThree,
8199 4 => Self::SlotFour,
8200 5 => Self::SlotFive,
8201 6 => Self::SlotSix,
8202 7 => Self::SlotSeven,
8203 8 => Self::SlotEight,
8204 9 => Self::SlotNine,
8205 10 => Self::SlotTen,
8206 11 => Self::SlotEleven,
8207 12 => Self::SlotTwelve,
8208 _ => Self::UnknownValue(backup_window::UnknownValue(
8209 wkt::internal::UnknownEnumValue::Integer(value),
8210 )),
8211 }
8212 }
8213 }
8214
8215 impl std::convert::From<&str> for BackupWindow {
8216 fn from(value: &str) -> Self {
8217 use std::string::ToString;
8218 match value {
8219 "BACKUP_WINDOW_UNSPECIFIED" => Self::Unspecified,
8220 "SLOT_ONE" => Self::SlotOne,
8221 "SLOT_TWO" => Self::SlotTwo,
8222 "SLOT_THREE" => Self::SlotThree,
8223 "SLOT_FOUR" => Self::SlotFour,
8224 "SLOT_FIVE" => Self::SlotFive,
8225 "SLOT_SIX" => Self::SlotSix,
8226 "SLOT_SEVEN" => Self::SlotSeven,
8227 "SLOT_EIGHT" => Self::SlotEight,
8228 "SLOT_NINE" => Self::SlotNine,
8229 "SLOT_TEN" => Self::SlotTen,
8230 "SLOT_ELEVEN" => Self::SlotEleven,
8231 "SLOT_TWELVE" => Self::SlotTwelve,
8232 _ => Self::UnknownValue(backup_window::UnknownValue(
8233 wkt::internal::UnknownEnumValue::String(value.to_string()),
8234 )),
8235 }
8236 }
8237 }
8238
8239 impl serde::ser::Serialize for BackupWindow {
8240 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8241 where
8242 S: serde::Serializer,
8243 {
8244 match self {
8245 Self::Unspecified => serializer.serialize_i32(0),
8246 Self::SlotOne => serializer.serialize_i32(1),
8247 Self::SlotTwo => serializer.serialize_i32(2),
8248 Self::SlotThree => serializer.serialize_i32(3),
8249 Self::SlotFour => serializer.serialize_i32(4),
8250 Self::SlotFive => serializer.serialize_i32(5),
8251 Self::SlotSix => serializer.serialize_i32(6),
8252 Self::SlotSeven => serializer.serialize_i32(7),
8253 Self::SlotEight => serializer.serialize_i32(8),
8254 Self::SlotNine => serializer.serialize_i32(9),
8255 Self::SlotTen => serializer.serialize_i32(10),
8256 Self::SlotEleven => serializer.serialize_i32(11),
8257 Self::SlotTwelve => serializer.serialize_i32(12),
8258 Self::UnknownValue(u) => u.0.serialize(serializer),
8259 }
8260 }
8261 }
8262
8263 impl<'de> serde::de::Deserialize<'de> for BackupWindow {
8264 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8265 where
8266 D: serde::Deserializer<'de>,
8267 {
8268 deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackupWindow>::new(
8269 ".google.cloud.oracledatabase.v1.DbBackupConfig.BackupWindow",
8270 ))
8271 }
8272 }
8273
8274 /// This defines when the backups will be deleted after Database termination.
8275 ///
8276 /// # Working with unknown values
8277 ///
8278 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8279 /// additional enum variants at any time. Adding new variants is not considered
8280 /// a breaking change. Applications should write their code in anticipation of:
8281 ///
8282 /// - New values appearing in future releases of the client library, **and**
8283 /// - New values received dynamically, without application changes.
8284 ///
8285 /// Please consult the [Working with enums] section in the user guide for some
8286 /// guidelines.
8287 ///
8288 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8289 #[derive(Clone, Debug, PartialEq)]
8290 #[non_exhaustive]
8291 pub enum BackupDeletionPolicy {
8292 /// Default unspecified value.
8293 Unspecified,
8294 /// Keeps the backup for predefined time
8295 /// i.e. 72 hours and then delete permanently.
8296 DeleteImmediately,
8297 /// Keeps the backups as per the policy defined
8298 /// for database backups.
8299 DeleteAfterRetentionPeriod,
8300 /// If set, the enum was initialized with an unknown value.
8301 ///
8302 /// Applications can examine the value using [BackupDeletionPolicy::value] or
8303 /// [BackupDeletionPolicy::name].
8304 UnknownValue(backup_deletion_policy::UnknownValue),
8305 }
8306
8307 #[doc(hidden)]
8308 pub mod backup_deletion_policy {
8309 #[allow(unused_imports)]
8310 use super::*;
8311 #[derive(Clone, Debug, PartialEq)]
8312 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8313 }
8314
8315 impl BackupDeletionPolicy {
8316 /// Gets the enum value.
8317 ///
8318 /// Returns `None` if the enum contains an unknown value deserialized from
8319 /// the string representation of enums.
8320 pub fn value(&self) -> std::option::Option<i32> {
8321 match self {
8322 Self::Unspecified => std::option::Option::Some(0),
8323 Self::DeleteImmediately => std::option::Option::Some(1),
8324 Self::DeleteAfterRetentionPeriod => std::option::Option::Some(2),
8325 Self::UnknownValue(u) => u.0.value(),
8326 }
8327 }
8328
8329 /// Gets the enum value as a string.
8330 ///
8331 /// Returns `None` if the enum contains an unknown value deserialized from
8332 /// the integer representation of enums.
8333 pub fn name(&self) -> std::option::Option<&str> {
8334 match self {
8335 Self::Unspecified => {
8336 std::option::Option::Some("BACKUP_DELETION_POLICY_UNSPECIFIED")
8337 }
8338 Self::DeleteImmediately => std::option::Option::Some("DELETE_IMMEDIATELY"),
8339 Self::DeleteAfterRetentionPeriod => {
8340 std::option::Option::Some("DELETE_AFTER_RETENTION_PERIOD")
8341 }
8342 Self::UnknownValue(u) => u.0.name(),
8343 }
8344 }
8345 }
8346
8347 impl std::default::Default for BackupDeletionPolicy {
8348 fn default() -> Self {
8349 use std::convert::From;
8350 Self::from(0)
8351 }
8352 }
8353
8354 impl std::fmt::Display for BackupDeletionPolicy {
8355 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8356 wkt::internal::display_enum(f, self.name(), self.value())
8357 }
8358 }
8359
8360 impl std::convert::From<i32> for BackupDeletionPolicy {
8361 fn from(value: i32) -> Self {
8362 match value {
8363 0 => Self::Unspecified,
8364 1 => Self::DeleteImmediately,
8365 2 => Self::DeleteAfterRetentionPeriod,
8366 _ => Self::UnknownValue(backup_deletion_policy::UnknownValue(
8367 wkt::internal::UnknownEnumValue::Integer(value),
8368 )),
8369 }
8370 }
8371 }
8372
8373 impl std::convert::From<&str> for BackupDeletionPolicy {
8374 fn from(value: &str) -> Self {
8375 use std::string::ToString;
8376 match value {
8377 "BACKUP_DELETION_POLICY_UNSPECIFIED" => Self::Unspecified,
8378 "DELETE_IMMEDIATELY" => Self::DeleteImmediately,
8379 "DELETE_AFTER_RETENTION_PERIOD" => Self::DeleteAfterRetentionPeriod,
8380 _ => Self::UnknownValue(backup_deletion_policy::UnknownValue(
8381 wkt::internal::UnknownEnumValue::String(value.to_string()),
8382 )),
8383 }
8384 }
8385 }
8386
8387 impl serde::ser::Serialize for BackupDeletionPolicy {
8388 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8389 where
8390 S: serde::Serializer,
8391 {
8392 match self {
8393 Self::Unspecified => serializer.serialize_i32(0),
8394 Self::DeleteImmediately => serializer.serialize_i32(1),
8395 Self::DeleteAfterRetentionPeriod => serializer.serialize_i32(2),
8396 Self::UnknownValue(u) => u.0.serialize(serializer),
8397 }
8398 }
8399 }
8400
8401 impl<'de> serde::de::Deserialize<'de> for BackupDeletionPolicy {
8402 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8403 where
8404 D: serde::Deserializer<'de>,
8405 {
8406 deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackupDeletionPolicy>::new(
8407 ".google.cloud.oracledatabase.v1.DbBackupConfig.BackupDeletionPolicy",
8408 ))
8409 }
8410 }
8411}
8412
8413/// The request for `Database.Get`.
8414#[derive(Clone, Default, PartialEq)]
8415#[non_exhaustive]
8416pub struct GetDatabaseRequest {
8417 /// Required. The name of the Database resource in the following format:
8418 /// projects/{project}/locations/{region}/databases/{database}
8419 pub name: std::string::String,
8420
8421 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8422}
8423
8424impl GetDatabaseRequest {
8425 pub fn new() -> Self {
8426 std::default::Default::default()
8427 }
8428
8429 /// Sets the value of [name][crate::model::GetDatabaseRequest::name].
8430 ///
8431 /// # Example
8432 /// ```ignore,no_run
8433 /// # use google_cloud_oracledatabase_v1::model::GetDatabaseRequest;
8434 /// let x = GetDatabaseRequest::new().set_name("example");
8435 /// ```
8436 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8437 self.name = v.into();
8438 self
8439 }
8440}
8441
8442impl wkt::message::Message for GetDatabaseRequest {
8443 fn typename() -> &'static str {
8444 "type.googleapis.com/google.cloud.oracledatabase.v1.GetDatabaseRequest"
8445 }
8446}
8447
8448/// The request for `Database.List`.
8449#[derive(Clone, Default, PartialEq)]
8450#[non_exhaustive]
8451pub struct ListDatabasesRequest {
8452 /// Required. The parent resource name in the following format:
8453 /// projects/{project}/locations/{region}
8454 pub parent: std::string::String,
8455
8456 /// Optional. The maximum number of items to return.
8457 /// If unspecified, a maximum of 50 Databases will be returned.
8458 /// The maximum value is 1000; values above 1000 will be reset to 1000.
8459 pub page_size: i32,
8460
8461 /// Optional. A token identifying the requested page of results to return. All
8462 /// fields except the filter should remain the same as in the request that
8463 /// provided this page token.
8464 pub page_token: std::string::String,
8465
8466 /// Optional. An expression for filtering the results of the request. list for
8467 /// container databases is supported only with a valid dbSystem (full resource
8468 /// name) filter in this format:
8469 /// `dbSystem="projects/{project}/locations/{location}/dbSystems/{dbSystemId}"`
8470 pub filter: std::string::String,
8471
8472 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8473}
8474
8475impl ListDatabasesRequest {
8476 pub fn new() -> Self {
8477 std::default::Default::default()
8478 }
8479
8480 /// Sets the value of [parent][crate::model::ListDatabasesRequest::parent].
8481 ///
8482 /// # Example
8483 /// ```ignore,no_run
8484 /// # use google_cloud_oracledatabase_v1::model::ListDatabasesRequest;
8485 /// let x = ListDatabasesRequest::new().set_parent("example");
8486 /// ```
8487 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8488 self.parent = v.into();
8489 self
8490 }
8491
8492 /// Sets the value of [page_size][crate::model::ListDatabasesRequest::page_size].
8493 ///
8494 /// # Example
8495 /// ```ignore,no_run
8496 /// # use google_cloud_oracledatabase_v1::model::ListDatabasesRequest;
8497 /// let x = ListDatabasesRequest::new().set_page_size(42);
8498 /// ```
8499 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8500 self.page_size = v.into();
8501 self
8502 }
8503
8504 /// Sets the value of [page_token][crate::model::ListDatabasesRequest::page_token].
8505 ///
8506 /// # Example
8507 /// ```ignore,no_run
8508 /// # use google_cloud_oracledatabase_v1::model::ListDatabasesRequest;
8509 /// let x = ListDatabasesRequest::new().set_page_token("example");
8510 /// ```
8511 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8512 self.page_token = v.into();
8513 self
8514 }
8515
8516 /// Sets the value of [filter][crate::model::ListDatabasesRequest::filter].
8517 ///
8518 /// # Example
8519 /// ```ignore,no_run
8520 /// # use google_cloud_oracledatabase_v1::model::ListDatabasesRequest;
8521 /// let x = ListDatabasesRequest::new().set_filter("example");
8522 /// ```
8523 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8524 self.filter = v.into();
8525 self
8526 }
8527}
8528
8529impl wkt::message::Message for ListDatabasesRequest {
8530 fn typename() -> &'static str {
8531 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDatabasesRequest"
8532 }
8533}
8534
8535/// The response for `Database.List`.
8536#[derive(Clone, Default, PartialEq)]
8537#[non_exhaustive]
8538pub struct ListDatabasesResponse {
8539 /// The list of Databases.
8540 pub databases: std::vec::Vec<crate::model::Database>,
8541
8542 /// A token identifying a page of results the server should return.
8543 pub next_page_token: std::string::String,
8544
8545 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8546}
8547
8548impl ListDatabasesResponse {
8549 pub fn new() -> Self {
8550 std::default::Default::default()
8551 }
8552
8553 /// Sets the value of [databases][crate::model::ListDatabasesResponse::databases].
8554 ///
8555 /// # Example
8556 /// ```ignore,no_run
8557 /// # use google_cloud_oracledatabase_v1::model::ListDatabasesResponse;
8558 /// use google_cloud_oracledatabase_v1::model::Database;
8559 /// let x = ListDatabasesResponse::new()
8560 /// .set_databases([
8561 /// Database::default()/* use setters */,
8562 /// Database::default()/* use (different) setters */,
8563 /// ]);
8564 /// ```
8565 pub fn set_databases<T, V>(mut self, v: T) -> Self
8566 where
8567 T: std::iter::IntoIterator<Item = V>,
8568 V: std::convert::Into<crate::model::Database>,
8569 {
8570 use std::iter::Iterator;
8571 self.databases = v.into_iter().map(|i| i.into()).collect();
8572 self
8573 }
8574
8575 /// Sets the value of [next_page_token][crate::model::ListDatabasesResponse::next_page_token].
8576 ///
8577 /// # Example
8578 /// ```ignore,no_run
8579 /// # use google_cloud_oracledatabase_v1::model::ListDatabasesResponse;
8580 /// let x = ListDatabasesResponse::new().set_next_page_token("example");
8581 /// ```
8582 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8583 self.next_page_token = v.into();
8584 self
8585 }
8586}
8587
8588impl wkt::message::Message for ListDatabasesResponse {
8589 fn typename() -> &'static str {
8590 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDatabasesResponse"
8591 }
8592}
8593
8594#[doc(hidden)]
8595impl google_cloud_gax::paginator::internal::PageableResponse for ListDatabasesResponse {
8596 type PageItem = crate::model::Database;
8597
8598 fn items(self) -> std::vec::Vec<Self::PageItem> {
8599 self.databases
8600 }
8601
8602 fn next_page_token(&self) -> std::string::String {
8603 use std::clone::Clone;
8604 self.next_page_token.clone()
8605 }
8606}
8607
8608/// Details of the Database character set resource.
8609#[derive(Clone, Default, PartialEq)]
8610#[non_exhaustive]
8611pub struct DatabaseCharacterSet {
8612 /// Identifier. The name of the Database Character Set resource in the
8613 /// following format:
8614 /// projects/{project}/locations/{region}/databaseCharacterSets/{database_character_set}
8615 pub name: std::string::String,
8616
8617 /// Output only. The character set type for the Database.
8618 pub character_set_type: crate::model::database_character_set::CharacterSetType,
8619
8620 /// Output only. The character set name for the Database which is the ID in the
8621 /// resource name.
8622 pub character_set: std::string::String,
8623
8624 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8625}
8626
8627impl DatabaseCharacterSet {
8628 pub fn new() -> Self {
8629 std::default::Default::default()
8630 }
8631
8632 /// Sets the value of [name][crate::model::DatabaseCharacterSet::name].
8633 ///
8634 /// # Example
8635 /// ```ignore,no_run
8636 /// # use google_cloud_oracledatabase_v1::model::DatabaseCharacterSet;
8637 /// let x = DatabaseCharacterSet::new().set_name("example");
8638 /// ```
8639 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8640 self.name = v.into();
8641 self
8642 }
8643
8644 /// Sets the value of [character_set_type][crate::model::DatabaseCharacterSet::character_set_type].
8645 ///
8646 /// # Example
8647 /// ```ignore,no_run
8648 /// # use google_cloud_oracledatabase_v1::model::DatabaseCharacterSet;
8649 /// use google_cloud_oracledatabase_v1::model::database_character_set::CharacterSetType;
8650 /// let x0 = DatabaseCharacterSet::new().set_character_set_type(CharacterSetType::Database);
8651 /// let x1 = DatabaseCharacterSet::new().set_character_set_type(CharacterSetType::National);
8652 /// ```
8653 pub fn set_character_set_type<
8654 T: std::convert::Into<crate::model::database_character_set::CharacterSetType>,
8655 >(
8656 mut self,
8657 v: T,
8658 ) -> Self {
8659 self.character_set_type = v.into();
8660 self
8661 }
8662
8663 /// Sets the value of [character_set][crate::model::DatabaseCharacterSet::character_set].
8664 ///
8665 /// # Example
8666 /// ```ignore,no_run
8667 /// # use google_cloud_oracledatabase_v1::model::DatabaseCharacterSet;
8668 /// let x = DatabaseCharacterSet::new().set_character_set("example");
8669 /// ```
8670 pub fn set_character_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8671 self.character_set = v.into();
8672 self
8673 }
8674}
8675
8676impl wkt::message::Message for DatabaseCharacterSet {
8677 fn typename() -> &'static str {
8678 "type.googleapis.com/google.cloud.oracledatabase.v1.DatabaseCharacterSet"
8679 }
8680}
8681
8682/// Defines additional types related to [DatabaseCharacterSet].
8683pub mod database_character_set {
8684 #[allow(unused_imports)]
8685 use super::*;
8686
8687 /// The type of character set a Database can have.
8688 ///
8689 /// # Working with unknown values
8690 ///
8691 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8692 /// additional enum variants at any time. Adding new variants is not considered
8693 /// a breaking change. Applications should write their code in anticipation of:
8694 ///
8695 /// - New values appearing in future releases of the client library, **and**
8696 /// - New values received dynamically, without application changes.
8697 ///
8698 /// Please consult the [Working with enums] section in the user guide for some
8699 /// guidelines.
8700 ///
8701 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8702 #[derive(Clone, Debug, PartialEq)]
8703 #[non_exhaustive]
8704 pub enum CharacterSetType {
8705 /// Character set type is not specified.
8706 Unspecified,
8707 /// Character set type is set to database.
8708 Database,
8709 /// Character set type is set to national.
8710 National,
8711 /// If set, the enum was initialized with an unknown value.
8712 ///
8713 /// Applications can examine the value using [CharacterSetType::value] or
8714 /// [CharacterSetType::name].
8715 UnknownValue(character_set_type::UnknownValue),
8716 }
8717
8718 #[doc(hidden)]
8719 pub mod character_set_type {
8720 #[allow(unused_imports)]
8721 use super::*;
8722 #[derive(Clone, Debug, PartialEq)]
8723 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8724 }
8725
8726 impl CharacterSetType {
8727 /// Gets the enum value.
8728 ///
8729 /// Returns `None` if the enum contains an unknown value deserialized from
8730 /// the string representation of enums.
8731 pub fn value(&self) -> std::option::Option<i32> {
8732 match self {
8733 Self::Unspecified => std::option::Option::Some(0),
8734 Self::Database => std::option::Option::Some(1),
8735 Self::National => std::option::Option::Some(2),
8736 Self::UnknownValue(u) => u.0.value(),
8737 }
8738 }
8739
8740 /// Gets the enum value as a string.
8741 ///
8742 /// Returns `None` if the enum contains an unknown value deserialized from
8743 /// the integer representation of enums.
8744 pub fn name(&self) -> std::option::Option<&str> {
8745 match self {
8746 Self::Unspecified => std::option::Option::Some("CHARACTER_SET_TYPE_UNSPECIFIED"),
8747 Self::Database => std::option::Option::Some("DATABASE"),
8748 Self::National => std::option::Option::Some("NATIONAL"),
8749 Self::UnknownValue(u) => u.0.name(),
8750 }
8751 }
8752 }
8753
8754 impl std::default::Default for CharacterSetType {
8755 fn default() -> Self {
8756 use std::convert::From;
8757 Self::from(0)
8758 }
8759 }
8760
8761 impl std::fmt::Display for CharacterSetType {
8762 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8763 wkt::internal::display_enum(f, self.name(), self.value())
8764 }
8765 }
8766
8767 impl std::convert::From<i32> for CharacterSetType {
8768 fn from(value: i32) -> Self {
8769 match value {
8770 0 => Self::Unspecified,
8771 1 => Self::Database,
8772 2 => Self::National,
8773 _ => Self::UnknownValue(character_set_type::UnknownValue(
8774 wkt::internal::UnknownEnumValue::Integer(value),
8775 )),
8776 }
8777 }
8778 }
8779
8780 impl std::convert::From<&str> for CharacterSetType {
8781 fn from(value: &str) -> Self {
8782 use std::string::ToString;
8783 match value {
8784 "CHARACTER_SET_TYPE_UNSPECIFIED" => Self::Unspecified,
8785 "DATABASE" => Self::Database,
8786 "NATIONAL" => Self::National,
8787 _ => Self::UnknownValue(character_set_type::UnknownValue(
8788 wkt::internal::UnknownEnumValue::String(value.to_string()),
8789 )),
8790 }
8791 }
8792 }
8793
8794 impl serde::ser::Serialize for CharacterSetType {
8795 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8796 where
8797 S: serde::Serializer,
8798 {
8799 match self {
8800 Self::Unspecified => serializer.serialize_i32(0),
8801 Self::Database => serializer.serialize_i32(1),
8802 Self::National => serializer.serialize_i32(2),
8803 Self::UnknownValue(u) => u.0.serialize(serializer),
8804 }
8805 }
8806 }
8807
8808 impl<'de> serde::de::Deserialize<'de> for CharacterSetType {
8809 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8810 where
8811 D: serde::Deserializer<'de>,
8812 {
8813 deserializer.deserialize_any(wkt::internal::EnumVisitor::<CharacterSetType>::new(
8814 ".google.cloud.oracledatabase.v1.DatabaseCharacterSet.CharacterSetType",
8815 ))
8816 }
8817 }
8818}
8819
8820/// The request for `DatabaseCharacterSet.List`.
8821#[derive(Clone, Default, PartialEq)]
8822#[non_exhaustive]
8823pub struct ListDatabaseCharacterSetsRequest {
8824 /// Required. The parent value for DatabaseCharacterSets in the following
8825 /// format: projects/{project}/locations/{location}.
8826 pub parent: std::string::String,
8827
8828 /// Optional. The maximum number of DatabaseCharacterSets to return. The
8829 /// service may return fewer than this value. If unspecified, at most 50
8830 /// DatabaseCharacterSets will be returned. The maximum value is 1000; values
8831 /// above 1000 will be coerced to 1000.
8832 pub page_size: i32,
8833
8834 /// Optional. A page token, received from a previous
8835 /// `ListDatabaseCharacterSets` call. Provide this to retrieve the subsequent
8836 /// page.
8837 ///
8838 /// When paginating, all other parameters provided to
8839 /// `ListDatabaseCharacterSets` must match the call that provided the page
8840 /// token.
8841 pub page_token: std::string::String,
8842
8843 /// Optional. An expression for filtering the results of the request. Only the
8844 /// **character_set_type** field is supported in the following format:
8845 /// `character_set_type="{characterSetType}"`. Accepted values include
8846 /// `DATABASE` and `NATIONAL`.
8847 pub filter: std::string::String,
8848
8849 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8850}
8851
8852impl ListDatabaseCharacterSetsRequest {
8853 pub fn new() -> Self {
8854 std::default::Default::default()
8855 }
8856
8857 /// Sets the value of [parent][crate::model::ListDatabaseCharacterSetsRequest::parent].
8858 ///
8859 /// # Example
8860 /// ```ignore,no_run
8861 /// # use google_cloud_oracledatabase_v1::model::ListDatabaseCharacterSetsRequest;
8862 /// let x = ListDatabaseCharacterSetsRequest::new().set_parent("example");
8863 /// ```
8864 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8865 self.parent = v.into();
8866 self
8867 }
8868
8869 /// Sets the value of [page_size][crate::model::ListDatabaseCharacterSetsRequest::page_size].
8870 ///
8871 /// # Example
8872 /// ```ignore,no_run
8873 /// # use google_cloud_oracledatabase_v1::model::ListDatabaseCharacterSetsRequest;
8874 /// let x = ListDatabaseCharacterSetsRequest::new().set_page_size(42);
8875 /// ```
8876 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8877 self.page_size = v.into();
8878 self
8879 }
8880
8881 /// Sets the value of [page_token][crate::model::ListDatabaseCharacterSetsRequest::page_token].
8882 ///
8883 /// # Example
8884 /// ```ignore,no_run
8885 /// # use google_cloud_oracledatabase_v1::model::ListDatabaseCharacterSetsRequest;
8886 /// let x = ListDatabaseCharacterSetsRequest::new().set_page_token("example");
8887 /// ```
8888 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8889 self.page_token = v.into();
8890 self
8891 }
8892
8893 /// Sets the value of [filter][crate::model::ListDatabaseCharacterSetsRequest::filter].
8894 ///
8895 /// # Example
8896 /// ```ignore,no_run
8897 /// # use google_cloud_oracledatabase_v1::model::ListDatabaseCharacterSetsRequest;
8898 /// let x = ListDatabaseCharacterSetsRequest::new().set_filter("example");
8899 /// ```
8900 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8901 self.filter = v.into();
8902 self
8903 }
8904}
8905
8906impl wkt::message::Message for ListDatabaseCharacterSetsRequest {
8907 fn typename() -> &'static str {
8908 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDatabaseCharacterSetsRequest"
8909 }
8910}
8911
8912/// The response for `DatabaseCharacterSet.List`.
8913#[derive(Clone, Default, PartialEq)]
8914#[non_exhaustive]
8915pub struct ListDatabaseCharacterSetsResponse {
8916 /// The list of DatabaseCharacterSets.
8917 pub database_character_sets: std::vec::Vec<crate::model::DatabaseCharacterSet>,
8918
8919 /// A token identifying a page of results the server should return.
8920 pub next_page_token: std::string::String,
8921
8922 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8923}
8924
8925impl ListDatabaseCharacterSetsResponse {
8926 pub fn new() -> Self {
8927 std::default::Default::default()
8928 }
8929
8930 /// Sets the value of [database_character_sets][crate::model::ListDatabaseCharacterSetsResponse::database_character_sets].
8931 ///
8932 /// # Example
8933 /// ```ignore,no_run
8934 /// # use google_cloud_oracledatabase_v1::model::ListDatabaseCharacterSetsResponse;
8935 /// use google_cloud_oracledatabase_v1::model::DatabaseCharacterSet;
8936 /// let x = ListDatabaseCharacterSetsResponse::new()
8937 /// .set_database_character_sets([
8938 /// DatabaseCharacterSet::default()/* use setters */,
8939 /// DatabaseCharacterSet::default()/* use (different) setters */,
8940 /// ]);
8941 /// ```
8942 pub fn set_database_character_sets<T, V>(mut self, v: T) -> Self
8943 where
8944 T: std::iter::IntoIterator<Item = V>,
8945 V: std::convert::Into<crate::model::DatabaseCharacterSet>,
8946 {
8947 use std::iter::Iterator;
8948 self.database_character_sets = v.into_iter().map(|i| i.into()).collect();
8949 self
8950 }
8951
8952 /// Sets the value of [next_page_token][crate::model::ListDatabaseCharacterSetsResponse::next_page_token].
8953 ///
8954 /// # Example
8955 /// ```ignore,no_run
8956 /// # use google_cloud_oracledatabase_v1::model::ListDatabaseCharacterSetsResponse;
8957 /// let x = ListDatabaseCharacterSetsResponse::new().set_next_page_token("example");
8958 /// ```
8959 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8960 self.next_page_token = v.into();
8961 self
8962 }
8963}
8964
8965impl wkt::message::Message for ListDatabaseCharacterSetsResponse {
8966 fn typename() -> &'static str {
8967 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDatabaseCharacterSetsResponse"
8968 }
8969}
8970
8971#[doc(hidden)]
8972impl google_cloud_gax::paginator::internal::PageableResponse for ListDatabaseCharacterSetsResponse {
8973 type PageItem = crate::model::DatabaseCharacterSet;
8974
8975 fn items(self) -> std::vec::Vec<Self::PageItem> {
8976 self.database_character_sets
8977 }
8978
8979 fn next_page_token(&self) -> std::string::String {
8980 use std::clone::Clone;
8981 self.next_page_token.clone()
8982 }
8983}
8984
8985/// Details of the database node resource.
8986/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/DbNode/>
8987#[derive(Clone, Default, PartialEq)]
8988#[non_exhaustive]
8989pub struct DbNode {
8990 /// Identifier. The name of the database node resource in the following format:
8991 /// projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}/dbNodes/{db_node}
8992 pub name: std::string::String,
8993
8994 /// Optional. Various properties of the database node.
8995 pub properties: std::option::Option<crate::model::DbNodeProperties>,
8996
8997 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8998}
8999
9000impl DbNode {
9001 pub fn new() -> Self {
9002 std::default::Default::default()
9003 }
9004
9005 /// Sets the value of [name][crate::model::DbNode::name].
9006 ///
9007 /// # Example
9008 /// ```ignore,no_run
9009 /// # use google_cloud_oracledatabase_v1::model::DbNode;
9010 /// let x = DbNode::new().set_name("example");
9011 /// ```
9012 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9013 self.name = v.into();
9014 self
9015 }
9016
9017 /// Sets the value of [properties][crate::model::DbNode::properties].
9018 ///
9019 /// # Example
9020 /// ```ignore,no_run
9021 /// # use google_cloud_oracledatabase_v1::model::DbNode;
9022 /// use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9023 /// let x = DbNode::new().set_properties(DbNodeProperties::default()/* use setters */);
9024 /// ```
9025 pub fn set_properties<T>(mut self, v: T) -> Self
9026 where
9027 T: std::convert::Into<crate::model::DbNodeProperties>,
9028 {
9029 self.properties = std::option::Option::Some(v.into());
9030 self
9031 }
9032
9033 /// Sets or clears the value of [properties][crate::model::DbNode::properties].
9034 ///
9035 /// # Example
9036 /// ```ignore,no_run
9037 /// # use google_cloud_oracledatabase_v1::model::DbNode;
9038 /// use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9039 /// let x = DbNode::new().set_or_clear_properties(Some(DbNodeProperties::default()/* use setters */));
9040 /// let x = DbNode::new().set_or_clear_properties(None::<DbNodeProperties>);
9041 /// ```
9042 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
9043 where
9044 T: std::convert::Into<crate::model::DbNodeProperties>,
9045 {
9046 self.properties = v.map(|x| x.into());
9047 self
9048 }
9049}
9050
9051impl wkt::message::Message for DbNode {
9052 fn typename() -> &'static str {
9053 "type.googleapis.com/google.cloud.oracledatabase.v1.DbNode"
9054 }
9055}
9056
9057/// Various properties and settings associated with Db node.
9058#[derive(Clone, Default, PartialEq)]
9059#[non_exhaustive]
9060pub struct DbNodeProperties {
9061 /// Output only. OCID of database node.
9062 pub ocid: std::string::String,
9063
9064 /// Optional. OCPU count per database node.
9065 pub ocpu_count: i32,
9066
9067 /// Memory allocated in GBs.
9068 pub memory_size_gb: i32,
9069
9070 /// Optional. Local storage per database node.
9071 pub db_node_storage_size_gb: i32,
9072
9073 /// Optional. Database server OCID.
9074 pub db_server_ocid: std::string::String,
9075
9076 /// Optional. DNS
9077 pub hostname: std::string::String,
9078
9079 /// Output only. State of the database node.
9080 pub state: crate::model::db_node_properties::State,
9081
9082 /// Total CPU core count of the database node.
9083 pub total_cpu_core_count: i32,
9084
9085 /// Output only. The date and time that the database node was created.
9086 pub create_time: std::option::Option<wkt::Timestamp>,
9087
9088 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9089}
9090
9091impl DbNodeProperties {
9092 pub fn new() -> Self {
9093 std::default::Default::default()
9094 }
9095
9096 /// Sets the value of [ocid][crate::model::DbNodeProperties::ocid].
9097 ///
9098 /// # Example
9099 /// ```ignore,no_run
9100 /// # use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9101 /// let x = DbNodeProperties::new().set_ocid("example");
9102 /// ```
9103 pub fn set_ocid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9104 self.ocid = v.into();
9105 self
9106 }
9107
9108 /// Sets the value of [ocpu_count][crate::model::DbNodeProperties::ocpu_count].
9109 ///
9110 /// # Example
9111 /// ```ignore,no_run
9112 /// # use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9113 /// let x = DbNodeProperties::new().set_ocpu_count(42);
9114 /// ```
9115 pub fn set_ocpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9116 self.ocpu_count = v.into();
9117 self
9118 }
9119
9120 /// Sets the value of [memory_size_gb][crate::model::DbNodeProperties::memory_size_gb].
9121 ///
9122 /// # Example
9123 /// ```ignore,no_run
9124 /// # use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9125 /// let x = DbNodeProperties::new().set_memory_size_gb(42);
9126 /// ```
9127 pub fn set_memory_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9128 self.memory_size_gb = v.into();
9129 self
9130 }
9131
9132 /// Sets the value of [db_node_storage_size_gb][crate::model::DbNodeProperties::db_node_storage_size_gb].
9133 ///
9134 /// # Example
9135 /// ```ignore,no_run
9136 /// # use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9137 /// let x = DbNodeProperties::new().set_db_node_storage_size_gb(42);
9138 /// ```
9139 pub fn set_db_node_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9140 self.db_node_storage_size_gb = v.into();
9141 self
9142 }
9143
9144 /// Sets the value of [db_server_ocid][crate::model::DbNodeProperties::db_server_ocid].
9145 ///
9146 /// # Example
9147 /// ```ignore,no_run
9148 /// # use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9149 /// let x = DbNodeProperties::new().set_db_server_ocid("example");
9150 /// ```
9151 pub fn set_db_server_ocid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9152 self.db_server_ocid = v.into();
9153 self
9154 }
9155
9156 /// Sets the value of [hostname][crate::model::DbNodeProperties::hostname].
9157 ///
9158 /// # Example
9159 /// ```ignore,no_run
9160 /// # use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9161 /// let x = DbNodeProperties::new().set_hostname("example");
9162 /// ```
9163 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9164 self.hostname = v.into();
9165 self
9166 }
9167
9168 /// Sets the value of [state][crate::model::DbNodeProperties::state].
9169 ///
9170 /// # Example
9171 /// ```ignore,no_run
9172 /// # use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9173 /// use google_cloud_oracledatabase_v1::model::db_node_properties::State;
9174 /// let x0 = DbNodeProperties::new().set_state(State::Provisioning);
9175 /// let x1 = DbNodeProperties::new().set_state(State::Available);
9176 /// let x2 = DbNodeProperties::new().set_state(State::Updating);
9177 /// ```
9178 pub fn set_state<T: std::convert::Into<crate::model::db_node_properties::State>>(
9179 mut self,
9180 v: T,
9181 ) -> Self {
9182 self.state = v.into();
9183 self
9184 }
9185
9186 /// Sets the value of [total_cpu_core_count][crate::model::DbNodeProperties::total_cpu_core_count].
9187 ///
9188 /// # Example
9189 /// ```ignore,no_run
9190 /// # use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9191 /// let x = DbNodeProperties::new().set_total_cpu_core_count(42);
9192 /// ```
9193 pub fn set_total_cpu_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9194 self.total_cpu_core_count = v.into();
9195 self
9196 }
9197
9198 /// Sets the value of [create_time][crate::model::DbNodeProperties::create_time].
9199 ///
9200 /// # Example
9201 /// ```ignore,no_run
9202 /// # use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9203 /// use wkt::Timestamp;
9204 /// let x = DbNodeProperties::new().set_create_time(Timestamp::default()/* use setters */);
9205 /// ```
9206 pub fn set_create_time<T>(mut self, v: T) -> Self
9207 where
9208 T: std::convert::Into<wkt::Timestamp>,
9209 {
9210 self.create_time = std::option::Option::Some(v.into());
9211 self
9212 }
9213
9214 /// Sets or clears the value of [create_time][crate::model::DbNodeProperties::create_time].
9215 ///
9216 /// # Example
9217 /// ```ignore,no_run
9218 /// # use google_cloud_oracledatabase_v1::model::DbNodeProperties;
9219 /// use wkt::Timestamp;
9220 /// let x = DbNodeProperties::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9221 /// let x = DbNodeProperties::new().set_or_clear_create_time(None::<Timestamp>);
9222 /// ```
9223 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9224 where
9225 T: std::convert::Into<wkt::Timestamp>,
9226 {
9227 self.create_time = v.map(|x| x.into());
9228 self
9229 }
9230}
9231
9232impl wkt::message::Message for DbNodeProperties {
9233 fn typename() -> &'static str {
9234 "type.googleapis.com/google.cloud.oracledatabase.v1.DbNodeProperties"
9235 }
9236}
9237
9238/// Defines additional types related to [DbNodeProperties].
9239pub mod db_node_properties {
9240 #[allow(unused_imports)]
9241 use super::*;
9242
9243 /// The various lifecycle states of the database node.
9244 ///
9245 /// # Working with unknown values
9246 ///
9247 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9248 /// additional enum variants at any time. Adding new variants is not considered
9249 /// a breaking change. Applications should write their code in anticipation of:
9250 ///
9251 /// - New values appearing in future releases of the client library, **and**
9252 /// - New values received dynamically, without application changes.
9253 ///
9254 /// Please consult the [Working with enums] section in the user guide for some
9255 /// guidelines.
9256 ///
9257 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9258 #[derive(Clone, Debug, PartialEq)]
9259 #[non_exhaustive]
9260 pub enum State {
9261 /// Default unspecified value.
9262 Unspecified,
9263 /// Indicates that the resource is in provisioning state.
9264 Provisioning,
9265 /// Indicates that the resource is in available state.
9266 Available,
9267 /// Indicates that the resource is in updating state.
9268 Updating,
9269 /// Indicates that the resource is in stopping state.
9270 Stopping,
9271 /// Indicates that the resource is in stopped state.
9272 Stopped,
9273 /// Indicates that the resource is in starting state.
9274 Starting,
9275 /// Indicates that the resource is in terminating state.
9276 Terminating,
9277 /// Indicates that the resource is in terminated state.
9278 Terminated,
9279 /// Indicates that the resource is in failed state.
9280 Failed,
9281 /// If set, the enum was initialized with an unknown value.
9282 ///
9283 /// Applications can examine the value using [State::value] or
9284 /// [State::name].
9285 UnknownValue(state::UnknownValue),
9286 }
9287
9288 #[doc(hidden)]
9289 pub mod state {
9290 #[allow(unused_imports)]
9291 use super::*;
9292 #[derive(Clone, Debug, PartialEq)]
9293 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9294 }
9295
9296 impl State {
9297 /// Gets the enum value.
9298 ///
9299 /// Returns `None` if the enum contains an unknown value deserialized from
9300 /// the string representation of enums.
9301 pub fn value(&self) -> std::option::Option<i32> {
9302 match self {
9303 Self::Unspecified => std::option::Option::Some(0),
9304 Self::Provisioning => std::option::Option::Some(1),
9305 Self::Available => std::option::Option::Some(2),
9306 Self::Updating => std::option::Option::Some(3),
9307 Self::Stopping => std::option::Option::Some(4),
9308 Self::Stopped => std::option::Option::Some(5),
9309 Self::Starting => std::option::Option::Some(6),
9310 Self::Terminating => std::option::Option::Some(7),
9311 Self::Terminated => std::option::Option::Some(8),
9312 Self::Failed => std::option::Option::Some(9),
9313 Self::UnknownValue(u) => u.0.value(),
9314 }
9315 }
9316
9317 /// Gets the enum value as a string.
9318 ///
9319 /// Returns `None` if the enum contains an unknown value deserialized from
9320 /// the integer representation of enums.
9321 pub fn name(&self) -> std::option::Option<&str> {
9322 match self {
9323 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
9324 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
9325 Self::Available => std::option::Option::Some("AVAILABLE"),
9326 Self::Updating => std::option::Option::Some("UPDATING"),
9327 Self::Stopping => std::option::Option::Some("STOPPING"),
9328 Self::Stopped => std::option::Option::Some("STOPPED"),
9329 Self::Starting => std::option::Option::Some("STARTING"),
9330 Self::Terminating => std::option::Option::Some("TERMINATING"),
9331 Self::Terminated => std::option::Option::Some("TERMINATED"),
9332 Self::Failed => std::option::Option::Some("FAILED"),
9333 Self::UnknownValue(u) => u.0.name(),
9334 }
9335 }
9336 }
9337
9338 impl std::default::Default for State {
9339 fn default() -> Self {
9340 use std::convert::From;
9341 Self::from(0)
9342 }
9343 }
9344
9345 impl std::fmt::Display for State {
9346 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9347 wkt::internal::display_enum(f, self.name(), self.value())
9348 }
9349 }
9350
9351 impl std::convert::From<i32> for State {
9352 fn from(value: i32) -> Self {
9353 match value {
9354 0 => Self::Unspecified,
9355 1 => Self::Provisioning,
9356 2 => Self::Available,
9357 3 => Self::Updating,
9358 4 => Self::Stopping,
9359 5 => Self::Stopped,
9360 6 => Self::Starting,
9361 7 => Self::Terminating,
9362 8 => Self::Terminated,
9363 9 => Self::Failed,
9364 _ => Self::UnknownValue(state::UnknownValue(
9365 wkt::internal::UnknownEnumValue::Integer(value),
9366 )),
9367 }
9368 }
9369 }
9370
9371 impl std::convert::From<&str> for State {
9372 fn from(value: &str) -> Self {
9373 use std::string::ToString;
9374 match value {
9375 "STATE_UNSPECIFIED" => Self::Unspecified,
9376 "PROVISIONING" => Self::Provisioning,
9377 "AVAILABLE" => Self::Available,
9378 "UPDATING" => Self::Updating,
9379 "STOPPING" => Self::Stopping,
9380 "STOPPED" => Self::Stopped,
9381 "STARTING" => Self::Starting,
9382 "TERMINATING" => Self::Terminating,
9383 "TERMINATED" => Self::Terminated,
9384 "FAILED" => Self::Failed,
9385 _ => Self::UnknownValue(state::UnknownValue(
9386 wkt::internal::UnknownEnumValue::String(value.to_string()),
9387 )),
9388 }
9389 }
9390 }
9391
9392 impl serde::ser::Serialize for State {
9393 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9394 where
9395 S: serde::Serializer,
9396 {
9397 match self {
9398 Self::Unspecified => serializer.serialize_i32(0),
9399 Self::Provisioning => serializer.serialize_i32(1),
9400 Self::Available => serializer.serialize_i32(2),
9401 Self::Updating => serializer.serialize_i32(3),
9402 Self::Stopping => serializer.serialize_i32(4),
9403 Self::Stopped => serializer.serialize_i32(5),
9404 Self::Starting => serializer.serialize_i32(6),
9405 Self::Terminating => serializer.serialize_i32(7),
9406 Self::Terminated => serializer.serialize_i32(8),
9407 Self::Failed => serializer.serialize_i32(9),
9408 Self::UnknownValue(u) => u.0.serialize(serializer),
9409 }
9410 }
9411 }
9412
9413 impl<'de> serde::de::Deserialize<'de> for State {
9414 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9415 where
9416 D: serde::Deserializer<'de>,
9417 {
9418 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9419 ".google.cloud.oracledatabase.v1.DbNodeProperties.State",
9420 ))
9421 }
9422 }
9423}
9424
9425/// Details of the database server resource.
9426/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/DbServer/>
9427#[derive(Clone, Default, PartialEq)]
9428#[non_exhaustive]
9429pub struct DbServer {
9430 /// Identifier. The name of the database server resource with the format:
9431 /// projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}/dbServers/{db_server}
9432 pub name: std::string::String,
9433
9434 /// Optional. User friendly name for this resource.
9435 pub display_name: std::string::String,
9436
9437 /// Optional. Various properties of the database server.
9438 pub properties: std::option::Option<crate::model::DbServerProperties>,
9439
9440 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9441}
9442
9443impl DbServer {
9444 pub fn new() -> Self {
9445 std::default::Default::default()
9446 }
9447
9448 /// Sets the value of [name][crate::model::DbServer::name].
9449 ///
9450 /// # Example
9451 /// ```ignore,no_run
9452 /// # use google_cloud_oracledatabase_v1::model::DbServer;
9453 /// let x = DbServer::new().set_name("example");
9454 /// ```
9455 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9456 self.name = v.into();
9457 self
9458 }
9459
9460 /// Sets the value of [display_name][crate::model::DbServer::display_name].
9461 ///
9462 /// # Example
9463 /// ```ignore,no_run
9464 /// # use google_cloud_oracledatabase_v1::model::DbServer;
9465 /// let x = DbServer::new().set_display_name("example");
9466 /// ```
9467 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9468 self.display_name = v.into();
9469 self
9470 }
9471
9472 /// Sets the value of [properties][crate::model::DbServer::properties].
9473 ///
9474 /// # Example
9475 /// ```ignore,no_run
9476 /// # use google_cloud_oracledatabase_v1::model::DbServer;
9477 /// use google_cloud_oracledatabase_v1::model::DbServerProperties;
9478 /// let x = DbServer::new().set_properties(DbServerProperties::default()/* use setters */);
9479 /// ```
9480 pub fn set_properties<T>(mut self, v: T) -> Self
9481 where
9482 T: std::convert::Into<crate::model::DbServerProperties>,
9483 {
9484 self.properties = std::option::Option::Some(v.into());
9485 self
9486 }
9487
9488 /// Sets or clears the value of [properties][crate::model::DbServer::properties].
9489 ///
9490 /// # Example
9491 /// ```ignore,no_run
9492 /// # use google_cloud_oracledatabase_v1::model::DbServer;
9493 /// use google_cloud_oracledatabase_v1::model::DbServerProperties;
9494 /// let x = DbServer::new().set_or_clear_properties(Some(DbServerProperties::default()/* use setters */));
9495 /// let x = DbServer::new().set_or_clear_properties(None::<DbServerProperties>);
9496 /// ```
9497 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
9498 where
9499 T: std::convert::Into<crate::model::DbServerProperties>,
9500 {
9501 self.properties = v.map(|x| x.into());
9502 self
9503 }
9504}
9505
9506impl wkt::message::Message for DbServer {
9507 fn typename() -> &'static str {
9508 "type.googleapis.com/google.cloud.oracledatabase.v1.DbServer"
9509 }
9510}
9511
9512/// Various properties and settings associated with Exadata database server.
9513#[derive(Clone, Default, PartialEq)]
9514#[non_exhaustive]
9515pub struct DbServerProperties {
9516 /// Output only. OCID of database server.
9517 pub ocid: std::string::String,
9518
9519 /// Optional. OCPU count per database.
9520 pub ocpu_count: i32,
9521
9522 /// Optional. Maximum OCPU count per database.
9523 pub max_ocpu_count: i32,
9524
9525 /// Optional. Memory allocated in GBs.
9526 pub memory_size_gb: i32,
9527
9528 /// Optional. Maximum memory allocated in GBs.
9529 pub max_memory_size_gb: i32,
9530
9531 /// Optional. Local storage per VM.
9532 pub db_node_storage_size_gb: i32,
9533
9534 /// Optional. Maximum local storage per VM.
9535 pub max_db_node_storage_size_gb: i32,
9536
9537 /// Optional. Vm count per database.
9538 pub vm_count: i32,
9539
9540 /// Output only. State of the database server.
9541 pub state: crate::model::db_server_properties::State,
9542
9543 /// Output only. OCID of database nodes associated with the database server.
9544 pub db_node_ids: std::vec::Vec<std::string::String>,
9545
9546 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9547}
9548
9549impl DbServerProperties {
9550 pub fn new() -> Self {
9551 std::default::Default::default()
9552 }
9553
9554 /// Sets the value of [ocid][crate::model::DbServerProperties::ocid].
9555 ///
9556 /// # Example
9557 /// ```ignore,no_run
9558 /// # use google_cloud_oracledatabase_v1::model::DbServerProperties;
9559 /// let x = DbServerProperties::new().set_ocid("example");
9560 /// ```
9561 pub fn set_ocid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9562 self.ocid = v.into();
9563 self
9564 }
9565
9566 /// Sets the value of [ocpu_count][crate::model::DbServerProperties::ocpu_count].
9567 ///
9568 /// # Example
9569 /// ```ignore,no_run
9570 /// # use google_cloud_oracledatabase_v1::model::DbServerProperties;
9571 /// let x = DbServerProperties::new().set_ocpu_count(42);
9572 /// ```
9573 pub fn set_ocpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9574 self.ocpu_count = v.into();
9575 self
9576 }
9577
9578 /// Sets the value of [max_ocpu_count][crate::model::DbServerProperties::max_ocpu_count].
9579 ///
9580 /// # Example
9581 /// ```ignore,no_run
9582 /// # use google_cloud_oracledatabase_v1::model::DbServerProperties;
9583 /// let x = DbServerProperties::new().set_max_ocpu_count(42);
9584 /// ```
9585 pub fn set_max_ocpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9586 self.max_ocpu_count = v.into();
9587 self
9588 }
9589
9590 /// Sets the value of [memory_size_gb][crate::model::DbServerProperties::memory_size_gb].
9591 ///
9592 /// # Example
9593 /// ```ignore,no_run
9594 /// # use google_cloud_oracledatabase_v1::model::DbServerProperties;
9595 /// let x = DbServerProperties::new().set_memory_size_gb(42);
9596 /// ```
9597 pub fn set_memory_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9598 self.memory_size_gb = v.into();
9599 self
9600 }
9601
9602 /// Sets the value of [max_memory_size_gb][crate::model::DbServerProperties::max_memory_size_gb].
9603 ///
9604 /// # Example
9605 /// ```ignore,no_run
9606 /// # use google_cloud_oracledatabase_v1::model::DbServerProperties;
9607 /// let x = DbServerProperties::new().set_max_memory_size_gb(42);
9608 /// ```
9609 pub fn set_max_memory_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9610 self.max_memory_size_gb = v.into();
9611 self
9612 }
9613
9614 /// Sets the value of [db_node_storage_size_gb][crate::model::DbServerProperties::db_node_storage_size_gb].
9615 ///
9616 /// # Example
9617 /// ```ignore,no_run
9618 /// # use google_cloud_oracledatabase_v1::model::DbServerProperties;
9619 /// let x = DbServerProperties::new().set_db_node_storage_size_gb(42);
9620 /// ```
9621 pub fn set_db_node_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9622 self.db_node_storage_size_gb = v.into();
9623 self
9624 }
9625
9626 /// Sets the value of [max_db_node_storage_size_gb][crate::model::DbServerProperties::max_db_node_storage_size_gb].
9627 ///
9628 /// # Example
9629 /// ```ignore,no_run
9630 /// # use google_cloud_oracledatabase_v1::model::DbServerProperties;
9631 /// let x = DbServerProperties::new().set_max_db_node_storage_size_gb(42);
9632 /// ```
9633 pub fn set_max_db_node_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9634 self.max_db_node_storage_size_gb = v.into();
9635 self
9636 }
9637
9638 /// Sets the value of [vm_count][crate::model::DbServerProperties::vm_count].
9639 ///
9640 /// # Example
9641 /// ```ignore,no_run
9642 /// # use google_cloud_oracledatabase_v1::model::DbServerProperties;
9643 /// let x = DbServerProperties::new().set_vm_count(42);
9644 /// ```
9645 pub fn set_vm_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9646 self.vm_count = v.into();
9647 self
9648 }
9649
9650 /// Sets the value of [state][crate::model::DbServerProperties::state].
9651 ///
9652 /// # Example
9653 /// ```ignore,no_run
9654 /// # use google_cloud_oracledatabase_v1::model::DbServerProperties;
9655 /// use google_cloud_oracledatabase_v1::model::db_server_properties::State;
9656 /// let x0 = DbServerProperties::new().set_state(State::Creating);
9657 /// let x1 = DbServerProperties::new().set_state(State::Available);
9658 /// let x2 = DbServerProperties::new().set_state(State::Unavailable);
9659 /// ```
9660 pub fn set_state<T: std::convert::Into<crate::model::db_server_properties::State>>(
9661 mut self,
9662 v: T,
9663 ) -> Self {
9664 self.state = v.into();
9665 self
9666 }
9667
9668 /// Sets the value of [db_node_ids][crate::model::DbServerProperties::db_node_ids].
9669 ///
9670 /// # Example
9671 /// ```ignore,no_run
9672 /// # use google_cloud_oracledatabase_v1::model::DbServerProperties;
9673 /// let x = DbServerProperties::new().set_db_node_ids(["a", "b", "c"]);
9674 /// ```
9675 pub fn set_db_node_ids<T, V>(mut self, v: T) -> Self
9676 where
9677 T: std::iter::IntoIterator<Item = V>,
9678 V: std::convert::Into<std::string::String>,
9679 {
9680 use std::iter::Iterator;
9681 self.db_node_ids = v.into_iter().map(|i| i.into()).collect();
9682 self
9683 }
9684}
9685
9686impl wkt::message::Message for DbServerProperties {
9687 fn typename() -> &'static str {
9688 "type.googleapis.com/google.cloud.oracledatabase.v1.DbServerProperties"
9689 }
9690}
9691
9692/// Defines additional types related to [DbServerProperties].
9693pub mod db_server_properties {
9694 #[allow(unused_imports)]
9695 use super::*;
9696
9697 /// The various lifecycle states of the database server.
9698 ///
9699 /// # Working with unknown values
9700 ///
9701 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9702 /// additional enum variants at any time. Adding new variants is not considered
9703 /// a breaking change. Applications should write their code in anticipation of:
9704 ///
9705 /// - New values appearing in future releases of the client library, **and**
9706 /// - New values received dynamically, without application changes.
9707 ///
9708 /// Please consult the [Working with enums] section in the user guide for some
9709 /// guidelines.
9710 ///
9711 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9712 #[derive(Clone, Debug, PartialEq)]
9713 #[non_exhaustive]
9714 pub enum State {
9715 /// Default unspecified value.
9716 Unspecified,
9717 /// Indicates that the resource is in creating state.
9718 Creating,
9719 /// Indicates that the resource is in available state.
9720 Available,
9721 /// Indicates that the resource is in unavailable state.
9722 Unavailable,
9723 /// Indicates that the resource is in deleting state.
9724 Deleting,
9725 /// Indicates that the resource is in deleted state.
9726 Deleted,
9727 /// If set, the enum was initialized with an unknown value.
9728 ///
9729 /// Applications can examine the value using [State::value] or
9730 /// [State::name].
9731 UnknownValue(state::UnknownValue),
9732 }
9733
9734 #[doc(hidden)]
9735 pub mod state {
9736 #[allow(unused_imports)]
9737 use super::*;
9738 #[derive(Clone, Debug, PartialEq)]
9739 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9740 }
9741
9742 impl State {
9743 /// Gets the enum value.
9744 ///
9745 /// Returns `None` if the enum contains an unknown value deserialized from
9746 /// the string representation of enums.
9747 pub fn value(&self) -> std::option::Option<i32> {
9748 match self {
9749 Self::Unspecified => std::option::Option::Some(0),
9750 Self::Creating => std::option::Option::Some(1),
9751 Self::Available => std::option::Option::Some(2),
9752 Self::Unavailable => std::option::Option::Some(3),
9753 Self::Deleting => std::option::Option::Some(4),
9754 Self::Deleted => std::option::Option::Some(5),
9755 Self::UnknownValue(u) => u.0.value(),
9756 }
9757 }
9758
9759 /// Gets the enum value as a string.
9760 ///
9761 /// Returns `None` if the enum contains an unknown value deserialized from
9762 /// the integer representation of enums.
9763 pub fn name(&self) -> std::option::Option<&str> {
9764 match self {
9765 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
9766 Self::Creating => std::option::Option::Some("CREATING"),
9767 Self::Available => std::option::Option::Some("AVAILABLE"),
9768 Self::Unavailable => std::option::Option::Some("UNAVAILABLE"),
9769 Self::Deleting => std::option::Option::Some("DELETING"),
9770 Self::Deleted => std::option::Option::Some("DELETED"),
9771 Self::UnknownValue(u) => u.0.name(),
9772 }
9773 }
9774 }
9775
9776 impl std::default::Default for State {
9777 fn default() -> Self {
9778 use std::convert::From;
9779 Self::from(0)
9780 }
9781 }
9782
9783 impl std::fmt::Display for State {
9784 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9785 wkt::internal::display_enum(f, self.name(), self.value())
9786 }
9787 }
9788
9789 impl std::convert::From<i32> for State {
9790 fn from(value: i32) -> Self {
9791 match value {
9792 0 => Self::Unspecified,
9793 1 => Self::Creating,
9794 2 => Self::Available,
9795 3 => Self::Unavailable,
9796 4 => Self::Deleting,
9797 5 => Self::Deleted,
9798 _ => Self::UnknownValue(state::UnknownValue(
9799 wkt::internal::UnknownEnumValue::Integer(value),
9800 )),
9801 }
9802 }
9803 }
9804
9805 impl std::convert::From<&str> for State {
9806 fn from(value: &str) -> Self {
9807 use std::string::ToString;
9808 match value {
9809 "STATE_UNSPECIFIED" => Self::Unspecified,
9810 "CREATING" => Self::Creating,
9811 "AVAILABLE" => Self::Available,
9812 "UNAVAILABLE" => Self::Unavailable,
9813 "DELETING" => Self::Deleting,
9814 "DELETED" => Self::Deleted,
9815 _ => Self::UnknownValue(state::UnknownValue(
9816 wkt::internal::UnknownEnumValue::String(value.to_string()),
9817 )),
9818 }
9819 }
9820 }
9821
9822 impl serde::ser::Serialize for State {
9823 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9824 where
9825 S: serde::Serializer,
9826 {
9827 match self {
9828 Self::Unspecified => serializer.serialize_i32(0),
9829 Self::Creating => serializer.serialize_i32(1),
9830 Self::Available => serializer.serialize_i32(2),
9831 Self::Unavailable => serializer.serialize_i32(3),
9832 Self::Deleting => serializer.serialize_i32(4),
9833 Self::Deleted => serializer.serialize_i32(5),
9834 Self::UnknownValue(u) => u.0.serialize(serializer),
9835 }
9836 }
9837 }
9838
9839 impl<'de> serde::de::Deserialize<'de> for State {
9840 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9841 where
9842 D: serde::Deserializer<'de>,
9843 {
9844 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9845 ".google.cloud.oracledatabase.v1.DbServerProperties.State",
9846 ))
9847 }
9848 }
9849}
9850
9851/// Details of the DbSystem (BaseDB) resource.
9852/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/DbSystem/>
9853#[derive(Clone, Default, PartialEq)]
9854#[non_exhaustive]
9855pub struct DbSystem {
9856 /// Identifier. The name of the DbSystem resource in the following format:
9857 /// projects/{project}/locations/{region}/dbSystems/{db_system}
9858 pub name: std::string::String,
9859
9860 /// Optional. The properties of the DbSystem.
9861 pub properties: std::option::Option<crate::model::DbSystemProperties>,
9862
9863 /// Optional. The GCP Oracle zone where Oracle DbSystem is hosted.
9864 /// Example: us-east4-b-r2.
9865 /// If not specified, the system will pick a zone based on availability.
9866 pub gcp_oracle_zone: std::string::String,
9867
9868 /// Optional. The labels or tags associated with the DbSystem.
9869 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9870
9871 /// Optional. The name of the OdbNetwork associated with the DbSystem.
9872 /// Format: projects/{project}/locations/{location}/odbNetworks/{odb_network}
9873 /// It is optional but if specified, this should match the parent ODBNetwork of
9874 /// the OdbSubnet.
9875 pub odb_network: std::string::String,
9876
9877 /// Required. The name of the OdbSubnet associated with the DbSystem for IP
9878 /// allocation. Format:
9879 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
9880 pub odb_subnet: std::string::String,
9881
9882 /// Output only. The ID of the subscription entitlement associated with the
9883 /// DbSystem
9884 pub entitlement_id: std::string::String,
9885
9886 /// Required. The display name for the System db. The name does not have to
9887 /// be unique within your project.
9888 pub display_name: std::string::String,
9889
9890 /// Output only. The date and time that the DbSystem was created.
9891 pub create_time: std::option::Option<wkt::Timestamp>,
9892
9893 /// Output only. HTTPS link to OCI resources exposed to Customer via UI
9894 /// Interface.
9895 pub oci_url: std::string::String,
9896
9897 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9898}
9899
9900impl DbSystem {
9901 pub fn new() -> Self {
9902 std::default::Default::default()
9903 }
9904
9905 /// Sets the value of [name][crate::model::DbSystem::name].
9906 ///
9907 /// # Example
9908 /// ```ignore,no_run
9909 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
9910 /// let x = DbSystem::new().set_name("example");
9911 /// ```
9912 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9913 self.name = v.into();
9914 self
9915 }
9916
9917 /// Sets the value of [properties][crate::model::DbSystem::properties].
9918 ///
9919 /// # Example
9920 /// ```ignore,no_run
9921 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
9922 /// use google_cloud_oracledatabase_v1::model::DbSystemProperties;
9923 /// let x = DbSystem::new().set_properties(DbSystemProperties::default()/* use setters */);
9924 /// ```
9925 pub fn set_properties<T>(mut self, v: T) -> Self
9926 where
9927 T: std::convert::Into<crate::model::DbSystemProperties>,
9928 {
9929 self.properties = std::option::Option::Some(v.into());
9930 self
9931 }
9932
9933 /// Sets or clears the value of [properties][crate::model::DbSystem::properties].
9934 ///
9935 /// # Example
9936 /// ```ignore,no_run
9937 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
9938 /// use google_cloud_oracledatabase_v1::model::DbSystemProperties;
9939 /// let x = DbSystem::new().set_or_clear_properties(Some(DbSystemProperties::default()/* use setters */));
9940 /// let x = DbSystem::new().set_or_clear_properties(None::<DbSystemProperties>);
9941 /// ```
9942 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
9943 where
9944 T: std::convert::Into<crate::model::DbSystemProperties>,
9945 {
9946 self.properties = v.map(|x| x.into());
9947 self
9948 }
9949
9950 /// Sets the value of [gcp_oracle_zone][crate::model::DbSystem::gcp_oracle_zone].
9951 ///
9952 /// # Example
9953 /// ```ignore,no_run
9954 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
9955 /// let x = DbSystem::new().set_gcp_oracle_zone("example");
9956 /// ```
9957 pub fn set_gcp_oracle_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9958 self.gcp_oracle_zone = v.into();
9959 self
9960 }
9961
9962 /// Sets the value of [labels][crate::model::DbSystem::labels].
9963 ///
9964 /// # Example
9965 /// ```ignore,no_run
9966 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
9967 /// let x = DbSystem::new().set_labels([
9968 /// ("key0", "abc"),
9969 /// ("key1", "xyz"),
9970 /// ]);
9971 /// ```
9972 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
9973 where
9974 T: std::iter::IntoIterator<Item = (K, V)>,
9975 K: std::convert::Into<std::string::String>,
9976 V: std::convert::Into<std::string::String>,
9977 {
9978 use std::iter::Iterator;
9979 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9980 self
9981 }
9982
9983 /// Sets the value of [odb_network][crate::model::DbSystem::odb_network].
9984 ///
9985 /// # Example
9986 /// ```ignore,no_run
9987 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
9988 /// let x = DbSystem::new().set_odb_network("example");
9989 /// ```
9990 pub fn set_odb_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9991 self.odb_network = v.into();
9992 self
9993 }
9994
9995 /// Sets the value of [odb_subnet][crate::model::DbSystem::odb_subnet].
9996 ///
9997 /// # Example
9998 /// ```ignore,no_run
9999 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
10000 /// let x = DbSystem::new().set_odb_subnet("example");
10001 /// ```
10002 pub fn set_odb_subnet<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10003 self.odb_subnet = v.into();
10004 self
10005 }
10006
10007 /// Sets the value of [entitlement_id][crate::model::DbSystem::entitlement_id].
10008 ///
10009 /// # Example
10010 /// ```ignore,no_run
10011 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
10012 /// let x = DbSystem::new().set_entitlement_id("example");
10013 /// ```
10014 pub fn set_entitlement_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10015 self.entitlement_id = v.into();
10016 self
10017 }
10018
10019 /// Sets the value of [display_name][crate::model::DbSystem::display_name].
10020 ///
10021 /// # Example
10022 /// ```ignore,no_run
10023 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
10024 /// let x = DbSystem::new().set_display_name("example");
10025 /// ```
10026 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10027 self.display_name = v.into();
10028 self
10029 }
10030
10031 /// Sets the value of [create_time][crate::model::DbSystem::create_time].
10032 ///
10033 /// # Example
10034 /// ```ignore,no_run
10035 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
10036 /// use wkt::Timestamp;
10037 /// let x = DbSystem::new().set_create_time(Timestamp::default()/* use setters */);
10038 /// ```
10039 pub fn set_create_time<T>(mut self, v: T) -> Self
10040 where
10041 T: std::convert::Into<wkt::Timestamp>,
10042 {
10043 self.create_time = std::option::Option::Some(v.into());
10044 self
10045 }
10046
10047 /// Sets or clears the value of [create_time][crate::model::DbSystem::create_time].
10048 ///
10049 /// # Example
10050 /// ```ignore,no_run
10051 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
10052 /// use wkt::Timestamp;
10053 /// let x = DbSystem::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
10054 /// let x = DbSystem::new().set_or_clear_create_time(None::<Timestamp>);
10055 /// ```
10056 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10057 where
10058 T: std::convert::Into<wkt::Timestamp>,
10059 {
10060 self.create_time = v.map(|x| x.into());
10061 self
10062 }
10063
10064 /// Sets the value of [oci_url][crate::model::DbSystem::oci_url].
10065 ///
10066 /// # Example
10067 /// ```ignore,no_run
10068 /// # use google_cloud_oracledatabase_v1::model::DbSystem;
10069 /// let x = DbSystem::new().set_oci_url("example");
10070 /// ```
10071 pub fn set_oci_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10072 self.oci_url = v.into();
10073 self
10074 }
10075}
10076
10077impl wkt::message::Message for DbSystem {
10078 fn typename() -> &'static str {
10079 "type.googleapis.com/google.cloud.oracledatabase.v1.DbSystem"
10080 }
10081}
10082
10083/// The properties of a DbSystem.
10084#[derive(Clone, Default, PartialEq)]
10085#[non_exhaustive]
10086pub struct DbSystemProperties {
10087 /// Required. Shape of DB System.
10088 pub shape: std::string::String,
10089
10090 /// Required. The number of CPU cores to enable for the DbSystem.
10091 pub compute_count: i32,
10092
10093 /// Required. The initial data storage size in GB.
10094 pub initial_data_storage_size_gb: i32,
10095
10096 /// Required. The database edition of the DbSystem.
10097 pub database_edition: crate::model::db_system_properties::DbSystemDatabaseEdition,
10098
10099 /// Required. The license model of the DbSystem.
10100 pub license_model: crate::model::db_system_properties::LicenseModel,
10101
10102 /// Required. SSH public keys to be stored with the DbSystem.
10103 pub ssh_public_keys: std::vec::Vec<std::string::String>,
10104
10105 /// Optional. Prefix for DB System host names.
10106 pub hostname_prefix: std::string::String,
10107
10108 /// Output only. The hostname of the DbSystem.
10109 pub hostname: std::string::String,
10110
10111 /// Optional. The private IP address of the DbSystem.
10112 pub private_ip: std::string::String,
10113
10114 /// Optional. Data collection options for diagnostics.
10115 pub data_collection_options: std::option::Option<crate::model::DataCollectionOptionsDbSystem>,
10116
10117 /// Optional. Time zone of the DbSystem.
10118 pub time_zone: std::option::Option<google_cloud_type::model::TimeZone>,
10119
10120 /// Output only. State of the DbSystem.
10121 pub lifecycle_state: crate::model::db_system_properties::DbSystemLifecycleState,
10122
10123 /// Optional. Details for creating a Database Home.
10124 pub db_home: std::option::Option<crate::model::DbHome>,
10125
10126 /// Output only. OCID of the DbSystem.
10127 pub ocid: std::string::String,
10128
10129 /// Optional. The memory size in GB.
10130 pub memory_size_gb: i32,
10131
10132 /// Optional. The compute model of the DbSystem.
10133 pub compute_model: crate::model::db_system_properties::ComputeModel,
10134
10135 /// Optional. The data storage size in GB that is currently available to
10136 /// DbSystems.
10137 pub data_storage_size_gb: i32,
10138
10139 /// Optional. The reco/redo storage size in GB.
10140 pub reco_storage_size_gb: i32,
10141
10142 /// Optional. The host domain name of the DbSystem.
10143 pub domain: std::string::String,
10144
10145 /// Optional. The number of nodes in the DbSystem.
10146 pub node_count: i32,
10147
10148 /// Optional. The options for the DbSystem.
10149 pub db_system_options: std::option::Option<crate::model::DbSystemOptions>,
10150
10151 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10152}
10153
10154impl DbSystemProperties {
10155 pub fn new() -> Self {
10156 std::default::Default::default()
10157 }
10158
10159 /// Sets the value of [shape][crate::model::DbSystemProperties::shape].
10160 ///
10161 /// # Example
10162 /// ```ignore,no_run
10163 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10164 /// let x = DbSystemProperties::new().set_shape("example");
10165 /// ```
10166 pub fn set_shape<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10167 self.shape = v.into();
10168 self
10169 }
10170
10171 /// Sets the value of [compute_count][crate::model::DbSystemProperties::compute_count].
10172 ///
10173 /// # Example
10174 /// ```ignore,no_run
10175 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10176 /// let x = DbSystemProperties::new().set_compute_count(42);
10177 /// ```
10178 pub fn set_compute_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10179 self.compute_count = v.into();
10180 self
10181 }
10182
10183 /// Sets the value of [initial_data_storage_size_gb][crate::model::DbSystemProperties::initial_data_storage_size_gb].
10184 ///
10185 /// # Example
10186 /// ```ignore,no_run
10187 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10188 /// let x = DbSystemProperties::new().set_initial_data_storage_size_gb(42);
10189 /// ```
10190 pub fn set_initial_data_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10191 self.initial_data_storage_size_gb = v.into();
10192 self
10193 }
10194
10195 /// Sets the value of [database_edition][crate::model::DbSystemProperties::database_edition].
10196 ///
10197 /// # Example
10198 /// ```ignore,no_run
10199 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10200 /// use google_cloud_oracledatabase_v1::model::db_system_properties::DbSystemDatabaseEdition;
10201 /// let x0 = DbSystemProperties::new().set_database_edition(DbSystemDatabaseEdition::StandardEdition);
10202 /// let x1 = DbSystemProperties::new().set_database_edition(DbSystemDatabaseEdition::EnterpriseEdition);
10203 /// let x2 = DbSystemProperties::new().set_database_edition(DbSystemDatabaseEdition::EnterpriseEditionHighPerformance);
10204 /// ```
10205 pub fn set_database_edition<
10206 T: std::convert::Into<crate::model::db_system_properties::DbSystemDatabaseEdition>,
10207 >(
10208 mut self,
10209 v: T,
10210 ) -> Self {
10211 self.database_edition = v.into();
10212 self
10213 }
10214
10215 /// Sets the value of [license_model][crate::model::DbSystemProperties::license_model].
10216 ///
10217 /// # Example
10218 /// ```ignore,no_run
10219 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10220 /// use google_cloud_oracledatabase_v1::model::db_system_properties::LicenseModel;
10221 /// let x0 = DbSystemProperties::new().set_license_model(LicenseModel::LicenseIncluded);
10222 /// let x1 = DbSystemProperties::new().set_license_model(LicenseModel::BringYourOwnLicense);
10223 /// ```
10224 pub fn set_license_model<
10225 T: std::convert::Into<crate::model::db_system_properties::LicenseModel>,
10226 >(
10227 mut self,
10228 v: T,
10229 ) -> Self {
10230 self.license_model = v.into();
10231 self
10232 }
10233
10234 /// Sets the value of [ssh_public_keys][crate::model::DbSystemProperties::ssh_public_keys].
10235 ///
10236 /// # Example
10237 /// ```ignore,no_run
10238 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10239 /// let x = DbSystemProperties::new().set_ssh_public_keys(["a", "b", "c"]);
10240 /// ```
10241 pub fn set_ssh_public_keys<T, V>(mut self, v: T) -> Self
10242 where
10243 T: std::iter::IntoIterator<Item = V>,
10244 V: std::convert::Into<std::string::String>,
10245 {
10246 use std::iter::Iterator;
10247 self.ssh_public_keys = v.into_iter().map(|i| i.into()).collect();
10248 self
10249 }
10250
10251 /// Sets the value of [hostname_prefix][crate::model::DbSystemProperties::hostname_prefix].
10252 ///
10253 /// # Example
10254 /// ```ignore,no_run
10255 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10256 /// let x = DbSystemProperties::new().set_hostname_prefix("example");
10257 /// ```
10258 pub fn set_hostname_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10259 self.hostname_prefix = v.into();
10260 self
10261 }
10262
10263 /// Sets the value of [hostname][crate::model::DbSystemProperties::hostname].
10264 ///
10265 /// # Example
10266 /// ```ignore,no_run
10267 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10268 /// let x = DbSystemProperties::new().set_hostname("example");
10269 /// ```
10270 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10271 self.hostname = v.into();
10272 self
10273 }
10274
10275 /// Sets the value of [private_ip][crate::model::DbSystemProperties::private_ip].
10276 ///
10277 /// # Example
10278 /// ```ignore,no_run
10279 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10280 /// let x = DbSystemProperties::new().set_private_ip("example");
10281 /// ```
10282 pub fn set_private_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10283 self.private_ip = v.into();
10284 self
10285 }
10286
10287 /// Sets the value of [data_collection_options][crate::model::DbSystemProperties::data_collection_options].
10288 ///
10289 /// # Example
10290 /// ```ignore,no_run
10291 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10292 /// use google_cloud_oracledatabase_v1::model::DataCollectionOptionsDbSystem;
10293 /// let x = DbSystemProperties::new().set_data_collection_options(DataCollectionOptionsDbSystem::default()/* use setters */);
10294 /// ```
10295 pub fn set_data_collection_options<T>(mut self, v: T) -> Self
10296 where
10297 T: std::convert::Into<crate::model::DataCollectionOptionsDbSystem>,
10298 {
10299 self.data_collection_options = std::option::Option::Some(v.into());
10300 self
10301 }
10302
10303 /// Sets or clears the value of [data_collection_options][crate::model::DbSystemProperties::data_collection_options].
10304 ///
10305 /// # Example
10306 /// ```ignore,no_run
10307 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10308 /// use google_cloud_oracledatabase_v1::model::DataCollectionOptionsDbSystem;
10309 /// let x = DbSystemProperties::new().set_or_clear_data_collection_options(Some(DataCollectionOptionsDbSystem::default()/* use setters */));
10310 /// let x = DbSystemProperties::new().set_or_clear_data_collection_options(None::<DataCollectionOptionsDbSystem>);
10311 /// ```
10312 pub fn set_or_clear_data_collection_options<T>(mut self, v: std::option::Option<T>) -> Self
10313 where
10314 T: std::convert::Into<crate::model::DataCollectionOptionsDbSystem>,
10315 {
10316 self.data_collection_options = v.map(|x| x.into());
10317 self
10318 }
10319
10320 /// Sets the value of [time_zone][crate::model::DbSystemProperties::time_zone].
10321 ///
10322 /// # Example
10323 /// ```ignore,no_run
10324 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10325 /// use google_cloud_type::model::TimeZone;
10326 /// let x = DbSystemProperties::new().set_time_zone(TimeZone::default()/* use setters */);
10327 /// ```
10328 pub fn set_time_zone<T>(mut self, v: T) -> Self
10329 where
10330 T: std::convert::Into<google_cloud_type::model::TimeZone>,
10331 {
10332 self.time_zone = std::option::Option::Some(v.into());
10333 self
10334 }
10335
10336 /// Sets or clears the value of [time_zone][crate::model::DbSystemProperties::time_zone].
10337 ///
10338 /// # Example
10339 /// ```ignore,no_run
10340 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10341 /// use google_cloud_type::model::TimeZone;
10342 /// let x = DbSystemProperties::new().set_or_clear_time_zone(Some(TimeZone::default()/* use setters */));
10343 /// let x = DbSystemProperties::new().set_or_clear_time_zone(None::<TimeZone>);
10344 /// ```
10345 pub fn set_or_clear_time_zone<T>(mut self, v: std::option::Option<T>) -> Self
10346 where
10347 T: std::convert::Into<google_cloud_type::model::TimeZone>,
10348 {
10349 self.time_zone = v.map(|x| x.into());
10350 self
10351 }
10352
10353 /// Sets the value of [lifecycle_state][crate::model::DbSystemProperties::lifecycle_state].
10354 ///
10355 /// # Example
10356 /// ```ignore,no_run
10357 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10358 /// use google_cloud_oracledatabase_v1::model::db_system_properties::DbSystemLifecycleState;
10359 /// let x0 = DbSystemProperties::new().set_lifecycle_state(DbSystemLifecycleState::Provisioning);
10360 /// let x1 = DbSystemProperties::new().set_lifecycle_state(DbSystemLifecycleState::Available);
10361 /// let x2 = DbSystemProperties::new().set_lifecycle_state(DbSystemLifecycleState::Updating);
10362 /// ```
10363 pub fn set_lifecycle_state<
10364 T: std::convert::Into<crate::model::db_system_properties::DbSystemLifecycleState>,
10365 >(
10366 mut self,
10367 v: T,
10368 ) -> Self {
10369 self.lifecycle_state = v.into();
10370 self
10371 }
10372
10373 /// Sets the value of [db_home][crate::model::DbSystemProperties::db_home].
10374 ///
10375 /// # Example
10376 /// ```ignore,no_run
10377 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10378 /// use google_cloud_oracledatabase_v1::model::DbHome;
10379 /// let x = DbSystemProperties::new().set_db_home(DbHome::default()/* use setters */);
10380 /// ```
10381 pub fn set_db_home<T>(mut self, v: T) -> Self
10382 where
10383 T: std::convert::Into<crate::model::DbHome>,
10384 {
10385 self.db_home = std::option::Option::Some(v.into());
10386 self
10387 }
10388
10389 /// Sets or clears the value of [db_home][crate::model::DbSystemProperties::db_home].
10390 ///
10391 /// # Example
10392 /// ```ignore,no_run
10393 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10394 /// use google_cloud_oracledatabase_v1::model::DbHome;
10395 /// let x = DbSystemProperties::new().set_or_clear_db_home(Some(DbHome::default()/* use setters */));
10396 /// let x = DbSystemProperties::new().set_or_clear_db_home(None::<DbHome>);
10397 /// ```
10398 pub fn set_or_clear_db_home<T>(mut self, v: std::option::Option<T>) -> Self
10399 where
10400 T: std::convert::Into<crate::model::DbHome>,
10401 {
10402 self.db_home = v.map(|x| x.into());
10403 self
10404 }
10405
10406 /// Sets the value of [ocid][crate::model::DbSystemProperties::ocid].
10407 ///
10408 /// # Example
10409 /// ```ignore,no_run
10410 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10411 /// let x = DbSystemProperties::new().set_ocid("example");
10412 /// ```
10413 pub fn set_ocid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10414 self.ocid = v.into();
10415 self
10416 }
10417
10418 /// Sets the value of [memory_size_gb][crate::model::DbSystemProperties::memory_size_gb].
10419 ///
10420 /// # Example
10421 /// ```ignore,no_run
10422 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10423 /// let x = DbSystemProperties::new().set_memory_size_gb(42);
10424 /// ```
10425 pub fn set_memory_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10426 self.memory_size_gb = v.into();
10427 self
10428 }
10429
10430 /// Sets the value of [compute_model][crate::model::DbSystemProperties::compute_model].
10431 ///
10432 /// # Example
10433 /// ```ignore,no_run
10434 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10435 /// use google_cloud_oracledatabase_v1::model::db_system_properties::ComputeModel;
10436 /// let x0 = DbSystemProperties::new().set_compute_model(ComputeModel::Ecpu);
10437 /// let x1 = DbSystemProperties::new().set_compute_model(ComputeModel::Ocpu);
10438 /// ```
10439 pub fn set_compute_model<
10440 T: std::convert::Into<crate::model::db_system_properties::ComputeModel>,
10441 >(
10442 mut self,
10443 v: T,
10444 ) -> Self {
10445 self.compute_model = v.into();
10446 self
10447 }
10448
10449 /// Sets the value of [data_storage_size_gb][crate::model::DbSystemProperties::data_storage_size_gb].
10450 ///
10451 /// # Example
10452 /// ```ignore,no_run
10453 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10454 /// let x = DbSystemProperties::new().set_data_storage_size_gb(42);
10455 /// ```
10456 pub fn set_data_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10457 self.data_storage_size_gb = v.into();
10458 self
10459 }
10460
10461 /// Sets the value of [reco_storage_size_gb][crate::model::DbSystemProperties::reco_storage_size_gb].
10462 ///
10463 /// # Example
10464 /// ```ignore,no_run
10465 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10466 /// let x = DbSystemProperties::new().set_reco_storage_size_gb(42);
10467 /// ```
10468 pub fn set_reco_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10469 self.reco_storage_size_gb = v.into();
10470 self
10471 }
10472
10473 /// Sets the value of [domain][crate::model::DbSystemProperties::domain].
10474 ///
10475 /// # Example
10476 /// ```ignore,no_run
10477 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10478 /// let x = DbSystemProperties::new().set_domain("example");
10479 /// ```
10480 pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10481 self.domain = v.into();
10482 self
10483 }
10484
10485 /// Sets the value of [node_count][crate::model::DbSystemProperties::node_count].
10486 ///
10487 /// # Example
10488 /// ```ignore,no_run
10489 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10490 /// let x = DbSystemProperties::new().set_node_count(42);
10491 /// ```
10492 pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10493 self.node_count = v.into();
10494 self
10495 }
10496
10497 /// Sets the value of [db_system_options][crate::model::DbSystemProperties::db_system_options].
10498 ///
10499 /// # Example
10500 /// ```ignore,no_run
10501 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10502 /// use google_cloud_oracledatabase_v1::model::DbSystemOptions;
10503 /// let x = DbSystemProperties::new().set_db_system_options(DbSystemOptions::default()/* use setters */);
10504 /// ```
10505 pub fn set_db_system_options<T>(mut self, v: T) -> Self
10506 where
10507 T: std::convert::Into<crate::model::DbSystemOptions>,
10508 {
10509 self.db_system_options = std::option::Option::Some(v.into());
10510 self
10511 }
10512
10513 /// Sets or clears the value of [db_system_options][crate::model::DbSystemProperties::db_system_options].
10514 ///
10515 /// # Example
10516 /// ```ignore,no_run
10517 /// # use google_cloud_oracledatabase_v1::model::DbSystemProperties;
10518 /// use google_cloud_oracledatabase_v1::model::DbSystemOptions;
10519 /// let x = DbSystemProperties::new().set_or_clear_db_system_options(Some(DbSystemOptions::default()/* use setters */));
10520 /// let x = DbSystemProperties::new().set_or_clear_db_system_options(None::<DbSystemOptions>);
10521 /// ```
10522 pub fn set_or_clear_db_system_options<T>(mut self, v: std::option::Option<T>) -> Self
10523 where
10524 T: std::convert::Into<crate::model::DbSystemOptions>,
10525 {
10526 self.db_system_options = v.map(|x| x.into());
10527 self
10528 }
10529}
10530
10531impl wkt::message::Message for DbSystemProperties {
10532 fn typename() -> &'static str {
10533 "type.googleapis.com/google.cloud.oracledatabase.v1.DbSystemProperties"
10534 }
10535}
10536
10537/// Defines additional types related to [DbSystemProperties].
10538pub mod db_system_properties {
10539 #[allow(unused_imports)]
10540 use super::*;
10541
10542 /// The editions available for DbSystem.
10543 ///
10544 /// # Working with unknown values
10545 ///
10546 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10547 /// additional enum variants at any time. Adding new variants is not considered
10548 /// a breaking change. Applications should write their code in anticipation of:
10549 ///
10550 /// - New values appearing in future releases of the client library, **and**
10551 /// - New values received dynamically, without application changes.
10552 ///
10553 /// Please consult the [Working with enums] section in the user guide for some
10554 /// guidelines.
10555 ///
10556 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10557 #[derive(Clone, Debug, PartialEq)]
10558 #[non_exhaustive]
10559 pub enum DbSystemDatabaseEdition {
10560 /// The database edition is unspecified.
10561 Unspecified,
10562 /// The database edition is Standard.
10563 StandardEdition,
10564 /// The database edition is Enterprise.
10565 EnterpriseEdition,
10566 /// The database edition is Enterprise Edition.
10567 EnterpriseEditionHighPerformance,
10568 /// If set, the enum was initialized with an unknown value.
10569 ///
10570 /// Applications can examine the value using [DbSystemDatabaseEdition::value] or
10571 /// [DbSystemDatabaseEdition::name].
10572 UnknownValue(db_system_database_edition::UnknownValue),
10573 }
10574
10575 #[doc(hidden)]
10576 pub mod db_system_database_edition {
10577 #[allow(unused_imports)]
10578 use super::*;
10579 #[derive(Clone, Debug, PartialEq)]
10580 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10581 }
10582
10583 impl DbSystemDatabaseEdition {
10584 /// Gets the enum value.
10585 ///
10586 /// Returns `None` if the enum contains an unknown value deserialized from
10587 /// the string representation of enums.
10588 pub fn value(&self) -> std::option::Option<i32> {
10589 match self {
10590 Self::Unspecified => std::option::Option::Some(0),
10591 Self::StandardEdition => std::option::Option::Some(1),
10592 Self::EnterpriseEdition => std::option::Option::Some(2),
10593 Self::EnterpriseEditionHighPerformance => std::option::Option::Some(3),
10594 Self::UnknownValue(u) => u.0.value(),
10595 }
10596 }
10597
10598 /// Gets the enum value as a string.
10599 ///
10600 /// Returns `None` if the enum contains an unknown value deserialized from
10601 /// the integer representation of enums.
10602 pub fn name(&self) -> std::option::Option<&str> {
10603 match self {
10604 Self::Unspecified => {
10605 std::option::Option::Some("DB_SYSTEM_DATABASE_EDITION_UNSPECIFIED")
10606 }
10607 Self::StandardEdition => std::option::Option::Some("STANDARD_EDITION"),
10608 Self::EnterpriseEdition => std::option::Option::Some("ENTERPRISE_EDITION"),
10609 Self::EnterpriseEditionHighPerformance => {
10610 std::option::Option::Some("ENTERPRISE_EDITION_HIGH_PERFORMANCE")
10611 }
10612 Self::UnknownValue(u) => u.0.name(),
10613 }
10614 }
10615 }
10616
10617 impl std::default::Default for DbSystemDatabaseEdition {
10618 fn default() -> Self {
10619 use std::convert::From;
10620 Self::from(0)
10621 }
10622 }
10623
10624 impl std::fmt::Display for DbSystemDatabaseEdition {
10625 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10626 wkt::internal::display_enum(f, self.name(), self.value())
10627 }
10628 }
10629
10630 impl std::convert::From<i32> for DbSystemDatabaseEdition {
10631 fn from(value: i32) -> Self {
10632 match value {
10633 0 => Self::Unspecified,
10634 1 => Self::StandardEdition,
10635 2 => Self::EnterpriseEdition,
10636 3 => Self::EnterpriseEditionHighPerformance,
10637 _ => Self::UnknownValue(db_system_database_edition::UnknownValue(
10638 wkt::internal::UnknownEnumValue::Integer(value),
10639 )),
10640 }
10641 }
10642 }
10643
10644 impl std::convert::From<&str> for DbSystemDatabaseEdition {
10645 fn from(value: &str) -> Self {
10646 use std::string::ToString;
10647 match value {
10648 "DB_SYSTEM_DATABASE_EDITION_UNSPECIFIED" => Self::Unspecified,
10649 "STANDARD_EDITION" => Self::StandardEdition,
10650 "ENTERPRISE_EDITION" => Self::EnterpriseEdition,
10651 "ENTERPRISE_EDITION_HIGH_PERFORMANCE" => Self::EnterpriseEditionHighPerformance,
10652 _ => Self::UnknownValue(db_system_database_edition::UnknownValue(
10653 wkt::internal::UnknownEnumValue::String(value.to_string()),
10654 )),
10655 }
10656 }
10657 }
10658
10659 impl serde::ser::Serialize for DbSystemDatabaseEdition {
10660 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10661 where
10662 S: serde::Serializer,
10663 {
10664 match self {
10665 Self::Unspecified => serializer.serialize_i32(0),
10666 Self::StandardEdition => serializer.serialize_i32(1),
10667 Self::EnterpriseEdition => serializer.serialize_i32(2),
10668 Self::EnterpriseEditionHighPerformance => serializer.serialize_i32(3),
10669 Self::UnknownValue(u) => u.0.serialize(serializer),
10670 }
10671 }
10672 }
10673
10674 impl<'de> serde::de::Deserialize<'de> for DbSystemDatabaseEdition {
10675 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10676 where
10677 D: serde::Deserializer<'de>,
10678 {
10679 deserializer.deserialize_any(
10680 wkt::internal::EnumVisitor::<DbSystemDatabaseEdition>::new(
10681 ".google.cloud.oracledatabase.v1.DbSystemProperties.DbSystemDatabaseEdition",
10682 ),
10683 )
10684 }
10685 }
10686
10687 /// The license model of the DbSystem.
10688 ///
10689 /// # Working with unknown values
10690 ///
10691 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10692 /// additional enum variants at any time. Adding new variants is not considered
10693 /// a breaking change. Applications should write their code in anticipation of:
10694 ///
10695 /// - New values appearing in future releases of the client library, **and**
10696 /// - New values received dynamically, without application changes.
10697 ///
10698 /// Please consult the [Working with enums] section in the user guide for some
10699 /// guidelines.
10700 ///
10701 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10702 #[derive(Clone, Debug, PartialEq)]
10703 #[non_exhaustive]
10704 pub enum LicenseModel {
10705 /// The license model is unspecified.
10706 Unspecified,
10707 /// The license model is included.
10708 LicenseIncluded,
10709 /// The license model is bring your own license.
10710 BringYourOwnLicense,
10711 /// If set, the enum was initialized with an unknown value.
10712 ///
10713 /// Applications can examine the value using [LicenseModel::value] or
10714 /// [LicenseModel::name].
10715 UnknownValue(license_model::UnknownValue),
10716 }
10717
10718 #[doc(hidden)]
10719 pub mod license_model {
10720 #[allow(unused_imports)]
10721 use super::*;
10722 #[derive(Clone, Debug, PartialEq)]
10723 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10724 }
10725
10726 impl LicenseModel {
10727 /// Gets the enum value.
10728 ///
10729 /// Returns `None` if the enum contains an unknown value deserialized from
10730 /// the string representation of enums.
10731 pub fn value(&self) -> std::option::Option<i32> {
10732 match self {
10733 Self::Unspecified => std::option::Option::Some(0),
10734 Self::LicenseIncluded => std::option::Option::Some(1),
10735 Self::BringYourOwnLicense => std::option::Option::Some(2),
10736 Self::UnknownValue(u) => u.0.value(),
10737 }
10738 }
10739
10740 /// Gets the enum value as a string.
10741 ///
10742 /// Returns `None` if the enum contains an unknown value deserialized from
10743 /// the integer representation of enums.
10744 pub fn name(&self) -> std::option::Option<&str> {
10745 match self {
10746 Self::Unspecified => std::option::Option::Some("LICENSE_MODEL_UNSPECIFIED"),
10747 Self::LicenseIncluded => std::option::Option::Some("LICENSE_INCLUDED"),
10748 Self::BringYourOwnLicense => std::option::Option::Some("BRING_YOUR_OWN_LICENSE"),
10749 Self::UnknownValue(u) => u.0.name(),
10750 }
10751 }
10752 }
10753
10754 impl std::default::Default for LicenseModel {
10755 fn default() -> Self {
10756 use std::convert::From;
10757 Self::from(0)
10758 }
10759 }
10760
10761 impl std::fmt::Display for LicenseModel {
10762 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10763 wkt::internal::display_enum(f, self.name(), self.value())
10764 }
10765 }
10766
10767 impl std::convert::From<i32> for LicenseModel {
10768 fn from(value: i32) -> Self {
10769 match value {
10770 0 => Self::Unspecified,
10771 1 => Self::LicenseIncluded,
10772 2 => Self::BringYourOwnLicense,
10773 _ => Self::UnknownValue(license_model::UnknownValue(
10774 wkt::internal::UnknownEnumValue::Integer(value),
10775 )),
10776 }
10777 }
10778 }
10779
10780 impl std::convert::From<&str> for LicenseModel {
10781 fn from(value: &str) -> Self {
10782 use std::string::ToString;
10783 match value {
10784 "LICENSE_MODEL_UNSPECIFIED" => Self::Unspecified,
10785 "LICENSE_INCLUDED" => Self::LicenseIncluded,
10786 "BRING_YOUR_OWN_LICENSE" => Self::BringYourOwnLicense,
10787 _ => Self::UnknownValue(license_model::UnknownValue(
10788 wkt::internal::UnknownEnumValue::String(value.to_string()),
10789 )),
10790 }
10791 }
10792 }
10793
10794 impl serde::ser::Serialize for LicenseModel {
10795 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10796 where
10797 S: serde::Serializer,
10798 {
10799 match self {
10800 Self::Unspecified => serializer.serialize_i32(0),
10801 Self::LicenseIncluded => serializer.serialize_i32(1),
10802 Self::BringYourOwnLicense => serializer.serialize_i32(2),
10803 Self::UnknownValue(u) => u.0.serialize(serializer),
10804 }
10805 }
10806 }
10807
10808 impl<'de> serde::de::Deserialize<'de> for LicenseModel {
10809 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10810 where
10811 D: serde::Deserializer<'de>,
10812 {
10813 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LicenseModel>::new(
10814 ".google.cloud.oracledatabase.v1.DbSystemProperties.LicenseModel",
10815 ))
10816 }
10817 }
10818
10819 /// The various lifecycle states of the DbSystem.
10820 ///
10821 /// # Working with unknown values
10822 ///
10823 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10824 /// additional enum variants at any time. Adding new variants is not considered
10825 /// a breaking change. Applications should write their code in anticipation of:
10826 ///
10827 /// - New values appearing in future releases of the client library, **and**
10828 /// - New values received dynamically, without application changes.
10829 ///
10830 /// Please consult the [Working with enums] section in the user guide for some
10831 /// guidelines.
10832 ///
10833 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10834 #[derive(Clone, Debug, PartialEq)]
10835 #[non_exhaustive]
10836 pub enum DbSystemLifecycleState {
10837 /// Default unspecified value.
10838 Unspecified,
10839 /// Indicates that the resource is in provisioning state.
10840 Provisioning,
10841 /// Indicates that the resource is in available state.
10842 Available,
10843 /// Indicates that the resource is in updating state.
10844 Updating,
10845 /// Indicates that the resource is in terminating state.
10846 Terminating,
10847 /// Indicates that the resource is in terminated state.
10848 Terminated,
10849 /// Indicates that the resource is in failed state.
10850 Failed,
10851 /// Indicates that the resource has been migrated.
10852 Migrated,
10853 /// Indicates that the resource is in maintenance in progress state.
10854 MaintenanceInProgress,
10855 /// Indicates that the resource needs attention.
10856 NeedsAttention,
10857 /// Indicates that the resource is upgrading.
10858 Upgrading,
10859 /// If set, the enum was initialized with an unknown value.
10860 ///
10861 /// Applications can examine the value using [DbSystemLifecycleState::value] or
10862 /// [DbSystemLifecycleState::name].
10863 UnknownValue(db_system_lifecycle_state::UnknownValue),
10864 }
10865
10866 #[doc(hidden)]
10867 pub mod db_system_lifecycle_state {
10868 #[allow(unused_imports)]
10869 use super::*;
10870 #[derive(Clone, Debug, PartialEq)]
10871 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10872 }
10873
10874 impl DbSystemLifecycleState {
10875 /// Gets the enum value.
10876 ///
10877 /// Returns `None` if the enum contains an unknown value deserialized from
10878 /// the string representation of enums.
10879 pub fn value(&self) -> std::option::Option<i32> {
10880 match self {
10881 Self::Unspecified => std::option::Option::Some(0),
10882 Self::Provisioning => std::option::Option::Some(1),
10883 Self::Available => std::option::Option::Some(2),
10884 Self::Updating => std::option::Option::Some(3),
10885 Self::Terminating => std::option::Option::Some(4),
10886 Self::Terminated => std::option::Option::Some(5),
10887 Self::Failed => std::option::Option::Some(6),
10888 Self::Migrated => std::option::Option::Some(7),
10889 Self::MaintenanceInProgress => std::option::Option::Some(8),
10890 Self::NeedsAttention => std::option::Option::Some(9),
10891 Self::Upgrading => std::option::Option::Some(10),
10892 Self::UnknownValue(u) => u.0.value(),
10893 }
10894 }
10895
10896 /// Gets the enum value as a string.
10897 ///
10898 /// Returns `None` if the enum contains an unknown value deserialized from
10899 /// the integer representation of enums.
10900 pub fn name(&self) -> std::option::Option<&str> {
10901 match self {
10902 Self::Unspecified => {
10903 std::option::Option::Some("DB_SYSTEM_LIFECYCLE_STATE_UNSPECIFIED")
10904 }
10905 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
10906 Self::Available => std::option::Option::Some("AVAILABLE"),
10907 Self::Updating => std::option::Option::Some("UPDATING"),
10908 Self::Terminating => std::option::Option::Some("TERMINATING"),
10909 Self::Terminated => std::option::Option::Some("TERMINATED"),
10910 Self::Failed => std::option::Option::Some("FAILED"),
10911 Self::Migrated => std::option::Option::Some("MIGRATED"),
10912 Self::MaintenanceInProgress => std::option::Option::Some("MAINTENANCE_IN_PROGRESS"),
10913 Self::NeedsAttention => std::option::Option::Some("NEEDS_ATTENTION"),
10914 Self::Upgrading => std::option::Option::Some("UPGRADING"),
10915 Self::UnknownValue(u) => u.0.name(),
10916 }
10917 }
10918 }
10919
10920 impl std::default::Default for DbSystemLifecycleState {
10921 fn default() -> Self {
10922 use std::convert::From;
10923 Self::from(0)
10924 }
10925 }
10926
10927 impl std::fmt::Display for DbSystemLifecycleState {
10928 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10929 wkt::internal::display_enum(f, self.name(), self.value())
10930 }
10931 }
10932
10933 impl std::convert::From<i32> for DbSystemLifecycleState {
10934 fn from(value: i32) -> Self {
10935 match value {
10936 0 => Self::Unspecified,
10937 1 => Self::Provisioning,
10938 2 => Self::Available,
10939 3 => Self::Updating,
10940 4 => Self::Terminating,
10941 5 => Self::Terminated,
10942 6 => Self::Failed,
10943 7 => Self::Migrated,
10944 8 => Self::MaintenanceInProgress,
10945 9 => Self::NeedsAttention,
10946 10 => Self::Upgrading,
10947 _ => Self::UnknownValue(db_system_lifecycle_state::UnknownValue(
10948 wkt::internal::UnknownEnumValue::Integer(value),
10949 )),
10950 }
10951 }
10952 }
10953
10954 impl std::convert::From<&str> for DbSystemLifecycleState {
10955 fn from(value: &str) -> Self {
10956 use std::string::ToString;
10957 match value {
10958 "DB_SYSTEM_LIFECYCLE_STATE_UNSPECIFIED" => Self::Unspecified,
10959 "PROVISIONING" => Self::Provisioning,
10960 "AVAILABLE" => Self::Available,
10961 "UPDATING" => Self::Updating,
10962 "TERMINATING" => Self::Terminating,
10963 "TERMINATED" => Self::Terminated,
10964 "FAILED" => Self::Failed,
10965 "MIGRATED" => Self::Migrated,
10966 "MAINTENANCE_IN_PROGRESS" => Self::MaintenanceInProgress,
10967 "NEEDS_ATTENTION" => Self::NeedsAttention,
10968 "UPGRADING" => Self::Upgrading,
10969 _ => Self::UnknownValue(db_system_lifecycle_state::UnknownValue(
10970 wkt::internal::UnknownEnumValue::String(value.to_string()),
10971 )),
10972 }
10973 }
10974 }
10975
10976 impl serde::ser::Serialize for DbSystemLifecycleState {
10977 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10978 where
10979 S: serde::Serializer,
10980 {
10981 match self {
10982 Self::Unspecified => serializer.serialize_i32(0),
10983 Self::Provisioning => serializer.serialize_i32(1),
10984 Self::Available => serializer.serialize_i32(2),
10985 Self::Updating => serializer.serialize_i32(3),
10986 Self::Terminating => serializer.serialize_i32(4),
10987 Self::Terminated => serializer.serialize_i32(5),
10988 Self::Failed => serializer.serialize_i32(6),
10989 Self::Migrated => serializer.serialize_i32(7),
10990 Self::MaintenanceInProgress => serializer.serialize_i32(8),
10991 Self::NeedsAttention => serializer.serialize_i32(9),
10992 Self::Upgrading => serializer.serialize_i32(10),
10993 Self::UnknownValue(u) => u.0.serialize(serializer),
10994 }
10995 }
10996 }
10997
10998 impl<'de> serde::de::Deserialize<'de> for DbSystemLifecycleState {
10999 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11000 where
11001 D: serde::Deserializer<'de>,
11002 {
11003 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DbSystemLifecycleState>::new(
11004 ".google.cloud.oracledatabase.v1.DbSystemProperties.DbSystemLifecycleState",
11005 ))
11006 }
11007 }
11008
11009 /// The compute model of the DbSystem.
11010 ///
11011 /// # Working with unknown values
11012 ///
11013 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11014 /// additional enum variants at any time. Adding new variants is not considered
11015 /// a breaking change. Applications should write their code in anticipation of:
11016 ///
11017 /// - New values appearing in future releases of the client library, **and**
11018 /// - New values received dynamically, without application changes.
11019 ///
11020 /// Please consult the [Working with enums] section in the user guide for some
11021 /// guidelines.
11022 ///
11023 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11024 #[derive(Clone, Debug, PartialEq)]
11025 #[non_exhaustive]
11026 pub enum ComputeModel {
11027 /// The compute model is unspecified.
11028 Unspecified,
11029 /// The compute model is virtual.
11030 Ecpu,
11031 /// The compute model is physical.
11032 Ocpu,
11033 /// If set, the enum was initialized with an unknown value.
11034 ///
11035 /// Applications can examine the value using [ComputeModel::value] or
11036 /// [ComputeModel::name].
11037 UnknownValue(compute_model::UnknownValue),
11038 }
11039
11040 #[doc(hidden)]
11041 pub mod compute_model {
11042 #[allow(unused_imports)]
11043 use super::*;
11044 #[derive(Clone, Debug, PartialEq)]
11045 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11046 }
11047
11048 impl ComputeModel {
11049 /// Gets the enum value.
11050 ///
11051 /// Returns `None` if the enum contains an unknown value deserialized from
11052 /// the string representation of enums.
11053 pub fn value(&self) -> std::option::Option<i32> {
11054 match self {
11055 Self::Unspecified => std::option::Option::Some(0),
11056 Self::Ecpu => std::option::Option::Some(1),
11057 Self::Ocpu => std::option::Option::Some(2),
11058 Self::UnknownValue(u) => u.0.value(),
11059 }
11060 }
11061
11062 /// Gets the enum value as a string.
11063 ///
11064 /// Returns `None` if the enum contains an unknown value deserialized from
11065 /// the integer representation of enums.
11066 pub fn name(&self) -> std::option::Option<&str> {
11067 match self {
11068 Self::Unspecified => std::option::Option::Some("COMPUTE_MODEL_UNSPECIFIED"),
11069 Self::Ecpu => std::option::Option::Some("ECPU"),
11070 Self::Ocpu => std::option::Option::Some("OCPU"),
11071 Self::UnknownValue(u) => u.0.name(),
11072 }
11073 }
11074 }
11075
11076 impl std::default::Default for ComputeModel {
11077 fn default() -> Self {
11078 use std::convert::From;
11079 Self::from(0)
11080 }
11081 }
11082
11083 impl std::fmt::Display for ComputeModel {
11084 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11085 wkt::internal::display_enum(f, self.name(), self.value())
11086 }
11087 }
11088
11089 impl std::convert::From<i32> for ComputeModel {
11090 fn from(value: i32) -> Self {
11091 match value {
11092 0 => Self::Unspecified,
11093 1 => Self::Ecpu,
11094 2 => Self::Ocpu,
11095 _ => Self::UnknownValue(compute_model::UnknownValue(
11096 wkt::internal::UnknownEnumValue::Integer(value),
11097 )),
11098 }
11099 }
11100 }
11101
11102 impl std::convert::From<&str> for ComputeModel {
11103 fn from(value: &str) -> Self {
11104 use std::string::ToString;
11105 match value {
11106 "COMPUTE_MODEL_UNSPECIFIED" => Self::Unspecified,
11107 "ECPU" => Self::Ecpu,
11108 "OCPU" => Self::Ocpu,
11109 _ => Self::UnknownValue(compute_model::UnknownValue(
11110 wkt::internal::UnknownEnumValue::String(value.to_string()),
11111 )),
11112 }
11113 }
11114 }
11115
11116 impl serde::ser::Serialize for ComputeModel {
11117 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11118 where
11119 S: serde::Serializer,
11120 {
11121 match self {
11122 Self::Unspecified => serializer.serialize_i32(0),
11123 Self::Ecpu => serializer.serialize_i32(1),
11124 Self::Ocpu => serializer.serialize_i32(2),
11125 Self::UnknownValue(u) => u.0.serialize(serializer),
11126 }
11127 }
11128 }
11129
11130 impl<'de> serde::de::Deserialize<'de> for ComputeModel {
11131 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11132 where
11133 D: serde::Deserializer<'de>,
11134 {
11135 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComputeModel>::new(
11136 ".google.cloud.oracledatabase.v1.DbSystemProperties.ComputeModel",
11137 ))
11138 }
11139 }
11140}
11141
11142/// Data collection options for DbSystem.
11143#[derive(Clone, Default, PartialEq)]
11144#[non_exhaustive]
11145pub struct DataCollectionOptionsDbSystem {
11146 /// Optional. Indicates whether to enable data collection for diagnostics.
11147 pub is_diagnostics_events_enabled: bool,
11148
11149 /// Optional. Indicates whether to enable incident logs and trace collection.
11150 pub is_incident_logs_enabled: bool,
11151
11152 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11153}
11154
11155impl DataCollectionOptionsDbSystem {
11156 pub fn new() -> Self {
11157 std::default::Default::default()
11158 }
11159
11160 /// Sets the value of [is_diagnostics_events_enabled][crate::model::DataCollectionOptionsDbSystem::is_diagnostics_events_enabled].
11161 ///
11162 /// # Example
11163 /// ```ignore,no_run
11164 /// # use google_cloud_oracledatabase_v1::model::DataCollectionOptionsDbSystem;
11165 /// let x = DataCollectionOptionsDbSystem::new().set_is_diagnostics_events_enabled(true);
11166 /// ```
11167 pub fn set_is_diagnostics_events_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11168 self.is_diagnostics_events_enabled = v.into();
11169 self
11170 }
11171
11172 /// Sets the value of [is_incident_logs_enabled][crate::model::DataCollectionOptionsDbSystem::is_incident_logs_enabled].
11173 ///
11174 /// # Example
11175 /// ```ignore,no_run
11176 /// # use google_cloud_oracledatabase_v1::model::DataCollectionOptionsDbSystem;
11177 /// let x = DataCollectionOptionsDbSystem::new().set_is_incident_logs_enabled(true);
11178 /// ```
11179 pub fn set_is_incident_logs_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11180 self.is_incident_logs_enabled = v.into();
11181 self
11182 }
11183}
11184
11185impl wkt::message::Message for DataCollectionOptionsDbSystem {
11186 fn typename() -> &'static str {
11187 "type.googleapis.com/google.cloud.oracledatabase.v1.DataCollectionOptionsDbSystem"
11188 }
11189}
11190
11191/// Details of the DbSystem Options.
11192#[derive(Clone, Default, PartialEq)]
11193#[non_exhaustive]
11194pub struct DbSystemOptions {
11195 /// Optional. The storage option used in DB system.
11196 pub storage_management: crate::model::db_system_options::StorageManagement,
11197
11198 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11199}
11200
11201impl DbSystemOptions {
11202 pub fn new() -> Self {
11203 std::default::Default::default()
11204 }
11205
11206 /// Sets the value of [storage_management][crate::model::DbSystemOptions::storage_management].
11207 ///
11208 /// # Example
11209 /// ```ignore,no_run
11210 /// # use google_cloud_oracledatabase_v1::model::DbSystemOptions;
11211 /// use google_cloud_oracledatabase_v1::model::db_system_options::StorageManagement;
11212 /// let x0 = DbSystemOptions::new().set_storage_management(StorageManagement::Asm);
11213 /// let x1 = DbSystemOptions::new().set_storage_management(StorageManagement::Lvm);
11214 /// ```
11215 pub fn set_storage_management<
11216 T: std::convert::Into<crate::model::db_system_options::StorageManagement>,
11217 >(
11218 mut self,
11219 v: T,
11220 ) -> Self {
11221 self.storage_management = v.into();
11222 self
11223 }
11224}
11225
11226impl wkt::message::Message for DbSystemOptions {
11227 fn typename() -> &'static str {
11228 "type.googleapis.com/google.cloud.oracledatabase.v1.DbSystemOptions"
11229 }
11230}
11231
11232/// Defines additional types related to [DbSystemOptions].
11233pub mod db_system_options {
11234 #[allow(unused_imports)]
11235 use super::*;
11236
11237 /// The storage option used in DB system.
11238 ///
11239 /// # Working with unknown values
11240 ///
11241 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11242 /// additional enum variants at any time. Adding new variants is not considered
11243 /// a breaking change. Applications should write their code in anticipation of:
11244 ///
11245 /// - New values appearing in future releases of the client library, **and**
11246 /// - New values received dynamically, without application changes.
11247 ///
11248 /// Please consult the [Working with enums] section in the user guide for some
11249 /// guidelines.
11250 ///
11251 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11252 #[derive(Clone, Debug, PartialEq)]
11253 #[non_exhaustive]
11254 pub enum StorageManagement {
11255 /// The storage management is unspecified.
11256 Unspecified,
11257 /// Automatic storage management.
11258 Asm,
11259 /// Logical Volume management.
11260 Lvm,
11261 /// If set, the enum was initialized with an unknown value.
11262 ///
11263 /// Applications can examine the value using [StorageManagement::value] or
11264 /// [StorageManagement::name].
11265 UnknownValue(storage_management::UnknownValue),
11266 }
11267
11268 #[doc(hidden)]
11269 pub mod storage_management {
11270 #[allow(unused_imports)]
11271 use super::*;
11272 #[derive(Clone, Debug, PartialEq)]
11273 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11274 }
11275
11276 impl StorageManagement {
11277 /// Gets the enum value.
11278 ///
11279 /// Returns `None` if the enum contains an unknown value deserialized from
11280 /// the string representation of enums.
11281 pub fn value(&self) -> std::option::Option<i32> {
11282 match self {
11283 Self::Unspecified => std::option::Option::Some(0),
11284 Self::Asm => std::option::Option::Some(1),
11285 Self::Lvm => std::option::Option::Some(2),
11286 Self::UnknownValue(u) => u.0.value(),
11287 }
11288 }
11289
11290 /// Gets the enum value as a string.
11291 ///
11292 /// Returns `None` if the enum contains an unknown value deserialized from
11293 /// the integer representation of enums.
11294 pub fn name(&self) -> std::option::Option<&str> {
11295 match self {
11296 Self::Unspecified => std::option::Option::Some("STORAGE_MANAGEMENT_UNSPECIFIED"),
11297 Self::Asm => std::option::Option::Some("ASM"),
11298 Self::Lvm => std::option::Option::Some("LVM"),
11299 Self::UnknownValue(u) => u.0.name(),
11300 }
11301 }
11302 }
11303
11304 impl std::default::Default for StorageManagement {
11305 fn default() -> Self {
11306 use std::convert::From;
11307 Self::from(0)
11308 }
11309 }
11310
11311 impl std::fmt::Display for StorageManagement {
11312 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11313 wkt::internal::display_enum(f, self.name(), self.value())
11314 }
11315 }
11316
11317 impl std::convert::From<i32> for StorageManagement {
11318 fn from(value: i32) -> Self {
11319 match value {
11320 0 => Self::Unspecified,
11321 1 => Self::Asm,
11322 2 => Self::Lvm,
11323 _ => Self::UnknownValue(storage_management::UnknownValue(
11324 wkt::internal::UnknownEnumValue::Integer(value),
11325 )),
11326 }
11327 }
11328 }
11329
11330 impl std::convert::From<&str> for StorageManagement {
11331 fn from(value: &str) -> Self {
11332 use std::string::ToString;
11333 match value {
11334 "STORAGE_MANAGEMENT_UNSPECIFIED" => Self::Unspecified,
11335 "ASM" => Self::Asm,
11336 "LVM" => Self::Lvm,
11337 _ => Self::UnknownValue(storage_management::UnknownValue(
11338 wkt::internal::UnknownEnumValue::String(value.to_string()),
11339 )),
11340 }
11341 }
11342 }
11343
11344 impl serde::ser::Serialize for StorageManagement {
11345 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11346 where
11347 S: serde::Serializer,
11348 {
11349 match self {
11350 Self::Unspecified => serializer.serialize_i32(0),
11351 Self::Asm => serializer.serialize_i32(1),
11352 Self::Lvm => serializer.serialize_i32(2),
11353 Self::UnknownValue(u) => u.0.serialize(serializer),
11354 }
11355 }
11356 }
11357
11358 impl<'de> serde::de::Deserialize<'de> for StorageManagement {
11359 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11360 where
11361 D: serde::Deserializer<'de>,
11362 {
11363 deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageManagement>::new(
11364 ".google.cloud.oracledatabase.v1.DbSystemOptions.StorageManagement",
11365 ))
11366 }
11367 }
11368}
11369
11370/// Details of the Database Home resource.
11371#[derive(Clone, Default, PartialEq)]
11372#[non_exhaustive]
11373pub struct DbHome {
11374 /// Optional. The display name for the Database Home. The name does not have to
11375 /// be unique within your project.
11376 pub display_name: std::string::String,
11377
11378 /// Required. A valid Oracle Database version. For a list of supported
11379 /// versions, use the ListDbVersions operation.
11380 pub db_version: std::string::String,
11381
11382 /// Required. The Database resource.
11383 pub database: std::option::Option<crate::model::Database>,
11384
11385 /// Optional. Whether unified auditing is enabled for the Database Home.
11386 pub is_unified_auditing_enabled: bool,
11387
11388 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11389}
11390
11391impl DbHome {
11392 pub fn new() -> Self {
11393 std::default::Default::default()
11394 }
11395
11396 /// Sets the value of [display_name][crate::model::DbHome::display_name].
11397 ///
11398 /// # Example
11399 /// ```ignore,no_run
11400 /// # use google_cloud_oracledatabase_v1::model::DbHome;
11401 /// let x = DbHome::new().set_display_name("example");
11402 /// ```
11403 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11404 self.display_name = v.into();
11405 self
11406 }
11407
11408 /// Sets the value of [db_version][crate::model::DbHome::db_version].
11409 ///
11410 /// # Example
11411 /// ```ignore,no_run
11412 /// # use google_cloud_oracledatabase_v1::model::DbHome;
11413 /// let x = DbHome::new().set_db_version("example");
11414 /// ```
11415 pub fn set_db_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11416 self.db_version = v.into();
11417 self
11418 }
11419
11420 /// Sets the value of [database][crate::model::DbHome::database].
11421 ///
11422 /// # Example
11423 /// ```ignore,no_run
11424 /// # use google_cloud_oracledatabase_v1::model::DbHome;
11425 /// use google_cloud_oracledatabase_v1::model::Database;
11426 /// let x = DbHome::new().set_database(Database::default()/* use setters */);
11427 /// ```
11428 pub fn set_database<T>(mut self, v: T) -> Self
11429 where
11430 T: std::convert::Into<crate::model::Database>,
11431 {
11432 self.database = std::option::Option::Some(v.into());
11433 self
11434 }
11435
11436 /// Sets or clears the value of [database][crate::model::DbHome::database].
11437 ///
11438 /// # Example
11439 /// ```ignore,no_run
11440 /// # use google_cloud_oracledatabase_v1::model::DbHome;
11441 /// use google_cloud_oracledatabase_v1::model::Database;
11442 /// let x = DbHome::new().set_or_clear_database(Some(Database::default()/* use setters */));
11443 /// let x = DbHome::new().set_or_clear_database(None::<Database>);
11444 /// ```
11445 pub fn set_or_clear_database<T>(mut self, v: std::option::Option<T>) -> Self
11446 where
11447 T: std::convert::Into<crate::model::Database>,
11448 {
11449 self.database = v.map(|x| x.into());
11450 self
11451 }
11452
11453 /// Sets the value of [is_unified_auditing_enabled][crate::model::DbHome::is_unified_auditing_enabled].
11454 ///
11455 /// # Example
11456 /// ```ignore,no_run
11457 /// # use google_cloud_oracledatabase_v1::model::DbHome;
11458 /// let x = DbHome::new().set_is_unified_auditing_enabled(true);
11459 /// ```
11460 pub fn set_is_unified_auditing_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11461 self.is_unified_auditing_enabled = v.into();
11462 self
11463 }
11464}
11465
11466impl wkt::message::Message for DbHome {
11467 fn typename() -> &'static str {
11468 "type.googleapis.com/google.cloud.oracledatabase.v1.DbHome"
11469 }
11470}
11471
11472/// The request for `DbSystem.Create`.
11473#[derive(Clone, Default, PartialEq)]
11474#[non_exhaustive]
11475pub struct CreateDbSystemRequest {
11476 /// Required. The value for parent of the DbSystem in the following format:
11477 /// projects/{project}/locations/{location}.
11478 pub parent: std::string::String,
11479
11480 /// Required. The ID of the DbSystem to create. This value is
11481 /// restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of
11482 /// 63 characters in length. The value must start with a letter and end with a
11483 /// letter or a number.
11484 pub db_system_id: std::string::String,
11485
11486 /// Required. The resource being created.
11487 pub db_system: std::option::Option<crate::model::DbSystem>,
11488
11489 /// Optional. An optional request ID to identify requests. Specify a unique
11490 /// request ID so that if you must retry your request, the server will know to
11491 /// ignore the request if it has already been completed. The server will
11492 /// guarantee that for at least 60 minutes since the first request.
11493 ///
11494 /// For example, consider a situation where you make an initial request and the
11495 /// request times out. If you make the request again with the same request
11496 /// ID, the server can check if original operation with the same request ID
11497 /// was received, and if so, will ignore the second request. This prevents
11498 /// clients from accidentally creating duplicate commitments.
11499 ///
11500 /// The request ID must be a valid UUID with the exception that zero UUID is
11501 /// not supported (00000000-0000-0000-0000-000000000000).
11502 pub request_id: std::string::String,
11503
11504 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11505}
11506
11507impl CreateDbSystemRequest {
11508 pub fn new() -> Self {
11509 std::default::Default::default()
11510 }
11511
11512 /// Sets the value of [parent][crate::model::CreateDbSystemRequest::parent].
11513 ///
11514 /// # Example
11515 /// ```ignore,no_run
11516 /// # use google_cloud_oracledatabase_v1::model::CreateDbSystemRequest;
11517 /// let x = CreateDbSystemRequest::new().set_parent("example");
11518 /// ```
11519 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11520 self.parent = v.into();
11521 self
11522 }
11523
11524 /// Sets the value of [db_system_id][crate::model::CreateDbSystemRequest::db_system_id].
11525 ///
11526 /// # Example
11527 /// ```ignore,no_run
11528 /// # use google_cloud_oracledatabase_v1::model::CreateDbSystemRequest;
11529 /// let x = CreateDbSystemRequest::new().set_db_system_id("example");
11530 /// ```
11531 pub fn set_db_system_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11532 self.db_system_id = v.into();
11533 self
11534 }
11535
11536 /// Sets the value of [db_system][crate::model::CreateDbSystemRequest::db_system].
11537 ///
11538 /// # Example
11539 /// ```ignore,no_run
11540 /// # use google_cloud_oracledatabase_v1::model::CreateDbSystemRequest;
11541 /// use google_cloud_oracledatabase_v1::model::DbSystem;
11542 /// let x = CreateDbSystemRequest::new().set_db_system(DbSystem::default()/* use setters */);
11543 /// ```
11544 pub fn set_db_system<T>(mut self, v: T) -> Self
11545 where
11546 T: std::convert::Into<crate::model::DbSystem>,
11547 {
11548 self.db_system = std::option::Option::Some(v.into());
11549 self
11550 }
11551
11552 /// Sets or clears the value of [db_system][crate::model::CreateDbSystemRequest::db_system].
11553 ///
11554 /// # Example
11555 /// ```ignore,no_run
11556 /// # use google_cloud_oracledatabase_v1::model::CreateDbSystemRequest;
11557 /// use google_cloud_oracledatabase_v1::model::DbSystem;
11558 /// let x = CreateDbSystemRequest::new().set_or_clear_db_system(Some(DbSystem::default()/* use setters */));
11559 /// let x = CreateDbSystemRequest::new().set_or_clear_db_system(None::<DbSystem>);
11560 /// ```
11561 pub fn set_or_clear_db_system<T>(mut self, v: std::option::Option<T>) -> Self
11562 where
11563 T: std::convert::Into<crate::model::DbSystem>,
11564 {
11565 self.db_system = v.map(|x| x.into());
11566 self
11567 }
11568
11569 /// Sets the value of [request_id][crate::model::CreateDbSystemRequest::request_id].
11570 ///
11571 /// # Example
11572 /// ```ignore,no_run
11573 /// # use google_cloud_oracledatabase_v1::model::CreateDbSystemRequest;
11574 /// let x = CreateDbSystemRequest::new().set_request_id("example");
11575 /// ```
11576 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11577 self.request_id = v.into();
11578 self
11579 }
11580}
11581
11582impl wkt::message::Message for CreateDbSystemRequest {
11583 fn typename() -> &'static str {
11584 "type.googleapis.com/google.cloud.oracledatabase.v1.CreateDbSystemRequest"
11585 }
11586}
11587
11588/// The request for `DbSystem.Delete`.
11589#[derive(Clone, Default, PartialEq)]
11590#[non_exhaustive]
11591pub struct DeleteDbSystemRequest {
11592 /// Required. The name of the DbSystem in the following format:
11593 /// projects/{project}/locations/{location}/dbSystems/{db_system}.
11594 pub name: std::string::String,
11595
11596 /// Optional. An optional ID to identify the request. This value is used to
11597 /// identify duplicate requests. If you make a request with the same request ID
11598 /// and the original request is still in progress or completed, the server
11599 /// ignores the second request. This prevents clients from
11600 /// accidentally creating duplicate commitments.
11601 ///
11602 /// The request ID must be a valid UUID with the exception that zero UUID is
11603 /// not supported (00000000-0000-0000-0000-000000000000).
11604 pub request_id: std::string::String,
11605
11606 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11607}
11608
11609impl DeleteDbSystemRequest {
11610 pub fn new() -> Self {
11611 std::default::Default::default()
11612 }
11613
11614 /// Sets the value of [name][crate::model::DeleteDbSystemRequest::name].
11615 ///
11616 /// # Example
11617 /// ```ignore,no_run
11618 /// # use google_cloud_oracledatabase_v1::model::DeleteDbSystemRequest;
11619 /// let x = DeleteDbSystemRequest::new().set_name("example");
11620 /// ```
11621 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11622 self.name = v.into();
11623 self
11624 }
11625
11626 /// Sets the value of [request_id][crate::model::DeleteDbSystemRequest::request_id].
11627 ///
11628 /// # Example
11629 /// ```ignore,no_run
11630 /// # use google_cloud_oracledatabase_v1::model::DeleteDbSystemRequest;
11631 /// let x = DeleteDbSystemRequest::new().set_request_id("example");
11632 /// ```
11633 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11634 self.request_id = v.into();
11635 self
11636 }
11637}
11638
11639impl wkt::message::Message for DeleteDbSystemRequest {
11640 fn typename() -> &'static str {
11641 "type.googleapis.com/google.cloud.oracledatabase.v1.DeleteDbSystemRequest"
11642 }
11643}
11644
11645/// The request for `DbSystem.Get`.
11646#[derive(Clone, Default, PartialEq)]
11647#[non_exhaustive]
11648pub struct GetDbSystemRequest {
11649 /// Required. The name of the DbSystem in the following format:
11650 /// projects/{project}/locations/{location}/dbSystems/{db_system}.
11651 pub name: std::string::String,
11652
11653 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11654}
11655
11656impl GetDbSystemRequest {
11657 pub fn new() -> Self {
11658 std::default::Default::default()
11659 }
11660
11661 /// Sets the value of [name][crate::model::GetDbSystemRequest::name].
11662 ///
11663 /// # Example
11664 /// ```ignore,no_run
11665 /// # use google_cloud_oracledatabase_v1::model::GetDbSystemRequest;
11666 /// let x = GetDbSystemRequest::new().set_name("example");
11667 /// ```
11668 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11669 self.name = v.into();
11670 self
11671 }
11672}
11673
11674impl wkt::message::Message for GetDbSystemRequest {
11675 fn typename() -> &'static str {
11676 "type.googleapis.com/google.cloud.oracledatabase.v1.GetDbSystemRequest"
11677 }
11678}
11679
11680/// The request for `DbSystem.List`.
11681#[derive(Clone, Default, PartialEq)]
11682#[non_exhaustive]
11683pub struct ListDbSystemsRequest {
11684 /// Required. The parent value for DbSystems in the following format:
11685 /// projects/{project}/locations/{location}.
11686 pub parent: std::string::String,
11687
11688 /// Optional. The maximum number of items to return.
11689 /// If unspecified, at most 50 DbSystems will be returned.
11690 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
11691 pub page_size: i32,
11692
11693 /// Optional. A token identifying a page of results the server should return.
11694 pub page_token: std::string::String,
11695
11696 /// Optional. An expression for filtering the results of the request.
11697 pub filter: std::string::String,
11698
11699 /// Optional. An expression for ordering the results of the request.
11700 pub order_by: std::string::String,
11701
11702 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11703}
11704
11705impl ListDbSystemsRequest {
11706 pub fn new() -> Self {
11707 std::default::Default::default()
11708 }
11709
11710 /// Sets the value of [parent][crate::model::ListDbSystemsRequest::parent].
11711 ///
11712 /// # Example
11713 /// ```ignore,no_run
11714 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemsRequest;
11715 /// let x = ListDbSystemsRequest::new().set_parent("example");
11716 /// ```
11717 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11718 self.parent = v.into();
11719 self
11720 }
11721
11722 /// Sets the value of [page_size][crate::model::ListDbSystemsRequest::page_size].
11723 ///
11724 /// # Example
11725 /// ```ignore,no_run
11726 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemsRequest;
11727 /// let x = ListDbSystemsRequest::new().set_page_size(42);
11728 /// ```
11729 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11730 self.page_size = v.into();
11731 self
11732 }
11733
11734 /// Sets the value of [page_token][crate::model::ListDbSystemsRequest::page_token].
11735 ///
11736 /// # Example
11737 /// ```ignore,no_run
11738 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemsRequest;
11739 /// let x = ListDbSystemsRequest::new().set_page_token("example");
11740 /// ```
11741 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11742 self.page_token = v.into();
11743 self
11744 }
11745
11746 /// Sets the value of [filter][crate::model::ListDbSystemsRequest::filter].
11747 ///
11748 /// # Example
11749 /// ```ignore,no_run
11750 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemsRequest;
11751 /// let x = ListDbSystemsRequest::new().set_filter("example");
11752 /// ```
11753 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11754 self.filter = v.into();
11755 self
11756 }
11757
11758 /// Sets the value of [order_by][crate::model::ListDbSystemsRequest::order_by].
11759 ///
11760 /// # Example
11761 /// ```ignore,no_run
11762 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemsRequest;
11763 /// let x = ListDbSystemsRequest::new().set_order_by("example");
11764 /// ```
11765 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11766 self.order_by = v.into();
11767 self
11768 }
11769}
11770
11771impl wkt::message::Message for ListDbSystemsRequest {
11772 fn typename() -> &'static str {
11773 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbSystemsRequest"
11774 }
11775}
11776
11777/// The response for `DbSystem.List`.
11778#[derive(Clone, Default, PartialEq)]
11779#[non_exhaustive]
11780pub struct ListDbSystemsResponse {
11781 /// The list of DbSystems.
11782 pub db_systems: std::vec::Vec<crate::model::DbSystem>,
11783
11784 /// A token identifying a page of results the server should return.
11785 pub next_page_token: std::string::String,
11786
11787 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11788}
11789
11790impl ListDbSystemsResponse {
11791 pub fn new() -> Self {
11792 std::default::Default::default()
11793 }
11794
11795 /// Sets the value of [db_systems][crate::model::ListDbSystemsResponse::db_systems].
11796 ///
11797 /// # Example
11798 /// ```ignore,no_run
11799 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemsResponse;
11800 /// use google_cloud_oracledatabase_v1::model::DbSystem;
11801 /// let x = ListDbSystemsResponse::new()
11802 /// .set_db_systems([
11803 /// DbSystem::default()/* use setters */,
11804 /// DbSystem::default()/* use (different) setters */,
11805 /// ]);
11806 /// ```
11807 pub fn set_db_systems<T, V>(mut self, v: T) -> Self
11808 where
11809 T: std::iter::IntoIterator<Item = V>,
11810 V: std::convert::Into<crate::model::DbSystem>,
11811 {
11812 use std::iter::Iterator;
11813 self.db_systems = v.into_iter().map(|i| i.into()).collect();
11814 self
11815 }
11816
11817 /// Sets the value of [next_page_token][crate::model::ListDbSystemsResponse::next_page_token].
11818 ///
11819 /// # Example
11820 /// ```ignore,no_run
11821 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemsResponse;
11822 /// let x = ListDbSystemsResponse::new().set_next_page_token("example");
11823 /// ```
11824 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11825 self.next_page_token = v.into();
11826 self
11827 }
11828}
11829
11830impl wkt::message::Message for ListDbSystemsResponse {
11831 fn typename() -> &'static str {
11832 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbSystemsResponse"
11833 }
11834}
11835
11836#[doc(hidden)]
11837impl google_cloud_gax::paginator::internal::PageableResponse for ListDbSystemsResponse {
11838 type PageItem = crate::model::DbSystem;
11839
11840 fn items(self) -> std::vec::Vec<Self::PageItem> {
11841 self.db_systems
11842 }
11843
11844 fn next_page_token(&self) -> std::string::String {
11845 use std::clone::Clone;
11846 self.next_page_token.clone()
11847 }
11848}
11849
11850/// Summary of the DbSystem initial storage size.
11851#[derive(Clone, Default, PartialEq)]
11852#[non_exhaustive]
11853pub struct DbSystemInitialStorageSize {
11854 /// Output only. The name of the resource.
11855 pub name: std::string::String,
11856
11857 /// Output only. The properties of the DbSystem initial storage size summary.
11858 pub properties: std::option::Option<crate::model::DbSystemInitialStorageSizeProperties>,
11859
11860 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11861}
11862
11863impl DbSystemInitialStorageSize {
11864 pub fn new() -> Self {
11865 std::default::Default::default()
11866 }
11867
11868 /// Sets the value of [name][crate::model::DbSystemInitialStorageSize::name].
11869 ///
11870 /// # Example
11871 /// ```ignore,no_run
11872 /// # use google_cloud_oracledatabase_v1::model::DbSystemInitialStorageSize;
11873 /// let x = DbSystemInitialStorageSize::new().set_name("example");
11874 /// ```
11875 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11876 self.name = v.into();
11877 self
11878 }
11879
11880 /// Sets the value of [properties][crate::model::DbSystemInitialStorageSize::properties].
11881 ///
11882 /// # Example
11883 /// ```ignore,no_run
11884 /// # use google_cloud_oracledatabase_v1::model::DbSystemInitialStorageSize;
11885 /// use google_cloud_oracledatabase_v1::model::DbSystemInitialStorageSizeProperties;
11886 /// let x = DbSystemInitialStorageSize::new().set_properties(DbSystemInitialStorageSizeProperties::default()/* use setters */);
11887 /// ```
11888 pub fn set_properties<T>(mut self, v: T) -> Self
11889 where
11890 T: std::convert::Into<crate::model::DbSystemInitialStorageSizeProperties>,
11891 {
11892 self.properties = std::option::Option::Some(v.into());
11893 self
11894 }
11895
11896 /// Sets or clears the value of [properties][crate::model::DbSystemInitialStorageSize::properties].
11897 ///
11898 /// # Example
11899 /// ```ignore,no_run
11900 /// # use google_cloud_oracledatabase_v1::model::DbSystemInitialStorageSize;
11901 /// use google_cloud_oracledatabase_v1::model::DbSystemInitialStorageSizeProperties;
11902 /// let x = DbSystemInitialStorageSize::new().set_or_clear_properties(Some(DbSystemInitialStorageSizeProperties::default()/* use setters */));
11903 /// let x = DbSystemInitialStorageSize::new().set_or_clear_properties(None::<DbSystemInitialStorageSizeProperties>);
11904 /// ```
11905 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
11906 where
11907 T: std::convert::Into<crate::model::DbSystemInitialStorageSizeProperties>,
11908 {
11909 self.properties = v.map(|x| x.into());
11910 self
11911 }
11912}
11913
11914impl wkt::message::Message for DbSystemInitialStorageSize {
11915 fn typename() -> &'static str {
11916 "type.googleapis.com/google.cloud.oracledatabase.v1.DbSystemInitialStorageSize"
11917 }
11918}
11919
11920/// The properties of a DbSystem initial storage size summary.
11921#[derive(Clone, Default, PartialEq)]
11922#[non_exhaustive]
11923pub struct DbSystemInitialStorageSizeProperties {
11924 /// Output only. The storage option used in DB system.
11925 pub storage_management:
11926 crate::model::db_system_initial_storage_size_properties::StorageManagement,
11927
11928 /// Output only. VM shape platform type
11929 pub shape_type: crate::model::db_system_initial_storage_size_properties::ShapeType,
11930
11931 /// Output only. List of storage disk details.
11932 pub storage_size_details: std::vec::Vec<crate::model::StorageSizeDetails>,
11933
11934 /// Output only. List of storage disk details available for launches from
11935 /// backup.
11936 pub launch_from_backup_storage_size_details: std::vec::Vec<crate::model::StorageSizeDetails>,
11937
11938 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11939}
11940
11941impl DbSystemInitialStorageSizeProperties {
11942 pub fn new() -> Self {
11943 std::default::Default::default()
11944 }
11945
11946 /// Sets the value of [storage_management][crate::model::DbSystemInitialStorageSizeProperties::storage_management].
11947 ///
11948 /// # Example
11949 /// ```ignore,no_run
11950 /// # use google_cloud_oracledatabase_v1::model::DbSystemInitialStorageSizeProperties;
11951 /// use google_cloud_oracledatabase_v1::model::db_system_initial_storage_size_properties::StorageManagement;
11952 /// let x0 = DbSystemInitialStorageSizeProperties::new().set_storage_management(StorageManagement::Asm);
11953 /// let x1 = DbSystemInitialStorageSizeProperties::new().set_storage_management(StorageManagement::Lvm);
11954 /// ```
11955 pub fn set_storage_management<
11956 T: std::convert::Into<
11957 crate::model::db_system_initial_storage_size_properties::StorageManagement,
11958 >,
11959 >(
11960 mut self,
11961 v: T,
11962 ) -> Self {
11963 self.storage_management = v.into();
11964 self
11965 }
11966
11967 /// Sets the value of [shape_type][crate::model::DbSystemInitialStorageSizeProperties::shape_type].
11968 ///
11969 /// # Example
11970 /// ```ignore,no_run
11971 /// # use google_cloud_oracledatabase_v1::model::DbSystemInitialStorageSizeProperties;
11972 /// use google_cloud_oracledatabase_v1::model::db_system_initial_storage_size_properties::ShapeType;
11973 /// let x0 = DbSystemInitialStorageSizeProperties::new().set_shape_type(ShapeType::StandardX86);
11974 /// ```
11975 pub fn set_shape_type<
11976 T: std::convert::Into<crate::model::db_system_initial_storage_size_properties::ShapeType>,
11977 >(
11978 mut self,
11979 v: T,
11980 ) -> Self {
11981 self.shape_type = v.into();
11982 self
11983 }
11984
11985 /// Sets the value of [storage_size_details][crate::model::DbSystemInitialStorageSizeProperties::storage_size_details].
11986 ///
11987 /// # Example
11988 /// ```ignore,no_run
11989 /// # use google_cloud_oracledatabase_v1::model::DbSystemInitialStorageSizeProperties;
11990 /// use google_cloud_oracledatabase_v1::model::StorageSizeDetails;
11991 /// let x = DbSystemInitialStorageSizeProperties::new()
11992 /// .set_storage_size_details([
11993 /// StorageSizeDetails::default()/* use setters */,
11994 /// StorageSizeDetails::default()/* use (different) setters */,
11995 /// ]);
11996 /// ```
11997 pub fn set_storage_size_details<T, V>(mut self, v: T) -> Self
11998 where
11999 T: std::iter::IntoIterator<Item = V>,
12000 V: std::convert::Into<crate::model::StorageSizeDetails>,
12001 {
12002 use std::iter::Iterator;
12003 self.storage_size_details = v.into_iter().map(|i| i.into()).collect();
12004 self
12005 }
12006
12007 /// Sets the value of [launch_from_backup_storage_size_details][crate::model::DbSystemInitialStorageSizeProperties::launch_from_backup_storage_size_details].
12008 ///
12009 /// # Example
12010 /// ```ignore,no_run
12011 /// # use google_cloud_oracledatabase_v1::model::DbSystemInitialStorageSizeProperties;
12012 /// use google_cloud_oracledatabase_v1::model::StorageSizeDetails;
12013 /// let x = DbSystemInitialStorageSizeProperties::new()
12014 /// .set_launch_from_backup_storage_size_details([
12015 /// StorageSizeDetails::default()/* use setters */,
12016 /// StorageSizeDetails::default()/* use (different) setters */,
12017 /// ]);
12018 /// ```
12019 pub fn set_launch_from_backup_storage_size_details<T, V>(mut self, v: T) -> Self
12020 where
12021 T: std::iter::IntoIterator<Item = V>,
12022 V: std::convert::Into<crate::model::StorageSizeDetails>,
12023 {
12024 use std::iter::Iterator;
12025 self.launch_from_backup_storage_size_details = v.into_iter().map(|i| i.into()).collect();
12026 self
12027 }
12028}
12029
12030impl wkt::message::Message for DbSystemInitialStorageSizeProperties {
12031 fn typename() -> &'static str {
12032 "type.googleapis.com/google.cloud.oracledatabase.v1.DbSystemInitialStorageSizeProperties"
12033 }
12034}
12035
12036/// Defines additional types related to [DbSystemInitialStorageSizeProperties].
12037pub mod db_system_initial_storage_size_properties {
12038 #[allow(unused_imports)]
12039 use super::*;
12040
12041 /// The storage option used in the DB system.
12042 ///
12043 /// # Working with unknown values
12044 ///
12045 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12046 /// additional enum variants at any time. Adding new variants is not considered
12047 /// a breaking change. Applications should write their code in anticipation of:
12048 ///
12049 /// - New values appearing in future releases of the client library, **and**
12050 /// - New values received dynamically, without application changes.
12051 ///
12052 /// Please consult the [Working with enums] section in the user guide for some
12053 /// guidelines.
12054 ///
12055 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12056 #[derive(Clone, Debug, PartialEq)]
12057 #[non_exhaustive]
12058 pub enum StorageManagement {
12059 /// Unspecified storage management.
12060 Unspecified,
12061 /// Automatic Storage Management.
12062 Asm,
12063 /// Logical Volume Management.
12064 Lvm,
12065 /// If set, the enum was initialized with an unknown value.
12066 ///
12067 /// Applications can examine the value using [StorageManagement::value] or
12068 /// [StorageManagement::name].
12069 UnknownValue(storage_management::UnknownValue),
12070 }
12071
12072 #[doc(hidden)]
12073 pub mod storage_management {
12074 #[allow(unused_imports)]
12075 use super::*;
12076 #[derive(Clone, Debug, PartialEq)]
12077 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12078 }
12079
12080 impl StorageManagement {
12081 /// Gets the enum value.
12082 ///
12083 /// Returns `None` if the enum contains an unknown value deserialized from
12084 /// the string representation of enums.
12085 pub fn value(&self) -> std::option::Option<i32> {
12086 match self {
12087 Self::Unspecified => std::option::Option::Some(0),
12088 Self::Asm => std::option::Option::Some(1),
12089 Self::Lvm => std::option::Option::Some(2),
12090 Self::UnknownValue(u) => u.0.value(),
12091 }
12092 }
12093
12094 /// Gets the enum value as a string.
12095 ///
12096 /// Returns `None` if the enum contains an unknown value deserialized from
12097 /// the integer representation of enums.
12098 pub fn name(&self) -> std::option::Option<&str> {
12099 match self {
12100 Self::Unspecified => std::option::Option::Some("STORAGE_MANAGEMENT_UNSPECIFIED"),
12101 Self::Asm => std::option::Option::Some("ASM"),
12102 Self::Lvm => std::option::Option::Some("LVM"),
12103 Self::UnknownValue(u) => u.0.name(),
12104 }
12105 }
12106 }
12107
12108 impl std::default::Default for StorageManagement {
12109 fn default() -> Self {
12110 use std::convert::From;
12111 Self::from(0)
12112 }
12113 }
12114
12115 impl std::fmt::Display for StorageManagement {
12116 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12117 wkt::internal::display_enum(f, self.name(), self.value())
12118 }
12119 }
12120
12121 impl std::convert::From<i32> for StorageManagement {
12122 fn from(value: i32) -> Self {
12123 match value {
12124 0 => Self::Unspecified,
12125 1 => Self::Asm,
12126 2 => Self::Lvm,
12127 _ => Self::UnknownValue(storage_management::UnknownValue(
12128 wkt::internal::UnknownEnumValue::Integer(value),
12129 )),
12130 }
12131 }
12132 }
12133
12134 impl std::convert::From<&str> for StorageManagement {
12135 fn from(value: &str) -> Self {
12136 use std::string::ToString;
12137 match value {
12138 "STORAGE_MANAGEMENT_UNSPECIFIED" => Self::Unspecified,
12139 "ASM" => Self::Asm,
12140 "LVM" => Self::Lvm,
12141 _ => Self::UnknownValue(storage_management::UnknownValue(
12142 wkt::internal::UnknownEnumValue::String(value.to_string()),
12143 )),
12144 }
12145 }
12146 }
12147
12148 impl serde::ser::Serialize for StorageManagement {
12149 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12150 where
12151 S: serde::Serializer,
12152 {
12153 match self {
12154 Self::Unspecified => serializer.serialize_i32(0),
12155 Self::Asm => serializer.serialize_i32(1),
12156 Self::Lvm => serializer.serialize_i32(2),
12157 Self::UnknownValue(u) => u.0.serialize(serializer),
12158 }
12159 }
12160 }
12161
12162 impl<'de> serde::de::Deserialize<'de> for StorageManagement {
12163 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12164 where
12165 D: serde::Deserializer<'de>,
12166 {
12167 deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageManagement>::new(
12168 ".google.cloud.oracledatabase.v1.DbSystemInitialStorageSizeProperties.StorageManagement"))
12169 }
12170 }
12171
12172 /// The shape type of the DB system.
12173 ///
12174 /// # Working with unknown values
12175 ///
12176 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12177 /// additional enum variants at any time. Adding new variants is not considered
12178 /// a breaking change. Applications should write their code in anticipation of:
12179 ///
12180 /// - New values appearing in future releases of the client library, **and**
12181 /// - New values received dynamically, without application changes.
12182 ///
12183 /// Please consult the [Working with enums] section in the user guide for some
12184 /// guidelines.
12185 ///
12186 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12187 #[derive(Clone, Debug, PartialEq)]
12188 #[non_exhaustive]
12189 pub enum ShapeType {
12190 /// Unspecified shape type.
12191 Unspecified,
12192 /// Standard X86.
12193 StandardX86,
12194 /// If set, the enum was initialized with an unknown value.
12195 ///
12196 /// Applications can examine the value using [ShapeType::value] or
12197 /// [ShapeType::name].
12198 UnknownValue(shape_type::UnknownValue),
12199 }
12200
12201 #[doc(hidden)]
12202 pub mod shape_type {
12203 #[allow(unused_imports)]
12204 use super::*;
12205 #[derive(Clone, Debug, PartialEq)]
12206 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12207 }
12208
12209 impl ShapeType {
12210 /// Gets the enum value.
12211 ///
12212 /// Returns `None` if the enum contains an unknown value deserialized from
12213 /// the string representation of enums.
12214 pub fn value(&self) -> std::option::Option<i32> {
12215 match self {
12216 Self::Unspecified => std::option::Option::Some(0),
12217 Self::StandardX86 => std::option::Option::Some(1),
12218 Self::UnknownValue(u) => u.0.value(),
12219 }
12220 }
12221
12222 /// Gets the enum value as a string.
12223 ///
12224 /// Returns `None` if the enum contains an unknown value deserialized from
12225 /// the integer representation of enums.
12226 pub fn name(&self) -> std::option::Option<&str> {
12227 match self {
12228 Self::Unspecified => std::option::Option::Some("SHAPE_TYPE_UNSPECIFIED"),
12229 Self::StandardX86 => std::option::Option::Some("STANDARD_X86"),
12230 Self::UnknownValue(u) => u.0.name(),
12231 }
12232 }
12233 }
12234
12235 impl std::default::Default for ShapeType {
12236 fn default() -> Self {
12237 use std::convert::From;
12238 Self::from(0)
12239 }
12240 }
12241
12242 impl std::fmt::Display for ShapeType {
12243 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12244 wkt::internal::display_enum(f, self.name(), self.value())
12245 }
12246 }
12247
12248 impl std::convert::From<i32> for ShapeType {
12249 fn from(value: i32) -> Self {
12250 match value {
12251 0 => Self::Unspecified,
12252 1 => Self::StandardX86,
12253 _ => Self::UnknownValue(shape_type::UnknownValue(
12254 wkt::internal::UnknownEnumValue::Integer(value),
12255 )),
12256 }
12257 }
12258 }
12259
12260 impl std::convert::From<&str> for ShapeType {
12261 fn from(value: &str) -> Self {
12262 use std::string::ToString;
12263 match value {
12264 "SHAPE_TYPE_UNSPECIFIED" => Self::Unspecified,
12265 "STANDARD_X86" => Self::StandardX86,
12266 _ => Self::UnknownValue(shape_type::UnknownValue(
12267 wkt::internal::UnknownEnumValue::String(value.to_string()),
12268 )),
12269 }
12270 }
12271 }
12272
12273 impl serde::ser::Serialize for ShapeType {
12274 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12275 where
12276 S: serde::Serializer,
12277 {
12278 match self {
12279 Self::Unspecified => serializer.serialize_i32(0),
12280 Self::StandardX86 => serializer.serialize_i32(1),
12281 Self::UnknownValue(u) => u.0.serialize(serializer),
12282 }
12283 }
12284 }
12285
12286 impl<'de> serde::de::Deserialize<'de> for ShapeType {
12287 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12288 where
12289 D: serde::Deserializer<'de>,
12290 {
12291 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ShapeType>::new(
12292 ".google.cloud.oracledatabase.v1.DbSystemInitialStorageSizeProperties.ShapeType",
12293 ))
12294 }
12295 }
12296}
12297
12298/// The initial storage size, in gigabytes, that is applicable for virtual
12299/// machine DBSystem.
12300#[derive(Clone, Default, PartialEq)]
12301#[non_exhaustive]
12302pub struct StorageSizeDetails {
12303 /// Output only. The data storage size, in gigabytes, that is applicable for
12304 /// virtual machine DBSystem.
12305 pub data_storage_size_in_gbs: i32,
12306
12307 /// Output only. The RECO/REDO storage size, in gigabytes, that is applicable
12308 /// for virtual machine DBSystem.
12309 pub reco_storage_size_in_gbs: i32,
12310
12311 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12312}
12313
12314impl StorageSizeDetails {
12315 pub fn new() -> Self {
12316 std::default::Default::default()
12317 }
12318
12319 /// Sets the value of [data_storage_size_in_gbs][crate::model::StorageSizeDetails::data_storage_size_in_gbs].
12320 ///
12321 /// # Example
12322 /// ```ignore,no_run
12323 /// # use google_cloud_oracledatabase_v1::model::StorageSizeDetails;
12324 /// let x = StorageSizeDetails::new().set_data_storage_size_in_gbs(42);
12325 /// ```
12326 pub fn set_data_storage_size_in_gbs<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12327 self.data_storage_size_in_gbs = v.into();
12328 self
12329 }
12330
12331 /// Sets the value of [reco_storage_size_in_gbs][crate::model::StorageSizeDetails::reco_storage_size_in_gbs].
12332 ///
12333 /// # Example
12334 /// ```ignore,no_run
12335 /// # use google_cloud_oracledatabase_v1::model::StorageSizeDetails;
12336 /// let x = StorageSizeDetails::new().set_reco_storage_size_in_gbs(42);
12337 /// ```
12338 pub fn set_reco_storage_size_in_gbs<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12339 self.reco_storage_size_in_gbs = v.into();
12340 self
12341 }
12342}
12343
12344impl wkt::message::Message for StorageSizeDetails {
12345 fn typename() -> &'static str {
12346 "type.googleapis.com/google.cloud.oracledatabase.v1.StorageSizeDetails"
12347 }
12348}
12349
12350/// The request for `DbSystemInitialStorageSizes.List`.
12351#[derive(Clone, Default, PartialEq)]
12352#[non_exhaustive]
12353pub struct ListDbSystemInitialStorageSizesRequest {
12354 /// Required. The parent value for the DbSystemInitialStorageSize resource with
12355 /// the format: projects/{project}/locations/{location}
12356 pub parent: std::string::String,
12357
12358 /// Optional. The maximum number of items to return.
12359 /// If unspecified, a maximum of 50 DbSystemInitialStorageSizes will be
12360 /// returned. The maximum value is 1000; values above 1000 will be reset to
12361 /// 1000.
12362 pub page_size: i32,
12363
12364 /// Optional. A token identifying the requested page of results to return. All
12365 /// fields except the filter should remain the same as in the request that
12366 /// provided this page token.
12367 pub page_token: std::string::String,
12368
12369 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12370}
12371
12372impl ListDbSystemInitialStorageSizesRequest {
12373 pub fn new() -> Self {
12374 std::default::Default::default()
12375 }
12376
12377 /// Sets the value of [parent][crate::model::ListDbSystemInitialStorageSizesRequest::parent].
12378 ///
12379 /// # Example
12380 /// ```ignore,no_run
12381 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemInitialStorageSizesRequest;
12382 /// let x = ListDbSystemInitialStorageSizesRequest::new().set_parent("example");
12383 /// ```
12384 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12385 self.parent = v.into();
12386 self
12387 }
12388
12389 /// Sets the value of [page_size][crate::model::ListDbSystemInitialStorageSizesRequest::page_size].
12390 ///
12391 /// # Example
12392 /// ```ignore,no_run
12393 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemInitialStorageSizesRequest;
12394 /// let x = ListDbSystemInitialStorageSizesRequest::new().set_page_size(42);
12395 /// ```
12396 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12397 self.page_size = v.into();
12398 self
12399 }
12400
12401 /// Sets the value of [page_token][crate::model::ListDbSystemInitialStorageSizesRequest::page_token].
12402 ///
12403 /// # Example
12404 /// ```ignore,no_run
12405 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemInitialStorageSizesRequest;
12406 /// let x = ListDbSystemInitialStorageSizesRequest::new().set_page_token("example");
12407 /// ```
12408 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12409 self.page_token = v.into();
12410 self
12411 }
12412}
12413
12414impl wkt::message::Message for ListDbSystemInitialStorageSizesRequest {
12415 fn typename() -> &'static str {
12416 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbSystemInitialStorageSizesRequest"
12417 }
12418}
12419
12420/// The response for `DbSystemInitialStorageSizes.List`.
12421#[derive(Clone, Default, PartialEq)]
12422#[non_exhaustive]
12423pub struct ListDbSystemInitialStorageSizesResponse {
12424 /// The list of DbSystemInitialStorageSizes.
12425 pub db_system_initial_storage_sizes: std::vec::Vec<crate::model::DbSystemInitialStorageSize>,
12426
12427 /// A token identifying a page of results the server should return.
12428 pub next_page_token: std::string::String,
12429
12430 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12431}
12432
12433impl ListDbSystemInitialStorageSizesResponse {
12434 pub fn new() -> Self {
12435 std::default::Default::default()
12436 }
12437
12438 /// Sets the value of [db_system_initial_storage_sizes][crate::model::ListDbSystemInitialStorageSizesResponse::db_system_initial_storage_sizes].
12439 ///
12440 /// # Example
12441 /// ```ignore,no_run
12442 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemInitialStorageSizesResponse;
12443 /// use google_cloud_oracledatabase_v1::model::DbSystemInitialStorageSize;
12444 /// let x = ListDbSystemInitialStorageSizesResponse::new()
12445 /// .set_db_system_initial_storage_sizes([
12446 /// DbSystemInitialStorageSize::default()/* use setters */,
12447 /// DbSystemInitialStorageSize::default()/* use (different) setters */,
12448 /// ]);
12449 /// ```
12450 pub fn set_db_system_initial_storage_sizes<T, V>(mut self, v: T) -> Self
12451 where
12452 T: std::iter::IntoIterator<Item = V>,
12453 V: std::convert::Into<crate::model::DbSystemInitialStorageSize>,
12454 {
12455 use std::iter::Iterator;
12456 self.db_system_initial_storage_sizes = v.into_iter().map(|i| i.into()).collect();
12457 self
12458 }
12459
12460 /// Sets the value of [next_page_token][crate::model::ListDbSystemInitialStorageSizesResponse::next_page_token].
12461 ///
12462 /// # Example
12463 /// ```ignore,no_run
12464 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemInitialStorageSizesResponse;
12465 /// let x = ListDbSystemInitialStorageSizesResponse::new().set_next_page_token("example");
12466 /// ```
12467 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12468 self.next_page_token = v.into();
12469 self
12470 }
12471}
12472
12473impl wkt::message::Message for ListDbSystemInitialStorageSizesResponse {
12474 fn typename() -> &'static str {
12475 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbSystemInitialStorageSizesResponse"
12476 }
12477}
12478
12479#[doc(hidden)]
12480impl google_cloud_gax::paginator::internal::PageableResponse
12481 for ListDbSystemInitialStorageSizesResponse
12482{
12483 type PageItem = crate::model::DbSystemInitialStorageSize;
12484
12485 fn items(self) -> std::vec::Vec<Self::PageItem> {
12486 self.db_system_initial_storage_sizes
12487 }
12488
12489 fn next_page_token(&self) -> std::string::String {
12490 use std::clone::Clone;
12491 self.next_page_token.clone()
12492 }
12493}
12494
12495/// Details of the Database System Shapes resource.
12496/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/DbSystemShapeSummary/>
12497#[derive(Clone, Default, PartialEq)]
12498#[non_exhaustive]
12499pub struct DbSystemShape {
12500 /// Identifier. The name of the Database System Shape resource with the format:
12501 /// projects/{project}/locations/{region}/dbSystemShapes/{db_system_shape}
12502 pub name: std::string::String,
12503
12504 /// Optional. shape
12505 pub shape: std::string::String,
12506
12507 /// Optional. Minimum number of database servers.
12508 pub min_node_count: i32,
12509
12510 /// Optional. Maximum number of database servers.
12511 pub max_node_count: i32,
12512
12513 /// Optional. Minimum number of storage servers.
12514 pub min_storage_count: i32,
12515
12516 /// Optional. Maximum number of storage servers.
12517 pub max_storage_count: i32,
12518
12519 /// Optional. Number of cores per node.
12520 pub available_core_count_per_node: i32,
12521
12522 /// Optional. Memory per database server node in gigabytes.
12523 pub available_memory_per_node_gb: i32,
12524
12525 /// Optional. Storage per storage server in terabytes.
12526 pub available_data_storage_tb: i32,
12527
12528 /// Optional. Minimum core count per node.
12529 pub min_core_count_per_node: i32,
12530
12531 /// Optional. Minimum memory per node in gigabytes.
12532 pub min_memory_per_node_gb: i32,
12533
12534 /// Optional. Minimum node storage per database server in gigabytes.
12535 pub min_db_node_storage_per_node_gb: i32,
12536
12537 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12538}
12539
12540impl DbSystemShape {
12541 pub fn new() -> Self {
12542 std::default::Default::default()
12543 }
12544
12545 /// Sets the value of [name][crate::model::DbSystemShape::name].
12546 ///
12547 /// # Example
12548 /// ```ignore,no_run
12549 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12550 /// let x = DbSystemShape::new().set_name("example");
12551 /// ```
12552 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12553 self.name = v.into();
12554 self
12555 }
12556
12557 /// Sets the value of [shape][crate::model::DbSystemShape::shape].
12558 ///
12559 /// # Example
12560 /// ```ignore,no_run
12561 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12562 /// let x = DbSystemShape::new().set_shape("example");
12563 /// ```
12564 pub fn set_shape<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12565 self.shape = v.into();
12566 self
12567 }
12568
12569 /// Sets the value of [min_node_count][crate::model::DbSystemShape::min_node_count].
12570 ///
12571 /// # Example
12572 /// ```ignore,no_run
12573 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12574 /// let x = DbSystemShape::new().set_min_node_count(42);
12575 /// ```
12576 pub fn set_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12577 self.min_node_count = v.into();
12578 self
12579 }
12580
12581 /// Sets the value of [max_node_count][crate::model::DbSystemShape::max_node_count].
12582 ///
12583 /// # Example
12584 /// ```ignore,no_run
12585 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12586 /// let x = DbSystemShape::new().set_max_node_count(42);
12587 /// ```
12588 pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12589 self.max_node_count = v.into();
12590 self
12591 }
12592
12593 /// Sets the value of [min_storage_count][crate::model::DbSystemShape::min_storage_count].
12594 ///
12595 /// # Example
12596 /// ```ignore,no_run
12597 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12598 /// let x = DbSystemShape::new().set_min_storage_count(42);
12599 /// ```
12600 pub fn set_min_storage_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12601 self.min_storage_count = v.into();
12602 self
12603 }
12604
12605 /// Sets the value of [max_storage_count][crate::model::DbSystemShape::max_storage_count].
12606 ///
12607 /// # Example
12608 /// ```ignore,no_run
12609 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12610 /// let x = DbSystemShape::new().set_max_storage_count(42);
12611 /// ```
12612 pub fn set_max_storage_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12613 self.max_storage_count = v.into();
12614 self
12615 }
12616
12617 /// Sets the value of [available_core_count_per_node][crate::model::DbSystemShape::available_core_count_per_node].
12618 ///
12619 /// # Example
12620 /// ```ignore,no_run
12621 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12622 /// let x = DbSystemShape::new().set_available_core_count_per_node(42);
12623 /// ```
12624 pub fn set_available_core_count_per_node<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12625 self.available_core_count_per_node = v.into();
12626 self
12627 }
12628
12629 /// Sets the value of [available_memory_per_node_gb][crate::model::DbSystemShape::available_memory_per_node_gb].
12630 ///
12631 /// # Example
12632 /// ```ignore,no_run
12633 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12634 /// let x = DbSystemShape::new().set_available_memory_per_node_gb(42);
12635 /// ```
12636 pub fn set_available_memory_per_node_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12637 self.available_memory_per_node_gb = v.into();
12638 self
12639 }
12640
12641 /// Sets the value of [available_data_storage_tb][crate::model::DbSystemShape::available_data_storage_tb].
12642 ///
12643 /// # Example
12644 /// ```ignore,no_run
12645 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12646 /// let x = DbSystemShape::new().set_available_data_storage_tb(42);
12647 /// ```
12648 pub fn set_available_data_storage_tb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12649 self.available_data_storage_tb = v.into();
12650 self
12651 }
12652
12653 /// Sets the value of [min_core_count_per_node][crate::model::DbSystemShape::min_core_count_per_node].
12654 ///
12655 /// # Example
12656 /// ```ignore,no_run
12657 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12658 /// let x = DbSystemShape::new().set_min_core_count_per_node(42);
12659 /// ```
12660 pub fn set_min_core_count_per_node<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12661 self.min_core_count_per_node = v.into();
12662 self
12663 }
12664
12665 /// Sets the value of [min_memory_per_node_gb][crate::model::DbSystemShape::min_memory_per_node_gb].
12666 ///
12667 /// # Example
12668 /// ```ignore,no_run
12669 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12670 /// let x = DbSystemShape::new().set_min_memory_per_node_gb(42);
12671 /// ```
12672 pub fn set_min_memory_per_node_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12673 self.min_memory_per_node_gb = v.into();
12674 self
12675 }
12676
12677 /// Sets the value of [min_db_node_storage_per_node_gb][crate::model::DbSystemShape::min_db_node_storage_per_node_gb].
12678 ///
12679 /// # Example
12680 /// ```ignore,no_run
12681 /// # use google_cloud_oracledatabase_v1::model::DbSystemShape;
12682 /// let x = DbSystemShape::new().set_min_db_node_storage_per_node_gb(42);
12683 /// ```
12684 pub fn set_min_db_node_storage_per_node_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12685 self.min_db_node_storage_per_node_gb = v.into();
12686 self
12687 }
12688}
12689
12690impl wkt::message::Message for DbSystemShape {
12691 fn typename() -> &'static str {
12692 "type.googleapis.com/google.cloud.oracledatabase.v1.DbSystemShape"
12693 }
12694}
12695
12696/// A valid Oracle Database version.
12697#[derive(Clone, Default, PartialEq)]
12698#[non_exhaustive]
12699pub struct DbVersion {
12700 /// Output only. The name of the DbVersion resource in the following format:
12701 /// projects/{project}/locations/{region}/dbVersions/{db_version}
12702 pub name: std::string::String,
12703
12704 /// Output only. The properties of the DbVersion.
12705 pub properties: std::option::Option<crate::model::DbVersionProperties>,
12706
12707 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12708}
12709
12710impl DbVersion {
12711 pub fn new() -> Self {
12712 std::default::Default::default()
12713 }
12714
12715 /// Sets the value of [name][crate::model::DbVersion::name].
12716 ///
12717 /// # Example
12718 /// ```ignore,no_run
12719 /// # use google_cloud_oracledatabase_v1::model::DbVersion;
12720 /// let x = DbVersion::new().set_name("example");
12721 /// ```
12722 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12723 self.name = v.into();
12724 self
12725 }
12726
12727 /// Sets the value of [properties][crate::model::DbVersion::properties].
12728 ///
12729 /// # Example
12730 /// ```ignore,no_run
12731 /// # use google_cloud_oracledatabase_v1::model::DbVersion;
12732 /// use google_cloud_oracledatabase_v1::model::DbVersionProperties;
12733 /// let x = DbVersion::new().set_properties(DbVersionProperties::default()/* use setters */);
12734 /// ```
12735 pub fn set_properties<T>(mut self, v: T) -> Self
12736 where
12737 T: std::convert::Into<crate::model::DbVersionProperties>,
12738 {
12739 self.properties = std::option::Option::Some(v.into());
12740 self
12741 }
12742
12743 /// Sets or clears the value of [properties][crate::model::DbVersion::properties].
12744 ///
12745 /// # Example
12746 /// ```ignore,no_run
12747 /// # use google_cloud_oracledatabase_v1::model::DbVersion;
12748 /// use google_cloud_oracledatabase_v1::model::DbVersionProperties;
12749 /// let x = DbVersion::new().set_or_clear_properties(Some(DbVersionProperties::default()/* use setters */));
12750 /// let x = DbVersion::new().set_or_clear_properties(None::<DbVersionProperties>);
12751 /// ```
12752 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
12753 where
12754 T: std::convert::Into<crate::model::DbVersionProperties>,
12755 {
12756 self.properties = v.map(|x| x.into());
12757 self
12758 }
12759}
12760
12761impl wkt::message::Message for DbVersion {
12762 fn typename() -> &'static str {
12763 "type.googleapis.com/google.cloud.oracledatabase.v1.DbVersion"
12764 }
12765}
12766
12767/// The properties of a DbVersion.
12768#[derive(Clone, Default, PartialEq)]
12769#[non_exhaustive]
12770pub struct DbVersionProperties {
12771 /// Output only. A valid Oracle Database version.
12772 pub version: std::string::String,
12773
12774 /// Output only. True if this version of the Oracle Database software is the
12775 /// latest version for a release.
12776 pub is_latest_for_major_version: bool,
12777
12778 /// Output only. True if this version of the Oracle Database software supports
12779 /// pluggable databases.
12780 pub supports_pdb: bool,
12781
12782 /// Output only. True if this version of the Oracle Database software is the
12783 /// preview version.
12784 pub is_preview_db_version: bool,
12785
12786 /// Output only. True if this version of the Oracle Database software is
12787 /// supported for Upgrade.
12788 pub is_upgrade_supported: bool,
12789
12790 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12791}
12792
12793impl DbVersionProperties {
12794 pub fn new() -> Self {
12795 std::default::Default::default()
12796 }
12797
12798 /// Sets the value of [version][crate::model::DbVersionProperties::version].
12799 ///
12800 /// # Example
12801 /// ```ignore,no_run
12802 /// # use google_cloud_oracledatabase_v1::model::DbVersionProperties;
12803 /// let x = DbVersionProperties::new().set_version("example");
12804 /// ```
12805 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12806 self.version = v.into();
12807 self
12808 }
12809
12810 /// Sets the value of [is_latest_for_major_version][crate::model::DbVersionProperties::is_latest_for_major_version].
12811 ///
12812 /// # Example
12813 /// ```ignore,no_run
12814 /// # use google_cloud_oracledatabase_v1::model::DbVersionProperties;
12815 /// let x = DbVersionProperties::new().set_is_latest_for_major_version(true);
12816 /// ```
12817 pub fn set_is_latest_for_major_version<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12818 self.is_latest_for_major_version = v.into();
12819 self
12820 }
12821
12822 /// Sets the value of [supports_pdb][crate::model::DbVersionProperties::supports_pdb].
12823 ///
12824 /// # Example
12825 /// ```ignore,no_run
12826 /// # use google_cloud_oracledatabase_v1::model::DbVersionProperties;
12827 /// let x = DbVersionProperties::new().set_supports_pdb(true);
12828 /// ```
12829 pub fn set_supports_pdb<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12830 self.supports_pdb = v.into();
12831 self
12832 }
12833
12834 /// Sets the value of [is_preview_db_version][crate::model::DbVersionProperties::is_preview_db_version].
12835 ///
12836 /// # Example
12837 /// ```ignore,no_run
12838 /// # use google_cloud_oracledatabase_v1::model::DbVersionProperties;
12839 /// let x = DbVersionProperties::new().set_is_preview_db_version(true);
12840 /// ```
12841 pub fn set_is_preview_db_version<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12842 self.is_preview_db_version = v.into();
12843 self
12844 }
12845
12846 /// Sets the value of [is_upgrade_supported][crate::model::DbVersionProperties::is_upgrade_supported].
12847 ///
12848 /// # Example
12849 /// ```ignore,no_run
12850 /// # use google_cloud_oracledatabase_v1::model::DbVersionProperties;
12851 /// let x = DbVersionProperties::new().set_is_upgrade_supported(true);
12852 /// ```
12853 pub fn set_is_upgrade_supported<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12854 self.is_upgrade_supported = v.into();
12855 self
12856 }
12857}
12858
12859impl wkt::message::Message for DbVersionProperties {
12860 fn typename() -> &'static str {
12861 "type.googleapis.com/google.cloud.oracledatabase.v1.DbVersionProperties"
12862 }
12863}
12864
12865/// The request for `DbVersions.List`.
12866#[derive(Clone, Default, PartialEq)]
12867#[non_exhaustive]
12868pub struct ListDbVersionsRequest {
12869 /// Required. The parent value for the DbVersion resource with the
12870 /// format: projects/{project}/locations/{location}
12871 pub parent: std::string::String,
12872
12873 /// Optional. The maximum number of items to return.
12874 /// If unspecified, a maximum of 50 DbVersions will be returned.
12875 /// The maximum value is 1000; values above 1000 will be reset to 1000.
12876 pub page_size: i32,
12877
12878 /// Optional. A token identifying the requested page of results to return. All
12879 /// fields except the filter should remain the same as in the request that
12880 /// provided this page token.
12881 pub page_token: std::string::String,
12882
12883 /// Optional. Filter expression that matches a subset of the DbVersions to
12884 /// show. The supported filter for dbSystem creation is `db_system_shape =
12885 /// {db_system_shape} AND storage_management = {storage_management}`. If no
12886 /// filter is provided, all DbVersions will be returned.
12887 pub filter: std::string::String,
12888
12889 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12890}
12891
12892impl ListDbVersionsRequest {
12893 pub fn new() -> Self {
12894 std::default::Default::default()
12895 }
12896
12897 /// Sets the value of [parent][crate::model::ListDbVersionsRequest::parent].
12898 ///
12899 /// # Example
12900 /// ```ignore,no_run
12901 /// # use google_cloud_oracledatabase_v1::model::ListDbVersionsRequest;
12902 /// let x = ListDbVersionsRequest::new().set_parent("example");
12903 /// ```
12904 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12905 self.parent = v.into();
12906 self
12907 }
12908
12909 /// Sets the value of [page_size][crate::model::ListDbVersionsRequest::page_size].
12910 ///
12911 /// # Example
12912 /// ```ignore,no_run
12913 /// # use google_cloud_oracledatabase_v1::model::ListDbVersionsRequest;
12914 /// let x = ListDbVersionsRequest::new().set_page_size(42);
12915 /// ```
12916 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12917 self.page_size = v.into();
12918 self
12919 }
12920
12921 /// Sets the value of [page_token][crate::model::ListDbVersionsRequest::page_token].
12922 ///
12923 /// # Example
12924 /// ```ignore,no_run
12925 /// # use google_cloud_oracledatabase_v1::model::ListDbVersionsRequest;
12926 /// let x = ListDbVersionsRequest::new().set_page_token("example");
12927 /// ```
12928 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12929 self.page_token = v.into();
12930 self
12931 }
12932
12933 /// Sets the value of [filter][crate::model::ListDbVersionsRequest::filter].
12934 ///
12935 /// # Example
12936 /// ```ignore,no_run
12937 /// # use google_cloud_oracledatabase_v1::model::ListDbVersionsRequest;
12938 /// let x = ListDbVersionsRequest::new().set_filter("example");
12939 /// ```
12940 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12941 self.filter = v.into();
12942 self
12943 }
12944}
12945
12946impl wkt::message::Message for ListDbVersionsRequest {
12947 fn typename() -> &'static str {
12948 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbVersionsRequest"
12949 }
12950}
12951
12952/// The response for `DbVersions.List`.
12953#[derive(Clone, Default, PartialEq)]
12954#[non_exhaustive]
12955pub struct ListDbVersionsResponse {
12956 /// The list of DbVersions.
12957 pub db_versions: std::vec::Vec<crate::model::DbVersion>,
12958
12959 /// A token identifying a page of results the server should return.
12960 pub next_page_token: std::string::String,
12961
12962 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12963}
12964
12965impl ListDbVersionsResponse {
12966 pub fn new() -> Self {
12967 std::default::Default::default()
12968 }
12969
12970 /// Sets the value of [db_versions][crate::model::ListDbVersionsResponse::db_versions].
12971 ///
12972 /// # Example
12973 /// ```ignore,no_run
12974 /// # use google_cloud_oracledatabase_v1::model::ListDbVersionsResponse;
12975 /// use google_cloud_oracledatabase_v1::model::DbVersion;
12976 /// let x = ListDbVersionsResponse::new()
12977 /// .set_db_versions([
12978 /// DbVersion::default()/* use setters */,
12979 /// DbVersion::default()/* use (different) setters */,
12980 /// ]);
12981 /// ```
12982 pub fn set_db_versions<T, V>(mut self, v: T) -> Self
12983 where
12984 T: std::iter::IntoIterator<Item = V>,
12985 V: std::convert::Into<crate::model::DbVersion>,
12986 {
12987 use std::iter::Iterator;
12988 self.db_versions = v.into_iter().map(|i| i.into()).collect();
12989 self
12990 }
12991
12992 /// Sets the value of [next_page_token][crate::model::ListDbVersionsResponse::next_page_token].
12993 ///
12994 /// # Example
12995 /// ```ignore,no_run
12996 /// # use google_cloud_oracledatabase_v1::model::ListDbVersionsResponse;
12997 /// let x = ListDbVersionsResponse::new().set_next_page_token("example");
12998 /// ```
12999 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13000 self.next_page_token = v.into();
13001 self
13002 }
13003}
13004
13005impl wkt::message::Message for ListDbVersionsResponse {
13006 fn typename() -> &'static str {
13007 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbVersionsResponse"
13008 }
13009}
13010
13011#[doc(hidden)]
13012impl google_cloud_gax::paginator::internal::PageableResponse for ListDbVersionsResponse {
13013 type PageItem = crate::model::DbVersion;
13014
13015 fn items(self) -> std::vec::Vec<Self::PageItem> {
13016 self.db_versions
13017 }
13018
13019 fn next_page_token(&self) -> std::string::String {
13020 use std::clone::Clone;
13021 self.next_page_token.clone()
13022 }
13023}
13024
13025/// Details of the Entitlement resource.
13026#[derive(Clone, Default, PartialEq)]
13027#[non_exhaustive]
13028pub struct Entitlement {
13029 /// Identifier. The name of the Entitlement resource with the format:
13030 /// projects/{project}/locations/{region}/entitlements/{entitlement}
13031 pub name: std::string::String,
13032
13033 /// Details of the OCI Cloud Account.
13034 pub cloud_account_details: std::option::Option<crate::model::CloudAccountDetails>,
13035
13036 /// Output only. Google Cloud Marketplace order ID (aka entitlement ID)
13037 pub entitlement_id: std::string::String,
13038
13039 /// Output only. Entitlement State.
13040 pub state: crate::model::entitlement::State,
13041
13042 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13043}
13044
13045impl Entitlement {
13046 pub fn new() -> Self {
13047 std::default::Default::default()
13048 }
13049
13050 /// Sets the value of [name][crate::model::Entitlement::name].
13051 ///
13052 /// # Example
13053 /// ```ignore,no_run
13054 /// # use google_cloud_oracledatabase_v1::model::Entitlement;
13055 /// let x = Entitlement::new().set_name("example");
13056 /// ```
13057 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13058 self.name = v.into();
13059 self
13060 }
13061
13062 /// Sets the value of [cloud_account_details][crate::model::Entitlement::cloud_account_details].
13063 ///
13064 /// # Example
13065 /// ```ignore,no_run
13066 /// # use google_cloud_oracledatabase_v1::model::Entitlement;
13067 /// use google_cloud_oracledatabase_v1::model::CloudAccountDetails;
13068 /// let x = Entitlement::new().set_cloud_account_details(CloudAccountDetails::default()/* use setters */);
13069 /// ```
13070 pub fn set_cloud_account_details<T>(mut self, v: T) -> Self
13071 where
13072 T: std::convert::Into<crate::model::CloudAccountDetails>,
13073 {
13074 self.cloud_account_details = std::option::Option::Some(v.into());
13075 self
13076 }
13077
13078 /// Sets or clears the value of [cloud_account_details][crate::model::Entitlement::cloud_account_details].
13079 ///
13080 /// # Example
13081 /// ```ignore,no_run
13082 /// # use google_cloud_oracledatabase_v1::model::Entitlement;
13083 /// use google_cloud_oracledatabase_v1::model::CloudAccountDetails;
13084 /// let x = Entitlement::new().set_or_clear_cloud_account_details(Some(CloudAccountDetails::default()/* use setters */));
13085 /// let x = Entitlement::new().set_or_clear_cloud_account_details(None::<CloudAccountDetails>);
13086 /// ```
13087 pub fn set_or_clear_cloud_account_details<T>(mut self, v: std::option::Option<T>) -> Self
13088 where
13089 T: std::convert::Into<crate::model::CloudAccountDetails>,
13090 {
13091 self.cloud_account_details = v.map(|x| x.into());
13092 self
13093 }
13094
13095 /// Sets the value of [entitlement_id][crate::model::Entitlement::entitlement_id].
13096 ///
13097 /// # Example
13098 /// ```ignore,no_run
13099 /// # use google_cloud_oracledatabase_v1::model::Entitlement;
13100 /// let x = Entitlement::new().set_entitlement_id("example");
13101 /// ```
13102 pub fn set_entitlement_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13103 self.entitlement_id = v.into();
13104 self
13105 }
13106
13107 /// Sets the value of [state][crate::model::Entitlement::state].
13108 ///
13109 /// # Example
13110 /// ```ignore,no_run
13111 /// # use google_cloud_oracledatabase_v1::model::Entitlement;
13112 /// use google_cloud_oracledatabase_v1::model::entitlement::State;
13113 /// let x0 = Entitlement::new().set_state(State::AccountNotLinked);
13114 /// let x1 = Entitlement::new().set_state(State::AccountNotActive);
13115 /// let x2 = Entitlement::new().set_state(State::Active);
13116 /// ```
13117 pub fn set_state<T: std::convert::Into<crate::model::entitlement::State>>(
13118 mut self,
13119 v: T,
13120 ) -> Self {
13121 self.state = v.into();
13122 self
13123 }
13124}
13125
13126impl wkt::message::Message for Entitlement {
13127 fn typename() -> &'static str {
13128 "type.googleapis.com/google.cloud.oracledatabase.v1.Entitlement"
13129 }
13130}
13131
13132/// Defines additional types related to [Entitlement].
13133pub mod entitlement {
13134 #[allow(unused_imports)]
13135 use super::*;
13136
13137 /// The various lifecycle states of the subscription.
13138 ///
13139 /// # Working with unknown values
13140 ///
13141 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13142 /// additional enum variants at any time. Adding new variants is not considered
13143 /// a breaking change. Applications should write their code in anticipation of:
13144 ///
13145 /// - New values appearing in future releases of the client library, **and**
13146 /// - New values received dynamically, without application changes.
13147 ///
13148 /// Please consult the [Working with enums] section in the user guide for some
13149 /// guidelines.
13150 ///
13151 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13152 #[derive(Clone, Debug, PartialEq)]
13153 #[non_exhaustive]
13154 pub enum State {
13155 /// Default unspecified value.
13156 Unspecified,
13157 /// Account not linked.
13158 AccountNotLinked,
13159 /// Account is linked but not active.
13160 AccountNotActive,
13161 /// Entitlement and Account are active.
13162 Active,
13163 /// Account is suspended.
13164 AccountSuspended,
13165 /// Entitlement is not approved in private marketplace.
13166 NotApprovedInPrivateMarketplace,
13167 /// If set, the enum was initialized with an unknown value.
13168 ///
13169 /// Applications can examine the value using [State::value] or
13170 /// [State::name].
13171 UnknownValue(state::UnknownValue),
13172 }
13173
13174 #[doc(hidden)]
13175 pub mod state {
13176 #[allow(unused_imports)]
13177 use super::*;
13178 #[derive(Clone, Debug, PartialEq)]
13179 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13180 }
13181
13182 impl State {
13183 /// Gets the enum value.
13184 ///
13185 /// Returns `None` if the enum contains an unknown value deserialized from
13186 /// the string representation of enums.
13187 pub fn value(&self) -> std::option::Option<i32> {
13188 match self {
13189 Self::Unspecified => std::option::Option::Some(0),
13190 Self::AccountNotLinked => std::option::Option::Some(1),
13191 Self::AccountNotActive => std::option::Option::Some(2),
13192 Self::Active => std::option::Option::Some(3),
13193 Self::AccountSuspended => std::option::Option::Some(4),
13194 Self::NotApprovedInPrivateMarketplace => std::option::Option::Some(5),
13195 Self::UnknownValue(u) => u.0.value(),
13196 }
13197 }
13198
13199 /// Gets the enum value as a string.
13200 ///
13201 /// Returns `None` if the enum contains an unknown value deserialized from
13202 /// the integer representation of enums.
13203 pub fn name(&self) -> std::option::Option<&str> {
13204 match self {
13205 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13206 Self::AccountNotLinked => std::option::Option::Some("ACCOUNT_NOT_LINKED"),
13207 Self::AccountNotActive => std::option::Option::Some("ACCOUNT_NOT_ACTIVE"),
13208 Self::Active => std::option::Option::Some("ACTIVE"),
13209 Self::AccountSuspended => std::option::Option::Some("ACCOUNT_SUSPENDED"),
13210 Self::NotApprovedInPrivateMarketplace => {
13211 std::option::Option::Some("NOT_APPROVED_IN_PRIVATE_MARKETPLACE")
13212 }
13213 Self::UnknownValue(u) => u.0.name(),
13214 }
13215 }
13216 }
13217
13218 impl std::default::Default for State {
13219 fn default() -> Self {
13220 use std::convert::From;
13221 Self::from(0)
13222 }
13223 }
13224
13225 impl std::fmt::Display for State {
13226 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13227 wkt::internal::display_enum(f, self.name(), self.value())
13228 }
13229 }
13230
13231 impl std::convert::From<i32> for State {
13232 fn from(value: i32) -> Self {
13233 match value {
13234 0 => Self::Unspecified,
13235 1 => Self::AccountNotLinked,
13236 2 => Self::AccountNotActive,
13237 3 => Self::Active,
13238 4 => Self::AccountSuspended,
13239 5 => Self::NotApprovedInPrivateMarketplace,
13240 _ => Self::UnknownValue(state::UnknownValue(
13241 wkt::internal::UnknownEnumValue::Integer(value),
13242 )),
13243 }
13244 }
13245 }
13246
13247 impl std::convert::From<&str> for State {
13248 fn from(value: &str) -> Self {
13249 use std::string::ToString;
13250 match value {
13251 "STATE_UNSPECIFIED" => Self::Unspecified,
13252 "ACCOUNT_NOT_LINKED" => Self::AccountNotLinked,
13253 "ACCOUNT_NOT_ACTIVE" => Self::AccountNotActive,
13254 "ACTIVE" => Self::Active,
13255 "ACCOUNT_SUSPENDED" => Self::AccountSuspended,
13256 "NOT_APPROVED_IN_PRIVATE_MARKETPLACE" => Self::NotApprovedInPrivateMarketplace,
13257 _ => Self::UnknownValue(state::UnknownValue(
13258 wkt::internal::UnknownEnumValue::String(value.to_string()),
13259 )),
13260 }
13261 }
13262 }
13263
13264 impl serde::ser::Serialize for State {
13265 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13266 where
13267 S: serde::Serializer,
13268 {
13269 match self {
13270 Self::Unspecified => serializer.serialize_i32(0),
13271 Self::AccountNotLinked => serializer.serialize_i32(1),
13272 Self::AccountNotActive => serializer.serialize_i32(2),
13273 Self::Active => serializer.serialize_i32(3),
13274 Self::AccountSuspended => serializer.serialize_i32(4),
13275 Self::NotApprovedInPrivateMarketplace => serializer.serialize_i32(5),
13276 Self::UnknownValue(u) => u.0.serialize(serializer),
13277 }
13278 }
13279 }
13280
13281 impl<'de> serde::de::Deserialize<'de> for State {
13282 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13283 where
13284 D: serde::Deserializer<'de>,
13285 {
13286 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13287 ".google.cloud.oracledatabase.v1.Entitlement.State",
13288 ))
13289 }
13290 }
13291}
13292
13293/// Details of the OCI Cloud Account.
13294#[derive(Clone, Default, PartialEq)]
13295#[non_exhaustive]
13296pub struct CloudAccountDetails {
13297 /// Output only. OCI account name.
13298 pub cloud_account: std::string::String,
13299
13300 /// Output only. OCI account home region.
13301 pub cloud_account_home_region: std::string::String,
13302
13303 /// Output only. URL to link an existing account.
13304 pub link_existing_account_uri: std::option::Option<std::string::String>,
13305
13306 /// Output only. URL to create a new account and link.
13307 pub account_creation_uri: std::option::Option<std::string::String>,
13308
13309 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13310}
13311
13312impl CloudAccountDetails {
13313 pub fn new() -> Self {
13314 std::default::Default::default()
13315 }
13316
13317 /// Sets the value of [cloud_account][crate::model::CloudAccountDetails::cloud_account].
13318 ///
13319 /// # Example
13320 /// ```ignore,no_run
13321 /// # use google_cloud_oracledatabase_v1::model::CloudAccountDetails;
13322 /// let x = CloudAccountDetails::new().set_cloud_account("example");
13323 /// ```
13324 pub fn set_cloud_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13325 self.cloud_account = v.into();
13326 self
13327 }
13328
13329 /// Sets the value of [cloud_account_home_region][crate::model::CloudAccountDetails::cloud_account_home_region].
13330 ///
13331 /// # Example
13332 /// ```ignore,no_run
13333 /// # use google_cloud_oracledatabase_v1::model::CloudAccountDetails;
13334 /// let x = CloudAccountDetails::new().set_cloud_account_home_region("example");
13335 /// ```
13336 pub fn set_cloud_account_home_region<T: std::convert::Into<std::string::String>>(
13337 mut self,
13338 v: T,
13339 ) -> Self {
13340 self.cloud_account_home_region = v.into();
13341 self
13342 }
13343
13344 /// Sets the value of [link_existing_account_uri][crate::model::CloudAccountDetails::link_existing_account_uri].
13345 ///
13346 /// # Example
13347 /// ```ignore,no_run
13348 /// # use google_cloud_oracledatabase_v1::model::CloudAccountDetails;
13349 /// let x = CloudAccountDetails::new().set_link_existing_account_uri("example");
13350 /// ```
13351 pub fn set_link_existing_account_uri<T>(mut self, v: T) -> Self
13352 where
13353 T: std::convert::Into<std::string::String>,
13354 {
13355 self.link_existing_account_uri = std::option::Option::Some(v.into());
13356 self
13357 }
13358
13359 /// Sets or clears the value of [link_existing_account_uri][crate::model::CloudAccountDetails::link_existing_account_uri].
13360 ///
13361 /// # Example
13362 /// ```ignore,no_run
13363 /// # use google_cloud_oracledatabase_v1::model::CloudAccountDetails;
13364 /// let x = CloudAccountDetails::new().set_or_clear_link_existing_account_uri(Some("example"));
13365 /// let x = CloudAccountDetails::new().set_or_clear_link_existing_account_uri(None::<String>);
13366 /// ```
13367 pub fn set_or_clear_link_existing_account_uri<T>(mut self, v: std::option::Option<T>) -> Self
13368 where
13369 T: std::convert::Into<std::string::String>,
13370 {
13371 self.link_existing_account_uri = v.map(|x| x.into());
13372 self
13373 }
13374
13375 /// Sets the value of [account_creation_uri][crate::model::CloudAccountDetails::account_creation_uri].
13376 ///
13377 /// # Example
13378 /// ```ignore,no_run
13379 /// # use google_cloud_oracledatabase_v1::model::CloudAccountDetails;
13380 /// let x = CloudAccountDetails::new().set_account_creation_uri("example");
13381 /// ```
13382 pub fn set_account_creation_uri<T>(mut self, v: T) -> Self
13383 where
13384 T: std::convert::Into<std::string::String>,
13385 {
13386 self.account_creation_uri = std::option::Option::Some(v.into());
13387 self
13388 }
13389
13390 /// Sets or clears the value of [account_creation_uri][crate::model::CloudAccountDetails::account_creation_uri].
13391 ///
13392 /// # Example
13393 /// ```ignore,no_run
13394 /// # use google_cloud_oracledatabase_v1::model::CloudAccountDetails;
13395 /// let x = CloudAccountDetails::new().set_or_clear_account_creation_uri(Some("example"));
13396 /// let x = CloudAccountDetails::new().set_or_clear_account_creation_uri(None::<String>);
13397 /// ```
13398 pub fn set_or_clear_account_creation_uri<T>(mut self, v: std::option::Option<T>) -> Self
13399 where
13400 T: std::convert::Into<std::string::String>,
13401 {
13402 self.account_creation_uri = v.map(|x| x.into());
13403 self
13404 }
13405}
13406
13407impl wkt::message::Message for CloudAccountDetails {
13408 fn typename() -> &'static str {
13409 "type.googleapis.com/google.cloud.oracledatabase.v1.CloudAccountDetails"
13410 }
13411}
13412
13413/// Represents CloudExadataInfrastructure resource.
13414/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/>
13415#[derive(Clone, Default, PartialEq)]
13416#[non_exhaustive]
13417pub struct CloudExadataInfrastructure {
13418 /// Identifier. The name of the Exadata Infrastructure resource with the
13419 /// format:
13420 /// projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}
13421 pub name: std::string::String,
13422
13423 /// Optional. User friendly name for this resource.
13424 pub display_name: std::string::String,
13425
13426 /// Optional. The GCP Oracle zone where Oracle Exadata Infrastructure is
13427 /// hosted. Example: us-east4-b-r2. If not specified, the system will pick a
13428 /// zone based on availability.
13429 pub gcp_oracle_zone: std::string::String,
13430
13431 /// Output only. Entitlement ID of the private offer against which this
13432 /// infrastructure resource is provisioned.
13433 pub entitlement_id: std::string::String,
13434
13435 /// Optional. Various properties of the infra.
13436 pub properties: std::option::Option<crate::model::CloudExadataInfrastructureProperties>,
13437
13438 /// Optional. Labels or tags associated with the resource.
13439 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
13440
13441 /// Output only. The date and time that the Exadata Infrastructure was created.
13442 pub create_time: std::option::Option<wkt::Timestamp>,
13443
13444 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13445}
13446
13447impl CloudExadataInfrastructure {
13448 pub fn new() -> Self {
13449 std::default::Default::default()
13450 }
13451
13452 /// Sets the value of [name][crate::model::CloudExadataInfrastructure::name].
13453 ///
13454 /// # Example
13455 /// ```ignore,no_run
13456 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
13457 /// let x = CloudExadataInfrastructure::new().set_name("example");
13458 /// ```
13459 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13460 self.name = v.into();
13461 self
13462 }
13463
13464 /// Sets the value of [display_name][crate::model::CloudExadataInfrastructure::display_name].
13465 ///
13466 /// # Example
13467 /// ```ignore,no_run
13468 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
13469 /// let x = CloudExadataInfrastructure::new().set_display_name("example");
13470 /// ```
13471 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13472 self.display_name = v.into();
13473 self
13474 }
13475
13476 /// Sets the value of [gcp_oracle_zone][crate::model::CloudExadataInfrastructure::gcp_oracle_zone].
13477 ///
13478 /// # Example
13479 /// ```ignore,no_run
13480 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
13481 /// let x = CloudExadataInfrastructure::new().set_gcp_oracle_zone("example");
13482 /// ```
13483 pub fn set_gcp_oracle_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13484 self.gcp_oracle_zone = v.into();
13485 self
13486 }
13487
13488 /// Sets the value of [entitlement_id][crate::model::CloudExadataInfrastructure::entitlement_id].
13489 ///
13490 /// # Example
13491 /// ```ignore,no_run
13492 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
13493 /// let x = CloudExadataInfrastructure::new().set_entitlement_id("example");
13494 /// ```
13495 pub fn set_entitlement_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13496 self.entitlement_id = v.into();
13497 self
13498 }
13499
13500 /// Sets the value of [properties][crate::model::CloudExadataInfrastructure::properties].
13501 ///
13502 /// # Example
13503 /// ```ignore,no_run
13504 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
13505 /// use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13506 /// let x = CloudExadataInfrastructure::new().set_properties(CloudExadataInfrastructureProperties::default()/* use setters */);
13507 /// ```
13508 pub fn set_properties<T>(mut self, v: T) -> Self
13509 where
13510 T: std::convert::Into<crate::model::CloudExadataInfrastructureProperties>,
13511 {
13512 self.properties = std::option::Option::Some(v.into());
13513 self
13514 }
13515
13516 /// Sets or clears the value of [properties][crate::model::CloudExadataInfrastructure::properties].
13517 ///
13518 /// # Example
13519 /// ```ignore,no_run
13520 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
13521 /// use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13522 /// let x = CloudExadataInfrastructure::new().set_or_clear_properties(Some(CloudExadataInfrastructureProperties::default()/* use setters */));
13523 /// let x = CloudExadataInfrastructure::new().set_or_clear_properties(None::<CloudExadataInfrastructureProperties>);
13524 /// ```
13525 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
13526 where
13527 T: std::convert::Into<crate::model::CloudExadataInfrastructureProperties>,
13528 {
13529 self.properties = v.map(|x| x.into());
13530 self
13531 }
13532
13533 /// Sets the value of [labels][crate::model::CloudExadataInfrastructure::labels].
13534 ///
13535 /// # Example
13536 /// ```ignore,no_run
13537 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
13538 /// let x = CloudExadataInfrastructure::new().set_labels([
13539 /// ("key0", "abc"),
13540 /// ("key1", "xyz"),
13541 /// ]);
13542 /// ```
13543 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
13544 where
13545 T: std::iter::IntoIterator<Item = (K, V)>,
13546 K: std::convert::Into<std::string::String>,
13547 V: std::convert::Into<std::string::String>,
13548 {
13549 use std::iter::Iterator;
13550 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
13551 self
13552 }
13553
13554 /// Sets the value of [create_time][crate::model::CloudExadataInfrastructure::create_time].
13555 ///
13556 /// # Example
13557 /// ```ignore,no_run
13558 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
13559 /// use wkt::Timestamp;
13560 /// let x = CloudExadataInfrastructure::new().set_create_time(Timestamp::default()/* use setters */);
13561 /// ```
13562 pub fn set_create_time<T>(mut self, v: T) -> Self
13563 where
13564 T: std::convert::Into<wkt::Timestamp>,
13565 {
13566 self.create_time = std::option::Option::Some(v.into());
13567 self
13568 }
13569
13570 /// Sets or clears the value of [create_time][crate::model::CloudExadataInfrastructure::create_time].
13571 ///
13572 /// # Example
13573 /// ```ignore,no_run
13574 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
13575 /// use wkt::Timestamp;
13576 /// let x = CloudExadataInfrastructure::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
13577 /// let x = CloudExadataInfrastructure::new().set_or_clear_create_time(None::<Timestamp>);
13578 /// ```
13579 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
13580 where
13581 T: std::convert::Into<wkt::Timestamp>,
13582 {
13583 self.create_time = v.map(|x| x.into());
13584 self
13585 }
13586}
13587
13588impl wkt::message::Message for CloudExadataInfrastructure {
13589 fn typename() -> &'static str {
13590 "type.googleapis.com/google.cloud.oracledatabase.v1.CloudExadataInfrastructure"
13591 }
13592}
13593
13594/// Various properties of Exadata Infrastructure.
13595#[derive(Clone, Default, PartialEq)]
13596#[non_exhaustive]
13597pub struct CloudExadataInfrastructureProperties {
13598 /// Output only. OCID of created infra.
13599 /// <https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle>
13600 pub ocid: std::string::String,
13601
13602 /// Optional. The number of compute servers for the Exadata Infrastructure.
13603 pub compute_count: i32,
13604
13605 /// Optional. The number of Cloud Exadata storage servers for the Exadata
13606 /// Infrastructure.
13607 pub storage_count: i32,
13608
13609 /// Optional. The total storage allocated to the Exadata Infrastructure
13610 /// resource, in gigabytes (GB).
13611 pub total_storage_size_gb: i32,
13612
13613 /// Output only. The available storage can be allocated to the Exadata
13614 /// Infrastructure resource, in gigabytes (GB).
13615 pub available_storage_size_gb: i32,
13616
13617 /// Optional. Maintenance window for repair.
13618 pub maintenance_window: std::option::Option<crate::model::MaintenanceWindow>,
13619
13620 /// Output only. The current lifecycle state of the Exadata Infrastructure.
13621 pub state: crate::model::cloud_exadata_infrastructure_properties::State,
13622
13623 /// Required. The shape of the Exadata Infrastructure. The shape determines the
13624 /// amount of CPU, storage, and memory resources allocated to the instance.
13625 pub shape: std::string::String,
13626
13627 /// Output only. Deep link to the OCI console to view this resource.
13628 pub oci_url: std::string::String,
13629
13630 /// Output only. The number of enabled CPU cores.
13631 pub cpu_count: i32,
13632
13633 /// Output only. The total number of CPU cores available.
13634 pub max_cpu_count: i32,
13635
13636 /// Output only. The memory allocated in GBs.
13637 pub memory_size_gb: i32,
13638
13639 /// Output only. The total memory available in GBs.
13640 pub max_memory_gb: i32,
13641
13642 /// Output only. The local node storage allocated in GBs.
13643 pub db_node_storage_size_gb: i32,
13644
13645 /// Output only. The total local node storage available in GBs.
13646 pub max_db_node_storage_size_gb: i32,
13647
13648 /// Output only. Size, in terabytes, of the DATA disk group.
13649 pub data_storage_size_tb: f64,
13650
13651 /// Output only. The total available DATA disk group size.
13652 pub max_data_storage_tb: f64,
13653
13654 /// Output only. The requested number of additional storage servers activated
13655 /// for the Exadata Infrastructure.
13656 pub activated_storage_count: i32,
13657
13658 /// Output only. The requested number of additional storage servers for the
13659 /// Exadata Infrastructure.
13660 pub additional_storage_count: i32,
13661
13662 /// Output only. The software version of the database servers (dom0) in the
13663 /// Exadata Infrastructure.
13664 pub db_server_version: std::string::String,
13665
13666 /// Output only. The software version of the storage servers (cells) in the
13667 /// Exadata Infrastructure.
13668 pub storage_server_version: std::string::String,
13669
13670 /// Output only. The OCID of the next maintenance run.
13671 pub next_maintenance_run_id: std::string::String,
13672
13673 /// Output only. The time when the next maintenance run will occur.
13674 pub next_maintenance_run_time: std::option::Option<wkt::Timestamp>,
13675
13676 /// Output only. The time when the next security maintenance run will occur.
13677 pub next_security_maintenance_run_time: std::option::Option<wkt::Timestamp>,
13678
13679 /// Optional. The list of customer contacts.
13680 pub customer_contacts: std::vec::Vec<crate::model::CustomerContact>,
13681
13682 /// Output only. The monthly software version of the storage servers (cells)
13683 /// in the Exadata Infrastructure. Example: 20.1.15
13684 pub monthly_storage_server_version: std::string::String,
13685
13686 /// Output only. The monthly software version of the database servers (dom0)
13687 /// in the Exadata Infrastructure. Example: 20.1.15
13688 pub monthly_db_server_version: std::string::String,
13689
13690 /// Output only. The compute model of the Exadata Infrastructure.
13691 pub compute_model: crate::model::ComputeModel,
13692
13693 /// Output only. The database server type of the Exadata Infrastructure.
13694 pub database_server_type: std::string::String,
13695
13696 /// Output only. The storage server type of the Exadata Infrastructure.
13697 pub storage_server_type: std::string::String,
13698
13699 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13700}
13701
13702impl CloudExadataInfrastructureProperties {
13703 pub fn new() -> Self {
13704 std::default::Default::default()
13705 }
13706
13707 /// Sets the value of [ocid][crate::model::CloudExadataInfrastructureProperties::ocid].
13708 ///
13709 /// # Example
13710 /// ```ignore,no_run
13711 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13712 /// let x = CloudExadataInfrastructureProperties::new().set_ocid("example");
13713 /// ```
13714 pub fn set_ocid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13715 self.ocid = v.into();
13716 self
13717 }
13718
13719 /// Sets the value of [compute_count][crate::model::CloudExadataInfrastructureProperties::compute_count].
13720 ///
13721 /// # Example
13722 /// ```ignore,no_run
13723 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13724 /// let x = CloudExadataInfrastructureProperties::new().set_compute_count(42);
13725 /// ```
13726 pub fn set_compute_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13727 self.compute_count = v.into();
13728 self
13729 }
13730
13731 /// Sets the value of [storage_count][crate::model::CloudExadataInfrastructureProperties::storage_count].
13732 ///
13733 /// # Example
13734 /// ```ignore,no_run
13735 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13736 /// let x = CloudExadataInfrastructureProperties::new().set_storage_count(42);
13737 /// ```
13738 pub fn set_storage_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13739 self.storage_count = v.into();
13740 self
13741 }
13742
13743 /// Sets the value of [total_storage_size_gb][crate::model::CloudExadataInfrastructureProperties::total_storage_size_gb].
13744 ///
13745 /// # Example
13746 /// ```ignore,no_run
13747 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13748 /// let x = CloudExadataInfrastructureProperties::new().set_total_storage_size_gb(42);
13749 /// ```
13750 pub fn set_total_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13751 self.total_storage_size_gb = v.into();
13752 self
13753 }
13754
13755 /// Sets the value of [available_storage_size_gb][crate::model::CloudExadataInfrastructureProperties::available_storage_size_gb].
13756 ///
13757 /// # Example
13758 /// ```ignore,no_run
13759 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13760 /// let x = CloudExadataInfrastructureProperties::new().set_available_storage_size_gb(42);
13761 /// ```
13762 pub fn set_available_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13763 self.available_storage_size_gb = v.into();
13764 self
13765 }
13766
13767 /// Sets the value of [maintenance_window][crate::model::CloudExadataInfrastructureProperties::maintenance_window].
13768 ///
13769 /// # Example
13770 /// ```ignore,no_run
13771 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13772 /// use google_cloud_oracledatabase_v1::model::MaintenanceWindow;
13773 /// let x = CloudExadataInfrastructureProperties::new().set_maintenance_window(MaintenanceWindow::default()/* use setters */);
13774 /// ```
13775 pub fn set_maintenance_window<T>(mut self, v: T) -> Self
13776 where
13777 T: std::convert::Into<crate::model::MaintenanceWindow>,
13778 {
13779 self.maintenance_window = std::option::Option::Some(v.into());
13780 self
13781 }
13782
13783 /// Sets or clears the value of [maintenance_window][crate::model::CloudExadataInfrastructureProperties::maintenance_window].
13784 ///
13785 /// # Example
13786 /// ```ignore,no_run
13787 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13788 /// use google_cloud_oracledatabase_v1::model::MaintenanceWindow;
13789 /// let x = CloudExadataInfrastructureProperties::new().set_or_clear_maintenance_window(Some(MaintenanceWindow::default()/* use setters */));
13790 /// let x = CloudExadataInfrastructureProperties::new().set_or_clear_maintenance_window(None::<MaintenanceWindow>);
13791 /// ```
13792 pub fn set_or_clear_maintenance_window<T>(mut self, v: std::option::Option<T>) -> Self
13793 where
13794 T: std::convert::Into<crate::model::MaintenanceWindow>,
13795 {
13796 self.maintenance_window = v.map(|x| x.into());
13797 self
13798 }
13799
13800 /// Sets the value of [state][crate::model::CloudExadataInfrastructureProperties::state].
13801 ///
13802 /// # Example
13803 /// ```ignore,no_run
13804 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13805 /// use google_cloud_oracledatabase_v1::model::cloud_exadata_infrastructure_properties::State;
13806 /// let x0 = CloudExadataInfrastructureProperties::new().set_state(State::Provisioning);
13807 /// let x1 = CloudExadataInfrastructureProperties::new().set_state(State::Available);
13808 /// let x2 = CloudExadataInfrastructureProperties::new().set_state(State::Updating);
13809 /// ```
13810 pub fn set_state<
13811 T: std::convert::Into<crate::model::cloud_exadata_infrastructure_properties::State>,
13812 >(
13813 mut self,
13814 v: T,
13815 ) -> Self {
13816 self.state = v.into();
13817 self
13818 }
13819
13820 /// Sets the value of [shape][crate::model::CloudExadataInfrastructureProperties::shape].
13821 ///
13822 /// # Example
13823 /// ```ignore,no_run
13824 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13825 /// let x = CloudExadataInfrastructureProperties::new().set_shape("example");
13826 /// ```
13827 pub fn set_shape<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13828 self.shape = v.into();
13829 self
13830 }
13831
13832 /// Sets the value of [oci_url][crate::model::CloudExadataInfrastructureProperties::oci_url].
13833 ///
13834 /// # Example
13835 /// ```ignore,no_run
13836 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13837 /// let x = CloudExadataInfrastructureProperties::new().set_oci_url("example");
13838 /// ```
13839 pub fn set_oci_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13840 self.oci_url = v.into();
13841 self
13842 }
13843
13844 /// Sets the value of [cpu_count][crate::model::CloudExadataInfrastructureProperties::cpu_count].
13845 ///
13846 /// # Example
13847 /// ```ignore,no_run
13848 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13849 /// let x = CloudExadataInfrastructureProperties::new().set_cpu_count(42);
13850 /// ```
13851 pub fn set_cpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13852 self.cpu_count = v.into();
13853 self
13854 }
13855
13856 /// Sets the value of [max_cpu_count][crate::model::CloudExadataInfrastructureProperties::max_cpu_count].
13857 ///
13858 /// # Example
13859 /// ```ignore,no_run
13860 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13861 /// let x = CloudExadataInfrastructureProperties::new().set_max_cpu_count(42);
13862 /// ```
13863 pub fn set_max_cpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13864 self.max_cpu_count = v.into();
13865 self
13866 }
13867
13868 /// Sets the value of [memory_size_gb][crate::model::CloudExadataInfrastructureProperties::memory_size_gb].
13869 ///
13870 /// # Example
13871 /// ```ignore,no_run
13872 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13873 /// let x = CloudExadataInfrastructureProperties::new().set_memory_size_gb(42);
13874 /// ```
13875 pub fn set_memory_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13876 self.memory_size_gb = v.into();
13877 self
13878 }
13879
13880 /// Sets the value of [max_memory_gb][crate::model::CloudExadataInfrastructureProperties::max_memory_gb].
13881 ///
13882 /// # Example
13883 /// ```ignore,no_run
13884 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13885 /// let x = CloudExadataInfrastructureProperties::new().set_max_memory_gb(42);
13886 /// ```
13887 pub fn set_max_memory_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13888 self.max_memory_gb = v.into();
13889 self
13890 }
13891
13892 /// Sets the value of [db_node_storage_size_gb][crate::model::CloudExadataInfrastructureProperties::db_node_storage_size_gb].
13893 ///
13894 /// # Example
13895 /// ```ignore,no_run
13896 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13897 /// let x = CloudExadataInfrastructureProperties::new().set_db_node_storage_size_gb(42);
13898 /// ```
13899 pub fn set_db_node_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13900 self.db_node_storage_size_gb = v.into();
13901 self
13902 }
13903
13904 /// Sets the value of [max_db_node_storage_size_gb][crate::model::CloudExadataInfrastructureProperties::max_db_node_storage_size_gb].
13905 ///
13906 /// # Example
13907 /// ```ignore,no_run
13908 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13909 /// let x = CloudExadataInfrastructureProperties::new().set_max_db_node_storage_size_gb(42);
13910 /// ```
13911 pub fn set_max_db_node_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13912 self.max_db_node_storage_size_gb = v.into();
13913 self
13914 }
13915
13916 /// Sets the value of [data_storage_size_tb][crate::model::CloudExadataInfrastructureProperties::data_storage_size_tb].
13917 ///
13918 /// # Example
13919 /// ```ignore,no_run
13920 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13921 /// let x = CloudExadataInfrastructureProperties::new().set_data_storage_size_tb(42.0);
13922 /// ```
13923 pub fn set_data_storage_size_tb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
13924 self.data_storage_size_tb = v.into();
13925 self
13926 }
13927
13928 /// Sets the value of [max_data_storage_tb][crate::model::CloudExadataInfrastructureProperties::max_data_storage_tb].
13929 ///
13930 /// # Example
13931 /// ```ignore,no_run
13932 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13933 /// let x = CloudExadataInfrastructureProperties::new().set_max_data_storage_tb(42.0);
13934 /// ```
13935 pub fn set_max_data_storage_tb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
13936 self.max_data_storage_tb = v.into();
13937 self
13938 }
13939
13940 /// Sets the value of [activated_storage_count][crate::model::CloudExadataInfrastructureProperties::activated_storage_count].
13941 ///
13942 /// # Example
13943 /// ```ignore,no_run
13944 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13945 /// let x = CloudExadataInfrastructureProperties::new().set_activated_storage_count(42);
13946 /// ```
13947 pub fn set_activated_storage_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13948 self.activated_storage_count = v.into();
13949 self
13950 }
13951
13952 /// Sets the value of [additional_storage_count][crate::model::CloudExadataInfrastructureProperties::additional_storage_count].
13953 ///
13954 /// # Example
13955 /// ```ignore,no_run
13956 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13957 /// let x = CloudExadataInfrastructureProperties::new().set_additional_storage_count(42);
13958 /// ```
13959 pub fn set_additional_storage_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13960 self.additional_storage_count = v.into();
13961 self
13962 }
13963
13964 /// Sets the value of [db_server_version][crate::model::CloudExadataInfrastructureProperties::db_server_version].
13965 ///
13966 /// # Example
13967 /// ```ignore,no_run
13968 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13969 /// let x = CloudExadataInfrastructureProperties::new().set_db_server_version("example");
13970 /// ```
13971 pub fn set_db_server_version<T: std::convert::Into<std::string::String>>(
13972 mut self,
13973 v: T,
13974 ) -> Self {
13975 self.db_server_version = v.into();
13976 self
13977 }
13978
13979 /// Sets the value of [storage_server_version][crate::model::CloudExadataInfrastructureProperties::storage_server_version].
13980 ///
13981 /// # Example
13982 /// ```ignore,no_run
13983 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13984 /// let x = CloudExadataInfrastructureProperties::new().set_storage_server_version("example");
13985 /// ```
13986 pub fn set_storage_server_version<T: std::convert::Into<std::string::String>>(
13987 mut self,
13988 v: T,
13989 ) -> Self {
13990 self.storage_server_version = v.into();
13991 self
13992 }
13993
13994 /// Sets the value of [next_maintenance_run_id][crate::model::CloudExadataInfrastructureProperties::next_maintenance_run_id].
13995 ///
13996 /// # Example
13997 /// ```ignore,no_run
13998 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
13999 /// let x = CloudExadataInfrastructureProperties::new().set_next_maintenance_run_id("example");
14000 /// ```
14001 pub fn set_next_maintenance_run_id<T: std::convert::Into<std::string::String>>(
14002 mut self,
14003 v: T,
14004 ) -> Self {
14005 self.next_maintenance_run_id = v.into();
14006 self
14007 }
14008
14009 /// Sets the value of [next_maintenance_run_time][crate::model::CloudExadataInfrastructureProperties::next_maintenance_run_time].
14010 ///
14011 /// # Example
14012 /// ```ignore,no_run
14013 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
14014 /// use wkt::Timestamp;
14015 /// let x = CloudExadataInfrastructureProperties::new().set_next_maintenance_run_time(Timestamp::default()/* use setters */);
14016 /// ```
14017 pub fn set_next_maintenance_run_time<T>(mut self, v: T) -> Self
14018 where
14019 T: std::convert::Into<wkt::Timestamp>,
14020 {
14021 self.next_maintenance_run_time = std::option::Option::Some(v.into());
14022 self
14023 }
14024
14025 /// Sets or clears the value of [next_maintenance_run_time][crate::model::CloudExadataInfrastructureProperties::next_maintenance_run_time].
14026 ///
14027 /// # Example
14028 /// ```ignore,no_run
14029 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
14030 /// use wkt::Timestamp;
14031 /// let x = CloudExadataInfrastructureProperties::new().set_or_clear_next_maintenance_run_time(Some(Timestamp::default()/* use setters */));
14032 /// let x = CloudExadataInfrastructureProperties::new().set_or_clear_next_maintenance_run_time(None::<Timestamp>);
14033 /// ```
14034 pub fn set_or_clear_next_maintenance_run_time<T>(mut self, v: std::option::Option<T>) -> Self
14035 where
14036 T: std::convert::Into<wkt::Timestamp>,
14037 {
14038 self.next_maintenance_run_time = v.map(|x| x.into());
14039 self
14040 }
14041
14042 /// Sets the value of [next_security_maintenance_run_time][crate::model::CloudExadataInfrastructureProperties::next_security_maintenance_run_time].
14043 ///
14044 /// # Example
14045 /// ```ignore,no_run
14046 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
14047 /// use wkt::Timestamp;
14048 /// let x = CloudExadataInfrastructureProperties::new().set_next_security_maintenance_run_time(Timestamp::default()/* use setters */);
14049 /// ```
14050 pub fn set_next_security_maintenance_run_time<T>(mut self, v: T) -> Self
14051 where
14052 T: std::convert::Into<wkt::Timestamp>,
14053 {
14054 self.next_security_maintenance_run_time = std::option::Option::Some(v.into());
14055 self
14056 }
14057
14058 /// Sets or clears the value of [next_security_maintenance_run_time][crate::model::CloudExadataInfrastructureProperties::next_security_maintenance_run_time].
14059 ///
14060 /// # Example
14061 /// ```ignore,no_run
14062 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
14063 /// use wkt::Timestamp;
14064 /// let x = CloudExadataInfrastructureProperties::new().set_or_clear_next_security_maintenance_run_time(Some(Timestamp::default()/* use setters */));
14065 /// let x = CloudExadataInfrastructureProperties::new().set_or_clear_next_security_maintenance_run_time(None::<Timestamp>);
14066 /// ```
14067 pub fn set_or_clear_next_security_maintenance_run_time<T>(
14068 mut self,
14069 v: std::option::Option<T>,
14070 ) -> Self
14071 where
14072 T: std::convert::Into<wkt::Timestamp>,
14073 {
14074 self.next_security_maintenance_run_time = v.map(|x| x.into());
14075 self
14076 }
14077
14078 /// Sets the value of [customer_contacts][crate::model::CloudExadataInfrastructureProperties::customer_contacts].
14079 ///
14080 /// # Example
14081 /// ```ignore,no_run
14082 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
14083 /// use google_cloud_oracledatabase_v1::model::CustomerContact;
14084 /// let x = CloudExadataInfrastructureProperties::new()
14085 /// .set_customer_contacts([
14086 /// CustomerContact::default()/* use setters */,
14087 /// CustomerContact::default()/* use (different) setters */,
14088 /// ]);
14089 /// ```
14090 pub fn set_customer_contacts<T, V>(mut self, v: T) -> Self
14091 where
14092 T: std::iter::IntoIterator<Item = V>,
14093 V: std::convert::Into<crate::model::CustomerContact>,
14094 {
14095 use std::iter::Iterator;
14096 self.customer_contacts = v.into_iter().map(|i| i.into()).collect();
14097 self
14098 }
14099
14100 /// Sets the value of [monthly_storage_server_version][crate::model::CloudExadataInfrastructureProperties::monthly_storage_server_version].
14101 ///
14102 /// # Example
14103 /// ```ignore,no_run
14104 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
14105 /// let x = CloudExadataInfrastructureProperties::new().set_monthly_storage_server_version("example");
14106 /// ```
14107 pub fn set_monthly_storage_server_version<T: std::convert::Into<std::string::String>>(
14108 mut self,
14109 v: T,
14110 ) -> Self {
14111 self.monthly_storage_server_version = v.into();
14112 self
14113 }
14114
14115 /// Sets the value of [monthly_db_server_version][crate::model::CloudExadataInfrastructureProperties::monthly_db_server_version].
14116 ///
14117 /// # Example
14118 /// ```ignore,no_run
14119 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
14120 /// let x = CloudExadataInfrastructureProperties::new().set_monthly_db_server_version("example");
14121 /// ```
14122 pub fn set_monthly_db_server_version<T: std::convert::Into<std::string::String>>(
14123 mut self,
14124 v: T,
14125 ) -> Self {
14126 self.monthly_db_server_version = v.into();
14127 self
14128 }
14129
14130 /// Sets the value of [compute_model][crate::model::CloudExadataInfrastructureProperties::compute_model].
14131 ///
14132 /// # Example
14133 /// ```ignore,no_run
14134 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
14135 /// use google_cloud_oracledatabase_v1::model::ComputeModel;
14136 /// let x0 = CloudExadataInfrastructureProperties::new().set_compute_model(ComputeModel::Ecpu);
14137 /// let x1 = CloudExadataInfrastructureProperties::new().set_compute_model(ComputeModel::Ocpu);
14138 /// ```
14139 pub fn set_compute_model<T: std::convert::Into<crate::model::ComputeModel>>(
14140 mut self,
14141 v: T,
14142 ) -> Self {
14143 self.compute_model = v.into();
14144 self
14145 }
14146
14147 /// Sets the value of [database_server_type][crate::model::CloudExadataInfrastructureProperties::database_server_type].
14148 ///
14149 /// # Example
14150 /// ```ignore,no_run
14151 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
14152 /// let x = CloudExadataInfrastructureProperties::new().set_database_server_type("example");
14153 /// ```
14154 pub fn set_database_server_type<T: std::convert::Into<std::string::String>>(
14155 mut self,
14156 v: T,
14157 ) -> Self {
14158 self.database_server_type = v.into();
14159 self
14160 }
14161
14162 /// Sets the value of [storage_server_type][crate::model::CloudExadataInfrastructureProperties::storage_server_type].
14163 ///
14164 /// # Example
14165 /// ```ignore,no_run
14166 /// # use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructureProperties;
14167 /// let x = CloudExadataInfrastructureProperties::new().set_storage_server_type("example");
14168 /// ```
14169 pub fn set_storage_server_type<T: std::convert::Into<std::string::String>>(
14170 mut self,
14171 v: T,
14172 ) -> Self {
14173 self.storage_server_type = v.into();
14174 self
14175 }
14176}
14177
14178impl wkt::message::Message for CloudExadataInfrastructureProperties {
14179 fn typename() -> &'static str {
14180 "type.googleapis.com/google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties"
14181 }
14182}
14183
14184/// Defines additional types related to [CloudExadataInfrastructureProperties].
14185pub mod cloud_exadata_infrastructure_properties {
14186 #[allow(unused_imports)]
14187 use super::*;
14188
14189 /// The various lifecycle states of the Exadata Infrastructure.
14190 ///
14191 /// # Working with unknown values
14192 ///
14193 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14194 /// additional enum variants at any time. Adding new variants is not considered
14195 /// a breaking change. Applications should write their code in anticipation of:
14196 ///
14197 /// - New values appearing in future releases of the client library, **and**
14198 /// - New values received dynamically, without application changes.
14199 ///
14200 /// Please consult the [Working with enums] section in the user guide for some
14201 /// guidelines.
14202 ///
14203 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14204 #[derive(Clone, Debug, PartialEq)]
14205 #[non_exhaustive]
14206 pub enum State {
14207 /// Default unspecified value.
14208 Unspecified,
14209 /// The Exadata Infrastructure is being provisioned.
14210 Provisioning,
14211 /// The Exadata Infrastructure is available for use.
14212 Available,
14213 /// The Exadata Infrastructure is being updated.
14214 Updating,
14215 /// The Exadata Infrastructure is being terminated.
14216 Terminating,
14217 /// The Exadata Infrastructure is terminated.
14218 Terminated,
14219 /// The Exadata Infrastructure is in failed state.
14220 Failed,
14221 /// The Exadata Infrastructure is in maintenance.
14222 MaintenanceInProgress,
14223 /// If set, the enum was initialized with an unknown value.
14224 ///
14225 /// Applications can examine the value using [State::value] or
14226 /// [State::name].
14227 UnknownValue(state::UnknownValue),
14228 }
14229
14230 #[doc(hidden)]
14231 pub mod state {
14232 #[allow(unused_imports)]
14233 use super::*;
14234 #[derive(Clone, Debug, PartialEq)]
14235 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14236 }
14237
14238 impl State {
14239 /// Gets the enum value.
14240 ///
14241 /// Returns `None` if the enum contains an unknown value deserialized from
14242 /// the string representation of enums.
14243 pub fn value(&self) -> std::option::Option<i32> {
14244 match self {
14245 Self::Unspecified => std::option::Option::Some(0),
14246 Self::Provisioning => std::option::Option::Some(1),
14247 Self::Available => std::option::Option::Some(2),
14248 Self::Updating => std::option::Option::Some(3),
14249 Self::Terminating => std::option::Option::Some(4),
14250 Self::Terminated => std::option::Option::Some(5),
14251 Self::Failed => std::option::Option::Some(6),
14252 Self::MaintenanceInProgress => std::option::Option::Some(7),
14253 Self::UnknownValue(u) => u.0.value(),
14254 }
14255 }
14256
14257 /// Gets the enum value as a string.
14258 ///
14259 /// Returns `None` if the enum contains an unknown value deserialized from
14260 /// the integer representation of enums.
14261 pub fn name(&self) -> std::option::Option<&str> {
14262 match self {
14263 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
14264 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
14265 Self::Available => std::option::Option::Some("AVAILABLE"),
14266 Self::Updating => std::option::Option::Some("UPDATING"),
14267 Self::Terminating => std::option::Option::Some("TERMINATING"),
14268 Self::Terminated => std::option::Option::Some("TERMINATED"),
14269 Self::Failed => std::option::Option::Some("FAILED"),
14270 Self::MaintenanceInProgress => std::option::Option::Some("MAINTENANCE_IN_PROGRESS"),
14271 Self::UnknownValue(u) => u.0.name(),
14272 }
14273 }
14274 }
14275
14276 impl std::default::Default for State {
14277 fn default() -> Self {
14278 use std::convert::From;
14279 Self::from(0)
14280 }
14281 }
14282
14283 impl std::fmt::Display for State {
14284 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14285 wkt::internal::display_enum(f, self.name(), self.value())
14286 }
14287 }
14288
14289 impl std::convert::From<i32> for State {
14290 fn from(value: i32) -> Self {
14291 match value {
14292 0 => Self::Unspecified,
14293 1 => Self::Provisioning,
14294 2 => Self::Available,
14295 3 => Self::Updating,
14296 4 => Self::Terminating,
14297 5 => Self::Terminated,
14298 6 => Self::Failed,
14299 7 => Self::MaintenanceInProgress,
14300 _ => Self::UnknownValue(state::UnknownValue(
14301 wkt::internal::UnknownEnumValue::Integer(value),
14302 )),
14303 }
14304 }
14305 }
14306
14307 impl std::convert::From<&str> for State {
14308 fn from(value: &str) -> Self {
14309 use std::string::ToString;
14310 match value {
14311 "STATE_UNSPECIFIED" => Self::Unspecified,
14312 "PROVISIONING" => Self::Provisioning,
14313 "AVAILABLE" => Self::Available,
14314 "UPDATING" => Self::Updating,
14315 "TERMINATING" => Self::Terminating,
14316 "TERMINATED" => Self::Terminated,
14317 "FAILED" => Self::Failed,
14318 "MAINTENANCE_IN_PROGRESS" => Self::MaintenanceInProgress,
14319 _ => Self::UnknownValue(state::UnknownValue(
14320 wkt::internal::UnknownEnumValue::String(value.to_string()),
14321 )),
14322 }
14323 }
14324 }
14325
14326 impl serde::ser::Serialize for State {
14327 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14328 where
14329 S: serde::Serializer,
14330 {
14331 match self {
14332 Self::Unspecified => serializer.serialize_i32(0),
14333 Self::Provisioning => serializer.serialize_i32(1),
14334 Self::Available => serializer.serialize_i32(2),
14335 Self::Updating => serializer.serialize_i32(3),
14336 Self::Terminating => serializer.serialize_i32(4),
14337 Self::Terminated => serializer.serialize_i32(5),
14338 Self::Failed => serializer.serialize_i32(6),
14339 Self::MaintenanceInProgress => serializer.serialize_i32(7),
14340 Self::UnknownValue(u) => u.0.serialize(serializer),
14341 }
14342 }
14343 }
14344
14345 impl<'de> serde::de::Deserialize<'de> for State {
14346 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14347 where
14348 D: serde::Deserializer<'de>,
14349 {
14350 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14351 ".google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties.State",
14352 ))
14353 }
14354 }
14355}
14356
14357/// Maintenance window as defined by Oracle.
14358/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/MaintenanceWindow>
14359#[derive(Clone, Default, PartialEq)]
14360#[non_exhaustive]
14361pub struct MaintenanceWindow {
14362 /// Optional. The maintenance window scheduling preference.
14363 pub preference: crate::model::maintenance_window::MaintenanceWindowPreference,
14364
14365 /// Optional. Months during the year when maintenance should be performed.
14366 pub months: std::vec::Vec<google_cloud_type::model::Month>,
14367
14368 /// Optional. Weeks during the month when maintenance should be performed.
14369 /// Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a
14370 /// duration of 7 days. Weeks start and end based on calendar dates, not days
14371 /// of the week.
14372 pub weeks_of_month: std::vec::Vec<i32>,
14373
14374 /// Optional. Days during the week when maintenance should be performed.
14375 pub days_of_week: std::vec::Vec<google_cloud_type::model::DayOfWeek>,
14376
14377 /// Optional. The window of hours during the day when maintenance should be
14378 /// performed. The window is a 4 hour slot. Valid values are:
14379 /// 0 - represents time slot 0:00 - 3:59 UTC
14380 /// 4 - represents time slot 4:00 - 7:59 UTC
14381 /// 8 - represents time slot 8:00 - 11:59 UTC
14382 /// 12 - represents time slot 12:00 - 15:59 UTC
14383 /// 16 - represents time slot 16:00 - 19:59 UTC
14384 /// 20 - represents time slot 20:00 - 23:59 UTC
14385 pub hours_of_day: std::vec::Vec<i32>,
14386
14387 /// Optional. Lead time window allows user to set a lead time to prepare for a
14388 /// down time. The lead time is in weeks and valid value is between 1 to 4.
14389 pub lead_time_week: i32,
14390
14391 /// Optional. Cloud CloudExadataInfrastructure node patching method, either
14392 /// "ROLLING" or "NONROLLING". Default value is ROLLING.
14393 pub patching_mode: crate::model::maintenance_window::PatchingMode,
14394
14395 /// Optional. Determines the amount of time the system will wait before the
14396 /// start of each database server patching operation. Custom action timeout is
14397 /// in minutes and valid value is between 15 to 120 (inclusive).
14398 pub custom_action_timeout_mins: i32,
14399
14400 /// Optional. If true, enables the configuration of a custom action timeout
14401 /// (waiting period) between database server patching operations.
14402 pub is_custom_action_timeout_enabled: bool,
14403
14404 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14405}
14406
14407impl MaintenanceWindow {
14408 pub fn new() -> Self {
14409 std::default::Default::default()
14410 }
14411
14412 /// Sets the value of [preference][crate::model::MaintenanceWindow::preference].
14413 ///
14414 /// # Example
14415 /// ```ignore,no_run
14416 /// # use google_cloud_oracledatabase_v1::model::MaintenanceWindow;
14417 /// use google_cloud_oracledatabase_v1::model::maintenance_window::MaintenanceWindowPreference;
14418 /// let x0 = MaintenanceWindow::new().set_preference(MaintenanceWindowPreference::CustomPreference);
14419 /// let x1 = MaintenanceWindow::new().set_preference(MaintenanceWindowPreference::NoPreference);
14420 /// ```
14421 pub fn set_preference<
14422 T: std::convert::Into<crate::model::maintenance_window::MaintenanceWindowPreference>,
14423 >(
14424 mut self,
14425 v: T,
14426 ) -> Self {
14427 self.preference = v.into();
14428 self
14429 }
14430
14431 /// Sets the value of [months][crate::model::MaintenanceWindow::months].
14432 ///
14433 /// # Example
14434 /// ```ignore,no_run
14435 /// # use google_cloud_oracledatabase_v1::model::MaintenanceWindow;
14436 /// use google_cloud_type::model::Month;
14437 /// let x = MaintenanceWindow::new().set_months([
14438 /// Month::January,
14439 /// Month::February,
14440 /// Month::March,
14441 /// ]);
14442 /// ```
14443 pub fn set_months<T, V>(mut self, v: T) -> Self
14444 where
14445 T: std::iter::IntoIterator<Item = V>,
14446 V: std::convert::Into<google_cloud_type::model::Month>,
14447 {
14448 use std::iter::Iterator;
14449 self.months = v.into_iter().map(|i| i.into()).collect();
14450 self
14451 }
14452
14453 /// Sets the value of [weeks_of_month][crate::model::MaintenanceWindow::weeks_of_month].
14454 ///
14455 /// # Example
14456 /// ```ignore,no_run
14457 /// # use google_cloud_oracledatabase_v1::model::MaintenanceWindow;
14458 /// let x = MaintenanceWindow::new().set_weeks_of_month([1, 2, 3]);
14459 /// ```
14460 pub fn set_weeks_of_month<T, V>(mut self, v: T) -> Self
14461 where
14462 T: std::iter::IntoIterator<Item = V>,
14463 V: std::convert::Into<i32>,
14464 {
14465 use std::iter::Iterator;
14466 self.weeks_of_month = v.into_iter().map(|i| i.into()).collect();
14467 self
14468 }
14469
14470 /// Sets the value of [days_of_week][crate::model::MaintenanceWindow::days_of_week].
14471 ///
14472 /// # Example
14473 /// ```ignore,no_run
14474 /// # use google_cloud_oracledatabase_v1::model::MaintenanceWindow;
14475 /// use google_cloud_type::model::DayOfWeek;
14476 /// let x = MaintenanceWindow::new().set_days_of_week([
14477 /// DayOfWeek::Monday,
14478 /// DayOfWeek::Tuesday,
14479 /// DayOfWeek::Wednesday,
14480 /// ]);
14481 /// ```
14482 pub fn set_days_of_week<T, V>(mut self, v: T) -> Self
14483 where
14484 T: std::iter::IntoIterator<Item = V>,
14485 V: std::convert::Into<google_cloud_type::model::DayOfWeek>,
14486 {
14487 use std::iter::Iterator;
14488 self.days_of_week = v.into_iter().map(|i| i.into()).collect();
14489 self
14490 }
14491
14492 /// Sets the value of [hours_of_day][crate::model::MaintenanceWindow::hours_of_day].
14493 ///
14494 /// # Example
14495 /// ```ignore,no_run
14496 /// # use google_cloud_oracledatabase_v1::model::MaintenanceWindow;
14497 /// let x = MaintenanceWindow::new().set_hours_of_day([1, 2, 3]);
14498 /// ```
14499 pub fn set_hours_of_day<T, V>(mut self, v: T) -> Self
14500 where
14501 T: std::iter::IntoIterator<Item = V>,
14502 V: std::convert::Into<i32>,
14503 {
14504 use std::iter::Iterator;
14505 self.hours_of_day = v.into_iter().map(|i| i.into()).collect();
14506 self
14507 }
14508
14509 /// Sets the value of [lead_time_week][crate::model::MaintenanceWindow::lead_time_week].
14510 ///
14511 /// # Example
14512 /// ```ignore,no_run
14513 /// # use google_cloud_oracledatabase_v1::model::MaintenanceWindow;
14514 /// let x = MaintenanceWindow::new().set_lead_time_week(42);
14515 /// ```
14516 pub fn set_lead_time_week<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14517 self.lead_time_week = v.into();
14518 self
14519 }
14520
14521 /// Sets the value of [patching_mode][crate::model::MaintenanceWindow::patching_mode].
14522 ///
14523 /// # Example
14524 /// ```ignore,no_run
14525 /// # use google_cloud_oracledatabase_v1::model::MaintenanceWindow;
14526 /// use google_cloud_oracledatabase_v1::model::maintenance_window::PatchingMode;
14527 /// let x0 = MaintenanceWindow::new().set_patching_mode(PatchingMode::Rolling);
14528 /// let x1 = MaintenanceWindow::new().set_patching_mode(PatchingMode::NonRolling);
14529 /// ```
14530 pub fn set_patching_mode<
14531 T: std::convert::Into<crate::model::maintenance_window::PatchingMode>,
14532 >(
14533 mut self,
14534 v: T,
14535 ) -> Self {
14536 self.patching_mode = v.into();
14537 self
14538 }
14539
14540 /// Sets the value of [custom_action_timeout_mins][crate::model::MaintenanceWindow::custom_action_timeout_mins].
14541 ///
14542 /// # Example
14543 /// ```ignore,no_run
14544 /// # use google_cloud_oracledatabase_v1::model::MaintenanceWindow;
14545 /// let x = MaintenanceWindow::new().set_custom_action_timeout_mins(42);
14546 /// ```
14547 pub fn set_custom_action_timeout_mins<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14548 self.custom_action_timeout_mins = v.into();
14549 self
14550 }
14551
14552 /// Sets the value of [is_custom_action_timeout_enabled][crate::model::MaintenanceWindow::is_custom_action_timeout_enabled].
14553 ///
14554 /// # Example
14555 /// ```ignore,no_run
14556 /// # use google_cloud_oracledatabase_v1::model::MaintenanceWindow;
14557 /// let x = MaintenanceWindow::new().set_is_custom_action_timeout_enabled(true);
14558 /// ```
14559 pub fn set_is_custom_action_timeout_enabled<T: std::convert::Into<bool>>(
14560 mut self,
14561 v: T,
14562 ) -> Self {
14563 self.is_custom_action_timeout_enabled = v.into();
14564 self
14565 }
14566}
14567
14568impl wkt::message::Message for MaintenanceWindow {
14569 fn typename() -> &'static str {
14570 "type.googleapis.com/google.cloud.oracledatabase.v1.MaintenanceWindow"
14571 }
14572}
14573
14574/// Defines additional types related to [MaintenanceWindow].
14575pub mod maintenance_window {
14576 #[allow(unused_imports)]
14577 use super::*;
14578
14579 /// Maintenance window preference.
14580 ///
14581 /// # Working with unknown values
14582 ///
14583 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14584 /// additional enum variants at any time. Adding new variants is not considered
14585 /// a breaking change. Applications should write their code in anticipation of:
14586 ///
14587 /// - New values appearing in future releases of the client library, **and**
14588 /// - New values received dynamically, without application changes.
14589 ///
14590 /// Please consult the [Working with enums] section in the user guide for some
14591 /// guidelines.
14592 ///
14593 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14594 #[derive(Clone, Debug, PartialEq)]
14595 #[non_exhaustive]
14596 pub enum MaintenanceWindowPreference {
14597 /// Default unspecified value.
14598 Unspecified,
14599 /// Custom preference.
14600 CustomPreference,
14601 /// No preference.
14602 NoPreference,
14603 /// If set, the enum was initialized with an unknown value.
14604 ///
14605 /// Applications can examine the value using [MaintenanceWindowPreference::value] or
14606 /// [MaintenanceWindowPreference::name].
14607 UnknownValue(maintenance_window_preference::UnknownValue),
14608 }
14609
14610 #[doc(hidden)]
14611 pub mod maintenance_window_preference {
14612 #[allow(unused_imports)]
14613 use super::*;
14614 #[derive(Clone, Debug, PartialEq)]
14615 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14616 }
14617
14618 impl MaintenanceWindowPreference {
14619 /// Gets the enum value.
14620 ///
14621 /// Returns `None` if the enum contains an unknown value deserialized from
14622 /// the string representation of enums.
14623 pub fn value(&self) -> std::option::Option<i32> {
14624 match self {
14625 Self::Unspecified => std::option::Option::Some(0),
14626 Self::CustomPreference => std::option::Option::Some(1),
14627 Self::NoPreference => std::option::Option::Some(2),
14628 Self::UnknownValue(u) => u.0.value(),
14629 }
14630 }
14631
14632 /// Gets the enum value as a string.
14633 ///
14634 /// Returns `None` if the enum contains an unknown value deserialized from
14635 /// the integer representation of enums.
14636 pub fn name(&self) -> std::option::Option<&str> {
14637 match self {
14638 Self::Unspecified => {
14639 std::option::Option::Some("MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED")
14640 }
14641 Self::CustomPreference => std::option::Option::Some("CUSTOM_PREFERENCE"),
14642 Self::NoPreference => std::option::Option::Some("NO_PREFERENCE"),
14643 Self::UnknownValue(u) => u.0.name(),
14644 }
14645 }
14646 }
14647
14648 impl std::default::Default for MaintenanceWindowPreference {
14649 fn default() -> Self {
14650 use std::convert::From;
14651 Self::from(0)
14652 }
14653 }
14654
14655 impl std::fmt::Display for MaintenanceWindowPreference {
14656 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14657 wkt::internal::display_enum(f, self.name(), self.value())
14658 }
14659 }
14660
14661 impl std::convert::From<i32> for MaintenanceWindowPreference {
14662 fn from(value: i32) -> Self {
14663 match value {
14664 0 => Self::Unspecified,
14665 1 => Self::CustomPreference,
14666 2 => Self::NoPreference,
14667 _ => Self::UnknownValue(maintenance_window_preference::UnknownValue(
14668 wkt::internal::UnknownEnumValue::Integer(value),
14669 )),
14670 }
14671 }
14672 }
14673
14674 impl std::convert::From<&str> for MaintenanceWindowPreference {
14675 fn from(value: &str) -> Self {
14676 use std::string::ToString;
14677 match value {
14678 "MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED" => Self::Unspecified,
14679 "CUSTOM_PREFERENCE" => Self::CustomPreference,
14680 "NO_PREFERENCE" => Self::NoPreference,
14681 _ => Self::UnknownValue(maintenance_window_preference::UnknownValue(
14682 wkt::internal::UnknownEnumValue::String(value.to_string()),
14683 )),
14684 }
14685 }
14686 }
14687
14688 impl serde::ser::Serialize for MaintenanceWindowPreference {
14689 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14690 where
14691 S: serde::Serializer,
14692 {
14693 match self {
14694 Self::Unspecified => serializer.serialize_i32(0),
14695 Self::CustomPreference => serializer.serialize_i32(1),
14696 Self::NoPreference => serializer.serialize_i32(2),
14697 Self::UnknownValue(u) => u.0.serialize(serializer),
14698 }
14699 }
14700 }
14701
14702 impl<'de> serde::de::Deserialize<'de> for MaintenanceWindowPreference {
14703 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14704 where
14705 D: serde::Deserializer<'de>,
14706 {
14707 deserializer.deserialize_any(
14708 wkt::internal::EnumVisitor::<MaintenanceWindowPreference>::new(
14709 ".google.cloud.oracledatabase.v1.MaintenanceWindow.MaintenanceWindowPreference",
14710 ),
14711 )
14712 }
14713 }
14714
14715 /// Patching mode.
14716 ///
14717 /// # Working with unknown values
14718 ///
14719 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14720 /// additional enum variants at any time. Adding new variants is not considered
14721 /// a breaking change. Applications should write their code in anticipation of:
14722 ///
14723 /// - New values appearing in future releases of the client library, **and**
14724 /// - New values received dynamically, without application changes.
14725 ///
14726 /// Please consult the [Working with enums] section in the user guide for some
14727 /// guidelines.
14728 ///
14729 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14730 #[derive(Clone, Debug, PartialEq)]
14731 #[non_exhaustive]
14732 pub enum PatchingMode {
14733 /// Default unspecified value.
14734 Unspecified,
14735 /// Updates the Cloud Exadata database server hosts in a rolling fashion.
14736 Rolling,
14737 /// The non-rolling maintenance method first updates your storage servers at
14738 /// the same time, then your database servers at the same time.
14739 NonRolling,
14740 /// If set, the enum was initialized with an unknown value.
14741 ///
14742 /// Applications can examine the value using [PatchingMode::value] or
14743 /// [PatchingMode::name].
14744 UnknownValue(patching_mode::UnknownValue),
14745 }
14746
14747 #[doc(hidden)]
14748 pub mod patching_mode {
14749 #[allow(unused_imports)]
14750 use super::*;
14751 #[derive(Clone, Debug, PartialEq)]
14752 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14753 }
14754
14755 impl PatchingMode {
14756 /// Gets the enum value.
14757 ///
14758 /// Returns `None` if the enum contains an unknown value deserialized from
14759 /// the string representation of enums.
14760 pub fn value(&self) -> std::option::Option<i32> {
14761 match self {
14762 Self::Unspecified => std::option::Option::Some(0),
14763 Self::Rolling => std::option::Option::Some(1),
14764 Self::NonRolling => std::option::Option::Some(2),
14765 Self::UnknownValue(u) => u.0.value(),
14766 }
14767 }
14768
14769 /// Gets the enum value as a string.
14770 ///
14771 /// Returns `None` if the enum contains an unknown value deserialized from
14772 /// the integer representation of enums.
14773 pub fn name(&self) -> std::option::Option<&str> {
14774 match self {
14775 Self::Unspecified => std::option::Option::Some("PATCHING_MODE_UNSPECIFIED"),
14776 Self::Rolling => std::option::Option::Some("ROLLING"),
14777 Self::NonRolling => std::option::Option::Some("NON_ROLLING"),
14778 Self::UnknownValue(u) => u.0.name(),
14779 }
14780 }
14781 }
14782
14783 impl std::default::Default for PatchingMode {
14784 fn default() -> Self {
14785 use std::convert::From;
14786 Self::from(0)
14787 }
14788 }
14789
14790 impl std::fmt::Display for PatchingMode {
14791 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14792 wkt::internal::display_enum(f, self.name(), self.value())
14793 }
14794 }
14795
14796 impl std::convert::From<i32> for PatchingMode {
14797 fn from(value: i32) -> Self {
14798 match value {
14799 0 => Self::Unspecified,
14800 1 => Self::Rolling,
14801 2 => Self::NonRolling,
14802 _ => Self::UnknownValue(patching_mode::UnknownValue(
14803 wkt::internal::UnknownEnumValue::Integer(value),
14804 )),
14805 }
14806 }
14807 }
14808
14809 impl std::convert::From<&str> for PatchingMode {
14810 fn from(value: &str) -> Self {
14811 use std::string::ToString;
14812 match value {
14813 "PATCHING_MODE_UNSPECIFIED" => Self::Unspecified,
14814 "ROLLING" => Self::Rolling,
14815 "NON_ROLLING" => Self::NonRolling,
14816 _ => Self::UnknownValue(patching_mode::UnknownValue(
14817 wkt::internal::UnknownEnumValue::String(value.to_string()),
14818 )),
14819 }
14820 }
14821 }
14822
14823 impl serde::ser::Serialize for PatchingMode {
14824 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14825 where
14826 S: serde::Serializer,
14827 {
14828 match self {
14829 Self::Unspecified => serializer.serialize_i32(0),
14830 Self::Rolling => serializer.serialize_i32(1),
14831 Self::NonRolling => serializer.serialize_i32(2),
14832 Self::UnknownValue(u) => u.0.serialize(serializer),
14833 }
14834 }
14835 }
14836
14837 impl<'de> serde::de::Deserialize<'de> for PatchingMode {
14838 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14839 where
14840 D: serde::Deserializer<'de>,
14841 {
14842 deserializer.deserialize_any(wkt::internal::EnumVisitor::<PatchingMode>::new(
14843 ".google.cloud.oracledatabase.v1.MaintenanceWindow.PatchingMode",
14844 ))
14845 }
14846 }
14847}
14848
14849/// ExadbVmCluster represents a cluster of VMs that are used to run Exadata
14850/// workloads.
14851/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/ExadbVmCluster/>
14852#[derive(Clone, Default, PartialEq)]
14853#[non_exhaustive]
14854pub struct ExadbVmCluster {
14855 /// Identifier. The name of the ExadbVmCluster resource in the following
14856 /// format:
14857 /// projects/{project}/locations/{region}/exadbVmClusters/{exadb_vm_cluster}
14858 pub name: std::string::String,
14859
14860 /// Required. The properties of the ExadbVmCluster.
14861 pub properties: std::option::Option<crate::model::ExadbVmClusterProperties>,
14862
14863 /// Output only. Immutable. The GCP Oracle zone where Oracle ExadbVmCluster is
14864 /// hosted. Example: us-east4-b-r2. During creation, the system will pick the
14865 /// zone assigned to the ExascaleDbStorageVault.
14866 pub gcp_oracle_zone: std::string::String,
14867
14868 /// Optional. The labels or tags associated with the ExadbVmCluster.
14869 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
14870
14871 /// Optional. Immutable. The name of the OdbNetwork associated with the
14872 /// ExadbVmCluster. Format:
14873 /// projects/{project}/locations/{location}/odbNetworks/{odb_network} It is
14874 /// optional but if specified, this should match the parent ODBNetwork of the
14875 /// OdbSubnet.
14876 pub odb_network: std::string::String,
14877
14878 /// Required. Immutable. The name of the OdbSubnet associated with the
14879 /// ExadbVmCluster for IP allocation. Format:
14880 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
14881 pub odb_subnet: std::string::String,
14882
14883 /// Required. Immutable. The name of the backup OdbSubnet associated with the
14884 /// ExadbVmCluster. Format:
14885 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
14886 pub backup_odb_subnet: std::string::String,
14887
14888 /// Required. Immutable. The display name for the ExadbVmCluster. The name does
14889 /// not have to be unique within your project. The name must be 1-255
14890 /// characters long and can only contain alphanumeric characters.
14891 pub display_name: std::string::String,
14892
14893 /// Output only. The date and time that the ExadbVmCluster was created.
14894 pub create_time: std::option::Option<wkt::Timestamp>,
14895
14896 /// Output only. The ID of the subscription entitlement associated with the
14897 /// ExadbVmCluster.
14898 pub entitlement_id: std::string::String,
14899
14900 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14901}
14902
14903impl ExadbVmCluster {
14904 pub fn new() -> Self {
14905 std::default::Default::default()
14906 }
14907
14908 /// Sets the value of [name][crate::model::ExadbVmCluster::name].
14909 ///
14910 /// # Example
14911 /// ```ignore,no_run
14912 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
14913 /// let x = ExadbVmCluster::new().set_name("example");
14914 /// ```
14915 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14916 self.name = v.into();
14917 self
14918 }
14919
14920 /// Sets the value of [properties][crate::model::ExadbVmCluster::properties].
14921 ///
14922 /// # Example
14923 /// ```ignore,no_run
14924 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
14925 /// use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
14926 /// let x = ExadbVmCluster::new().set_properties(ExadbVmClusterProperties::default()/* use setters */);
14927 /// ```
14928 pub fn set_properties<T>(mut self, v: T) -> Self
14929 where
14930 T: std::convert::Into<crate::model::ExadbVmClusterProperties>,
14931 {
14932 self.properties = std::option::Option::Some(v.into());
14933 self
14934 }
14935
14936 /// Sets or clears the value of [properties][crate::model::ExadbVmCluster::properties].
14937 ///
14938 /// # Example
14939 /// ```ignore,no_run
14940 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
14941 /// use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
14942 /// let x = ExadbVmCluster::new().set_or_clear_properties(Some(ExadbVmClusterProperties::default()/* use setters */));
14943 /// let x = ExadbVmCluster::new().set_or_clear_properties(None::<ExadbVmClusterProperties>);
14944 /// ```
14945 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
14946 where
14947 T: std::convert::Into<crate::model::ExadbVmClusterProperties>,
14948 {
14949 self.properties = v.map(|x| x.into());
14950 self
14951 }
14952
14953 /// Sets the value of [gcp_oracle_zone][crate::model::ExadbVmCluster::gcp_oracle_zone].
14954 ///
14955 /// # Example
14956 /// ```ignore,no_run
14957 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
14958 /// let x = ExadbVmCluster::new().set_gcp_oracle_zone("example");
14959 /// ```
14960 pub fn set_gcp_oracle_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14961 self.gcp_oracle_zone = v.into();
14962 self
14963 }
14964
14965 /// Sets the value of [labels][crate::model::ExadbVmCluster::labels].
14966 ///
14967 /// # Example
14968 /// ```ignore,no_run
14969 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
14970 /// let x = ExadbVmCluster::new().set_labels([
14971 /// ("key0", "abc"),
14972 /// ("key1", "xyz"),
14973 /// ]);
14974 /// ```
14975 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
14976 where
14977 T: std::iter::IntoIterator<Item = (K, V)>,
14978 K: std::convert::Into<std::string::String>,
14979 V: std::convert::Into<std::string::String>,
14980 {
14981 use std::iter::Iterator;
14982 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14983 self
14984 }
14985
14986 /// Sets the value of [odb_network][crate::model::ExadbVmCluster::odb_network].
14987 ///
14988 /// # Example
14989 /// ```ignore,no_run
14990 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
14991 /// let x = ExadbVmCluster::new().set_odb_network("example");
14992 /// ```
14993 pub fn set_odb_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14994 self.odb_network = v.into();
14995 self
14996 }
14997
14998 /// Sets the value of [odb_subnet][crate::model::ExadbVmCluster::odb_subnet].
14999 ///
15000 /// # Example
15001 /// ```ignore,no_run
15002 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
15003 /// let x = ExadbVmCluster::new().set_odb_subnet("example");
15004 /// ```
15005 pub fn set_odb_subnet<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15006 self.odb_subnet = v.into();
15007 self
15008 }
15009
15010 /// Sets the value of [backup_odb_subnet][crate::model::ExadbVmCluster::backup_odb_subnet].
15011 ///
15012 /// # Example
15013 /// ```ignore,no_run
15014 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
15015 /// let x = ExadbVmCluster::new().set_backup_odb_subnet("example");
15016 /// ```
15017 pub fn set_backup_odb_subnet<T: std::convert::Into<std::string::String>>(
15018 mut self,
15019 v: T,
15020 ) -> Self {
15021 self.backup_odb_subnet = v.into();
15022 self
15023 }
15024
15025 /// Sets the value of [display_name][crate::model::ExadbVmCluster::display_name].
15026 ///
15027 /// # Example
15028 /// ```ignore,no_run
15029 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
15030 /// let x = ExadbVmCluster::new().set_display_name("example");
15031 /// ```
15032 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15033 self.display_name = v.into();
15034 self
15035 }
15036
15037 /// Sets the value of [create_time][crate::model::ExadbVmCluster::create_time].
15038 ///
15039 /// # Example
15040 /// ```ignore,no_run
15041 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
15042 /// use wkt::Timestamp;
15043 /// let x = ExadbVmCluster::new().set_create_time(Timestamp::default()/* use setters */);
15044 /// ```
15045 pub fn set_create_time<T>(mut self, v: T) -> Self
15046 where
15047 T: std::convert::Into<wkt::Timestamp>,
15048 {
15049 self.create_time = std::option::Option::Some(v.into());
15050 self
15051 }
15052
15053 /// Sets or clears the value of [create_time][crate::model::ExadbVmCluster::create_time].
15054 ///
15055 /// # Example
15056 /// ```ignore,no_run
15057 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
15058 /// use wkt::Timestamp;
15059 /// let x = ExadbVmCluster::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
15060 /// let x = ExadbVmCluster::new().set_or_clear_create_time(None::<Timestamp>);
15061 /// ```
15062 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
15063 where
15064 T: std::convert::Into<wkt::Timestamp>,
15065 {
15066 self.create_time = v.map(|x| x.into());
15067 self
15068 }
15069
15070 /// Sets the value of [entitlement_id][crate::model::ExadbVmCluster::entitlement_id].
15071 ///
15072 /// # Example
15073 /// ```ignore,no_run
15074 /// # use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
15075 /// let x = ExadbVmCluster::new().set_entitlement_id("example");
15076 /// ```
15077 pub fn set_entitlement_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15078 self.entitlement_id = v.into();
15079 self
15080 }
15081}
15082
15083impl wkt::message::Message for ExadbVmCluster {
15084 fn typename() -> &'static str {
15085 "type.googleapis.com/google.cloud.oracledatabase.v1.ExadbVmCluster"
15086 }
15087}
15088
15089/// The storage allocation for the exadbvmcluster, in gigabytes (GB).
15090#[derive(Clone, Default, PartialEq)]
15091#[non_exhaustive]
15092pub struct ExadbVmClusterStorageDetails {
15093 /// Required. The storage allocation for the exadbvmcluster per node, in
15094 /// gigabytes (GB). This field is used to calculate the total storage
15095 /// allocation for the exadbvmcluster.
15096 pub size_in_gbs_per_node: i32,
15097
15098 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15099}
15100
15101impl ExadbVmClusterStorageDetails {
15102 pub fn new() -> Self {
15103 std::default::Default::default()
15104 }
15105
15106 /// Sets the value of [size_in_gbs_per_node][crate::model::ExadbVmClusterStorageDetails::size_in_gbs_per_node].
15107 ///
15108 /// # Example
15109 /// ```ignore,no_run
15110 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterStorageDetails;
15111 /// let x = ExadbVmClusterStorageDetails::new().set_size_in_gbs_per_node(42);
15112 /// ```
15113 pub fn set_size_in_gbs_per_node<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15114 self.size_in_gbs_per_node = v.into();
15115 self
15116 }
15117}
15118
15119impl wkt::message::Message for ExadbVmClusterStorageDetails {
15120 fn typename() -> &'static str {
15121 "type.googleapis.com/google.cloud.oracledatabase.v1.ExadbVmClusterStorageDetails"
15122 }
15123}
15124
15125/// The properties of an ExadbVmCluster.
15126#[derive(Clone, Default, PartialEq)]
15127#[non_exhaustive]
15128pub struct ExadbVmClusterProperties {
15129 /// Optional. Immutable. The cluster name for Exascale vm cluster. The cluster
15130 /// name must begin with an alphabetic character and may contain hyphens(-) but
15131 /// can not contain underscores(_). It should be not more than 11 characters
15132 /// and is not case sensitive. OCI Cluster name.
15133 pub cluster_name: std::string::String,
15134
15135 /// Required. Immutable. Grid Infrastructure Version.
15136 pub grid_image_id: std::string::String,
15137
15138 /// Required. The number of nodes/VMs in the ExadbVmCluster.
15139 pub node_count: i32,
15140
15141 /// Required. Immutable. The number of ECPUs enabled per node for an exadata vm
15142 /// cluster on exascale infrastructure.
15143 pub enabled_ecpu_count_per_node: i32,
15144
15145 /// Optional. Immutable. The number of additional ECPUs per node for an Exadata
15146 /// VM cluster on exascale infrastructure.
15147 pub additional_ecpu_count_per_node: i32,
15148
15149 /// Required. Immutable. Total storage details for the ExadbVmCluster.
15150 pub vm_file_system_storage: std::option::Option<crate::model::ExadbVmClusterStorageDetails>,
15151
15152 /// Optional. Immutable. The license type of the ExadbVmCluster.
15153 pub license_model: crate::model::exadb_vm_cluster_properties::LicenseModel,
15154
15155 /// Required. Immutable. The name of ExascaleDbStorageVault associated with the
15156 /// ExadbVmCluster. It can refer to an existing ExascaleDbStorageVault. Or a
15157 /// new one can be created during the ExadbVmCluster creation (requires
15158 /// storage_vault_properties to be set).
15159 /// Format:
15160 /// projects/{project}/locations/{location}/exascaleDbStorageVaults/{exascale_db_storage_vault}
15161 pub exascale_db_storage_vault: std::string::String,
15162
15163 /// Required. Immutable. Prefix for VM cluster host names.
15164 pub hostname_prefix: std::string::String,
15165
15166 /// Output only. The hostname of the ExadbVmCluster.
15167 pub hostname: std::string::String,
15168
15169 /// Required. Immutable. The SSH public keys for the ExadbVmCluster.
15170 pub ssh_public_keys: std::vec::Vec<std::string::String>,
15171
15172 /// Optional. Immutable. Indicates user preference for data collection options.
15173 pub data_collection_options: std::option::Option<crate::model::DataCollectionOptionsCommon>,
15174
15175 /// Optional. Immutable. The time zone of the ExadbVmCluster.
15176 pub time_zone: std::option::Option<google_cloud_type::model::TimeZone>,
15177
15178 /// Output only. State of the cluster.
15179 pub lifecycle_state: crate::model::exadb_vm_cluster_properties::ExadbVmClusterLifecycleState,
15180
15181 /// Required. Immutable. The shape attribute of the VM cluster. The type of
15182 /// Exascale storage used for Exadata VM cluster. The default is SMART_STORAGE
15183 /// which supports Oracle Database 23ai and later
15184 pub shape_attribute: crate::model::exadb_vm_cluster_properties::ShapeAttribute,
15185
15186 /// Output only. Memory per VM (GB) (Read-only): Shows the amount of memory
15187 /// allocated to each VM. Memory is calculated based on 2.75 GB per Total
15188 /// ECPUs.
15189 pub memory_size_gb: i32,
15190
15191 /// Optional. Immutable. SCAN listener port - TCP
15192 pub scan_listener_port_tcp: i32,
15193
15194 /// Output only. Deep link to the OCI console to view this resource.
15195 pub oci_uri: std::string::String,
15196
15197 /// Output only. The Oracle Grid Infrastructure (GI) software version.
15198 pub gi_version: std::string::String,
15199
15200 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15201}
15202
15203impl ExadbVmClusterProperties {
15204 pub fn new() -> Self {
15205 std::default::Default::default()
15206 }
15207
15208 /// Sets the value of [cluster_name][crate::model::ExadbVmClusterProperties::cluster_name].
15209 ///
15210 /// # Example
15211 /// ```ignore,no_run
15212 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15213 /// let x = ExadbVmClusterProperties::new().set_cluster_name("example");
15214 /// ```
15215 pub fn set_cluster_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15216 self.cluster_name = v.into();
15217 self
15218 }
15219
15220 /// Sets the value of [grid_image_id][crate::model::ExadbVmClusterProperties::grid_image_id].
15221 ///
15222 /// # Example
15223 /// ```ignore,no_run
15224 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15225 /// let x = ExadbVmClusterProperties::new().set_grid_image_id("example");
15226 /// ```
15227 pub fn set_grid_image_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15228 self.grid_image_id = v.into();
15229 self
15230 }
15231
15232 /// Sets the value of [node_count][crate::model::ExadbVmClusterProperties::node_count].
15233 ///
15234 /// # Example
15235 /// ```ignore,no_run
15236 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15237 /// let x = ExadbVmClusterProperties::new().set_node_count(42);
15238 /// ```
15239 pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15240 self.node_count = v.into();
15241 self
15242 }
15243
15244 /// Sets the value of [enabled_ecpu_count_per_node][crate::model::ExadbVmClusterProperties::enabled_ecpu_count_per_node].
15245 ///
15246 /// # Example
15247 /// ```ignore,no_run
15248 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15249 /// let x = ExadbVmClusterProperties::new().set_enabled_ecpu_count_per_node(42);
15250 /// ```
15251 pub fn set_enabled_ecpu_count_per_node<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15252 self.enabled_ecpu_count_per_node = v.into();
15253 self
15254 }
15255
15256 /// Sets the value of [additional_ecpu_count_per_node][crate::model::ExadbVmClusterProperties::additional_ecpu_count_per_node].
15257 ///
15258 /// # Example
15259 /// ```ignore,no_run
15260 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15261 /// let x = ExadbVmClusterProperties::new().set_additional_ecpu_count_per_node(42);
15262 /// ```
15263 pub fn set_additional_ecpu_count_per_node<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15264 self.additional_ecpu_count_per_node = v.into();
15265 self
15266 }
15267
15268 /// Sets the value of [vm_file_system_storage][crate::model::ExadbVmClusterProperties::vm_file_system_storage].
15269 ///
15270 /// # Example
15271 /// ```ignore,no_run
15272 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15273 /// use google_cloud_oracledatabase_v1::model::ExadbVmClusterStorageDetails;
15274 /// let x = ExadbVmClusterProperties::new().set_vm_file_system_storage(ExadbVmClusterStorageDetails::default()/* use setters */);
15275 /// ```
15276 pub fn set_vm_file_system_storage<T>(mut self, v: T) -> Self
15277 where
15278 T: std::convert::Into<crate::model::ExadbVmClusterStorageDetails>,
15279 {
15280 self.vm_file_system_storage = std::option::Option::Some(v.into());
15281 self
15282 }
15283
15284 /// Sets or clears the value of [vm_file_system_storage][crate::model::ExadbVmClusterProperties::vm_file_system_storage].
15285 ///
15286 /// # Example
15287 /// ```ignore,no_run
15288 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15289 /// use google_cloud_oracledatabase_v1::model::ExadbVmClusterStorageDetails;
15290 /// let x = ExadbVmClusterProperties::new().set_or_clear_vm_file_system_storage(Some(ExadbVmClusterStorageDetails::default()/* use setters */));
15291 /// let x = ExadbVmClusterProperties::new().set_or_clear_vm_file_system_storage(None::<ExadbVmClusterStorageDetails>);
15292 /// ```
15293 pub fn set_or_clear_vm_file_system_storage<T>(mut self, v: std::option::Option<T>) -> Self
15294 where
15295 T: std::convert::Into<crate::model::ExadbVmClusterStorageDetails>,
15296 {
15297 self.vm_file_system_storage = v.map(|x| x.into());
15298 self
15299 }
15300
15301 /// Sets the value of [license_model][crate::model::ExadbVmClusterProperties::license_model].
15302 ///
15303 /// # Example
15304 /// ```ignore,no_run
15305 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15306 /// use google_cloud_oracledatabase_v1::model::exadb_vm_cluster_properties::LicenseModel;
15307 /// let x0 = ExadbVmClusterProperties::new().set_license_model(LicenseModel::LicenseIncluded);
15308 /// let x1 = ExadbVmClusterProperties::new().set_license_model(LicenseModel::BringYourOwnLicense);
15309 /// ```
15310 pub fn set_license_model<
15311 T: std::convert::Into<crate::model::exadb_vm_cluster_properties::LicenseModel>,
15312 >(
15313 mut self,
15314 v: T,
15315 ) -> Self {
15316 self.license_model = v.into();
15317 self
15318 }
15319
15320 /// Sets the value of [exascale_db_storage_vault][crate::model::ExadbVmClusterProperties::exascale_db_storage_vault].
15321 ///
15322 /// # Example
15323 /// ```ignore,no_run
15324 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15325 /// let x = ExadbVmClusterProperties::new().set_exascale_db_storage_vault("example");
15326 /// ```
15327 pub fn set_exascale_db_storage_vault<T: std::convert::Into<std::string::String>>(
15328 mut self,
15329 v: T,
15330 ) -> Self {
15331 self.exascale_db_storage_vault = v.into();
15332 self
15333 }
15334
15335 /// Sets the value of [hostname_prefix][crate::model::ExadbVmClusterProperties::hostname_prefix].
15336 ///
15337 /// # Example
15338 /// ```ignore,no_run
15339 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15340 /// let x = ExadbVmClusterProperties::new().set_hostname_prefix("example");
15341 /// ```
15342 pub fn set_hostname_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15343 self.hostname_prefix = v.into();
15344 self
15345 }
15346
15347 /// Sets the value of [hostname][crate::model::ExadbVmClusterProperties::hostname].
15348 ///
15349 /// # Example
15350 /// ```ignore,no_run
15351 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15352 /// let x = ExadbVmClusterProperties::new().set_hostname("example");
15353 /// ```
15354 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15355 self.hostname = v.into();
15356 self
15357 }
15358
15359 /// Sets the value of [ssh_public_keys][crate::model::ExadbVmClusterProperties::ssh_public_keys].
15360 ///
15361 /// # Example
15362 /// ```ignore,no_run
15363 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15364 /// let x = ExadbVmClusterProperties::new().set_ssh_public_keys(["a", "b", "c"]);
15365 /// ```
15366 pub fn set_ssh_public_keys<T, V>(mut self, v: T) -> Self
15367 where
15368 T: std::iter::IntoIterator<Item = V>,
15369 V: std::convert::Into<std::string::String>,
15370 {
15371 use std::iter::Iterator;
15372 self.ssh_public_keys = v.into_iter().map(|i| i.into()).collect();
15373 self
15374 }
15375
15376 /// Sets the value of [data_collection_options][crate::model::ExadbVmClusterProperties::data_collection_options].
15377 ///
15378 /// # Example
15379 /// ```ignore,no_run
15380 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15381 /// use google_cloud_oracledatabase_v1::model::DataCollectionOptionsCommon;
15382 /// let x = ExadbVmClusterProperties::new().set_data_collection_options(DataCollectionOptionsCommon::default()/* use setters */);
15383 /// ```
15384 pub fn set_data_collection_options<T>(mut self, v: T) -> Self
15385 where
15386 T: std::convert::Into<crate::model::DataCollectionOptionsCommon>,
15387 {
15388 self.data_collection_options = std::option::Option::Some(v.into());
15389 self
15390 }
15391
15392 /// Sets or clears the value of [data_collection_options][crate::model::ExadbVmClusterProperties::data_collection_options].
15393 ///
15394 /// # Example
15395 /// ```ignore,no_run
15396 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15397 /// use google_cloud_oracledatabase_v1::model::DataCollectionOptionsCommon;
15398 /// let x = ExadbVmClusterProperties::new().set_or_clear_data_collection_options(Some(DataCollectionOptionsCommon::default()/* use setters */));
15399 /// let x = ExadbVmClusterProperties::new().set_or_clear_data_collection_options(None::<DataCollectionOptionsCommon>);
15400 /// ```
15401 pub fn set_or_clear_data_collection_options<T>(mut self, v: std::option::Option<T>) -> Self
15402 where
15403 T: std::convert::Into<crate::model::DataCollectionOptionsCommon>,
15404 {
15405 self.data_collection_options = v.map(|x| x.into());
15406 self
15407 }
15408
15409 /// Sets the value of [time_zone][crate::model::ExadbVmClusterProperties::time_zone].
15410 ///
15411 /// # Example
15412 /// ```ignore,no_run
15413 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15414 /// use google_cloud_type::model::TimeZone;
15415 /// let x = ExadbVmClusterProperties::new().set_time_zone(TimeZone::default()/* use setters */);
15416 /// ```
15417 pub fn set_time_zone<T>(mut self, v: T) -> Self
15418 where
15419 T: std::convert::Into<google_cloud_type::model::TimeZone>,
15420 {
15421 self.time_zone = std::option::Option::Some(v.into());
15422 self
15423 }
15424
15425 /// Sets or clears the value of [time_zone][crate::model::ExadbVmClusterProperties::time_zone].
15426 ///
15427 /// # Example
15428 /// ```ignore,no_run
15429 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15430 /// use google_cloud_type::model::TimeZone;
15431 /// let x = ExadbVmClusterProperties::new().set_or_clear_time_zone(Some(TimeZone::default()/* use setters */));
15432 /// let x = ExadbVmClusterProperties::new().set_or_clear_time_zone(None::<TimeZone>);
15433 /// ```
15434 pub fn set_or_clear_time_zone<T>(mut self, v: std::option::Option<T>) -> Self
15435 where
15436 T: std::convert::Into<google_cloud_type::model::TimeZone>,
15437 {
15438 self.time_zone = v.map(|x| x.into());
15439 self
15440 }
15441
15442 /// Sets the value of [lifecycle_state][crate::model::ExadbVmClusterProperties::lifecycle_state].
15443 ///
15444 /// # Example
15445 /// ```ignore,no_run
15446 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15447 /// use google_cloud_oracledatabase_v1::model::exadb_vm_cluster_properties::ExadbVmClusterLifecycleState;
15448 /// let x0 = ExadbVmClusterProperties::new().set_lifecycle_state(ExadbVmClusterLifecycleState::Provisioning);
15449 /// let x1 = ExadbVmClusterProperties::new().set_lifecycle_state(ExadbVmClusterLifecycleState::Available);
15450 /// let x2 = ExadbVmClusterProperties::new().set_lifecycle_state(ExadbVmClusterLifecycleState::Updating);
15451 /// ```
15452 pub fn set_lifecycle_state<
15453 T: std::convert::Into<crate::model::exadb_vm_cluster_properties::ExadbVmClusterLifecycleState>,
15454 >(
15455 mut self,
15456 v: T,
15457 ) -> Self {
15458 self.lifecycle_state = v.into();
15459 self
15460 }
15461
15462 /// Sets the value of [shape_attribute][crate::model::ExadbVmClusterProperties::shape_attribute].
15463 ///
15464 /// # Example
15465 /// ```ignore,no_run
15466 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15467 /// use google_cloud_oracledatabase_v1::model::exadb_vm_cluster_properties::ShapeAttribute;
15468 /// let x0 = ExadbVmClusterProperties::new().set_shape_attribute(ShapeAttribute::SmartStorage);
15469 /// let x1 = ExadbVmClusterProperties::new().set_shape_attribute(ShapeAttribute::BlockStorage);
15470 /// ```
15471 pub fn set_shape_attribute<
15472 T: std::convert::Into<crate::model::exadb_vm_cluster_properties::ShapeAttribute>,
15473 >(
15474 mut self,
15475 v: T,
15476 ) -> Self {
15477 self.shape_attribute = v.into();
15478 self
15479 }
15480
15481 /// Sets the value of [memory_size_gb][crate::model::ExadbVmClusterProperties::memory_size_gb].
15482 ///
15483 /// # Example
15484 /// ```ignore,no_run
15485 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15486 /// let x = ExadbVmClusterProperties::new().set_memory_size_gb(42);
15487 /// ```
15488 pub fn set_memory_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15489 self.memory_size_gb = v.into();
15490 self
15491 }
15492
15493 /// Sets the value of [scan_listener_port_tcp][crate::model::ExadbVmClusterProperties::scan_listener_port_tcp].
15494 ///
15495 /// # Example
15496 /// ```ignore,no_run
15497 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15498 /// let x = ExadbVmClusterProperties::new().set_scan_listener_port_tcp(42);
15499 /// ```
15500 pub fn set_scan_listener_port_tcp<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15501 self.scan_listener_port_tcp = v.into();
15502 self
15503 }
15504
15505 /// Sets the value of [oci_uri][crate::model::ExadbVmClusterProperties::oci_uri].
15506 ///
15507 /// # Example
15508 /// ```ignore,no_run
15509 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15510 /// let x = ExadbVmClusterProperties::new().set_oci_uri("example");
15511 /// ```
15512 pub fn set_oci_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15513 self.oci_uri = v.into();
15514 self
15515 }
15516
15517 /// Sets the value of [gi_version][crate::model::ExadbVmClusterProperties::gi_version].
15518 ///
15519 /// # Example
15520 /// ```ignore,no_run
15521 /// # use google_cloud_oracledatabase_v1::model::ExadbVmClusterProperties;
15522 /// let x = ExadbVmClusterProperties::new().set_gi_version("example");
15523 /// ```
15524 pub fn set_gi_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15525 self.gi_version = v.into();
15526 self
15527 }
15528}
15529
15530impl wkt::message::Message for ExadbVmClusterProperties {
15531 fn typename() -> &'static str {
15532 "type.googleapis.com/google.cloud.oracledatabase.v1.ExadbVmClusterProperties"
15533 }
15534}
15535
15536/// Defines additional types related to [ExadbVmClusterProperties].
15537pub mod exadb_vm_cluster_properties {
15538 #[allow(unused_imports)]
15539 use super::*;
15540
15541 /// The Oracle license model that applies to the ExaScale VM cluster
15542 ///
15543 /// # Working with unknown values
15544 ///
15545 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15546 /// additional enum variants at any time. Adding new variants is not considered
15547 /// a breaking change. Applications should write their code in anticipation of:
15548 ///
15549 /// - New values appearing in future releases of the client library, **and**
15550 /// - New values received dynamically, without application changes.
15551 ///
15552 /// Please consult the [Working with enums] section in the user guide for some
15553 /// guidelines.
15554 ///
15555 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
15556 #[derive(Clone, Debug, PartialEq)]
15557 #[non_exhaustive]
15558 pub enum LicenseModel {
15559 /// Unspecified.
15560 Unspecified,
15561 /// Default is license included.
15562 LicenseIncluded,
15563 /// Bring your own license.
15564 BringYourOwnLicense,
15565 /// If set, the enum was initialized with an unknown value.
15566 ///
15567 /// Applications can examine the value using [LicenseModel::value] or
15568 /// [LicenseModel::name].
15569 UnknownValue(license_model::UnknownValue),
15570 }
15571
15572 #[doc(hidden)]
15573 pub mod license_model {
15574 #[allow(unused_imports)]
15575 use super::*;
15576 #[derive(Clone, Debug, PartialEq)]
15577 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15578 }
15579
15580 impl LicenseModel {
15581 /// Gets the enum value.
15582 ///
15583 /// Returns `None` if the enum contains an unknown value deserialized from
15584 /// the string representation of enums.
15585 pub fn value(&self) -> std::option::Option<i32> {
15586 match self {
15587 Self::Unspecified => std::option::Option::Some(0),
15588 Self::LicenseIncluded => std::option::Option::Some(1),
15589 Self::BringYourOwnLicense => std::option::Option::Some(2),
15590 Self::UnknownValue(u) => u.0.value(),
15591 }
15592 }
15593
15594 /// Gets the enum value as a string.
15595 ///
15596 /// Returns `None` if the enum contains an unknown value deserialized from
15597 /// the integer representation of enums.
15598 pub fn name(&self) -> std::option::Option<&str> {
15599 match self {
15600 Self::Unspecified => std::option::Option::Some("LICENSE_MODEL_UNSPECIFIED"),
15601 Self::LicenseIncluded => std::option::Option::Some("LICENSE_INCLUDED"),
15602 Self::BringYourOwnLicense => std::option::Option::Some("BRING_YOUR_OWN_LICENSE"),
15603 Self::UnknownValue(u) => u.0.name(),
15604 }
15605 }
15606 }
15607
15608 impl std::default::Default for LicenseModel {
15609 fn default() -> Self {
15610 use std::convert::From;
15611 Self::from(0)
15612 }
15613 }
15614
15615 impl std::fmt::Display for LicenseModel {
15616 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15617 wkt::internal::display_enum(f, self.name(), self.value())
15618 }
15619 }
15620
15621 impl std::convert::From<i32> for LicenseModel {
15622 fn from(value: i32) -> Self {
15623 match value {
15624 0 => Self::Unspecified,
15625 1 => Self::LicenseIncluded,
15626 2 => Self::BringYourOwnLicense,
15627 _ => Self::UnknownValue(license_model::UnknownValue(
15628 wkt::internal::UnknownEnumValue::Integer(value),
15629 )),
15630 }
15631 }
15632 }
15633
15634 impl std::convert::From<&str> for LicenseModel {
15635 fn from(value: &str) -> Self {
15636 use std::string::ToString;
15637 match value {
15638 "LICENSE_MODEL_UNSPECIFIED" => Self::Unspecified,
15639 "LICENSE_INCLUDED" => Self::LicenseIncluded,
15640 "BRING_YOUR_OWN_LICENSE" => Self::BringYourOwnLicense,
15641 _ => Self::UnknownValue(license_model::UnknownValue(
15642 wkt::internal::UnknownEnumValue::String(value.to_string()),
15643 )),
15644 }
15645 }
15646 }
15647
15648 impl serde::ser::Serialize for LicenseModel {
15649 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15650 where
15651 S: serde::Serializer,
15652 {
15653 match self {
15654 Self::Unspecified => serializer.serialize_i32(0),
15655 Self::LicenseIncluded => serializer.serialize_i32(1),
15656 Self::BringYourOwnLicense => serializer.serialize_i32(2),
15657 Self::UnknownValue(u) => u.0.serialize(serializer),
15658 }
15659 }
15660 }
15661
15662 impl<'de> serde::de::Deserialize<'de> for LicenseModel {
15663 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15664 where
15665 D: serde::Deserializer<'de>,
15666 {
15667 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LicenseModel>::new(
15668 ".google.cloud.oracledatabase.v1.ExadbVmClusterProperties.LicenseModel",
15669 ))
15670 }
15671 }
15672
15673 /// The various lifecycle states of the VM cluster.
15674 ///
15675 /// # Working with unknown values
15676 ///
15677 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15678 /// additional enum variants at any time. Adding new variants is not considered
15679 /// a breaking change. Applications should write their code in anticipation of:
15680 ///
15681 /// - New values appearing in future releases of the client library, **and**
15682 /// - New values received dynamically, without application changes.
15683 ///
15684 /// Please consult the [Working with enums] section in the user guide for some
15685 /// guidelines.
15686 ///
15687 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
15688 #[derive(Clone, Debug, PartialEq)]
15689 #[non_exhaustive]
15690 pub enum ExadbVmClusterLifecycleState {
15691 /// Default unspecified value.
15692 Unspecified,
15693 /// Indicates that the resource is in provisioning state.
15694 Provisioning,
15695 /// Indicates that the resource is in available state.
15696 Available,
15697 /// Indicates that the resource is in updating state.
15698 Updating,
15699 /// Indicates that the resource is in terminating state.
15700 Terminating,
15701 /// Indicates that the resource is in terminated state.
15702 Terminated,
15703 /// Indicates that the resource is in failed state.
15704 Failed,
15705 /// Indicates that the resource is in maintenance in progress state.
15706 MaintenanceInProgress,
15707 /// If set, the enum was initialized with an unknown value.
15708 ///
15709 /// Applications can examine the value using [ExadbVmClusterLifecycleState::value] or
15710 /// [ExadbVmClusterLifecycleState::name].
15711 UnknownValue(exadb_vm_cluster_lifecycle_state::UnknownValue),
15712 }
15713
15714 #[doc(hidden)]
15715 pub mod exadb_vm_cluster_lifecycle_state {
15716 #[allow(unused_imports)]
15717 use super::*;
15718 #[derive(Clone, Debug, PartialEq)]
15719 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15720 }
15721
15722 impl ExadbVmClusterLifecycleState {
15723 /// Gets the enum value.
15724 ///
15725 /// Returns `None` if the enum contains an unknown value deserialized from
15726 /// the string representation of enums.
15727 pub fn value(&self) -> std::option::Option<i32> {
15728 match self {
15729 Self::Unspecified => std::option::Option::Some(0),
15730 Self::Provisioning => std::option::Option::Some(1),
15731 Self::Available => std::option::Option::Some(2),
15732 Self::Updating => std::option::Option::Some(3),
15733 Self::Terminating => std::option::Option::Some(4),
15734 Self::Terminated => std::option::Option::Some(5),
15735 Self::Failed => std::option::Option::Some(6),
15736 Self::MaintenanceInProgress => std::option::Option::Some(7),
15737 Self::UnknownValue(u) => u.0.value(),
15738 }
15739 }
15740
15741 /// Gets the enum value as a string.
15742 ///
15743 /// Returns `None` if the enum contains an unknown value deserialized from
15744 /// the integer representation of enums.
15745 pub fn name(&self) -> std::option::Option<&str> {
15746 match self {
15747 Self::Unspecified => {
15748 std::option::Option::Some("EXADB_VM_CLUSTER_LIFECYCLE_STATE_UNSPECIFIED")
15749 }
15750 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
15751 Self::Available => std::option::Option::Some("AVAILABLE"),
15752 Self::Updating => std::option::Option::Some("UPDATING"),
15753 Self::Terminating => std::option::Option::Some("TERMINATING"),
15754 Self::Terminated => std::option::Option::Some("TERMINATED"),
15755 Self::Failed => std::option::Option::Some("FAILED"),
15756 Self::MaintenanceInProgress => std::option::Option::Some("MAINTENANCE_IN_PROGRESS"),
15757 Self::UnknownValue(u) => u.0.name(),
15758 }
15759 }
15760 }
15761
15762 impl std::default::Default for ExadbVmClusterLifecycleState {
15763 fn default() -> Self {
15764 use std::convert::From;
15765 Self::from(0)
15766 }
15767 }
15768
15769 impl std::fmt::Display for ExadbVmClusterLifecycleState {
15770 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15771 wkt::internal::display_enum(f, self.name(), self.value())
15772 }
15773 }
15774
15775 impl std::convert::From<i32> for ExadbVmClusterLifecycleState {
15776 fn from(value: i32) -> Self {
15777 match value {
15778 0 => Self::Unspecified,
15779 1 => Self::Provisioning,
15780 2 => Self::Available,
15781 3 => Self::Updating,
15782 4 => Self::Terminating,
15783 5 => Self::Terminated,
15784 6 => Self::Failed,
15785 7 => Self::MaintenanceInProgress,
15786 _ => Self::UnknownValue(exadb_vm_cluster_lifecycle_state::UnknownValue(
15787 wkt::internal::UnknownEnumValue::Integer(value),
15788 )),
15789 }
15790 }
15791 }
15792
15793 impl std::convert::From<&str> for ExadbVmClusterLifecycleState {
15794 fn from(value: &str) -> Self {
15795 use std::string::ToString;
15796 match value {
15797 "EXADB_VM_CLUSTER_LIFECYCLE_STATE_UNSPECIFIED" => Self::Unspecified,
15798 "PROVISIONING" => Self::Provisioning,
15799 "AVAILABLE" => Self::Available,
15800 "UPDATING" => Self::Updating,
15801 "TERMINATING" => Self::Terminating,
15802 "TERMINATED" => Self::Terminated,
15803 "FAILED" => Self::Failed,
15804 "MAINTENANCE_IN_PROGRESS" => Self::MaintenanceInProgress,
15805 _ => Self::UnknownValue(exadb_vm_cluster_lifecycle_state::UnknownValue(
15806 wkt::internal::UnknownEnumValue::String(value.to_string()),
15807 )),
15808 }
15809 }
15810 }
15811
15812 impl serde::ser::Serialize for ExadbVmClusterLifecycleState {
15813 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15814 where
15815 S: serde::Serializer,
15816 {
15817 match self {
15818 Self::Unspecified => serializer.serialize_i32(0),
15819 Self::Provisioning => serializer.serialize_i32(1),
15820 Self::Available => serializer.serialize_i32(2),
15821 Self::Updating => serializer.serialize_i32(3),
15822 Self::Terminating => serializer.serialize_i32(4),
15823 Self::Terminated => serializer.serialize_i32(5),
15824 Self::Failed => serializer.serialize_i32(6),
15825 Self::MaintenanceInProgress => serializer.serialize_i32(7),
15826 Self::UnknownValue(u) => u.0.serialize(serializer),
15827 }
15828 }
15829 }
15830
15831 impl<'de> serde::de::Deserialize<'de> for ExadbVmClusterLifecycleState {
15832 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15833 where
15834 D: serde::Deserializer<'de>,
15835 {
15836 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExadbVmClusterLifecycleState>::new(
15837 ".google.cloud.oracledatabase.v1.ExadbVmClusterProperties.ExadbVmClusterLifecycleState"))
15838 }
15839 }
15840
15841 /// The shape attribute of the VM cluster. The type of Exascale storage used
15842 /// for Exadata VM cluster. The default is SMART_STORAGE which supports Oracle
15843 /// Database 23ai and later
15844 ///
15845 /// # Working with unknown values
15846 ///
15847 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15848 /// additional enum variants at any time. Adding new variants is not considered
15849 /// a breaking change. Applications should write their code in anticipation of:
15850 ///
15851 /// - New values appearing in future releases of the client library, **and**
15852 /// - New values received dynamically, without application changes.
15853 ///
15854 /// Please consult the [Working with enums] section in the user guide for some
15855 /// guidelines.
15856 ///
15857 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
15858 #[derive(Clone, Debug, PartialEq)]
15859 #[non_exhaustive]
15860 pub enum ShapeAttribute {
15861 /// Default unspecified value.
15862 Unspecified,
15863 /// Indicates that the resource is in smart storage.
15864 SmartStorage,
15865 /// Indicates that the resource is in block storage.
15866 BlockStorage,
15867 /// If set, the enum was initialized with an unknown value.
15868 ///
15869 /// Applications can examine the value using [ShapeAttribute::value] or
15870 /// [ShapeAttribute::name].
15871 UnknownValue(shape_attribute::UnknownValue),
15872 }
15873
15874 #[doc(hidden)]
15875 pub mod shape_attribute {
15876 #[allow(unused_imports)]
15877 use super::*;
15878 #[derive(Clone, Debug, PartialEq)]
15879 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15880 }
15881
15882 impl ShapeAttribute {
15883 /// Gets the enum value.
15884 ///
15885 /// Returns `None` if the enum contains an unknown value deserialized from
15886 /// the string representation of enums.
15887 pub fn value(&self) -> std::option::Option<i32> {
15888 match self {
15889 Self::Unspecified => std::option::Option::Some(0),
15890 Self::SmartStorage => std::option::Option::Some(1),
15891 Self::BlockStorage => std::option::Option::Some(2),
15892 Self::UnknownValue(u) => u.0.value(),
15893 }
15894 }
15895
15896 /// Gets the enum value as a string.
15897 ///
15898 /// Returns `None` if the enum contains an unknown value deserialized from
15899 /// the integer representation of enums.
15900 pub fn name(&self) -> std::option::Option<&str> {
15901 match self {
15902 Self::Unspecified => std::option::Option::Some("SHAPE_ATTRIBUTE_UNSPECIFIED"),
15903 Self::SmartStorage => std::option::Option::Some("SMART_STORAGE"),
15904 Self::BlockStorage => std::option::Option::Some("BLOCK_STORAGE"),
15905 Self::UnknownValue(u) => u.0.name(),
15906 }
15907 }
15908 }
15909
15910 impl std::default::Default for ShapeAttribute {
15911 fn default() -> Self {
15912 use std::convert::From;
15913 Self::from(0)
15914 }
15915 }
15916
15917 impl std::fmt::Display for ShapeAttribute {
15918 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15919 wkt::internal::display_enum(f, self.name(), self.value())
15920 }
15921 }
15922
15923 impl std::convert::From<i32> for ShapeAttribute {
15924 fn from(value: i32) -> Self {
15925 match value {
15926 0 => Self::Unspecified,
15927 1 => Self::SmartStorage,
15928 2 => Self::BlockStorage,
15929 _ => Self::UnknownValue(shape_attribute::UnknownValue(
15930 wkt::internal::UnknownEnumValue::Integer(value),
15931 )),
15932 }
15933 }
15934 }
15935
15936 impl std::convert::From<&str> for ShapeAttribute {
15937 fn from(value: &str) -> Self {
15938 use std::string::ToString;
15939 match value {
15940 "SHAPE_ATTRIBUTE_UNSPECIFIED" => Self::Unspecified,
15941 "SMART_STORAGE" => Self::SmartStorage,
15942 "BLOCK_STORAGE" => Self::BlockStorage,
15943 _ => Self::UnknownValue(shape_attribute::UnknownValue(
15944 wkt::internal::UnknownEnumValue::String(value.to_string()),
15945 )),
15946 }
15947 }
15948 }
15949
15950 impl serde::ser::Serialize for ShapeAttribute {
15951 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15952 where
15953 S: serde::Serializer,
15954 {
15955 match self {
15956 Self::Unspecified => serializer.serialize_i32(0),
15957 Self::SmartStorage => serializer.serialize_i32(1),
15958 Self::BlockStorage => serializer.serialize_i32(2),
15959 Self::UnknownValue(u) => u.0.serialize(serializer),
15960 }
15961 }
15962 }
15963
15964 impl<'de> serde::de::Deserialize<'de> for ShapeAttribute {
15965 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15966 where
15967 D: serde::Deserializer<'de>,
15968 {
15969 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ShapeAttribute>::new(
15970 ".google.cloud.oracledatabase.v1.ExadbVmClusterProperties.ShapeAttribute",
15971 ))
15972 }
15973 }
15974}
15975
15976/// ExascaleDbStorageVault represents a storage vault exadb vm cluster resource.
15977/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/ExascaleDbStorageVault/>
15978#[derive(Clone, Default, PartialEq)]
15979#[non_exhaustive]
15980pub struct ExascaleDbStorageVault {
15981 /// Identifier. The resource name of the ExascaleDbStorageVault.
15982 /// Format:
15983 /// projects/{project}/locations/{location}/exascaleDbStorageVaults/{exascale_db_storage_vault}
15984 pub name: std::string::String,
15985
15986 /// Required. The display name for the ExascaleDbStorageVault. The name does
15987 /// not have to be unique within your project. The name must be 1-255
15988 /// characters long and can only contain alphanumeric characters.
15989 pub display_name: std::string::String,
15990
15991 /// Optional. The GCP Oracle zone where Oracle ExascaleDbStorageVault is
15992 /// hosted. Example: us-east4-b-r2. If not specified, the system will pick a
15993 /// zone based on availability.
15994 pub gcp_oracle_zone: std::string::String,
15995
15996 /// Required. The properties of the ExascaleDbStorageVault.
15997 pub properties: std::option::Option<crate::model::ExascaleDbStorageVaultProperties>,
15998
15999 /// Output only. The date and time when the ExascaleDbStorageVault was created.
16000 pub create_time: std::option::Option<wkt::Timestamp>,
16001
16002 /// Output only. The ID of the subscription entitlement associated with the
16003 /// ExascaleDbStorageVault.
16004 pub entitlement_id: std::string::String,
16005
16006 /// Optional. The labels or tags associated with the ExascaleDbStorageVault.
16007 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
16008
16009 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16010}
16011
16012impl ExascaleDbStorageVault {
16013 pub fn new() -> Self {
16014 std::default::Default::default()
16015 }
16016
16017 /// Sets the value of [name][crate::model::ExascaleDbStorageVault::name].
16018 ///
16019 /// # Example
16020 /// ```ignore,no_run
16021 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
16022 /// let x = ExascaleDbStorageVault::new().set_name("example");
16023 /// ```
16024 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16025 self.name = v.into();
16026 self
16027 }
16028
16029 /// Sets the value of [display_name][crate::model::ExascaleDbStorageVault::display_name].
16030 ///
16031 /// # Example
16032 /// ```ignore,no_run
16033 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
16034 /// let x = ExascaleDbStorageVault::new().set_display_name("example");
16035 /// ```
16036 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16037 self.display_name = v.into();
16038 self
16039 }
16040
16041 /// Sets the value of [gcp_oracle_zone][crate::model::ExascaleDbStorageVault::gcp_oracle_zone].
16042 ///
16043 /// # Example
16044 /// ```ignore,no_run
16045 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
16046 /// let x = ExascaleDbStorageVault::new().set_gcp_oracle_zone("example");
16047 /// ```
16048 pub fn set_gcp_oracle_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16049 self.gcp_oracle_zone = v.into();
16050 self
16051 }
16052
16053 /// Sets the value of [properties][crate::model::ExascaleDbStorageVault::properties].
16054 ///
16055 /// # Example
16056 /// ```ignore,no_run
16057 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
16058 /// use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16059 /// let x = ExascaleDbStorageVault::new().set_properties(ExascaleDbStorageVaultProperties::default()/* use setters */);
16060 /// ```
16061 pub fn set_properties<T>(mut self, v: T) -> Self
16062 where
16063 T: std::convert::Into<crate::model::ExascaleDbStorageVaultProperties>,
16064 {
16065 self.properties = std::option::Option::Some(v.into());
16066 self
16067 }
16068
16069 /// Sets or clears the value of [properties][crate::model::ExascaleDbStorageVault::properties].
16070 ///
16071 /// # Example
16072 /// ```ignore,no_run
16073 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
16074 /// use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16075 /// let x = ExascaleDbStorageVault::new().set_or_clear_properties(Some(ExascaleDbStorageVaultProperties::default()/* use setters */));
16076 /// let x = ExascaleDbStorageVault::new().set_or_clear_properties(None::<ExascaleDbStorageVaultProperties>);
16077 /// ```
16078 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
16079 where
16080 T: std::convert::Into<crate::model::ExascaleDbStorageVaultProperties>,
16081 {
16082 self.properties = v.map(|x| x.into());
16083 self
16084 }
16085
16086 /// Sets the value of [create_time][crate::model::ExascaleDbStorageVault::create_time].
16087 ///
16088 /// # Example
16089 /// ```ignore,no_run
16090 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
16091 /// use wkt::Timestamp;
16092 /// let x = ExascaleDbStorageVault::new().set_create_time(Timestamp::default()/* use setters */);
16093 /// ```
16094 pub fn set_create_time<T>(mut self, v: T) -> Self
16095 where
16096 T: std::convert::Into<wkt::Timestamp>,
16097 {
16098 self.create_time = std::option::Option::Some(v.into());
16099 self
16100 }
16101
16102 /// Sets or clears the value of [create_time][crate::model::ExascaleDbStorageVault::create_time].
16103 ///
16104 /// # Example
16105 /// ```ignore,no_run
16106 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
16107 /// use wkt::Timestamp;
16108 /// let x = ExascaleDbStorageVault::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
16109 /// let x = ExascaleDbStorageVault::new().set_or_clear_create_time(None::<Timestamp>);
16110 /// ```
16111 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16112 where
16113 T: std::convert::Into<wkt::Timestamp>,
16114 {
16115 self.create_time = v.map(|x| x.into());
16116 self
16117 }
16118
16119 /// Sets the value of [entitlement_id][crate::model::ExascaleDbStorageVault::entitlement_id].
16120 ///
16121 /// # Example
16122 /// ```ignore,no_run
16123 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
16124 /// let x = ExascaleDbStorageVault::new().set_entitlement_id("example");
16125 /// ```
16126 pub fn set_entitlement_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16127 self.entitlement_id = v.into();
16128 self
16129 }
16130
16131 /// Sets the value of [labels][crate::model::ExascaleDbStorageVault::labels].
16132 ///
16133 /// # Example
16134 /// ```ignore,no_run
16135 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
16136 /// let x = ExascaleDbStorageVault::new().set_labels([
16137 /// ("key0", "abc"),
16138 /// ("key1", "xyz"),
16139 /// ]);
16140 /// ```
16141 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
16142 where
16143 T: std::iter::IntoIterator<Item = (K, V)>,
16144 K: std::convert::Into<std::string::String>,
16145 V: std::convert::Into<std::string::String>,
16146 {
16147 use std::iter::Iterator;
16148 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16149 self
16150 }
16151}
16152
16153impl wkt::message::Message for ExascaleDbStorageVault {
16154 fn typename() -> &'static str {
16155 "type.googleapis.com/google.cloud.oracledatabase.v1.ExascaleDbStorageVault"
16156 }
16157}
16158
16159/// The properties of the ExascaleDbStorageVault.
16160/// next ID: 12
16161#[derive(Clone, Default, PartialEq)]
16162#[non_exhaustive]
16163pub struct ExascaleDbStorageVaultProperties {
16164 /// Output only. The OCID for the ExascaleDbStorageVault.
16165 pub ocid: std::string::String,
16166
16167 /// Output only. The time zone of the ExascaleDbStorageVault.
16168 pub time_zone: std::option::Option<google_cloud_type::model::TimeZone>,
16169
16170 /// Required. The storage details of the ExascaleDbStorageVault.
16171 pub exascale_db_storage_details: std::option::Option<crate::model::ExascaleDbStorageDetails>,
16172
16173 /// Output only. The state of the ExascaleDbStorageVault.
16174 pub state: crate::model::exascale_db_storage_vault_properties::State,
16175
16176 /// Optional. The description of the ExascaleDbStorageVault.
16177 pub description: std::string::String,
16178
16179 /// Output only. The list of VM cluster OCIDs associated with the
16180 /// ExascaleDbStorageVault.
16181 pub vm_cluster_ids: std::vec::Vec<std::string::String>,
16182
16183 /// Output only. The number of VM clusters associated with the
16184 /// ExascaleDbStorageVault.
16185 pub vm_cluster_count: i32,
16186
16187 /// Optional. The size of additional flash cache in percentage of high capacity
16188 /// database storage.
16189 pub additional_flash_cache_percent: i32,
16190
16191 /// Output only. Deep link to the OCI console to view this resource.
16192 pub oci_uri: std::string::String,
16193
16194 /// Output only. The shape attributes of the VM clusters attached to the
16195 /// ExascaleDbStorageVault.
16196 pub attached_shape_attributes:
16197 std::vec::Vec<crate::model::exascale_db_storage_vault_properties::ShapeAttribute>,
16198
16199 /// Output only. The shape attributes available for the VM clusters to be
16200 /// attached to the ExascaleDbStorageVault.
16201 pub available_shape_attributes:
16202 std::vec::Vec<crate::model::exascale_db_storage_vault_properties::ShapeAttribute>,
16203
16204 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16205}
16206
16207impl ExascaleDbStorageVaultProperties {
16208 pub fn new() -> Self {
16209 std::default::Default::default()
16210 }
16211
16212 /// Sets the value of [ocid][crate::model::ExascaleDbStorageVaultProperties::ocid].
16213 ///
16214 /// # Example
16215 /// ```ignore,no_run
16216 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16217 /// let x = ExascaleDbStorageVaultProperties::new().set_ocid("example");
16218 /// ```
16219 pub fn set_ocid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16220 self.ocid = v.into();
16221 self
16222 }
16223
16224 /// Sets the value of [time_zone][crate::model::ExascaleDbStorageVaultProperties::time_zone].
16225 ///
16226 /// # Example
16227 /// ```ignore,no_run
16228 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16229 /// use google_cloud_type::model::TimeZone;
16230 /// let x = ExascaleDbStorageVaultProperties::new().set_time_zone(TimeZone::default()/* use setters */);
16231 /// ```
16232 pub fn set_time_zone<T>(mut self, v: T) -> Self
16233 where
16234 T: std::convert::Into<google_cloud_type::model::TimeZone>,
16235 {
16236 self.time_zone = std::option::Option::Some(v.into());
16237 self
16238 }
16239
16240 /// Sets or clears the value of [time_zone][crate::model::ExascaleDbStorageVaultProperties::time_zone].
16241 ///
16242 /// # Example
16243 /// ```ignore,no_run
16244 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16245 /// use google_cloud_type::model::TimeZone;
16246 /// let x = ExascaleDbStorageVaultProperties::new().set_or_clear_time_zone(Some(TimeZone::default()/* use setters */));
16247 /// let x = ExascaleDbStorageVaultProperties::new().set_or_clear_time_zone(None::<TimeZone>);
16248 /// ```
16249 pub fn set_or_clear_time_zone<T>(mut self, v: std::option::Option<T>) -> Self
16250 where
16251 T: std::convert::Into<google_cloud_type::model::TimeZone>,
16252 {
16253 self.time_zone = v.map(|x| x.into());
16254 self
16255 }
16256
16257 /// Sets the value of [exascale_db_storage_details][crate::model::ExascaleDbStorageVaultProperties::exascale_db_storage_details].
16258 ///
16259 /// # Example
16260 /// ```ignore,no_run
16261 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16262 /// use google_cloud_oracledatabase_v1::model::ExascaleDbStorageDetails;
16263 /// let x = ExascaleDbStorageVaultProperties::new().set_exascale_db_storage_details(ExascaleDbStorageDetails::default()/* use setters */);
16264 /// ```
16265 pub fn set_exascale_db_storage_details<T>(mut self, v: T) -> Self
16266 where
16267 T: std::convert::Into<crate::model::ExascaleDbStorageDetails>,
16268 {
16269 self.exascale_db_storage_details = std::option::Option::Some(v.into());
16270 self
16271 }
16272
16273 /// Sets or clears the value of [exascale_db_storage_details][crate::model::ExascaleDbStorageVaultProperties::exascale_db_storage_details].
16274 ///
16275 /// # Example
16276 /// ```ignore,no_run
16277 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16278 /// use google_cloud_oracledatabase_v1::model::ExascaleDbStorageDetails;
16279 /// let x = ExascaleDbStorageVaultProperties::new().set_or_clear_exascale_db_storage_details(Some(ExascaleDbStorageDetails::default()/* use setters */));
16280 /// let x = ExascaleDbStorageVaultProperties::new().set_or_clear_exascale_db_storage_details(None::<ExascaleDbStorageDetails>);
16281 /// ```
16282 pub fn set_or_clear_exascale_db_storage_details<T>(mut self, v: std::option::Option<T>) -> Self
16283 where
16284 T: std::convert::Into<crate::model::ExascaleDbStorageDetails>,
16285 {
16286 self.exascale_db_storage_details = v.map(|x| x.into());
16287 self
16288 }
16289
16290 /// Sets the value of [state][crate::model::ExascaleDbStorageVaultProperties::state].
16291 ///
16292 /// # Example
16293 /// ```ignore,no_run
16294 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16295 /// use google_cloud_oracledatabase_v1::model::exascale_db_storage_vault_properties::State;
16296 /// let x0 = ExascaleDbStorageVaultProperties::new().set_state(State::Provisioning);
16297 /// let x1 = ExascaleDbStorageVaultProperties::new().set_state(State::Available);
16298 /// let x2 = ExascaleDbStorageVaultProperties::new().set_state(State::Updating);
16299 /// ```
16300 pub fn set_state<
16301 T: std::convert::Into<crate::model::exascale_db_storage_vault_properties::State>,
16302 >(
16303 mut self,
16304 v: T,
16305 ) -> Self {
16306 self.state = v.into();
16307 self
16308 }
16309
16310 /// Sets the value of [description][crate::model::ExascaleDbStorageVaultProperties::description].
16311 ///
16312 /// # Example
16313 /// ```ignore,no_run
16314 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16315 /// let x = ExascaleDbStorageVaultProperties::new().set_description("example");
16316 /// ```
16317 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16318 self.description = v.into();
16319 self
16320 }
16321
16322 /// Sets the value of [vm_cluster_ids][crate::model::ExascaleDbStorageVaultProperties::vm_cluster_ids].
16323 ///
16324 /// # Example
16325 /// ```ignore,no_run
16326 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16327 /// let x = ExascaleDbStorageVaultProperties::new().set_vm_cluster_ids(["a", "b", "c"]);
16328 /// ```
16329 pub fn set_vm_cluster_ids<T, V>(mut self, v: T) -> Self
16330 where
16331 T: std::iter::IntoIterator<Item = V>,
16332 V: std::convert::Into<std::string::String>,
16333 {
16334 use std::iter::Iterator;
16335 self.vm_cluster_ids = v.into_iter().map(|i| i.into()).collect();
16336 self
16337 }
16338
16339 /// Sets the value of [vm_cluster_count][crate::model::ExascaleDbStorageVaultProperties::vm_cluster_count].
16340 ///
16341 /// # Example
16342 /// ```ignore,no_run
16343 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16344 /// let x = ExascaleDbStorageVaultProperties::new().set_vm_cluster_count(42);
16345 /// ```
16346 pub fn set_vm_cluster_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16347 self.vm_cluster_count = v.into();
16348 self
16349 }
16350
16351 /// Sets the value of [additional_flash_cache_percent][crate::model::ExascaleDbStorageVaultProperties::additional_flash_cache_percent].
16352 ///
16353 /// # Example
16354 /// ```ignore,no_run
16355 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16356 /// let x = ExascaleDbStorageVaultProperties::new().set_additional_flash_cache_percent(42);
16357 /// ```
16358 pub fn set_additional_flash_cache_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16359 self.additional_flash_cache_percent = v.into();
16360 self
16361 }
16362
16363 /// Sets the value of [oci_uri][crate::model::ExascaleDbStorageVaultProperties::oci_uri].
16364 ///
16365 /// # Example
16366 /// ```ignore,no_run
16367 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16368 /// let x = ExascaleDbStorageVaultProperties::new().set_oci_uri("example");
16369 /// ```
16370 pub fn set_oci_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16371 self.oci_uri = v.into();
16372 self
16373 }
16374
16375 /// Sets the value of [attached_shape_attributes][crate::model::ExascaleDbStorageVaultProperties::attached_shape_attributes].
16376 ///
16377 /// # Example
16378 /// ```ignore,no_run
16379 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16380 /// use google_cloud_oracledatabase_v1::model::exascale_db_storage_vault_properties::ShapeAttribute;
16381 /// let x = ExascaleDbStorageVaultProperties::new().set_attached_shape_attributes([
16382 /// ShapeAttribute::SmartStorage,
16383 /// ShapeAttribute::BlockStorage,
16384 /// ]);
16385 /// ```
16386 pub fn set_attached_shape_attributes<T, V>(mut self, v: T) -> Self
16387 where
16388 T: std::iter::IntoIterator<Item = V>,
16389 V: std::convert::Into<crate::model::exascale_db_storage_vault_properties::ShapeAttribute>,
16390 {
16391 use std::iter::Iterator;
16392 self.attached_shape_attributes = v.into_iter().map(|i| i.into()).collect();
16393 self
16394 }
16395
16396 /// Sets the value of [available_shape_attributes][crate::model::ExascaleDbStorageVaultProperties::available_shape_attributes].
16397 ///
16398 /// # Example
16399 /// ```ignore,no_run
16400 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVaultProperties;
16401 /// use google_cloud_oracledatabase_v1::model::exascale_db_storage_vault_properties::ShapeAttribute;
16402 /// let x = ExascaleDbStorageVaultProperties::new().set_available_shape_attributes([
16403 /// ShapeAttribute::SmartStorage,
16404 /// ShapeAttribute::BlockStorage,
16405 /// ]);
16406 /// ```
16407 pub fn set_available_shape_attributes<T, V>(mut self, v: T) -> Self
16408 where
16409 T: std::iter::IntoIterator<Item = V>,
16410 V: std::convert::Into<crate::model::exascale_db_storage_vault_properties::ShapeAttribute>,
16411 {
16412 use std::iter::Iterator;
16413 self.available_shape_attributes = v.into_iter().map(|i| i.into()).collect();
16414 self
16415 }
16416}
16417
16418impl wkt::message::Message for ExascaleDbStorageVaultProperties {
16419 fn typename() -> &'static str {
16420 "type.googleapis.com/google.cloud.oracledatabase.v1.ExascaleDbStorageVaultProperties"
16421 }
16422}
16423
16424/// Defines additional types related to [ExascaleDbStorageVaultProperties].
16425pub mod exascale_db_storage_vault_properties {
16426 #[allow(unused_imports)]
16427 use super::*;
16428
16429 /// The state of the ExascaleDbStorageVault.
16430 ///
16431 /// # Working with unknown values
16432 ///
16433 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16434 /// additional enum variants at any time. Adding new variants is not considered
16435 /// a breaking change. Applications should write their code in anticipation of:
16436 ///
16437 /// - New values appearing in future releases of the client library, **and**
16438 /// - New values received dynamically, without application changes.
16439 ///
16440 /// Please consult the [Working with enums] section in the user guide for some
16441 /// guidelines.
16442 ///
16443 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
16444 #[derive(Clone, Debug, PartialEq)]
16445 #[non_exhaustive]
16446 pub enum State {
16447 /// The state of the ExascaleDbStorageVault is unspecified.
16448 Unspecified,
16449 /// The ExascaleDbStorageVault is being provisioned.
16450 Provisioning,
16451 /// The ExascaleDbStorageVault is available.
16452 Available,
16453 /// The ExascaleDbStorageVault is being updated.
16454 Updating,
16455 /// The ExascaleDbStorageVault is being deleted.
16456 Terminating,
16457 /// The ExascaleDbStorageVault has been deleted.
16458 Terminated,
16459 /// The ExascaleDbStorageVault has failed.
16460 Failed,
16461 /// If set, the enum was initialized with an unknown value.
16462 ///
16463 /// Applications can examine the value using [State::value] or
16464 /// [State::name].
16465 UnknownValue(state::UnknownValue),
16466 }
16467
16468 #[doc(hidden)]
16469 pub mod state {
16470 #[allow(unused_imports)]
16471 use super::*;
16472 #[derive(Clone, Debug, PartialEq)]
16473 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16474 }
16475
16476 impl State {
16477 /// Gets the enum value.
16478 ///
16479 /// Returns `None` if the enum contains an unknown value deserialized from
16480 /// the string representation of enums.
16481 pub fn value(&self) -> std::option::Option<i32> {
16482 match self {
16483 Self::Unspecified => std::option::Option::Some(0),
16484 Self::Provisioning => std::option::Option::Some(1),
16485 Self::Available => std::option::Option::Some(2),
16486 Self::Updating => std::option::Option::Some(3),
16487 Self::Terminating => std::option::Option::Some(4),
16488 Self::Terminated => std::option::Option::Some(5),
16489 Self::Failed => std::option::Option::Some(6),
16490 Self::UnknownValue(u) => u.0.value(),
16491 }
16492 }
16493
16494 /// Gets the enum value as a string.
16495 ///
16496 /// Returns `None` if the enum contains an unknown value deserialized from
16497 /// the integer representation of enums.
16498 pub fn name(&self) -> std::option::Option<&str> {
16499 match self {
16500 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
16501 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
16502 Self::Available => std::option::Option::Some("AVAILABLE"),
16503 Self::Updating => std::option::Option::Some("UPDATING"),
16504 Self::Terminating => std::option::Option::Some("TERMINATING"),
16505 Self::Terminated => std::option::Option::Some("TERMINATED"),
16506 Self::Failed => std::option::Option::Some("FAILED"),
16507 Self::UnknownValue(u) => u.0.name(),
16508 }
16509 }
16510 }
16511
16512 impl std::default::Default for State {
16513 fn default() -> Self {
16514 use std::convert::From;
16515 Self::from(0)
16516 }
16517 }
16518
16519 impl std::fmt::Display for State {
16520 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16521 wkt::internal::display_enum(f, self.name(), self.value())
16522 }
16523 }
16524
16525 impl std::convert::From<i32> for State {
16526 fn from(value: i32) -> Self {
16527 match value {
16528 0 => Self::Unspecified,
16529 1 => Self::Provisioning,
16530 2 => Self::Available,
16531 3 => Self::Updating,
16532 4 => Self::Terminating,
16533 5 => Self::Terminated,
16534 6 => Self::Failed,
16535 _ => Self::UnknownValue(state::UnknownValue(
16536 wkt::internal::UnknownEnumValue::Integer(value),
16537 )),
16538 }
16539 }
16540 }
16541
16542 impl std::convert::From<&str> for State {
16543 fn from(value: &str) -> Self {
16544 use std::string::ToString;
16545 match value {
16546 "STATE_UNSPECIFIED" => Self::Unspecified,
16547 "PROVISIONING" => Self::Provisioning,
16548 "AVAILABLE" => Self::Available,
16549 "UPDATING" => Self::Updating,
16550 "TERMINATING" => Self::Terminating,
16551 "TERMINATED" => Self::Terminated,
16552 "FAILED" => Self::Failed,
16553 _ => Self::UnknownValue(state::UnknownValue(
16554 wkt::internal::UnknownEnumValue::String(value.to_string()),
16555 )),
16556 }
16557 }
16558 }
16559
16560 impl serde::ser::Serialize for State {
16561 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16562 where
16563 S: serde::Serializer,
16564 {
16565 match self {
16566 Self::Unspecified => serializer.serialize_i32(0),
16567 Self::Provisioning => serializer.serialize_i32(1),
16568 Self::Available => serializer.serialize_i32(2),
16569 Self::Updating => serializer.serialize_i32(3),
16570 Self::Terminating => serializer.serialize_i32(4),
16571 Self::Terminated => serializer.serialize_i32(5),
16572 Self::Failed => serializer.serialize_i32(6),
16573 Self::UnknownValue(u) => u.0.serialize(serializer),
16574 }
16575 }
16576 }
16577
16578 impl<'de> serde::de::Deserialize<'de> for State {
16579 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16580 where
16581 D: serde::Deserializer<'de>,
16582 {
16583 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
16584 ".google.cloud.oracledatabase.v1.ExascaleDbStorageVaultProperties.State",
16585 ))
16586 }
16587 }
16588
16589 /// The shape attribute of the VM clusters attached to the
16590 /// ExascaleDbStorageVault.
16591 ///
16592 /// # Working with unknown values
16593 ///
16594 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16595 /// additional enum variants at any time. Adding new variants is not considered
16596 /// a breaking change. Applications should write their code in anticipation of:
16597 ///
16598 /// - New values appearing in future releases of the client library, **and**
16599 /// - New values received dynamically, without application changes.
16600 ///
16601 /// Please consult the [Working with enums] section in the user guide for some
16602 /// guidelines.
16603 ///
16604 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
16605 #[derive(Clone, Debug, PartialEq)]
16606 #[non_exhaustive]
16607 pub enum ShapeAttribute {
16608 /// Default unspecified value.
16609 Unspecified,
16610 /// Indicates that the resource is in smart storage.
16611 SmartStorage,
16612 /// Indicates that the resource is in block storage.
16613 BlockStorage,
16614 /// If set, the enum was initialized with an unknown value.
16615 ///
16616 /// Applications can examine the value using [ShapeAttribute::value] or
16617 /// [ShapeAttribute::name].
16618 UnknownValue(shape_attribute::UnknownValue),
16619 }
16620
16621 #[doc(hidden)]
16622 pub mod shape_attribute {
16623 #[allow(unused_imports)]
16624 use super::*;
16625 #[derive(Clone, Debug, PartialEq)]
16626 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16627 }
16628
16629 impl ShapeAttribute {
16630 /// Gets the enum value.
16631 ///
16632 /// Returns `None` if the enum contains an unknown value deserialized from
16633 /// the string representation of enums.
16634 pub fn value(&self) -> std::option::Option<i32> {
16635 match self {
16636 Self::Unspecified => std::option::Option::Some(0),
16637 Self::SmartStorage => std::option::Option::Some(1),
16638 Self::BlockStorage => std::option::Option::Some(2),
16639 Self::UnknownValue(u) => u.0.value(),
16640 }
16641 }
16642
16643 /// Gets the enum value as a string.
16644 ///
16645 /// Returns `None` if the enum contains an unknown value deserialized from
16646 /// the integer representation of enums.
16647 pub fn name(&self) -> std::option::Option<&str> {
16648 match self {
16649 Self::Unspecified => std::option::Option::Some("SHAPE_ATTRIBUTE_UNSPECIFIED"),
16650 Self::SmartStorage => std::option::Option::Some("SMART_STORAGE"),
16651 Self::BlockStorage => std::option::Option::Some("BLOCK_STORAGE"),
16652 Self::UnknownValue(u) => u.0.name(),
16653 }
16654 }
16655 }
16656
16657 impl std::default::Default for ShapeAttribute {
16658 fn default() -> Self {
16659 use std::convert::From;
16660 Self::from(0)
16661 }
16662 }
16663
16664 impl std::fmt::Display for ShapeAttribute {
16665 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16666 wkt::internal::display_enum(f, self.name(), self.value())
16667 }
16668 }
16669
16670 impl std::convert::From<i32> for ShapeAttribute {
16671 fn from(value: i32) -> Self {
16672 match value {
16673 0 => Self::Unspecified,
16674 1 => Self::SmartStorage,
16675 2 => Self::BlockStorage,
16676 _ => Self::UnknownValue(shape_attribute::UnknownValue(
16677 wkt::internal::UnknownEnumValue::Integer(value),
16678 )),
16679 }
16680 }
16681 }
16682
16683 impl std::convert::From<&str> for ShapeAttribute {
16684 fn from(value: &str) -> Self {
16685 use std::string::ToString;
16686 match value {
16687 "SHAPE_ATTRIBUTE_UNSPECIFIED" => Self::Unspecified,
16688 "SMART_STORAGE" => Self::SmartStorage,
16689 "BLOCK_STORAGE" => Self::BlockStorage,
16690 _ => Self::UnknownValue(shape_attribute::UnknownValue(
16691 wkt::internal::UnknownEnumValue::String(value.to_string()),
16692 )),
16693 }
16694 }
16695 }
16696
16697 impl serde::ser::Serialize for ShapeAttribute {
16698 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16699 where
16700 S: serde::Serializer,
16701 {
16702 match self {
16703 Self::Unspecified => serializer.serialize_i32(0),
16704 Self::SmartStorage => serializer.serialize_i32(1),
16705 Self::BlockStorage => serializer.serialize_i32(2),
16706 Self::UnknownValue(u) => u.0.serialize(serializer),
16707 }
16708 }
16709 }
16710
16711 impl<'de> serde::de::Deserialize<'de> for ShapeAttribute {
16712 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16713 where
16714 D: serde::Deserializer<'de>,
16715 {
16716 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ShapeAttribute>::new(
16717 ".google.cloud.oracledatabase.v1.ExascaleDbStorageVaultProperties.ShapeAttribute",
16718 ))
16719 }
16720 }
16721}
16722
16723/// The storage details of the ExascaleDbStorageVault.
16724#[derive(Clone, Default, PartialEq)]
16725#[non_exhaustive]
16726pub struct ExascaleDbStorageDetails {
16727 /// Output only. The available storage capacity for the ExascaleDbStorageVault,
16728 /// in gigabytes (GB).
16729 pub available_size_gbs: i32,
16730
16731 /// Required. The total storage allocation for the ExascaleDbStorageVault, in
16732 /// gigabytes (GB).
16733 pub total_size_gbs: i32,
16734
16735 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16736}
16737
16738impl ExascaleDbStorageDetails {
16739 pub fn new() -> Self {
16740 std::default::Default::default()
16741 }
16742
16743 /// Sets the value of [available_size_gbs][crate::model::ExascaleDbStorageDetails::available_size_gbs].
16744 ///
16745 /// # Example
16746 /// ```ignore,no_run
16747 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageDetails;
16748 /// let x = ExascaleDbStorageDetails::new().set_available_size_gbs(42);
16749 /// ```
16750 pub fn set_available_size_gbs<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16751 self.available_size_gbs = v.into();
16752 self
16753 }
16754
16755 /// Sets the value of [total_size_gbs][crate::model::ExascaleDbStorageDetails::total_size_gbs].
16756 ///
16757 /// # Example
16758 /// ```ignore,no_run
16759 /// # use google_cloud_oracledatabase_v1::model::ExascaleDbStorageDetails;
16760 /// let x = ExascaleDbStorageDetails::new().set_total_size_gbs(42);
16761 /// ```
16762 pub fn set_total_size_gbs<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16763 self.total_size_gbs = v.into();
16764 self
16765 }
16766}
16767
16768impl wkt::message::Message for ExascaleDbStorageDetails {
16769 fn typename() -> &'static str {
16770 "type.googleapis.com/google.cloud.oracledatabase.v1.ExascaleDbStorageDetails"
16771 }
16772}
16773
16774/// The request for `ExascaleDbStorageVault.Get`.
16775#[derive(Clone, Default, PartialEq)]
16776#[non_exhaustive]
16777pub struct GetExascaleDbStorageVaultRequest {
16778 /// Required. The name of the ExascaleDbStorageVault in the following format:
16779 /// projects/{project}/locations/{location}/exascaleDbStorageVaults/{exascale_db_storage_vault}.
16780 pub name: std::string::String,
16781
16782 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16783}
16784
16785impl GetExascaleDbStorageVaultRequest {
16786 pub fn new() -> Self {
16787 std::default::Default::default()
16788 }
16789
16790 /// Sets the value of [name][crate::model::GetExascaleDbStorageVaultRequest::name].
16791 ///
16792 /// # Example
16793 /// ```ignore,no_run
16794 /// # use google_cloud_oracledatabase_v1::model::GetExascaleDbStorageVaultRequest;
16795 /// let x = GetExascaleDbStorageVaultRequest::new().set_name("example");
16796 /// ```
16797 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16798 self.name = v.into();
16799 self
16800 }
16801}
16802
16803impl wkt::message::Message for GetExascaleDbStorageVaultRequest {
16804 fn typename() -> &'static str {
16805 "type.googleapis.com/google.cloud.oracledatabase.v1.GetExascaleDbStorageVaultRequest"
16806 }
16807}
16808
16809/// The request for `ExascaleDbStorageVault.List`.
16810#[derive(Clone, Default, PartialEq)]
16811#[non_exhaustive]
16812pub struct ListExascaleDbStorageVaultsRequest {
16813 /// Required. The parent value for ExascaleDbStorageVault in the following
16814 /// format: projects/{project}/locations/{location}.
16815 pub parent: std::string::String,
16816
16817 /// Optional. The maximum number of items to return.
16818 /// If unspecified, at most 50 ExascaleDbStorageVaults will be returned.
16819 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
16820 pub page_size: i32,
16821
16822 /// Optional. A token identifying a page of results the server should return.
16823 pub page_token: std::string::String,
16824
16825 /// Optional. An expression for filtering the results of the request. Filter
16826 /// the list as specified in <https://google.aip.dev/160>.
16827 pub filter: std::string::String,
16828
16829 /// Optional. An expression for ordering the results of the request. Order
16830 /// results as specified in <https://google.aip.dev/132>.
16831 pub order_by: std::string::String,
16832
16833 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16834}
16835
16836impl ListExascaleDbStorageVaultsRequest {
16837 pub fn new() -> Self {
16838 std::default::Default::default()
16839 }
16840
16841 /// Sets the value of [parent][crate::model::ListExascaleDbStorageVaultsRequest::parent].
16842 ///
16843 /// # Example
16844 /// ```ignore,no_run
16845 /// # use google_cloud_oracledatabase_v1::model::ListExascaleDbStorageVaultsRequest;
16846 /// let x = ListExascaleDbStorageVaultsRequest::new().set_parent("example");
16847 /// ```
16848 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16849 self.parent = v.into();
16850 self
16851 }
16852
16853 /// Sets the value of [page_size][crate::model::ListExascaleDbStorageVaultsRequest::page_size].
16854 ///
16855 /// # Example
16856 /// ```ignore,no_run
16857 /// # use google_cloud_oracledatabase_v1::model::ListExascaleDbStorageVaultsRequest;
16858 /// let x = ListExascaleDbStorageVaultsRequest::new().set_page_size(42);
16859 /// ```
16860 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16861 self.page_size = v.into();
16862 self
16863 }
16864
16865 /// Sets the value of [page_token][crate::model::ListExascaleDbStorageVaultsRequest::page_token].
16866 ///
16867 /// # Example
16868 /// ```ignore,no_run
16869 /// # use google_cloud_oracledatabase_v1::model::ListExascaleDbStorageVaultsRequest;
16870 /// let x = ListExascaleDbStorageVaultsRequest::new().set_page_token("example");
16871 /// ```
16872 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16873 self.page_token = v.into();
16874 self
16875 }
16876
16877 /// Sets the value of [filter][crate::model::ListExascaleDbStorageVaultsRequest::filter].
16878 ///
16879 /// # Example
16880 /// ```ignore,no_run
16881 /// # use google_cloud_oracledatabase_v1::model::ListExascaleDbStorageVaultsRequest;
16882 /// let x = ListExascaleDbStorageVaultsRequest::new().set_filter("example");
16883 /// ```
16884 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16885 self.filter = v.into();
16886 self
16887 }
16888
16889 /// Sets the value of [order_by][crate::model::ListExascaleDbStorageVaultsRequest::order_by].
16890 ///
16891 /// # Example
16892 /// ```ignore,no_run
16893 /// # use google_cloud_oracledatabase_v1::model::ListExascaleDbStorageVaultsRequest;
16894 /// let x = ListExascaleDbStorageVaultsRequest::new().set_order_by("example");
16895 /// ```
16896 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16897 self.order_by = v.into();
16898 self
16899 }
16900}
16901
16902impl wkt::message::Message for ListExascaleDbStorageVaultsRequest {
16903 fn typename() -> &'static str {
16904 "type.googleapis.com/google.cloud.oracledatabase.v1.ListExascaleDbStorageVaultsRequest"
16905 }
16906}
16907
16908/// The response for `ExascaleDbStorageVault.List`.
16909#[derive(Clone, Default, PartialEq)]
16910#[non_exhaustive]
16911pub struct ListExascaleDbStorageVaultsResponse {
16912 /// The ExascaleDbStorageVaults.
16913 pub exascale_db_storage_vaults: std::vec::Vec<crate::model::ExascaleDbStorageVault>,
16914
16915 /// A token identifying a page of results the server should return. If present,
16916 /// the next page token can be provided to a subsequent
16917 /// ListExascaleDbStorageVaults call to list the next page.
16918 /// If empty, there are no more pages.
16919 pub next_page_token: std::string::String,
16920
16921 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16922}
16923
16924impl ListExascaleDbStorageVaultsResponse {
16925 pub fn new() -> Self {
16926 std::default::Default::default()
16927 }
16928
16929 /// Sets the value of [exascale_db_storage_vaults][crate::model::ListExascaleDbStorageVaultsResponse::exascale_db_storage_vaults].
16930 ///
16931 /// # Example
16932 /// ```ignore,no_run
16933 /// # use google_cloud_oracledatabase_v1::model::ListExascaleDbStorageVaultsResponse;
16934 /// use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
16935 /// let x = ListExascaleDbStorageVaultsResponse::new()
16936 /// .set_exascale_db_storage_vaults([
16937 /// ExascaleDbStorageVault::default()/* use setters */,
16938 /// ExascaleDbStorageVault::default()/* use (different) setters */,
16939 /// ]);
16940 /// ```
16941 pub fn set_exascale_db_storage_vaults<T, V>(mut self, v: T) -> Self
16942 where
16943 T: std::iter::IntoIterator<Item = V>,
16944 V: std::convert::Into<crate::model::ExascaleDbStorageVault>,
16945 {
16946 use std::iter::Iterator;
16947 self.exascale_db_storage_vaults = v.into_iter().map(|i| i.into()).collect();
16948 self
16949 }
16950
16951 /// Sets the value of [next_page_token][crate::model::ListExascaleDbStorageVaultsResponse::next_page_token].
16952 ///
16953 /// # Example
16954 /// ```ignore,no_run
16955 /// # use google_cloud_oracledatabase_v1::model::ListExascaleDbStorageVaultsResponse;
16956 /// let x = ListExascaleDbStorageVaultsResponse::new().set_next_page_token("example");
16957 /// ```
16958 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16959 self.next_page_token = v.into();
16960 self
16961 }
16962}
16963
16964impl wkt::message::Message for ListExascaleDbStorageVaultsResponse {
16965 fn typename() -> &'static str {
16966 "type.googleapis.com/google.cloud.oracledatabase.v1.ListExascaleDbStorageVaultsResponse"
16967 }
16968}
16969
16970#[doc(hidden)]
16971impl google_cloud_gax::paginator::internal::PageableResponse
16972 for ListExascaleDbStorageVaultsResponse
16973{
16974 type PageItem = crate::model::ExascaleDbStorageVault;
16975
16976 fn items(self) -> std::vec::Vec<Self::PageItem> {
16977 self.exascale_db_storage_vaults
16978 }
16979
16980 fn next_page_token(&self) -> std::string::String {
16981 use std::clone::Clone;
16982 self.next_page_token.clone()
16983 }
16984}
16985
16986/// The request for `ExascaleDbStorageVault.Create`.
16987#[derive(Clone, Default, PartialEq)]
16988#[non_exhaustive]
16989pub struct CreateExascaleDbStorageVaultRequest {
16990 /// Required. The value for parent of the ExascaleDbStorageVault in the
16991 /// following format: projects/{project}/locations/{location}.
16992 pub parent: std::string::String,
16993
16994 /// Required. The ID of the ExascaleDbStorageVault to create. This value is
16995 /// restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of
16996 /// 63 characters in length. The value must start with a letter and end with a
16997 /// letter or a number.
16998 pub exascale_db_storage_vault_id: std::string::String,
16999
17000 /// Required. The resource being created.
17001 pub exascale_db_storage_vault: std::option::Option<crate::model::ExascaleDbStorageVault>,
17002
17003 /// Optional. An optional request ID to identify requests. Specify a unique
17004 /// request ID so that if you must retry your request, the server will know to
17005 /// ignore the request if it has already been completed. The server will
17006 /// guarantee that for at least 60 minutes since the first request.
17007 ///
17008 /// For example, consider a situation where you make an initial request and the
17009 /// request times out. If you make the request again with the same request
17010 /// ID, the server can check if original operation with the same request ID
17011 /// was received, and if so, will ignore the second request. This prevents
17012 /// clients from accidentally creating duplicate commitments.
17013 ///
17014 /// The request ID must be a valid UUID with the exception that zero UUID is
17015 /// not supported (00000000-0000-0000-0000-000000000000).
17016 pub request_id: std::string::String,
17017
17018 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17019}
17020
17021impl CreateExascaleDbStorageVaultRequest {
17022 pub fn new() -> Self {
17023 std::default::Default::default()
17024 }
17025
17026 /// Sets the value of [parent][crate::model::CreateExascaleDbStorageVaultRequest::parent].
17027 ///
17028 /// # Example
17029 /// ```ignore,no_run
17030 /// # use google_cloud_oracledatabase_v1::model::CreateExascaleDbStorageVaultRequest;
17031 /// let x = CreateExascaleDbStorageVaultRequest::new().set_parent("example");
17032 /// ```
17033 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17034 self.parent = v.into();
17035 self
17036 }
17037
17038 /// Sets the value of [exascale_db_storage_vault_id][crate::model::CreateExascaleDbStorageVaultRequest::exascale_db_storage_vault_id].
17039 ///
17040 /// # Example
17041 /// ```ignore,no_run
17042 /// # use google_cloud_oracledatabase_v1::model::CreateExascaleDbStorageVaultRequest;
17043 /// let x = CreateExascaleDbStorageVaultRequest::new().set_exascale_db_storage_vault_id("example");
17044 /// ```
17045 pub fn set_exascale_db_storage_vault_id<T: std::convert::Into<std::string::String>>(
17046 mut self,
17047 v: T,
17048 ) -> Self {
17049 self.exascale_db_storage_vault_id = v.into();
17050 self
17051 }
17052
17053 /// Sets the value of [exascale_db_storage_vault][crate::model::CreateExascaleDbStorageVaultRequest::exascale_db_storage_vault].
17054 ///
17055 /// # Example
17056 /// ```ignore,no_run
17057 /// # use google_cloud_oracledatabase_v1::model::CreateExascaleDbStorageVaultRequest;
17058 /// use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
17059 /// let x = CreateExascaleDbStorageVaultRequest::new().set_exascale_db_storage_vault(ExascaleDbStorageVault::default()/* use setters */);
17060 /// ```
17061 pub fn set_exascale_db_storage_vault<T>(mut self, v: T) -> Self
17062 where
17063 T: std::convert::Into<crate::model::ExascaleDbStorageVault>,
17064 {
17065 self.exascale_db_storage_vault = std::option::Option::Some(v.into());
17066 self
17067 }
17068
17069 /// Sets or clears the value of [exascale_db_storage_vault][crate::model::CreateExascaleDbStorageVaultRequest::exascale_db_storage_vault].
17070 ///
17071 /// # Example
17072 /// ```ignore,no_run
17073 /// # use google_cloud_oracledatabase_v1::model::CreateExascaleDbStorageVaultRequest;
17074 /// use google_cloud_oracledatabase_v1::model::ExascaleDbStorageVault;
17075 /// let x = CreateExascaleDbStorageVaultRequest::new().set_or_clear_exascale_db_storage_vault(Some(ExascaleDbStorageVault::default()/* use setters */));
17076 /// let x = CreateExascaleDbStorageVaultRequest::new().set_or_clear_exascale_db_storage_vault(None::<ExascaleDbStorageVault>);
17077 /// ```
17078 pub fn set_or_clear_exascale_db_storage_vault<T>(mut self, v: std::option::Option<T>) -> Self
17079 where
17080 T: std::convert::Into<crate::model::ExascaleDbStorageVault>,
17081 {
17082 self.exascale_db_storage_vault = v.map(|x| x.into());
17083 self
17084 }
17085
17086 /// Sets the value of [request_id][crate::model::CreateExascaleDbStorageVaultRequest::request_id].
17087 ///
17088 /// # Example
17089 /// ```ignore,no_run
17090 /// # use google_cloud_oracledatabase_v1::model::CreateExascaleDbStorageVaultRequest;
17091 /// let x = CreateExascaleDbStorageVaultRequest::new().set_request_id("example");
17092 /// ```
17093 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17094 self.request_id = v.into();
17095 self
17096 }
17097}
17098
17099impl wkt::message::Message for CreateExascaleDbStorageVaultRequest {
17100 fn typename() -> &'static str {
17101 "type.googleapis.com/google.cloud.oracledatabase.v1.CreateExascaleDbStorageVaultRequest"
17102 }
17103}
17104
17105/// The request message for `ExascaleDbStorageVault.Delete`.
17106#[derive(Clone, Default, PartialEq)]
17107#[non_exhaustive]
17108pub struct DeleteExascaleDbStorageVaultRequest {
17109 /// Required. The name of the ExascaleDbStorageVault in the following format:
17110 /// projects/{project}/locations/{location}/exascaleDbStorageVaults/{exascale_db_storage_vault}.
17111 pub name: std::string::String,
17112
17113 /// Optional. An optional ID to identify the request. This value is used to
17114 /// identify duplicate requests. If you make a request with the same request ID
17115 /// and the original request is still in progress or completed, the server
17116 /// ignores the second request. This prevents clients from
17117 /// accidentally creating duplicate commitments.
17118 ///
17119 /// The request ID must be a valid UUID with the exception that zero UUID is
17120 /// not supported (00000000-0000-0000-0000-000000000000).
17121 pub request_id: std::string::String,
17122
17123 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17124}
17125
17126impl DeleteExascaleDbStorageVaultRequest {
17127 pub fn new() -> Self {
17128 std::default::Default::default()
17129 }
17130
17131 /// Sets the value of [name][crate::model::DeleteExascaleDbStorageVaultRequest::name].
17132 ///
17133 /// # Example
17134 /// ```ignore,no_run
17135 /// # use google_cloud_oracledatabase_v1::model::DeleteExascaleDbStorageVaultRequest;
17136 /// let x = DeleteExascaleDbStorageVaultRequest::new().set_name("example");
17137 /// ```
17138 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17139 self.name = v.into();
17140 self
17141 }
17142
17143 /// Sets the value of [request_id][crate::model::DeleteExascaleDbStorageVaultRequest::request_id].
17144 ///
17145 /// # Example
17146 /// ```ignore,no_run
17147 /// # use google_cloud_oracledatabase_v1::model::DeleteExascaleDbStorageVaultRequest;
17148 /// let x = DeleteExascaleDbStorageVaultRequest::new().set_request_id("example");
17149 /// ```
17150 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17151 self.request_id = v.into();
17152 self
17153 }
17154}
17155
17156impl wkt::message::Message for DeleteExascaleDbStorageVaultRequest {
17157 fn typename() -> &'static str {
17158 "type.googleapis.com/google.cloud.oracledatabase.v1.DeleteExascaleDbStorageVaultRequest"
17159 }
17160}
17161
17162/// Details of the Oracle Grid Infrastructure (GI) version resource.
17163/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/GiVersionSummary/>
17164#[derive(Clone, Default, PartialEq)]
17165#[non_exhaustive]
17166pub struct GiVersion {
17167 /// Identifier. The name of the Oracle Grid Infrastructure (GI) version
17168 /// resource with the format:
17169 /// projects/{project}/locations/{region}/giVersions/{gi_versions}
17170 pub name: std::string::String,
17171
17172 /// Optional. version
17173 pub version: std::string::String,
17174
17175 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17176}
17177
17178impl GiVersion {
17179 pub fn new() -> Self {
17180 std::default::Default::default()
17181 }
17182
17183 /// Sets the value of [name][crate::model::GiVersion::name].
17184 ///
17185 /// # Example
17186 /// ```ignore,no_run
17187 /// # use google_cloud_oracledatabase_v1::model::GiVersion;
17188 /// let x = GiVersion::new().set_name("example");
17189 /// ```
17190 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17191 self.name = v.into();
17192 self
17193 }
17194
17195 /// Sets the value of [version][crate::model::GiVersion::version].
17196 ///
17197 /// # Example
17198 /// ```ignore,no_run
17199 /// # use google_cloud_oracledatabase_v1::model::GiVersion;
17200 /// let x = GiVersion::new().set_version("example");
17201 /// ```
17202 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17203 self.version = v.into();
17204 self
17205 }
17206}
17207
17208impl wkt::message::Message for GiVersion {
17209 fn typename() -> &'static str {
17210 "type.googleapis.com/google.cloud.oracledatabase.v1.GiVersion"
17211 }
17212}
17213
17214/// Metadata for a given [Location][google.cloud.location.Location].
17215///
17216/// [google.cloud.location.Location]: google_cloud_location::model::Location
17217#[derive(Clone, Default, PartialEq)]
17218#[non_exhaustive]
17219pub struct LocationMetadata {
17220 /// Output only. Google Cloud Platform Oracle zones in a location.
17221 pub gcp_oracle_zones: std::vec::Vec<std::string::String>,
17222
17223 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17224}
17225
17226impl LocationMetadata {
17227 pub fn new() -> Self {
17228 std::default::Default::default()
17229 }
17230
17231 /// Sets the value of [gcp_oracle_zones][crate::model::LocationMetadata::gcp_oracle_zones].
17232 ///
17233 /// # Example
17234 /// ```ignore,no_run
17235 /// # use google_cloud_oracledatabase_v1::model::LocationMetadata;
17236 /// let x = LocationMetadata::new().set_gcp_oracle_zones(["a", "b", "c"]);
17237 /// ```
17238 pub fn set_gcp_oracle_zones<T, V>(mut self, v: T) -> Self
17239 where
17240 T: std::iter::IntoIterator<Item = V>,
17241 V: std::convert::Into<std::string::String>,
17242 {
17243 use std::iter::Iterator;
17244 self.gcp_oracle_zones = v.into_iter().map(|i| i.into()).collect();
17245 self
17246 }
17247}
17248
17249impl wkt::message::Message for LocationMetadata {
17250 fn typename() -> &'static str {
17251 "type.googleapis.com/google.cloud.oracledatabase.v1.LocationMetadata"
17252 }
17253}
17254
17255/// MinorVersion represents a minor version of a GI.
17256/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/GiMinorVersionSummary/>
17257#[derive(Clone, Default, PartialEq)]
17258#[non_exhaustive]
17259pub struct MinorVersion {
17260 /// Identifier. The name of the MinorVersion resource with the format:
17261 /// projects/{project}/locations/{region}/giVersions/{gi_version}/minorVersions/{minor_version}
17262 pub name: std::string::String,
17263
17264 /// Optional. The ID of the Grid Image.
17265 pub grid_image_id: std::string::String,
17266
17267 /// Optional. The valid Oracle grid infrastructure software version.
17268 pub version: std::string::String,
17269
17270 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17271}
17272
17273impl MinorVersion {
17274 pub fn new() -> Self {
17275 std::default::Default::default()
17276 }
17277
17278 /// Sets the value of [name][crate::model::MinorVersion::name].
17279 ///
17280 /// # Example
17281 /// ```ignore,no_run
17282 /// # use google_cloud_oracledatabase_v1::model::MinorVersion;
17283 /// let x = MinorVersion::new().set_name("example");
17284 /// ```
17285 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17286 self.name = v.into();
17287 self
17288 }
17289
17290 /// Sets the value of [grid_image_id][crate::model::MinorVersion::grid_image_id].
17291 ///
17292 /// # Example
17293 /// ```ignore,no_run
17294 /// # use google_cloud_oracledatabase_v1::model::MinorVersion;
17295 /// let x = MinorVersion::new().set_grid_image_id("example");
17296 /// ```
17297 pub fn set_grid_image_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17298 self.grid_image_id = v.into();
17299 self
17300 }
17301
17302 /// Sets the value of [version][crate::model::MinorVersion::version].
17303 ///
17304 /// # Example
17305 /// ```ignore,no_run
17306 /// # use google_cloud_oracledatabase_v1::model::MinorVersion;
17307 /// let x = MinorVersion::new().set_version("example");
17308 /// ```
17309 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17310 self.version = v.into();
17311 self
17312 }
17313}
17314
17315impl wkt::message::Message for MinorVersion {
17316 fn typename() -> &'static str {
17317 "type.googleapis.com/google.cloud.oracledatabase.v1.MinorVersion"
17318 }
17319}
17320
17321/// The request for `MinorVersion.List`.
17322#[derive(Clone, Default, PartialEq)]
17323#[non_exhaustive]
17324pub struct ListMinorVersionsRequest {
17325 /// Required. The parent value for the MinorVersion resource with the format:
17326 /// projects/{project}/locations/{location}/giVersions/{gi_version}
17327 pub parent: std::string::String,
17328
17329 /// Optional. The maximum number of items to return.
17330 /// If unspecified, a maximum of 50 System Versions will be returned.
17331 /// The maximum value is 1000; values above 1000 will be reset to 1000.
17332 pub page_size: i32,
17333
17334 /// Optional. A token identifying the requested page of results to return. All
17335 /// fields except the filter should remain the same as in the request that
17336 /// provided this page token.
17337 pub page_token: std::string::String,
17338
17339 /// Optional. An expression for filtering the results of the request.
17340 /// Only shapeFamily and gcp_oracle_zone_id are supported in this format:
17341 /// `shape_family="{shapeFamily}" AND
17342 /// gcp_oracle_zone_id="{gcp_oracle_zone_id}"`.
17343 pub filter: std::string::String,
17344
17345 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17346}
17347
17348impl ListMinorVersionsRequest {
17349 pub fn new() -> Self {
17350 std::default::Default::default()
17351 }
17352
17353 /// Sets the value of [parent][crate::model::ListMinorVersionsRequest::parent].
17354 ///
17355 /// # Example
17356 /// ```ignore,no_run
17357 /// # use google_cloud_oracledatabase_v1::model::ListMinorVersionsRequest;
17358 /// let x = ListMinorVersionsRequest::new().set_parent("example");
17359 /// ```
17360 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17361 self.parent = v.into();
17362 self
17363 }
17364
17365 /// Sets the value of [page_size][crate::model::ListMinorVersionsRequest::page_size].
17366 ///
17367 /// # Example
17368 /// ```ignore,no_run
17369 /// # use google_cloud_oracledatabase_v1::model::ListMinorVersionsRequest;
17370 /// let x = ListMinorVersionsRequest::new().set_page_size(42);
17371 /// ```
17372 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17373 self.page_size = v.into();
17374 self
17375 }
17376
17377 /// Sets the value of [page_token][crate::model::ListMinorVersionsRequest::page_token].
17378 ///
17379 /// # Example
17380 /// ```ignore,no_run
17381 /// # use google_cloud_oracledatabase_v1::model::ListMinorVersionsRequest;
17382 /// let x = ListMinorVersionsRequest::new().set_page_token("example");
17383 /// ```
17384 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17385 self.page_token = v.into();
17386 self
17387 }
17388
17389 /// Sets the value of [filter][crate::model::ListMinorVersionsRequest::filter].
17390 ///
17391 /// # Example
17392 /// ```ignore,no_run
17393 /// # use google_cloud_oracledatabase_v1::model::ListMinorVersionsRequest;
17394 /// let x = ListMinorVersionsRequest::new().set_filter("example");
17395 /// ```
17396 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17397 self.filter = v.into();
17398 self
17399 }
17400}
17401
17402impl wkt::message::Message for ListMinorVersionsRequest {
17403 fn typename() -> &'static str {
17404 "type.googleapis.com/google.cloud.oracledatabase.v1.ListMinorVersionsRequest"
17405 }
17406}
17407
17408/// The response for `MinorVersion.List`.
17409#[derive(Clone, Default, PartialEq)]
17410#[non_exhaustive]
17411pub struct ListMinorVersionsResponse {
17412 /// The list of MinorVersions.
17413 pub minor_versions: std::vec::Vec<crate::model::MinorVersion>,
17414
17415 /// A token identifying a page of results the server should return.
17416 pub next_page_token: std::string::String,
17417
17418 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17419}
17420
17421impl ListMinorVersionsResponse {
17422 pub fn new() -> Self {
17423 std::default::Default::default()
17424 }
17425
17426 /// Sets the value of [minor_versions][crate::model::ListMinorVersionsResponse::minor_versions].
17427 ///
17428 /// # Example
17429 /// ```ignore,no_run
17430 /// # use google_cloud_oracledatabase_v1::model::ListMinorVersionsResponse;
17431 /// use google_cloud_oracledatabase_v1::model::MinorVersion;
17432 /// let x = ListMinorVersionsResponse::new()
17433 /// .set_minor_versions([
17434 /// MinorVersion::default()/* use setters */,
17435 /// MinorVersion::default()/* use (different) setters */,
17436 /// ]);
17437 /// ```
17438 pub fn set_minor_versions<T, V>(mut self, v: T) -> Self
17439 where
17440 T: std::iter::IntoIterator<Item = V>,
17441 V: std::convert::Into<crate::model::MinorVersion>,
17442 {
17443 use std::iter::Iterator;
17444 self.minor_versions = v.into_iter().map(|i| i.into()).collect();
17445 self
17446 }
17447
17448 /// Sets the value of [next_page_token][crate::model::ListMinorVersionsResponse::next_page_token].
17449 ///
17450 /// # Example
17451 /// ```ignore,no_run
17452 /// # use google_cloud_oracledatabase_v1::model::ListMinorVersionsResponse;
17453 /// let x = ListMinorVersionsResponse::new().set_next_page_token("example");
17454 /// ```
17455 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17456 self.next_page_token = v.into();
17457 self
17458 }
17459}
17460
17461impl wkt::message::Message for ListMinorVersionsResponse {
17462 fn typename() -> &'static str {
17463 "type.googleapis.com/google.cloud.oracledatabase.v1.ListMinorVersionsResponse"
17464 }
17465}
17466
17467#[doc(hidden)]
17468impl google_cloud_gax::paginator::internal::PageableResponse for ListMinorVersionsResponse {
17469 type PageItem = crate::model::MinorVersion;
17470
17471 fn items(self) -> std::vec::Vec<Self::PageItem> {
17472 self.minor_versions
17473 }
17474
17475 fn next_page_token(&self) -> std::string::String {
17476 use std::clone::Clone;
17477 self.next_page_token.clone()
17478 }
17479}
17480
17481/// Represents OdbNetwork resource.
17482#[derive(Clone, Default, PartialEq)]
17483#[non_exhaustive]
17484pub struct OdbNetwork {
17485 /// Identifier. The name of the OdbNetwork resource in the following format:
17486 /// projects/{project}/locations/{region}/odbNetworks/{odb_network}
17487 pub name: std::string::String,
17488
17489 /// Required. The name of the VPC network in the following format:
17490 /// projects/{project}/global/networks/{network}
17491 pub network: std::string::String,
17492
17493 /// Optional. Labels or tags associated with the resource.
17494 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
17495
17496 /// Output only. The date and time that the OdbNetwork was created.
17497 pub create_time: std::option::Option<wkt::Timestamp>,
17498
17499 /// Output only. State of the ODB Network.
17500 pub state: crate::model::odb_network::State,
17501
17502 /// Output only. The ID of the subscription entitlement associated with the
17503 /// OdbNetwork.
17504 pub entitlement_id: std::string::String,
17505
17506 /// Optional. The GCP Oracle zone where OdbNetwork is hosted.
17507 /// Example: us-east4-b-r2.
17508 /// If not specified, the system will pick a zone based on availability.
17509 pub gcp_oracle_zone: std::string::String,
17510
17511 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17512}
17513
17514impl OdbNetwork {
17515 pub fn new() -> Self {
17516 std::default::Default::default()
17517 }
17518
17519 /// Sets the value of [name][crate::model::OdbNetwork::name].
17520 ///
17521 /// # Example
17522 /// ```ignore,no_run
17523 /// # use google_cloud_oracledatabase_v1::model::OdbNetwork;
17524 /// let x = OdbNetwork::new().set_name("example");
17525 /// ```
17526 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17527 self.name = v.into();
17528 self
17529 }
17530
17531 /// Sets the value of [network][crate::model::OdbNetwork::network].
17532 ///
17533 /// # Example
17534 /// ```ignore,no_run
17535 /// # use google_cloud_oracledatabase_v1::model::OdbNetwork;
17536 /// let x = OdbNetwork::new().set_network("example");
17537 /// ```
17538 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17539 self.network = v.into();
17540 self
17541 }
17542
17543 /// Sets the value of [labels][crate::model::OdbNetwork::labels].
17544 ///
17545 /// # Example
17546 /// ```ignore,no_run
17547 /// # use google_cloud_oracledatabase_v1::model::OdbNetwork;
17548 /// let x = OdbNetwork::new().set_labels([
17549 /// ("key0", "abc"),
17550 /// ("key1", "xyz"),
17551 /// ]);
17552 /// ```
17553 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
17554 where
17555 T: std::iter::IntoIterator<Item = (K, V)>,
17556 K: std::convert::Into<std::string::String>,
17557 V: std::convert::Into<std::string::String>,
17558 {
17559 use std::iter::Iterator;
17560 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17561 self
17562 }
17563
17564 /// Sets the value of [create_time][crate::model::OdbNetwork::create_time].
17565 ///
17566 /// # Example
17567 /// ```ignore,no_run
17568 /// # use google_cloud_oracledatabase_v1::model::OdbNetwork;
17569 /// use wkt::Timestamp;
17570 /// let x = OdbNetwork::new().set_create_time(Timestamp::default()/* use setters */);
17571 /// ```
17572 pub fn set_create_time<T>(mut self, v: T) -> Self
17573 where
17574 T: std::convert::Into<wkt::Timestamp>,
17575 {
17576 self.create_time = std::option::Option::Some(v.into());
17577 self
17578 }
17579
17580 /// Sets or clears the value of [create_time][crate::model::OdbNetwork::create_time].
17581 ///
17582 /// # Example
17583 /// ```ignore,no_run
17584 /// # use google_cloud_oracledatabase_v1::model::OdbNetwork;
17585 /// use wkt::Timestamp;
17586 /// let x = OdbNetwork::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
17587 /// let x = OdbNetwork::new().set_or_clear_create_time(None::<Timestamp>);
17588 /// ```
17589 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17590 where
17591 T: std::convert::Into<wkt::Timestamp>,
17592 {
17593 self.create_time = v.map(|x| x.into());
17594 self
17595 }
17596
17597 /// Sets the value of [state][crate::model::OdbNetwork::state].
17598 ///
17599 /// # Example
17600 /// ```ignore,no_run
17601 /// # use google_cloud_oracledatabase_v1::model::OdbNetwork;
17602 /// use google_cloud_oracledatabase_v1::model::odb_network::State;
17603 /// let x0 = OdbNetwork::new().set_state(State::Provisioning);
17604 /// let x1 = OdbNetwork::new().set_state(State::Available);
17605 /// let x2 = OdbNetwork::new().set_state(State::Terminating);
17606 /// ```
17607 pub fn set_state<T: std::convert::Into<crate::model::odb_network::State>>(
17608 mut self,
17609 v: T,
17610 ) -> Self {
17611 self.state = v.into();
17612 self
17613 }
17614
17615 /// Sets the value of [entitlement_id][crate::model::OdbNetwork::entitlement_id].
17616 ///
17617 /// # Example
17618 /// ```ignore,no_run
17619 /// # use google_cloud_oracledatabase_v1::model::OdbNetwork;
17620 /// let x = OdbNetwork::new().set_entitlement_id("example");
17621 /// ```
17622 pub fn set_entitlement_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17623 self.entitlement_id = v.into();
17624 self
17625 }
17626
17627 /// Sets the value of [gcp_oracle_zone][crate::model::OdbNetwork::gcp_oracle_zone].
17628 ///
17629 /// # Example
17630 /// ```ignore,no_run
17631 /// # use google_cloud_oracledatabase_v1::model::OdbNetwork;
17632 /// let x = OdbNetwork::new().set_gcp_oracle_zone("example");
17633 /// ```
17634 pub fn set_gcp_oracle_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17635 self.gcp_oracle_zone = v.into();
17636 self
17637 }
17638}
17639
17640impl wkt::message::Message for OdbNetwork {
17641 fn typename() -> &'static str {
17642 "type.googleapis.com/google.cloud.oracledatabase.v1.OdbNetwork"
17643 }
17644}
17645
17646/// Defines additional types related to [OdbNetwork].
17647pub mod odb_network {
17648 #[allow(unused_imports)]
17649 use super::*;
17650
17651 /// The various lifecycle states of the ODB Network.
17652 ///
17653 /// # Working with unknown values
17654 ///
17655 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17656 /// additional enum variants at any time. Adding new variants is not considered
17657 /// a breaking change. Applications should write their code in anticipation of:
17658 ///
17659 /// - New values appearing in future releases of the client library, **and**
17660 /// - New values received dynamically, without application changes.
17661 ///
17662 /// Please consult the [Working with enums] section in the user guide for some
17663 /// guidelines.
17664 ///
17665 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17666 #[derive(Clone, Debug, PartialEq)]
17667 #[non_exhaustive]
17668 pub enum State {
17669 /// Default unspecified value.
17670 Unspecified,
17671 /// Indicates that the resource is in provisioning state.
17672 Provisioning,
17673 /// Indicates that the resource is in available state.
17674 Available,
17675 /// Indicates that the resource is in terminating state.
17676 Terminating,
17677 /// Indicates that the resource is in failed state.
17678 Failed,
17679 /// If set, the enum was initialized with an unknown value.
17680 ///
17681 /// Applications can examine the value using [State::value] or
17682 /// [State::name].
17683 UnknownValue(state::UnknownValue),
17684 }
17685
17686 #[doc(hidden)]
17687 pub mod state {
17688 #[allow(unused_imports)]
17689 use super::*;
17690 #[derive(Clone, Debug, PartialEq)]
17691 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17692 }
17693
17694 impl State {
17695 /// Gets the enum value.
17696 ///
17697 /// Returns `None` if the enum contains an unknown value deserialized from
17698 /// the string representation of enums.
17699 pub fn value(&self) -> std::option::Option<i32> {
17700 match self {
17701 Self::Unspecified => std::option::Option::Some(0),
17702 Self::Provisioning => std::option::Option::Some(1),
17703 Self::Available => std::option::Option::Some(2),
17704 Self::Terminating => std::option::Option::Some(3),
17705 Self::Failed => std::option::Option::Some(4),
17706 Self::UnknownValue(u) => u.0.value(),
17707 }
17708 }
17709
17710 /// Gets the enum value as a string.
17711 ///
17712 /// Returns `None` if the enum contains an unknown value deserialized from
17713 /// the integer representation of enums.
17714 pub fn name(&self) -> std::option::Option<&str> {
17715 match self {
17716 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
17717 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
17718 Self::Available => std::option::Option::Some("AVAILABLE"),
17719 Self::Terminating => std::option::Option::Some("TERMINATING"),
17720 Self::Failed => std::option::Option::Some("FAILED"),
17721 Self::UnknownValue(u) => u.0.name(),
17722 }
17723 }
17724 }
17725
17726 impl std::default::Default for State {
17727 fn default() -> Self {
17728 use std::convert::From;
17729 Self::from(0)
17730 }
17731 }
17732
17733 impl std::fmt::Display for State {
17734 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17735 wkt::internal::display_enum(f, self.name(), self.value())
17736 }
17737 }
17738
17739 impl std::convert::From<i32> for State {
17740 fn from(value: i32) -> Self {
17741 match value {
17742 0 => Self::Unspecified,
17743 1 => Self::Provisioning,
17744 2 => Self::Available,
17745 3 => Self::Terminating,
17746 4 => Self::Failed,
17747 _ => Self::UnknownValue(state::UnknownValue(
17748 wkt::internal::UnknownEnumValue::Integer(value),
17749 )),
17750 }
17751 }
17752 }
17753
17754 impl std::convert::From<&str> for State {
17755 fn from(value: &str) -> Self {
17756 use std::string::ToString;
17757 match value {
17758 "STATE_UNSPECIFIED" => Self::Unspecified,
17759 "PROVISIONING" => Self::Provisioning,
17760 "AVAILABLE" => Self::Available,
17761 "TERMINATING" => Self::Terminating,
17762 "FAILED" => Self::Failed,
17763 _ => Self::UnknownValue(state::UnknownValue(
17764 wkt::internal::UnknownEnumValue::String(value.to_string()),
17765 )),
17766 }
17767 }
17768 }
17769
17770 impl serde::ser::Serialize for State {
17771 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17772 where
17773 S: serde::Serializer,
17774 {
17775 match self {
17776 Self::Unspecified => serializer.serialize_i32(0),
17777 Self::Provisioning => serializer.serialize_i32(1),
17778 Self::Available => serializer.serialize_i32(2),
17779 Self::Terminating => serializer.serialize_i32(3),
17780 Self::Failed => serializer.serialize_i32(4),
17781 Self::UnknownValue(u) => u.0.serialize(serializer),
17782 }
17783 }
17784 }
17785
17786 impl<'de> serde::de::Deserialize<'de> for State {
17787 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17788 where
17789 D: serde::Deserializer<'de>,
17790 {
17791 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
17792 ".google.cloud.oracledatabase.v1.OdbNetwork.State",
17793 ))
17794 }
17795 }
17796}
17797
17798/// The request for `OdbNetwork.Create`.
17799#[derive(Clone, Default, PartialEq)]
17800#[non_exhaustive]
17801pub struct CreateOdbNetworkRequest {
17802 /// Required. The parent value for the OdbNetwork in the following format:
17803 /// projects/{project}/locations/{location}.
17804 pub parent: std::string::String,
17805
17806 /// Required. The ID of the OdbNetwork to create. This value is restricted
17807 /// to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63
17808 /// characters in length. The value must start with a letter and end with
17809 /// a letter or a number.
17810 pub odb_network_id: std::string::String,
17811
17812 /// Required. Details of the OdbNetwork instance to create.
17813 pub odb_network: std::option::Option<crate::model::OdbNetwork>,
17814
17815 /// Optional. An optional ID to identify the request. This value is used to
17816 /// identify duplicate requests. If you make a request with the same request ID
17817 /// and the original request is still in progress or completed, the server
17818 /// ignores the second request. This prevents clients from
17819 /// accidentally creating duplicate commitments.
17820 ///
17821 /// The request ID must be a valid UUID with the exception that zero UUID is
17822 /// not supported (00000000-0000-0000-0000-000000000000).
17823 pub request_id: std::string::String,
17824
17825 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17826}
17827
17828impl CreateOdbNetworkRequest {
17829 pub fn new() -> Self {
17830 std::default::Default::default()
17831 }
17832
17833 /// Sets the value of [parent][crate::model::CreateOdbNetworkRequest::parent].
17834 ///
17835 /// # Example
17836 /// ```ignore,no_run
17837 /// # use google_cloud_oracledatabase_v1::model::CreateOdbNetworkRequest;
17838 /// let x = CreateOdbNetworkRequest::new().set_parent("example");
17839 /// ```
17840 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17841 self.parent = v.into();
17842 self
17843 }
17844
17845 /// Sets the value of [odb_network_id][crate::model::CreateOdbNetworkRequest::odb_network_id].
17846 ///
17847 /// # Example
17848 /// ```ignore,no_run
17849 /// # use google_cloud_oracledatabase_v1::model::CreateOdbNetworkRequest;
17850 /// let x = CreateOdbNetworkRequest::new().set_odb_network_id("example");
17851 /// ```
17852 pub fn set_odb_network_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17853 self.odb_network_id = v.into();
17854 self
17855 }
17856
17857 /// Sets the value of [odb_network][crate::model::CreateOdbNetworkRequest::odb_network].
17858 ///
17859 /// # Example
17860 /// ```ignore,no_run
17861 /// # use google_cloud_oracledatabase_v1::model::CreateOdbNetworkRequest;
17862 /// use google_cloud_oracledatabase_v1::model::OdbNetwork;
17863 /// let x = CreateOdbNetworkRequest::new().set_odb_network(OdbNetwork::default()/* use setters */);
17864 /// ```
17865 pub fn set_odb_network<T>(mut self, v: T) -> Self
17866 where
17867 T: std::convert::Into<crate::model::OdbNetwork>,
17868 {
17869 self.odb_network = std::option::Option::Some(v.into());
17870 self
17871 }
17872
17873 /// Sets or clears the value of [odb_network][crate::model::CreateOdbNetworkRequest::odb_network].
17874 ///
17875 /// # Example
17876 /// ```ignore,no_run
17877 /// # use google_cloud_oracledatabase_v1::model::CreateOdbNetworkRequest;
17878 /// use google_cloud_oracledatabase_v1::model::OdbNetwork;
17879 /// let x = CreateOdbNetworkRequest::new().set_or_clear_odb_network(Some(OdbNetwork::default()/* use setters */));
17880 /// let x = CreateOdbNetworkRequest::new().set_or_clear_odb_network(None::<OdbNetwork>);
17881 /// ```
17882 pub fn set_or_clear_odb_network<T>(mut self, v: std::option::Option<T>) -> Self
17883 where
17884 T: std::convert::Into<crate::model::OdbNetwork>,
17885 {
17886 self.odb_network = v.map(|x| x.into());
17887 self
17888 }
17889
17890 /// Sets the value of [request_id][crate::model::CreateOdbNetworkRequest::request_id].
17891 ///
17892 /// # Example
17893 /// ```ignore,no_run
17894 /// # use google_cloud_oracledatabase_v1::model::CreateOdbNetworkRequest;
17895 /// let x = CreateOdbNetworkRequest::new().set_request_id("example");
17896 /// ```
17897 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17898 self.request_id = v.into();
17899 self
17900 }
17901}
17902
17903impl wkt::message::Message for CreateOdbNetworkRequest {
17904 fn typename() -> &'static str {
17905 "type.googleapis.com/google.cloud.oracledatabase.v1.CreateOdbNetworkRequest"
17906 }
17907}
17908
17909/// The request for `OdbNetwork.Delete`.
17910#[derive(Clone, Default, PartialEq)]
17911#[non_exhaustive]
17912pub struct DeleteOdbNetworkRequest {
17913 /// Required. The name of the resource in the following format:
17914 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}.
17915 pub name: std::string::String,
17916
17917 /// Optional. An optional ID to identify the request. This value is used to
17918 /// identify duplicate requests. If you make a request with the same request ID
17919 /// and the original request is still in progress or completed, the server
17920 /// ignores the second request. This prevents clients from
17921 /// accidentally creating duplicate commitments.
17922 ///
17923 /// The request ID must be a valid UUID with the exception that zero UUID is
17924 /// not supported (00000000-0000-0000-0000-000000000000).
17925 pub request_id: std::string::String,
17926
17927 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17928}
17929
17930impl DeleteOdbNetworkRequest {
17931 pub fn new() -> Self {
17932 std::default::Default::default()
17933 }
17934
17935 /// Sets the value of [name][crate::model::DeleteOdbNetworkRequest::name].
17936 ///
17937 /// # Example
17938 /// ```ignore,no_run
17939 /// # use google_cloud_oracledatabase_v1::model::DeleteOdbNetworkRequest;
17940 /// let x = DeleteOdbNetworkRequest::new().set_name("example");
17941 /// ```
17942 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17943 self.name = v.into();
17944 self
17945 }
17946
17947 /// Sets the value of [request_id][crate::model::DeleteOdbNetworkRequest::request_id].
17948 ///
17949 /// # Example
17950 /// ```ignore,no_run
17951 /// # use google_cloud_oracledatabase_v1::model::DeleteOdbNetworkRequest;
17952 /// let x = DeleteOdbNetworkRequest::new().set_request_id("example");
17953 /// ```
17954 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17955 self.request_id = v.into();
17956 self
17957 }
17958}
17959
17960impl wkt::message::Message for DeleteOdbNetworkRequest {
17961 fn typename() -> &'static str {
17962 "type.googleapis.com/google.cloud.oracledatabase.v1.DeleteOdbNetworkRequest"
17963 }
17964}
17965
17966/// The request for `OdbNetwork.List`.
17967#[derive(Clone, Default, PartialEq)]
17968#[non_exhaustive]
17969pub struct ListOdbNetworksRequest {
17970 /// Required. The parent value for the ODB Network in the following format:
17971 /// projects/{project}/locations/{location}.
17972 pub parent: std::string::String,
17973
17974 /// Optional. The maximum number of items to return.
17975 /// If unspecified, at most 50 ODB Networks will be returned.
17976 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
17977 pub page_size: i32,
17978
17979 /// Optional. A token identifying a page of results the server should return.
17980 pub page_token: std::string::String,
17981
17982 /// Optional. An expression for filtering the results of the request.
17983 pub filter: std::string::String,
17984
17985 /// Optional. An expression for ordering the results of the request.
17986 pub order_by: std::string::String,
17987
17988 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17989}
17990
17991impl ListOdbNetworksRequest {
17992 pub fn new() -> Self {
17993 std::default::Default::default()
17994 }
17995
17996 /// Sets the value of [parent][crate::model::ListOdbNetworksRequest::parent].
17997 ///
17998 /// # Example
17999 /// ```ignore,no_run
18000 /// # use google_cloud_oracledatabase_v1::model::ListOdbNetworksRequest;
18001 /// let x = ListOdbNetworksRequest::new().set_parent("example");
18002 /// ```
18003 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18004 self.parent = v.into();
18005 self
18006 }
18007
18008 /// Sets the value of [page_size][crate::model::ListOdbNetworksRequest::page_size].
18009 ///
18010 /// # Example
18011 /// ```ignore,no_run
18012 /// # use google_cloud_oracledatabase_v1::model::ListOdbNetworksRequest;
18013 /// let x = ListOdbNetworksRequest::new().set_page_size(42);
18014 /// ```
18015 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18016 self.page_size = v.into();
18017 self
18018 }
18019
18020 /// Sets the value of [page_token][crate::model::ListOdbNetworksRequest::page_token].
18021 ///
18022 /// # Example
18023 /// ```ignore,no_run
18024 /// # use google_cloud_oracledatabase_v1::model::ListOdbNetworksRequest;
18025 /// let x = ListOdbNetworksRequest::new().set_page_token("example");
18026 /// ```
18027 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18028 self.page_token = v.into();
18029 self
18030 }
18031
18032 /// Sets the value of [filter][crate::model::ListOdbNetworksRequest::filter].
18033 ///
18034 /// # Example
18035 /// ```ignore,no_run
18036 /// # use google_cloud_oracledatabase_v1::model::ListOdbNetworksRequest;
18037 /// let x = ListOdbNetworksRequest::new().set_filter("example");
18038 /// ```
18039 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18040 self.filter = v.into();
18041 self
18042 }
18043
18044 /// Sets the value of [order_by][crate::model::ListOdbNetworksRequest::order_by].
18045 ///
18046 /// # Example
18047 /// ```ignore,no_run
18048 /// # use google_cloud_oracledatabase_v1::model::ListOdbNetworksRequest;
18049 /// let x = ListOdbNetworksRequest::new().set_order_by("example");
18050 /// ```
18051 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18052 self.order_by = v.into();
18053 self
18054 }
18055}
18056
18057impl wkt::message::Message for ListOdbNetworksRequest {
18058 fn typename() -> &'static str {
18059 "type.googleapis.com/google.cloud.oracledatabase.v1.ListOdbNetworksRequest"
18060 }
18061}
18062
18063/// The response for `OdbNetwork.List`.
18064#[derive(Clone, Default, PartialEq)]
18065#[non_exhaustive]
18066pub struct ListOdbNetworksResponse {
18067 /// The list of ODB Networks.
18068 pub odb_networks: std::vec::Vec<crate::model::OdbNetwork>,
18069
18070 /// A token identifying a page of results the server should return.
18071 pub next_page_token: std::string::String,
18072
18073 /// Unreachable locations when listing resources across all locations using
18074 /// wildcard location '-'.
18075 pub unreachable: std::vec::Vec<std::string::String>,
18076
18077 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18078}
18079
18080impl ListOdbNetworksResponse {
18081 pub fn new() -> Self {
18082 std::default::Default::default()
18083 }
18084
18085 /// Sets the value of [odb_networks][crate::model::ListOdbNetworksResponse::odb_networks].
18086 ///
18087 /// # Example
18088 /// ```ignore,no_run
18089 /// # use google_cloud_oracledatabase_v1::model::ListOdbNetworksResponse;
18090 /// use google_cloud_oracledatabase_v1::model::OdbNetwork;
18091 /// let x = ListOdbNetworksResponse::new()
18092 /// .set_odb_networks([
18093 /// OdbNetwork::default()/* use setters */,
18094 /// OdbNetwork::default()/* use (different) setters */,
18095 /// ]);
18096 /// ```
18097 pub fn set_odb_networks<T, V>(mut self, v: T) -> Self
18098 where
18099 T: std::iter::IntoIterator<Item = V>,
18100 V: std::convert::Into<crate::model::OdbNetwork>,
18101 {
18102 use std::iter::Iterator;
18103 self.odb_networks = v.into_iter().map(|i| i.into()).collect();
18104 self
18105 }
18106
18107 /// Sets the value of [next_page_token][crate::model::ListOdbNetworksResponse::next_page_token].
18108 ///
18109 /// # Example
18110 /// ```ignore,no_run
18111 /// # use google_cloud_oracledatabase_v1::model::ListOdbNetworksResponse;
18112 /// let x = ListOdbNetworksResponse::new().set_next_page_token("example");
18113 /// ```
18114 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18115 self.next_page_token = v.into();
18116 self
18117 }
18118
18119 /// Sets the value of [unreachable][crate::model::ListOdbNetworksResponse::unreachable].
18120 ///
18121 /// # Example
18122 /// ```ignore,no_run
18123 /// # use google_cloud_oracledatabase_v1::model::ListOdbNetworksResponse;
18124 /// let x = ListOdbNetworksResponse::new().set_unreachable(["a", "b", "c"]);
18125 /// ```
18126 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
18127 where
18128 T: std::iter::IntoIterator<Item = V>,
18129 V: std::convert::Into<std::string::String>,
18130 {
18131 use std::iter::Iterator;
18132 self.unreachable = v.into_iter().map(|i| i.into()).collect();
18133 self
18134 }
18135}
18136
18137impl wkt::message::Message for ListOdbNetworksResponse {
18138 fn typename() -> &'static str {
18139 "type.googleapis.com/google.cloud.oracledatabase.v1.ListOdbNetworksResponse"
18140 }
18141}
18142
18143#[doc(hidden)]
18144impl google_cloud_gax::paginator::internal::PageableResponse for ListOdbNetworksResponse {
18145 type PageItem = crate::model::OdbNetwork;
18146
18147 fn items(self) -> std::vec::Vec<Self::PageItem> {
18148 self.odb_networks
18149 }
18150
18151 fn next_page_token(&self) -> std::string::String {
18152 use std::clone::Clone;
18153 self.next_page_token.clone()
18154 }
18155}
18156
18157/// The request for `OdbNetwork.Get`.
18158#[derive(Clone, Default, PartialEq)]
18159#[non_exhaustive]
18160pub struct GetOdbNetworkRequest {
18161 /// Required. The name of the OdbNetwork in the following format:
18162 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}.
18163 pub name: std::string::String,
18164
18165 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18166}
18167
18168impl GetOdbNetworkRequest {
18169 pub fn new() -> Self {
18170 std::default::Default::default()
18171 }
18172
18173 /// Sets the value of [name][crate::model::GetOdbNetworkRequest::name].
18174 ///
18175 /// # Example
18176 /// ```ignore,no_run
18177 /// # use google_cloud_oracledatabase_v1::model::GetOdbNetworkRequest;
18178 /// let x = GetOdbNetworkRequest::new().set_name("example");
18179 /// ```
18180 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18181 self.name = v.into();
18182 self
18183 }
18184}
18185
18186impl wkt::message::Message for GetOdbNetworkRequest {
18187 fn typename() -> &'static str {
18188 "type.googleapis.com/google.cloud.oracledatabase.v1.GetOdbNetworkRequest"
18189 }
18190}
18191
18192/// Represents OdbSubnet resource.
18193#[derive(Clone, Default, PartialEq)]
18194#[non_exhaustive]
18195pub struct OdbSubnet {
18196 /// Identifier. The name of the OdbSubnet resource in the following format:
18197 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
18198 pub name: std::string::String,
18199
18200 /// Required. The CIDR range of the subnet.
18201 pub cidr_range: std::string::String,
18202
18203 /// Required. Purpose of the subnet.
18204 pub purpose: crate::model::odb_subnet::Purpose,
18205
18206 /// Optional. Labels or tags associated with the resource.
18207 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
18208
18209 /// Output only. The date and time that the OdbNetwork was created.
18210 pub create_time: std::option::Option<wkt::Timestamp>,
18211
18212 /// Output only. State of the ODB Subnet.
18213 pub state: crate::model::odb_subnet::State,
18214
18215 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18216}
18217
18218impl OdbSubnet {
18219 pub fn new() -> Self {
18220 std::default::Default::default()
18221 }
18222
18223 /// Sets the value of [name][crate::model::OdbSubnet::name].
18224 ///
18225 /// # Example
18226 /// ```ignore,no_run
18227 /// # use google_cloud_oracledatabase_v1::model::OdbSubnet;
18228 /// let x = OdbSubnet::new().set_name("example");
18229 /// ```
18230 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18231 self.name = v.into();
18232 self
18233 }
18234
18235 /// Sets the value of [cidr_range][crate::model::OdbSubnet::cidr_range].
18236 ///
18237 /// # Example
18238 /// ```ignore,no_run
18239 /// # use google_cloud_oracledatabase_v1::model::OdbSubnet;
18240 /// let x = OdbSubnet::new().set_cidr_range("example");
18241 /// ```
18242 pub fn set_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18243 self.cidr_range = v.into();
18244 self
18245 }
18246
18247 /// Sets the value of [purpose][crate::model::OdbSubnet::purpose].
18248 ///
18249 /// # Example
18250 /// ```ignore,no_run
18251 /// # use google_cloud_oracledatabase_v1::model::OdbSubnet;
18252 /// use google_cloud_oracledatabase_v1::model::odb_subnet::Purpose;
18253 /// let x0 = OdbSubnet::new().set_purpose(Purpose::ClientSubnet);
18254 /// let x1 = OdbSubnet::new().set_purpose(Purpose::BackupSubnet);
18255 /// ```
18256 pub fn set_purpose<T: std::convert::Into<crate::model::odb_subnet::Purpose>>(
18257 mut self,
18258 v: T,
18259 ) -> Self {
18260 self.purpose = v.into();
18261 self
18262 }
18263
18264 /// Sets the value of [labels][crate::model::OdbSubnet::labels].
18265 ///
18266 /// # Example
18267 /// ```ignore,no_run
18268 /// # use google_cloud_oracledatabase_v1::model::OdbSubnet;
18269 /// let x = OdbSubnet::new().set_labels([
18270 /// ("key0", "abc"),
18271 /// ("key1", "xyz"),
18272 /// ]);
18273 /// ```
18274 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
18275 where
18276 T: std::iter::IntoIterator<Item = (K, V)>,
18277 K: std::convert::Into<std::string::String>,
18278 V: std::convert::Into<std::string::String>,
18279 {
18280 use std::iter::Iterator;
18281 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
18282 self
18283 }
18284
18285 /// Sets the value of [create_time][crate::model::OdbSubnet::create_time].
18286 ///
18287 /// # Example
18288 /// ```ignore,no_run
18289 /// # use google_cloud_oracledatabase_v1::model::OdbSubnet;
18290 /// use wkt::Timestamp;
18291 /// let x = OdbSubnet::new().set_create_time(Timestamp::default()/* use setters */);
18292 /// ```
18293 pub fn set_create_time<T>(mut self, v: T) -> Self
18294 where
18295 T: std::convert::Into<wkt::Timestamp>,
18296 {
18297 self.create_time = std::option::Option::Some(v.into());
18298 self
18299 }
18300
18301 /// Sets or clears the value of [create_time][crate::model::OdbSubnet::create_time].
18302 ///
18303 /// # Example
18304 /// ```ignore,no_run
18305 /// # use google_cloud_oracledatabase_v1::model::OdbSubnet;
18306 /// use wkt::Timestamp;
18307 /// let x = OdbSubnet::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
18308 /// let x = OdbSubnet::new().set_or_clear_create_time(None::<Timestamp>);
18309 /// ```
18310 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
18311 where
18312 T: std::convert::Into<wkt::Timestamp>,
18313 {
18314 self.create_time = v.map(|x| x.into());
18315 self
18316 }
18317
18318 /// Sets the value of [state][crate::model::OdbSubnet::state].
18319 ///
18320 /// # Example
18321 /// ```ignore,no_run
18322 /// # use google_cloud_oracledatabase_v1::model::OdbSubnet;
18323 /// use google_cloud_oracledatabase_v1::model::odb_subnet::State;
18324 /// let x0 = OdbSubnet::new().set_state(State::Provisioning);
18325 /// let x1 = OdbSubnet::new().set_state(State::Available);
18326 /// let x2 = OdbSubnet::new().set_state(State::Terminating);
18327 /// ```
18328 pub fn set_state<T: std::convert::Into<crate::model::odb_subnet::State>>(
18329 mut self,
18330 v: T,
18331 ) -> Self {
18332 self.state = v.into();
18333 self
18334 }
18335}
18336
18337impl wkt::message::Message for OdbSubnet {
18338 fn typename() -> &'static str {
18339 "type.googleapis.com/google.cloud.oracledatabase.v1.OdbSubnet"
18340 }
18341}
18342
18343/// Defines additional types related to [OdbSubnet].
18344pub mod odb_subnet {
18345 #[allow(unused_imports)]
18346 use super::*;
18347
18348 /// Purpose available for the subnet.
18349 ///
18350 /// # Working with unknown values
18351 ///
18352 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18353 /// additional enum variants at any time. Adding new variants is not considered
18354 /// a breaking change. Applications should write their code in anticipation of:
18355 ///
18356 /// - New values appearing in future releases of the client library, **and**
18357 /// - New values received dynamically, without application changes.
18358 ///
18359 /// Please consult the [Working with enums] section in the user guide for some
18360 /// guidelines.
18361 ///
18362 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18363 #[derive(Clone, Debug, PartialEq)]
18364 #[non_exhaustive]
18365 pub enum Purpose {
18366 /// Default unspecified value.
18367 Unspecified,
18368 /// Subnet to be used for client connections.
18369 ClientSubnet,
18370 /// Subnet to be used for backup.
18371 BackupSubnet,
18372 /// If set, the enum was initialized with an unknown value.
18373 ///
18374 /// Applications can examine the value using [Purpose::value] or
18375 /// [Purpose::name].
18376 UnknownValue(purpose::UnknownValue),
18377 }
18378
18379 #[doc(hidden)]
18380 pub mod purpose {
18381 #[allow(unused_imports)]
18382 use super::*;
18383 #[derive(Clone, Debug, PartialEq)]
18384 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18385 }
18386
18387 impl Purpose {
18388 /// Gets the enum value.
18389 ///
18390 /// Returns `None` if the enum contains an unknown value deserialized from
18391 /// the string representation of enums.
18392 pub fn value(&self) -> std::option::Option<i32> {
18393 match self {
18394 Self::Unspecified => std::option::Option::Some(0),
18395 Self::ClientSubnet => std::option::Option::Some(1),
18396 Self::BackupSubnet => std::option::Option::Some(2),
18397 Self::UnknownValue(u) => u.0.value(),
18398 }
18399 }
18400
18401 /// Gets the enum value as a string.
18402 ///
18403 /// Returns `None` if the enum contains an unknown value deserialized from
18404 /// the integer representation of enums.
18405 pub fn name(&self) -> std::option::Option<&str> {
18406 match self {
18407 Self::Unspecified => std::option::Option::Some("PURPOSE_UNSPECIFIED"),
18408 Self::ClientSubnet => std::option::Option::Some("CLIENT_SUBNET"),
18409 Self::BackupSubnet => std::option::Option::Some("BACKUP_SUBNET"),
18410 Self::UnknownValue(u) => u.0.name(),
18411 }
18412 }
18413 }
18414
18415 impl std::default::Default for Purpose {
18416 fn default() -> Self {
18417 use std::convert::From;
18418 Self::from(0)
18419 }
18420 }
18421
18422 impl std::fmt::Display for Purpose {
18423 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18424 wkt::internal::display_enum(f, self.name(), self.value())
18425 }
18426 }
18427
18428 impl std::convert::From<i32> for Purpose {
18429 fn from(value: i32) -> Self {
18430 match value {
18431 0 => Self::Unspecified,
18432 1 => Self::ClientSubnet,
18433 2 => Self::BackupSubnet,
18434 _ => Self::UnknownValue(purpose::UnknownValue(
18435 wkt::internal::UnknownEnumValue::Integer(value),
18436 )),
18437 }
18438 }
18439 }
18440
18441 impl std::convert::From<&str> for Purpose {
18442 fn from(value: &str) -> Self {
18443 use std::string::ToString;
18444 match value {
18445 "PURPOSE_UNSPECIFIED" => Self::Unspecified,
18446 "CLIENT_SUBNET" => Self::ClientSubnet,
18447 "BACKUP_SUBNET" => Self::BackupSubnet,
18448 _ => Self::UnknownValue(purpose::UnknownValue(
18449 wkt::internal::UnknownEnumValue::String(value.to_string()),
18450 )),
18451 }
18452 }
18453 }
18454
18455 impl serde::ser::Serialize for Purpose {
18456 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18457 where
18458 S: serde::Serializer,
18459 {
18460 match self {
18461 Self::Unspecified => serializer.serialize_i32(0),
18462 Self::ClientSubnet => serializer.serialize_i32(1),
18463 Self::BackupSubnet => serializer.serialize_i32(2),
18464 Self::UnknownValue(u) => u.0.serialize(serializer),
18465 }
18466 }
18467 }
18468
18469 impl<'de> serde::de::Deserialize<'de> for Purpose {
18470 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18471 where
18472 D: serde::Deserializer<'de>,
18473 {
18474 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Purpose>::new(
18475 ".google.cloud.oracledatabase.v1.OdbSubnet.Purpose",
18476 ))
18477 }
18478 }
18479
18480 /// The various lifecycle states of the ODB Subnet.
18481 ///
18482 /// # Working with unknown values
18483 ///
18484 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18485 /// additional enum variants at any time. Adding new variants is not considered
18486 /// a breaking change. Applications should write their code in anticipation of:
18487 ///
18488 /// - New values appearing in future releases of the client library, **and**
18489 /// - New values received dynamically, without application changes.
18490 ///
18491 /// Please consult the [Working with enums] section in the user guide for some
18492 /// guidelines.
18493 ///
18494 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18495 #[derive(Clone, Debug, PartialEq)]
18496 #[non_exhaustive]
18497 pub enum State {
18498 /// Default unspecified value.
18499 Unspecified,
18500 /// Indicates that the resource is in provisioning state.
18501 Provisioning,
18502 /// Indicates that the resource is in available state.
18503 Available,
18504 /// Indicates that the resource is in terminating state.
18505 Terminating,
18506 /// Indicates that the resource is in failed state.
18507 Failed,
18508 /// If set, the enum was initialized with an unknown value.
18509 ///
18510 /// Applications can examine the value using [State::value] or
18511 /// [State::name].
18512 UnknownValue(state::UnknownValue),
18513 }
18514
18515 #[doc(hidden)]
18516 pub mod state {
18517 #[allow(unused_imports)]
18518 use super::*;
18519 #[derive(Clone, Debug, PartialEq)]
18520 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18521 }
18522
18523 impl State {
18524 /// Gets the enum value.
18525 ///
18526 /// Returns `None` if the enum contains an unknown value deserialized from
18527 /// the string representation of enums.
18528 pub fn value(&self) -> std::option::Option<i32> {
18529 match self {
18530 Self::Unspecified => std::option::Option::Some(0),
18531 Self::Provisioning => std::option::Option::Some(1),
18532 Self::Available => std::option::Option::Some(2),
18533 Self::Terminating => std::option::Option::Some(3),
18534 Self::Failed => std::option::Option::Some(4),
18535 Self::UnknownValue(u) => u.0.value(),
18536 }
18537 }
18538
18539 /// Gets the enum value as a string.
18540 ///
18541 /// Returns `None` if the enum contains an unknown value deserialized from
18542 /// the integer representation of enums.
18543 pub fn name(&self) -> std::option::Option<&str> {
18544 match self {
18545 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
18546 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
18547 Self::Available => std::option::Option::Some("AVAILABLE"),
18548 Self::Terminating => std::option::Option::Some("TERMINATING"),
18549 Self::Failed => std::option::Option::Some("FAILED"),
18550 Self::UnknownValue(u) => u.0.name(),
18551 }
18552 }
18553 }
18554
18555 impl std::default::Default for State {
18556 fn default() -> Self {
18557 use std::convert::From;
18558 Self::from(0)
18559 }
18560 }
18561
18562 impl std::fmt::Display for State {
18563 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18564 wkt::internal::display_enum(f, self.name(), self.value())
18565 }
18566 }
18567
18568 impl std::convert::From<i32> for State {
18569 fn from(value: i32) -> Self {
18570 match value {
18571 0 => Self::Unspecified,
18572 1 => Self::Provisioning,
18573 2 => Self::Available,
18574 3 => Self::Terminating,
18575 4 => Self::Failed,
18576 _ => Self::UnknownValue(state::UnknownValue(
18577 wkt::internal::UnknownEnumValue::Integer(value),
18578 )),
18579 }
18580 }
18581 }
18582
18583 impl std::convert::From<&str> for State {
18584 fn from(value: &str) -> Self {
18585 use std::string::ToString;
18586 match value {
18587 "STATE_UNSPECIFIED" => Self::Unspecified,
18588 "PROVISIONING" => Self::Provisioning,
18589 "AVAILABLE" => Self::Available,
18590 "TERMINATING" => Self::Terminating,
18591 "FAILED" => Self::Failed,
18592 _ => Self::UnknownValue(state::UnknownValue(
18593 wkt::internal::UnknownEnumValue::String(value.to_string()),
18594 )),
18595 }
18596 }
18597 }
18598
18599 impl serde::ser::Serialize for State {
18600 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18601 where
18602 S: serde::Serializer,
18603 {
18604 match self {
18605 Self::Unspecified => serializer.serialize_i32(0),
18606 Self::Provisioning => serializer.serialize_i32(1),
18607 Self::Available => serializer.serialize_i32(2),
18608 Self::Terminating => serializer.serialize_i32(3),
18609 Self::Failed => serializer.serialize_i32(4),
18610 Self::UnknownValue(u) => u.0.serialize(serializer),
18611 }
18612 }
18613 }
18614
18615 impl<'de> serde::de::Deserialize<'de> for State {
18616 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18617 where
18618 D: serde::Deserializer<'de>,
18619 {
18620 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
18621 ".google.cloud.oracledatabase.v1.OdbSubnet.State",
18622 ))
18623 }
18624 }
18625}
18626
18627/// The request for `OdbSubnet.Create`.
18628#[derive(Clone, Default, PartialEq)]
18629#[non_exhaustive]
18630pub struct CreateOdbSubnetRequest {
18631 /// Required. The parent value for the OdbSubnet in the following format:
18632 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}.
18633 pub parent: std::string::String,
18634
18635 /// Required. The ID of the OdbSubnet to create. This value is restricted
18636 /// to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63
18637 /// characters in length. The value must start with a letter and end with
18638 /// a letter or a number.
18639 pub odb_subnet_id: std::string::String,
18640
18641 /// Required. Details of the OdbSubnet instance to create.
18642 pub odb_subnet: std::option::Option<crate::model::OdbSubnet>,
18643
18644 /// Optional. An optional ID to identify the request. This value is used to
18645 /// identify duplicate requests. If you make a request with the same request ID
18646 /// and the original request is still in progress or completed, the server
18647 /// ignores the second request. This prevents clients from
18648 /// accidentally creating duplicate commitments.
18649 ///
18650 /// The request ID must be a valid UUID with the exception that zero UUID is
18651 /// not supported (00000000-0000-0000-0000-000000000000).
18652 pub request_id: std::string::String,
18653
18654 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18655}
18656
18657impl CreateOdbSubnetRequest {
18658 pub fn new() -> Self {
18659 std::default::Default::default()
18660 }
18661
18662 /// Sets the value of [parent][crate::model::CreateOdbSubnetRequest::parent].
18663 ///
18664 /// # Example
18665 /// ```ignore,no_run
18666 /// # use google_cloud_oracledatabase_v1::model::CreateOdbSubnetRequest;
18667 /// let x = CreateOdbSubnetRequest::new().set_parent("example");
18668 /// ```
18669 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18670 self.parent = v.into();
18671 self
18672 }
18673
18674 /// Sets the value of [odb_subnet_id][crate::model::CreateOdbSubnetRequest::odb_subnet_id].
18675 ///
18676 /// # Example
18677 /// ```ignore,no_run
18678 /// # use google_cloud_oracledatabase_v1::model::CreateOdbSubnetRequest;
18679 /// let x = CreateOdbSubnetRequest::new().set_odb_subnet_id("example");
18680 /// ```
18681 pub fn set_odb_subnet_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18682 self.odb_subnet_id = v.into();
18683 self
18684 }
18685
18686 /// Sets the value of [odb_subnet][crate::model::CreateOdbSubnetRequest::odb_subnet].
18687 ///
18688 /// # Example
18689 /// ```ignore,no_run
18690 /// # use google_cloud_oracledatabase_v1::model::CreateOdbSubnetRequest;
18691 /// use google_cloud_oracledatabase_v1::model::OdbSubnet;
18692 /// let x = CreateOdbSubnetRequest::new().set_odb_subnet(OdbSubnet::default()/* use setters */);
18693 /// ```
18694 pub fn set_odb_subnet<T>(mut self, v: T) -> Self
18695 where
18696 T: std::convert::Into<crate::model::OdbSubnet>,
18697 {
18698 self.odb_subnet = std::option::Option::Some(v.into());
18699 self
18700 }
18701
18702 /// Sets or clears the value of [odb_subnet][crate::model::CreateOdbSubnetRequest::odb_subnet].
18703 ///
18704 /// # Example
18705 /// ```ignore,no_run
18706 /// # use google_cloud_oracledatabase_v1::model::CreateOdbSubnetRequest;
18707 /// use google_cloud_oracledatabase_v1::model::OdbSubnet;
18708 /// let x = CreateOdbSubnetRequest::new().set_or_clear_odb_subnet(Some(OdbSubnet::default()/* use setters */));
18709 /// let x = CreateOdbSubnetRequest::new().set_or_clear_odb_subnet(None::<OdbSubnet>);
18710 /// ```
18711 pub fn set_or_clear_odb_subnet<T>(mut self, v: std::option::Option<T>) -> Self
18712 where
18713 T: std::convert::Into<crate::model::OdbSubnet>,
18714 {
18715 self.odb_subnet = v.map(|x| x.into());
18716 self
18717 }
18718
18719 /// Sets the value of [request_id][crate::model::CreateOdbSubnetRequest::request_id].
18720 ///
18721 /// # Example
18722 /// ```ignore,no_run
18723 /// # use google_cloud_oracledatabase_v1::model::CreateOdbSubnetRequest;
18724 /// let x = CreateOdbSubnetRequest::new().set_request_id("example");
18725 /// ```
18726 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18727 self.request_id = v.into();
18728 self
18729 }
18730}
18731
18732impl wkt::message::Message for CreateOdbSubnetRequest {
18733 fn typename() -> &'static str {
18734 "type.googleapis.com/google.cloud.oracledatabase.v1.CreateOdbSubnetRequest"
18735 }
18736}
18737
18738/// The request for `OdbSubnet.Delete`.
18739#[derive(Clone, Default, PartialEq)]
18740#[non_exhaustive]
18741pub struct DeleteOdbSubnetRequest {
18742 /// Required. The name of the resource in the following format:
18743 /// projects/{project}/locations/{region}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}.
18744 pub name: std::string::String,
18745
18746 /// Optional. An optional ID to identify the request. This value is used to
18747 /// identify duplicate requests. If you make a request with the same request ID
18748 /// and the original request is still in progress or completed, the server
18749 /// ignores the second request. This prevents clients from
18750 /// accidentally creating duplicate commitments.
18751 ///
18752 /// The request ID must be a valid UUID with the exception that zero UUID is
18753 /// not supported (00000000-0000-0000-0000-000000000000).
18754 pub request_id: std::string::String,
18755
18756 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18757}
18758
18759impl DeleteOdbSubnetRequest {
18760 pub fn new() -> Self {
18761 std::default::Default::default()
18762 }
18763
18764 /// Sets the value of [name][crate::model::DeleteOdbSubnetRequest::name].
18765 ///
18766 /// # Example
18767 /// ```ignore,no_run
18768 /// # use google_cloud_oracledatabase_v1::model::DeleteOdbSubnetRequest;
18769 /// let x = DeleteOdbSubnetRequest::new().set_name("example");
18770 /// ```
18771 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18772 self.name = v.into();
18773 self
18774 }
18775
18776 /// Sets the value of [request_id][crate::model::DeleteOdbSubnetRequest::request_id].
18777 ///
18778 /// # Example
18779 /// ```ignore,no_run
18780 /// # use google_cloud_oracledatabase_v1::model::DeleteOdbSubnetRequest;
18781 /// let x = DeleteOdbSubnetRequest::new().set_request_id("example");
18782 /// ```
18783 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18784 self.request_id = v.into();
18785 self
18786 }
18787}
18788
18789impl wkt::message::Message for DeleteOdbSubnetRequest {
18790 fn typename() -> &'static str {
18791 "type.googleapis.com/google.cloud.oracledatabase.v1.DeleteOdbSubnetRequest"
18792 }
18793}
18794
18795/// The request for `OdbSubnet.List`.
18796#[derive(Clone, Default, PartialEq)]
18797#[non_exhaustive]
18798pub struct ListOdbSubnetsRequest {
18799 /// Required. The parent value for the OdbSubnet in the following format:
18800 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}.
18801 pub parent: std::string::String,
18802
18803 /// Optional. The maximum number of items to return.
18804 /// If unspecified, at most 50 ODB Networks will be returned.
18805 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
18806 pub page_size: i32,
18807
18808 /// Optional. A token identifying a page of results the server should return.
18809 pub page_token: std::string::String,
18810
18811 /// Optional. An expression for filtering the results of the request.
18812 pub filter: std::string::String,
18813
18814 /// Optional. An expression for ordering the results of the request.
18815 pub order_by: std::string::String,
18816
18817 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18818}
18819
18820impl ListOdbSubnetsRequest {
18821 pub fn new() -> Self {
18822 std::default::Default::default()
18823 }
18824
18825 /// Sets the value of [parent][crate::model::ListOdbSubnetsRequest::parent].
18826 ///
18827 /// # Example
18828 /// ```ignore,no_run
18829 /// # use google_cloud_oracledatabase_v1::model::ListOdbSubnetsRequest;
18830 /// let x = ListOdbSubnetsRequest::new().set_parent("example");
18831 /// ```
18832 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18833 self.parent = v.into();
18834 self
18835 }
18836
18837 /// Sets the value of [page_size][crate::model::ListOdbSubnetsRequest::page_size].
18838 ///
18839 /// # Example
18840 /// ```ignore,no_run
18841 /// # use google_cloud_oracledatabase_v1::model::ListOdbSubnetsRequest;
18842 /// let x = ListOdbSubnetsRequest::new().set_page_size(42);
18843 /// ```
18844 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18845 self.page_size = v.into();
18846 self
18847 }
18848
18849 /// Sets the value of [page_token][crate::model::ListOdbSubnetsRequest::page_token].
18850 ///
18851 /// # Example
18852 /// ```ignore,no_run
18853 /// # use google_cloud_oracledatabase_v1::model::ListOdbSubnetsRequest;
18854 /// let x = ListOdbSubnetsRequest::new().set_page_token("example");
18855 /// ```
18856 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18857 self.page_token = v.into();
18858 self
18859 }
18860
18861 /// Sets the value of [filter][crate::model::ListOdbSubnetsRequest::filter].
18862 ///
18863 /// # Example
18864 /// ```ignore,no_run
18865 /// # use google_cloud_oracledatabase_v1::model::ListOdbSubnetsRequest;
18866 /// let x = ListOdbSubnetsRequest::new().set_filter("example");
18867 /// ```
18868 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18869 self.filter = v.into();
18870 self
18871 }
18872
18873 /// Sets the value of [order_by][crate::model::ListOdbSubnetsRequest::order_by].
18874 ///
18875 /// # Example
18876 /// ```ignore,no_run
18877 /// # use google_cloud_oracledatabase_v1::model::ListOdbSubnetsRequest;
18878 /// let x = ListOdbSubnetsRequest::new().set_order_by("example");
18879 /// ```
18880 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18881 self.order_by = v.into();
18882 self
18883 }
18884}
18885
18886impl wkt::message::Message for ListOdbSubnetsRequest {
18887 fn typename() -> &'static str {
18888 "type.googleapis.com/google.cloud.oracledatabase.v1.ListOdbSubnetsRequest"
18889 }
18890}
18891
18892/// The response for `OdbSubnet.List`.
18893#[derive(Clone, Default, PartialEq)]
18894#[non_exhaustive]
18895pub struct ListOdbSubnetsResponse {
18896 /// The list of ODB Subnets.
18897 pub odb_subnets: std::vec::Vec<crate::model::OdbSubnet>,
18898
18899 /// A token identifying a page of results the server should return.
18900 pub next_page_token: std::string::String,
18901
18902 /// Unreachable locations when listing resources across all locations using
18903 /// wildcard location '-'.
18904 pub unreachable: std::vec::Vec<std::string::String>,
18905
18906 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18907}
18908
18909impl ListOdbSubnetsResponse {
18910 pub fn new() -> Self {
18911 std::default::Default::default()
18912 }
18913
18914 /// Sets the value of [odb_subnets][crate::model::ListOdbSubnetsResponse::odb_subnets].
18915 ///
18916 /// # Example
18917 /// ```ignore,no_run
18918 /// # use google_cloud_oracledatabase_v1::model::ListOdbSubnetsResponse;
18919 /// use google_cloud_oracledatabase_v1::model::OdbSubnet;
18920 /// let x = ListOdbSubnetsResponse::new()
18921 /// .set_odb_subnets([
18922 /// OdbSubnet::default()/* use setters */,
18923 /// OdbSubnet::default()/* use (different) setters */,
18924 /// ]);
18925 /// ```
18926 pub fn set_odb_subnets<T, V>(mut self, v: T) -> Self
18927 where
18928 T: std::iter::IntoIterator<Item = V>,
18929 V: std::convert::Into<crate::model::OdbSubnet>,
18930 {
18931 use std::iter::Iterator;
18932 self.odb_subnets = v.into_iter().map(|i| i.into()).collect();
18933 self
18934 }
18935
18936 /// Sets the value of [next_page_token][crate::model::ListOdbSubnetsResponse::next_page_token].
18937 ///
18938 /// # Example
18939 /// ```ignore,no_run
18940 /// # use google_cloud_oracledatabase_v1::model::ListOdbSubnetsResponse;
18941 /// let x = ListOdbSubnetsResponse::new().set_next_page_token("example");
18942 /// ```
18943 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18944 self.next_page_token = v.into();
18945 self
18946 }
18947
18948 /// Sets the value of [unreachable][crate::model::ListOdbSubnetsResponse::unreachable].
18949 ///
18950 /// # Example
18951 /// ```ignore,no_run
18952 /// # use google_cloud_oracledatabase_v1::model::ListOdbSubnetsResponse;
18953 /// let x = ListOdbSubnetsResponse::new().set_unreachable(["a", "b", "c"]);
18954 /// ```
18955 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
18956 where
18957 T: std::iter::IntoIterator<Item = V>,
18958 V: std::convert::Into<std::string::String>,
18959 {
18960 use std::iter::Iterator;
18961 self.unreachable = v.into_iter().map(|i| i.into()).collect();
18962 self
18963 }
18964}
18965
18966impl wkt::message::Message for ListOdbSubnetsResponse {
18967 fn typename() -> &'static str {
18968 "type.googleapis.com/google.cloud.oracledatabase.v1.ListOdbSubnetsResponse"
18969 }
18970}
18971
18972#[doc(hidden)]
18973impl google_cloud_gax::paginator::internal::PageableResponse for ListOdbSubnetsResponse {
18974 type PageItem = crate::model::OdbSubnet;
18975
18976 fn items(self) -> std::vec::Vec<Self::PageItem> {
18977 self.odb_subnets
18978 }
18979
18980 fn next_page_token(&self) -> std::string::String {
18981 use std::clone::Clone;
18982 self.next_page_token.clone()
18983 }
18984}
18985
18986/// The request for `OdbSubnet.Get`.
18987#[derive(Clone, Default, PartialEq)]
18988#[non_exhaustive]
18989pub struct GetOdbSubnetRequest {
18990 /// Required. The name of the OdbSubnet in the following format:
18991 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}.
18992 pub name: std::string::String,
18993
18994 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18995}
18996
18997impl GetOdbSubnetRequest {
18998 pub fn new() -> Self {
18999 std::default::Default::default()
19000 }
19001
19002 /// Sets the value of [name][crate::model::GetOdbSubnetRequest::name].
19003 ///
19004 /// # Example
19005 /// ```ignore,no_run
19006 /// # use google_cloud_oracledatabase_v1::model::GetOdbSubnetRequest;
19007 /// let x = GetOdbSubnetRequest::new().set_name("example");
19008 /// ```
19009 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19010 self.name = v.into();
19011 self
19012 }
19013}
19014
19015impl wkt::message::Message for GetOdbSubnetRequest {
19016 fn typename() -> &'static str {
19017 "type.googleapis.com/google.cloud.oracledatabase.v1.GetOdbSubnetRequest"
19018 }
19019}
19020
19021/// The request for `CloudExadataInfrastructures.List`.
19022#[derive(Clone, Default, PartialEq)]
19023#[non_exhaustive]
19024pub struct ListCloudExadataInfrastructuresRequest {
19025 /// Required. The parent value for CloudExadataInfrastructure in the following
19026 /// format: projects/{project}/locations/{location}.
19027 pub parent: std::string::String,
19028
19029 /// Optional. The maximum number of items to return.
19030 /// If unspecified, at most 50 Exadata infrastructures will be returned.
19031 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
19032 pub page_size: i32,
19033
19034 /// Optional. A token identifying a page of results the server should return.
19035 pub page_token: std::string::String,
19036
19037 /// Optional. An expression for filtering the results of the request.
19038 pub filter: std::string::String,
19039
19040 /// Optional. An expression for ordering the results of the request.
19041 pub order_by: std::string::String,
19042
19043 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19044}
19045
19046impl ListCloudExadataInfrastructuresRequest {
19047 pub fn new() -> Self {
19048 std::default::Default::default()
19049 }
19050
19051 /// Sets the value of [parent][crate::model::ListCloudExadataInfrastructuresRequest::parent].
19052 ///
19053 /// # Example
19054 /// ```ignore,no_run
19055 /// # use google_cloud_oracledatabase_v1::model::ListCloudExadataInfrastructuresRequest;
19056 /// let x = ListCloudExadataInfrastructuresRequest::new().set_parent("example");
19057 /// ```
19058 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19059 self.parent = v.into();
19060 self
19061 }
19062
19063 /// Sets the value of [page_size][crate::model::ListCloudExadataInfrastructuresRequest::page_size].
19064 ///
19065 /// # Example
19066 /// ```ignore,no_run
19067 /// # use google_cloud_oracledatabase_v1::model::ListCloudExadataInfrastructuresRequest;
19068 /// let x = ListCloudExadataInfrastructuresRequest::new().set_page_size(42);
19069 /// ```
19070 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19071 self.page_size = v.into();
19072 self
19073 }
19074
19075 /// Sets the value of [page_token][crate::model::ListCloudExadataInfrastructuresRequest::page_token].
19076 ///
19077 /// # Example
19078 /// ```ignore,no_run
19079 /// # use google_cloud_oracledatabase_v1::model::ListCloudExadataInfrastructuresRequest;
19080 /// let x = ListCloudExadataInfrastructuresRequest::new().set_page_token("example");
19081 /// ```
19082 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19083 self.page_token = v.into();
19084 self
19085 }
19086
19087 /// Sets the value of [filter][crate::model::ListCloudExadataInfrastructuresRequest::filter].
19088 ///
19089 /// # Example
19090 /// ```ignore,no_run
19091 /// # use google_cloud_oracledatabase_v1::model::ListCloudExadataInfrastructuresRequest;
19092 /// let x = ListCloudExadataInfrastructuresRequest::new().set_filter("example");
19093 /// ```
19094 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19095 self.filter = v.into();
19096 self
19097 }
19098
19099 /// Sets the value of [order_by][crate::model::ListCloudExadataInfrastructuresRequest::order_by].
19100 ///
19101 /// # Example
19102 /// ```ignore,no_run
19103 /// # use google_cloud_oracledatabase_v1::model::ListCloudExadataInfrastructuresRequest;
19104 /// let x = ListCloudExadataInfrastructuresRequest::new().set_order_by("example");
19105 /// ```
19106 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19107 self.order_by = v.into();
19108 self
19109 }
19110}
19111
19112impl wkt::message::Message for ListCloudExadataInfrastructuresRequest {
19113 fn typename() -> &'static str {
19114 "type.googleapis.com/google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequest"
19115 }
19116}
19117
19118/// The response for `CloudExadataInfrastructures.list`.
19119#[derive(Clone, Default, PartialEq)]
19120#[non_exhaustive]
19121pub struct ListCloudExadataInfrastructuresResponse {
19122 /// The list of Exadata Infrastructures.
19123 pub cloud_exadata_infrastructures: std::vec::Vec<crate::model::CloudExadataInfrastructure>,
19124
19125 /// A token for fetching next page of response.
19126 pub next_page_token: std::string::String,
19127
19128 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19129}
19130
19131impl ListCloudExadataInfrastructuresResponse {
19132 pub fn new() -> Self {
19133 std::default::Default::default()
19134 }
19135
19136 /// Sets the value of [cloud_exadata_infrastructures][crate::model::ListCloudExadataInfrastructuresResponse::cloud_exadata_infrastructures].
19137 ///
19138 /// # Example
19139 /// ```ignore,no_run
19140 /// # use google_cloud_oracledatabase_v1::model::ListCloudExadataInfrastructuresResponse;
19141 /// use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
19142 /// let x = ListCloudExadataInfrastructuresResponse::new()
19143 /// .set_cloud_exadata_infrastructures([
19144 /// CloudExadataInfrastructure::default()/* use setters */,
19145 /// CloudExadataInfrastructure::default()/* use (different) setters */,
19146 /// ]);
19147 /// ```
19148 pub fn set_cloud_exadata_infrastructures<T, V>(mut self, v: T) -> Self
19149 where
19150 T: std::iter::IntoIterator<Item = V>,
19151 V: std::convert::Into<crate::model::CloudExadataInfrastructure>,
19152 {
19153 use std::iter::Iterator;
19154 self.cloud_exadata_infrastructures = v.into_iter().map(|i| i.into()).collect();
19155 self
19156 }
19157
19158 /// Sets the value of [next_page_token][crate::model::ListCloudExadataInfrastructuresResponse::next_page_token].
19159 ///
19160 /// # Example
19161 /// ```ignore,no_run
19162 /// # use google_cloud_oracledatabase_v1::model::ListCloudExadataInfrastructuresResponse;
19163 /// let x = ListCloudExadataInfrastructuresResponse::new().set_next_page_token("example");
19164 /// ```
19165 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19166 self.next_page_token = v.into();
19167 self
19168 }
19169}
19170
19171impl wkt::message::Message for ListCloudExadataInfrastructuresResponse {
19172 fn typename() -> &'static str {
19173 "type.googleapis.com/google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresResponse"
19174 }
19175}
19176
19177#[doc(hidden)]
19178impl google_cloud_gax::paginator::internal::PageableResponse
19179 for ListCloudExadataInfrastructuresResponse
19180{
19181 type PageItem = crate::model::CloudExadataInfrastructure;
19182
19183 fn items(self) -> std::vec::Vec<Self::PageItem> {
19184 self.cloud_exadata_infrastructures
19185 }
19186
19187 fn next_page_token(&self) -> std::string::String {
19188 use std::clone::Clone;
19189 self.next_page_token.clone()
19190 }
19191}
19192
19193/// The request for `CloudExadataInfrastructure.Get`.
19194#[derive(Clone, Default, PartialEq)]
19195#[non_exhaustive]
19196pub struct GetCloudExadataInfrastructureRequest {
19197 /// Required. The name of the Cloud Exadata Infrastructure in the following
19198 /// format:
19199 /// projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}.
19200 pub name: std::string::String,
19201
19202 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19203}
19204
19205impl GetCloudExadataInfrastructureRequest {
19206 pub fn new() -> Self {
19207 std::default::Default::default()
19208 }
19209
19210 /// Sets the value of [name][crate::model::GetCloudExadataInfrastructureRequest::name].
19211 ///
19212 /// # Example
19213 /// ```ignore,no_run
19214 /// # use google_cloud_oracledatabase_v1::model::GetCloudExadataInfrastructureRequest;
19215 /// let x = GetCloudExadataInfrastructureRequest::new().set_name("example");
19216 /// ```
19217 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19218 self.name = v.into();
19219 self
19220 }
19221}
19222
19223impl wkt::message::Message for GetCloudExadataInfrastructureRequest {
19224 fn typename() -> &'static str {
19225 "type.googleapis.com/google.cloud.oracledatabase.v1.GetCloudExadataInfrastructureRequest"
19226 }
19227}
19228
19229/// The request for `CloudExadataInfrastructure.Create`.
19230#[derive(Clone, Default, PartialEq)]
19231#[non_exhaustive]
19232pub struct CreateCloudExadataInfrastructureRequest {
19233 /// Required. The parent value for CloudExadataInfrastructure in the following
19234 /// format: projects/{project}/locations/{location}.
19235 pub parent: std::string::String,
19236
19237 /// Required. The ID of the Exadata Infrastructure to create. This value is
19238 /// restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of
19239 /// 63 characters in length. The value must start with a letter and end with a
19240 /// letter or a number.
19241 pub cloud_exadata_infrastructure_id: std::string::String,
19242
19243 /// Required. Details of the Exadata Infrastructure instance to create.
19244 pub cloud_exadata_infrastructure: std::option::Option<crate::model::CloudExadataInfrastructure>,
19245
19246 /// Optional. An optional ID to identify the request. This value is used to
19247 /// identify duplicate requests. If you make a request with the same request ID
19248 /// and the original request is still in progress or completed, the server
19249 /// ignores the second request. This prevents clients from
19250 /// accidentally creating duplicate commitments.
19251 ///
19252 /// The request ID must be a valid UUID with the exception that zero UUID is
19253 /// not supported (00000000-0000-0000-0000-000000000000).
19254 pub request_id: std::string::String,
19255
19256 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19257}
19258
19259impl CreateCloudExadataInfrastructureRequest {
19260 pub fn new() -> Self {
19261 std::default::Default::default()
19262 }
19263
19264 /// Sets the value of [parent][crate::model::CreateCloudExadataInfrastructureRequest::parent].
19265 ///
19266 /// # Example
19267 /// ```ignore,no_run
19268 /// # use google_cloud_oracledatabase_v1::model::CreateCloudExadataInfrastructureRequest;
19269 /// let x = CreateCloudExadataInfrastructureRequest::new().set_parent("example");
19270 /// ```
19271 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19272 self.parent = v.into();
19273 self
19274 }
19275
19276 /// Sets the value of [cloud_exadata_infrastructure_id][crate::model::CreateCloudExadataInfrastructureRequest::cloud_exadata_infrastructure_id].
19277 ///
19278 /// # Example
19279 /// ```ignore,no_run
19280 /// # use google_cloud_oracledatabase_v1::model::CreateCloudExadataInfrastructureRequest;
19281 /// let x = CreateCloudExadataInfrastructureRequest::new().set_cloud_exadata_infrastructure_id("example");
19282 /// ```
19283 pub fn set_cloud_exadata_infrastructure_id<T: std::convert::Into<std::string::String>>(
19284 mut self,
19285 v: T,
19286 ) -> Self {
19287 self.cloud_exadata_infrastructure_id = v.into();
19288 self
19289 }
19290
19291 /// Sets the value of [cloud_exadata_infrastructure][crate::model::CreateCloudExadataInfrastructureRequest::cloud_exadata_infrastructure].
19292 ///
19293 /// # Example
19294 /// ```ignore,no_run
19295 /// # use google_cloud_oracledatabase_v1::model::CreateCloudExadataInfrastructureRequest;
19296 /// use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
19297 /// let x = CreateCloudExadataInfrastructureRequest::new().set_cloud_exadata_infrastructure(CloudExadataInfrastructure::default()/* use setters */);
19298 /// ```
19299 pub fn set_cloud_exadata_infrastructure<T>(mut self, v: T) -> Self
19300 where
19301 T: std::convert::Into<crate::model::CloudExadataInfrastructure>,
19302 {
19303 self.cloud_exadata_infrastructure = std::option::Option::Some(v.into());
19304 self
19305 }
19306
19307 /// Sets or clears the value of [cloud_exadata_infrastructure][crate::model::CreateCloudExadataInfrastructureRequest::cloud_exadata_infrastructure].
19308 ///
19309 /// # Example
19310 /// ```ignore,no_run
19311 /// # use google_cloud_oracledatabase_v1::model::CreateCloudExadataInfrastructureRequest;
19312 /// use google_cloud_oracledatabase_v1::model::CloudExadataInfrastructure;
19313 /// let x = CreateCloudExadataInfrastructureRequest::new().set_or_clear_cloud_exadata_infrastructure(Some(CloudExadataInfrastructure::default()/* use setters */));
19314 /// let x = CreateCloudExadataInfrastructureRequest::new().set_or_clear_cloud_exadata_infrastructure(None::<CloudExadataInfrastructure>);
19315 /// ```
19316 pub fn set_or_clear_cloud_exadata_infrastructure<T>(mut self, v: std::option::Option<T>) -> Self
19317 where
19318 T: std::convert::Into<crate::model::CloudExadataInfrastructure>,
19319 {
19320 self.cloud_exadata_infrastructure = v.map(|x| x.into());
19321 self
19322 }
19323
19324 /// Sets the value of [request_id][crate::model::CreateCloudExadataInfrastructureRequest::request_id].
19325 ///
19326 /// # Example
19327 /// ```ignore,no_run
19328 /// # use google_cloud_oracledatabase_v1::model::CreateCloudExadataInfrastructureRequest;
19329 /// let x = CreateCloudExadataInfrastructureRequest::new().set_request_id("example");
19330 /// ```
19331 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19332 self.request_id = v.into();
19333 self
19334 }
19335}
19336
19337impl wkt::message::Message for CreateCloudExadataInfrastructureRequest {
19338 fn typename() -> &'static str {
19339 "type.googleapis.com/google.cloud.oracledatabase.v1.CreateCloudExadataInfrastructureRequest"
19340 }
19341}
19342
19343/// The request for `CloudExadataInfrastructure.Delete`.
19344#[derive(Clone, Default, PartialEq)]
19345#[non_exhaustive]
19346pub struct DeleteCloudExadataInfrastructureRequest {
19347 /// Required. The name of the Cloud Exadata Infrastructure in the following
19348 /// format:
19349 /// projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}.
19350 pub name: std::string::String,
19351
19352 /// Optional. An optional ID to identify the request. This value is used to
19353 /// identify duplicate requests. If you make a request with the same request ID
19354 /// and the original request is still in progress or completed, the server
19355 /// ignores the second request. This prevents clients from
19356 /// accidentally creating duplicate commitments.
19357 ///
19358 /// The request ID must be a valid UUID with the exception that zero UUID is
19359 /// not supported (00000000-0000-0000-0000-000000000000).
19360 pub request_id: std::string::String,
19361
19362 /// Optional. If set to true, all VM clusters for this Exadata Infrastructure
19363 /// will be deleted. An Exadata Infrastructure can only be deleted once all its
19364 /// VM clusters have been deleted.
19365 pub force: bool,
19366
19367 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19368}
19369
19370impl DeleteCloudExadataInfrastructureRequest {
19371 pub fn new() -> Self {
19372 std::default::Default::default()
19373 }
19374
19375 /// Sets the value of [name][crate::model::DeleteCloudExadataInfrastructureRequest::name].
19376 ///
19377 /// # Example
19378 /// ```ignore,no_run
19379 /// # use google_cloud_oracledatabase_v1::model::DeleteCloudExadataInfrastructureRequest;
19380 /// let x = DeleteCloudExadataInfrastructureRequest::new().set_name("example");
19381 /// ```
19382 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19383 self.name = v.into();
19384 self
19385 }
19386
19387 /// Sets the value of [request_id][crate::model::DeleteCloudExadataInfrastructureRequest::request_id].
19388 ///
19389 /// # Example
19390 /// ```ignore,no_run
19391 /// # use google_cloud_oracledatabase_v1::model::DeleteCloudExadataInfrastructureRequest;
19392 /// let x = DeleteCloudExadataInfrastructureRequest::new().set_request_id("example");
19393 /// ```
19394 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19395 self.request_id = v.into();
19396 self
19397 }
19398
19399 /// Sets the value of [force][crate::model::DeleteCloudExadataInfrastructureRequest::force].
19400 ///
19401 /// # Example
19402 /// ```ignore,no_run
19403 /// # use google_cloud_oracledatabase_v1::model::DeleteCloudExadataInfrastructureRequest;
19404 /// let x = DeleteCloudExadataInfrastructureRequest::new().set_force(true);
19405 /// ```
19406 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19407 self.force = v.into();
19408 self
19409 }
19410}
19411
19412impl wkt::message::Message for DeleteCloudExadataInfrastructureRequest {
19413 fn typename() -> &'static str {
19414 "type.googleapis.com/google.cloud.oracledatabase.v1.DeleteCloudExadataInfrastructureRequest"
19415 }
19416}
19417
19418/// The request for `CloudVmCluster.List`.
19419#[derive(Clone, Default, PartialEq)]
19420#[non_exhaustive]
19421pub struct ListCloudVmClustersRequest {
19422 /// Required. The name of the parent in the following format:
19423 /// projects/{project}/locations/{location}.
19424 pub parent: std::string::String,
19425
19426 /// Optional. The number of VM clusters to return.
19427 /// If unspecified, at most 50 VM clusters will be returned.
19428 /// The maximum value is 1,000.
19429 pub page_size: i32,
19430
19431 /// Optional. A token identifying the page of results the server returns.
19432 pub page_token: std::string::String,
19433
19434 /// Optional. An expression for filtering the results of the request.
19435 pub filter: std::string::String,
19436
19437 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19438}
19439
19440impl ListCloudVmClustersRequest {
19441 pub fn new() -> Self {
19442 std::default::Default::default()
19443 }
19444
19445 /// Sets the value of [parent][crate::model::ListCloudVmClustersRequest::parent].
19446 ///
19447 /// # Example
19448 /// ```ignore,no_run
19449 /// # use google_cloud_oracledatabase_v1::model::ListCloudVmClustersRequest;
19450 /// let x = ListCloudVmClustersRequest::new().set_parent("example");
19451 /// ```
19452 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19453 self.parent = v.into();
19454 self
19455 }
19456
19457 /// Sets the value of [page_size][crate::model::ListCloudVmClustersRequest::page_size].
19458 ///
19459 /// # Example
19460 /// ```ignore,no_run
19461 /// # use google_cloud_oracledatabase_v1::model::ListCloudVmClustersRequest;
19462 /// let x = ListCloudVmClustersRequest::new().set_page_size(42);
19463 /// ```
19464 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19465 self.page_size = v.into();
19466 self
19467 }
19468
19469 /// Sets the value of [page_token][crate::model::ListCloudVmClustersRequest::page_token].
19470 ///
19471 /// # Example
19472 /// ```ignore,no_run
19473 /// # use google_cloud_oracledatabase_v1::model::ListCloudVmClustersRequest;
19474 /// let x = ListCloudVmClustersRequest::new().set_page_token("example");
19475 /// ```
19476 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19477 self.page_token = v.into();
19478 self
19479 }
19480
19481 /// Sets the value of [filter][crate::model::ListCloudVmClustersRequest::filter].
19482 ///
19483 /// # Example
19484 /// ```ignore,no_run
19485 /// # use google_cloud_oracledatabase_v1::model::ListCloudVmClustersRequest;
19486 /// let x = ListCloudVmClustersRequest::new().set_filter("example");
19487 /// ```
19488 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19489 self.filter = v.into();
19490 self
19491 }
19492}
19493
19494impl wkt::message::Message for ListCloudVmClustersRequest {
19495 fn typename() -> &'static str {
19496 "type.googleapis.com/google.cloud.oracledatabase.v1.ListCloudVmClustersRequest"
19497 }
19498}
19499
19500/// The response for `CloudVmCluster.List`.
19501#[derive(Clone, Default, PartialEq)]
19502#[non_exhaustive]
19503pub struct ListCloudVmClustersResponse {
19504 /// The list of VM Clusters.
19505 pub cloud_vm_clusters: std::vec::Vec<crate::model::CloudVmCluster>,
19506
19507 /// A token to fetch the next page of results.
19508 pub next_page_token: std::string::String,
19509
19510 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19511}
19512
19513impl ListCloudVmClustersResponse {
19514 pub fn new() -> Self {
19515 std::default::Default::default()
19516 }
19517
19518 /// Sets the value of [cloud_vm_clusters][crate::model::ListCloudVmClustersResponse::cloud_vm_clusters].
19519 ///
19520 /// # Example
19521 /// ```ignore,no_run
19522 /// # use google_cloud_oracledatabase_v1::model::ListCloudVmClustersResponse;
19523 /// use google_cloud_oracledatabase_v1::model::CloudVmCluster;
19524 /// let x = ListCloudVmClustersResponse::new()
19525 /// .set_cloud_vm_clusters([
19526 /// CloudVmCluster::default()/* use setters */,
19527 /// CloudVmCluster::default()/* use (different) setters */,
19528 /// ]);
19529 /// ```
19530 pub fn set_cloud_vm_clusters<T, V>(mut self, v: T) -> Self
19531 where
19532 T: std::iter::IntoIterator<Item = V>,
19533 V: std::convert::Into<crate::model::CloudVmCluster>,
19534 {
19535 use std::iter::Iterator;
19536 self.cloud_vm_clusters = v.into_iter().map(|i| i.into()).collect();
19537 self
19538 }
19539
19540 /// Sets the value of [next_page_token][crate::model::ListCloudVmClustersResponse::next_page_token].
19541 ///
19542 /// # Example
19543 /// ```ignore,no_run
19544 /// # use google_cloud_oracledatabase_v1::model::ListCloudVmClustersResponse;
19545 /// let x = ListCloudVmClustersResponse::new().set_next_page_token("example");
19546 /// ```
19547 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19548 self.next_page_token = v.into();
19549 self
19550 }
19551}
19552
19553impl wkt::message::Message for ListCloudVmClustersResponse {
19554 fn typename() -> &'static str {
19555 "type.googleapis.com/google.cloud.oracledatabase.v1.ListCloudVmClustersResponse"
19556 }
19557}
19558
19559#[doc(hidden)]
19560impl google_cloud_gax::paginator::internal::PageableResponse for ListCloudVmClustersResponse {
19561 type PageItem = crate::model::CloudVmCluster;
19562
19563 fn items(self) -> std::vec::Vec<Self::PageItem> {
19564 self.cloud_vm_clusters
19565 }
19566
19567 fn next_page_token(&self) -> std::string::String {
19568 use std::clone::Clone;
19569 self.next_page_token.clone()
19570 }
19571}
19572
19573/// The request for `CloudVmCluster.Get`.
19574#[derive(Clone, Default, PartialEq)]
19575#[non_exhaustive]
19576pub struct GetCloudVmClusterRequest {
19577 /// Required. The name of the Cloud VM Cluster in the following format:
19578 /// projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}.
19579 pub name: std::string::String,
19580
19581 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19582}
19583
19584impl GetCloudVmClusterRequest {
19585 pub fn new() -> Self {
19586 std::default::Default::default()
19587 }
19588
19589 /// Sets the value of [name][crate::model::GetCloudVmClusterRequest::name].
19590 ///
19591 /// # Example
19592 /// ```ignore,no_run
19593 /// # use google_cloud_oracledatabase_v1::model::GetCloudVmClusterRequest;
19594 /// let x = GetCloudVmClusterRequest::new().set_name("example");
19595 /// ```
19596 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19597 self.name = v.into();
19598 self
19599 }
19600}
19601
19602impl wkt::message::Message for GetCloudVmClusterRequest {
19603 fn typename() -> &'static str {
19604 "type.googleapis.com/google.cloud.oracledatabase.v1.GetCloudVmClusterRequest"
19605 }
19606}
19607
19608/// The request for `CloudVmCluster.Create`.
19609#[derive(Clone, Default, PartialEq)]
19610#[non_exhaustive]
19611pub struct CreateCloudVmClusterRequest {
19612 /// Required. The name of the parent in the following format:
19613 /// projects/{project}/locations/{location}.
19614 pub parent: std::string::String,
19615
19616 /// Required. The ID of the VM Cluster to create. This value is restricted
19617 /// to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63
19618 /// characters in length. The value must start with a letter and end with
19619 /// a letter or a number.
19620 pub cloud_vm_cluster_id: std::string::String,
19621
19622 /// Required. The resource being created
19623 pub cloud_vm_cluster: std::option::Option<crate::model::CloudVmCluster>,
19624
19625 /// Optional. An optional ID to identify the request. This value is used to
19626 /// identify duplicate requests. If you make a request with the same request ID
19627 /// and the original request is still in progress or completed, the server
19628 /// ignores the second request. This prevents clients from
19629 /// accidentally creating duplicate commitments.
19630 ///
19631 /// The request ID must be a valid UUID with the exception that zero UUID is
19632 /// not supported (00000000-0000-0000-0000-000000000000).
19633 pub request_id: std::string::String,
19634
19635 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19636}
19637
19638impl CreateCloudVmClusterRequest {
19639 pub fn new() -> Self {
19640 std::default::Default::default()
19641 }
19642
19643 /// Sets the value of [parent][crate::model::CreateCloudVmClusterRequest::parent].
19644 ///
19645 /// # Example
19646 /// ```ignore,no_run
19647 /// # use google_cloud_oracledatabase_v1::model::CreateCloudVmClusterRequest;
19648 /// let x = CreateCloudVmClusterRequest::new().set_parent("example");
19649 /// ```
19650 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19651 self.parent = v.into();
19652 self
19653 }
19654
19655 /// Sets the value of [cloud_vm_cluster_id][crate::model::CreateCloudVmClusterRequest::cloud_vm_cluster_id].
19656 ///
19657 /// # Example
19658 /// ```ignore,no_run
19659 /// # use google_cloud_oracledatabase_v1::model::CreateCloudVmClusterRequest;
19660 /// let x = CreateCloudVmClusterRequest::new().set_cloud_vm_cluster_id("example");
19661 /// ```
19662 pub fn set_cloud_vm_cluster_id<T: std::convert::Into<std::string::String>>(
19663 mut self,
19664 v: T,
19665 ) -> Self {
19666 self.cloud_vm_cluster_id = v.into();
19667 self
19668 }
19669
19670 /// Sets the value of [cloud_vm_cluster][crate::model::CreateCloudVmClusterRequest::cloud_vm_cluster].
19671 ///
19672 /// # Example
19673 /// ```ignore,no_run
19674 /// # use google_cloud_oracledatabase_v1::model::CreateCloudVmClusterRequest;
19675 /// use google_cloud_oracledatabase_v1::model::CloudVmCluster;
19676 /// let x = CreateCloudVmClusterRequest::new().set_cloud_vm_cluster(CloudVmCluster::default()/* use setters */);
19677 /// ```
19678 pub fn set_cloud_vm_cluster<T>(mut self, v: T) -> Self
19679 where
19680 T: std::convert::Into<crate::model::CloudVmCluster>,
19681 {
19682 self.cloud_vm_cluster = std::option::Option::Some(v.into());
19683 self
19684 }
19685
19686 /// Sets or clears the value of [cloud_vm_cluster][crate::model::CreateCloudVmClusterRequest::cloud_vm_cluster].
19687 ///
19688 /// # Example
19689 /// ```ignore,no_run
19690 /// # use google_cloud_oracledatabase_v1::model::CreateCloudVmClusterRequest;
19691 /// use google_cloud_oracledatabase_v1::model::CloudVmCluster;
19692 /// let x = CreateCloudVmClusterRequest::new().set_or_clear_cloud_vm_cluster(Some(CloudVmCluster::default()/* use setters */));
19693 /// let x = CreateCloudVmClusterRequest::new().set_or_clear_cloud_vm_cluster(None::<CloudVmCluster>);
19694 /// ```
19695 pub fn set_or_clear_cloud_vm_cluster<T>(mut self, v: std::option::Option<T>) -> Self
19696 where
19697 T: std::convert::Into<crate::model::CloudVmCluster>,
19698 {
19699 self.cloud_vm_cluster = v.map(|x| x.into());
19700 self
19701 }
19702
19703 /// Sets the value of [request_id][crate::model::CreateCloudVmClusterRequest::request_id].
19704 ///
19705 /// # Example
19706 /// ```ignore,no_run
19707 /// # use google_cloud_oracledatabase_v1::model::CreateCloudVmClusterRequest;
19708 /// let x = CreateCloudVmClusterRequest::new().set_request_id("example");
19709 /// ```
19710 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19711 self.request_id = v.into();
19712 self
19713 }
19714}
19715
19716impl wkt::message::Message for CreateCloudVmClusterRequest {
19717 fn typename() -> &'static str {
19718 "type.googleapis.com/google.cloud.oracledatabase.v1.CreateCloudVmClusterRequest"
19719 }
19720}
19721
19722/// The request for `CloudVmCluster.Delete`.
19723#[derive(Clone, Default, PartialEq)]
19724#[non_exhaustive]
19725pub struct DeleteCloudVmClusterRequest {
19726 /// Required. The name of the Cloud VM Cluster in the following format:
19727 /// projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}.
19728 pub name: std::string::String,
19729
19730 /// Optional. An optional ID to identify the request. This value is used to
19731 /// identify duplicate requests. If you make a request with the same request ID
19732 /// and the original request is still in progress or completed, the server
19733 /// ignores the second request. This prevents clients from
19734 /// accidentally creating duplicate commitments.
19735 ///
19736 /// The request ID must be a valid UUID with the exception that zero UUID is
19737 /// not supported (00000000-0000-0000-0000-000000000000).
19738 pub request_id: std::string::String,
19739
19740 /// Optional. If set to true, all child resources for the VM Cluster will be
19741 /// deleted. A VM Cluster can only be deleted once all its child resources have
19742 /// been deleted.
19743 pub force: bool,
19744
19745 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19746}
19747
19748impl DeleteCloudVmClusterRequest {
19749 pub fn new() -> Self {
19750 std::default::Default::default()
19751 }
19752
19753 /// Sets the value of [name][crate::model::DeleteCloudVmClusterRequest::name].
19754 ///
19755 /// # Example
19756 /// ```ignore,no_run
19757 /// # use google_cloud_oracledatabase_v1::model::DeleteCloudVmClusterRequest;
19758 /// let x = DeleteCloudVmClusterRequest::new().set_name("example");
19759 /// ```
19760 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19761 self.name = v.into();
19762 self
19763 }
19764
19765 /// Sets the value of [request_id][crate::model::DeleteCloudVmClusterRequest::request_id].
19766 ///
19767 /// # Example
19768 /// ```ignore,no_run
19769 /// # use google_cloud_oracledatabase_v1::model::DeleteCloudVmClusterRequest;
19770 /// let x = DeleteCloudVmClusterRequest::new().set_request_id("example");
19771 /// ```
19772 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19773 self.request_id = v.into();
19774 self
19775 }
19776
19777 /// Sets the value of [force][crate::model::DeleteCloudVmClusterRequest::force].
19778 ///
19779 /// # Example
19780 /// ```ignore,no_run
19781 /// # use google_cloud_oracledatabase_v1::model::DeleteCloudVmClusterRequest;
19782 /// let x = DeleteCloudVmClusterRequest::new().set_force(true);
19783 /// ```
19784 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19785 self.force = v.into();
19786 self
19787 }
19788}
19789
19790impl wkt::message::Message for DeleteCloudVmClusterRequest {
19791 fn typename() -> &'static str {
19792 "type.googleapis.com/google.cloud.oracledatabase.v1.DeleteCloudVmClusterRequest"
19793 }
19794}
19795
19796/// The request for `Entitlement.List`.
19797#[derive(Clone, Default, PartialEq)]
19798#[non_exhaustive]
19799pub struct ListEntitlementsRequest {
19800 /// Required. The parent value for the entitlement in the following format:
19801 /// projects/{project}/locations/{location}.
19802 pub parent: std::string::String,
19803
19804 /// Optional. The maximum number of items to return.
19805 /// If unspecified, a maximum of 50 entitlements will be returned.
19806 /// The maximum value is 1000.
19807 pub page_size: i32,
19808
19809 /// Optional. A token identifying a page of results the server should return.
19810 pub page_token: std::string::String,
19811
19812 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19813}
19814
19815impl ListEntitlementsRequest {
19816 pub fn new() -> Self {
19817 std::default::Default::default()
19818 }
19819
19820 /// Sets the value of [parent][crate::model::ListEntitlementsRequest::parent].
19821 ///
19822 /// # Example
19823 /// ```ignore,no_run
19824 /// # use google_cloud_oracledatabase_v1::model::ListEntitlementsRequest;
19825 /// let x = ListEntitlementsRequest::new().set_parent("example");
19826 /// ```
19827 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19828 self.parent = v.into();
19829 self
19830 }
19831
19832 /// Sets the value of [page_size][crate::model::ListEntitlementsRequest::page_size].
19833 ///
19834 /// # Example
19835 /// ```ignore,no_run
19836 /// # use google_cloud_oracledatabase_v1::model::ListEntitlementsRequest;
19837 /// let x = ListEntitlementsRequest::new().set_page_size(42);
19838 /// ```
19839 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19840 self.page_size = v.into();
19841 self
19842 }
19843
19844 /// Sets the value of [page_token][crate::model::ListEntitlementsRequest::page_token].
19845 ///
19846 /// # Example
19847 /// ```ignore,no_run
19848 /// # use google_cloud_oracledatabase_v1::model::ListEntitlementsRequest;
19849 /// let x = ListEntitlementsRequest::new().set_page_token("example");
19850 /// ```
19851 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19852 self.page_token = v.into();
19853 self
19854 }
19855}
19856
19857impl wkt::message::Message for ListEntitlementsRequest {
19858 fn typename() -> &'static str {
19859 "type.googleapis.com/google.cloud.oracledatabase.v1.ListEntitlementsRequest"
19860 }
19861}
19862
19863/// The response for `Entitlement.List`.
19864#[derive(Clone, Default, PartialEq)]
19865#[non_exhaustive]
19866pub struct ListEntitlementsResponse {
19867 /// The list of Entitlements
19868 pub entitlements: std::vec::Vec<crate::model::Entitlement>,
19869
19870 /// A token identifying a page of results the server should return.
19871 pub next_page_token: std::string::String,
19872
19873 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19874}
19875
19876impl ListEntitlementsResponse {
19877 pub fn new() -> Self {
19878 std::default::Default::default()
19879 }
19880
19881 /// Sets the value of [entitlements][crate::model::ListEntitlementsResponse::entitlements].
19882 ///
19883 /// # Example
19884 /// ```ignore,no_run
19885 /// # use google_cloud_oracledatabase_v1::model::ListEntitlementsResponse;
19886 /// use google_cloud_oracledatabase_v1::model::Entitlement;
19887 /// let x = ListEntitlementsResponse::new()
19888 /// .set_entitlements([
19889 /// Entitlement::default()/* use setters */,
19890 /// Entitlement::default()/* use (different) setters */,
19891 /// ]);
19892 /// ```
19893 pub fn set_entitlements<T, V>(mut self, v: T) -> Self
19894 where
19895 T: std::iter::IntoIterator<Item = V>,
19896 V: std::convert::Into<crate::model::Entitlement>,
19897 {
19898 use std::iter::Iterator;
19899 self.entitlements = v.into_iter().map(|i| i.into()).collect();
19900 self
19901 }
19902
19903 /// Sets the value of [next_page_token][crate::model::ListEntitlementsResponse::next_page_token].
19904 ///
19905 /// # Example
19906 /// ```ignore,no_run
19907 /// # use google_cloud_oracledatabase_v1::model::ListEntitlementsResponse;
19908 /// let x = ListEntitlementsResponse::new().set_next_page_token("example");
19909 /// ```
19910 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19911 self.next_page_token = v.into();
19912 self
19913 }
19914}
19915
19916impl wkt::message::Message for ListEntitlementsResponse {
19917 fn typename() -> &'static str {
19918 "type.googleapis.com/google.cloud.oracledatabase.v1.ListEntitlementsResponse"
19919 }
19920}
19921
19922#[doc(hidden)]
19923impl google_cloud_gax::paginator::internal::PageableResponse for ListEntitlementsResponse {
19924 type PageItem = crate::model::Entitlement;
19925
19926 fn items(self) -> std::vec::Vec<Self::PageItem> {
19927 self.entitlements
19928 }
19929
19930 fn next_page_token(&self) -> std::string::String {
19931 use std::clone::Clone;
19932 self.next_page_token.clone()
19933 }
19934}
19935
19936/// The request for `DbServer.List`.
19937#[derive(Clone, Default, PartialEq)]
19938#[non_exhaustive]
19939pub struct ListDbServersRequest {
19940 /// Required. The parent value for database server in the following format:
19941 /// projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}.
19942 pub parent: std::string::String,
19943
19944 /// Optional. The maximum number of items to return.
19945 /// If unspecified, a maximum of 50 db servers will be returned.
19946 /// The maximum value is 1000; values above 1000 will be reset to 1000.
19947 pub page_size: i32,
19948
19949 /// Optional. A token identifying a page of results the server should return.
19950 pub page_token: std::string::String,
19951
19952 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19953}
19954
19955impl ListDbServersRequest {
19956 pub fn new() -> Self {
19957 std::default::Default::default()
19958 }
19959
19960 /// Sets the value of [parent][crate::model::ListDbServersRequest::parent].
19961 ///
19962 /// # Example
19963 /// ```ignore,no_run
19964 /// # use google_cloud_oracledatabase_v1::model::ListDbServersRequest;
19965 /// let x = ListDbServersRequest::new().set_parent("example");
19966 /// ```
19967 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19968 self.parent = v.into();
19969 self
19970 }
19971
19972 /// Sets the value of [page_size][crate::model::ListDbServersRequest::page_size].
19973 ///
19974 /// # Example
19975 /// ```ignore,no_run
19976 /// # use google_cloud_oracledatabase_v1::model::ListDbServersRequest;
19977 /// let x = ListDbServersRequest::new().set_page_size(42);
19978 /// ```
19979 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19980 self.page_size = v.into();
19981 self
19982 }
19983
19984 /// Sets the value of [page_token][crate::model::ListDbServersRequest::page_token].
19985 ///
19986 /// # Example
19987 /// ```ignore,no_run
19988 /// # use google_cloud_oracledatabase_v1::model::ListDbServersRequest;
19989 /// let x = ListDbServersRequest::new().set_page_token("example");
19990 /// ```
19991 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19992 self.page_token = v.into();
19993 self
19994 }
19995}
19996
19997impl wkt::message::Message for ListDbServersRequest {
19998 fn typename() -> &'static str {
19999 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbServersRequest"
20000 }
20001}
20002
20003/// The response for `DbServer.List`.
20004#[derive(Clone, Default, PartialEq)]
20005#[non_exhaustive]
20006pub struct ListDbServersResponse {
20007 /// The list of database servers.
20008 pub db_servers: std::vec::Vec<crate::model::DbServer>,
20009
20010 /// A token identifying a page of results the server should return.
20011 pub next_page_token: std::string::String,
20012
20013 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20014}
20015
20016impl ListDbServersResponse {
20017 pub fn new() -> Self {
20018 std::default::Default::default()
20019 }
20020
20021 /// Sets the value of [db_servers][crate::model::ListDbServersResponse::db_servers].
20022 ///
20023 /// # Example
20024 /// ```ignore,no_run
20025 /// # use google_cloud_oracledatabase_v1::model::ListDbServersResponse;
20026 /// use google_cloud_oracledatabase_v1::model::DbServer;
20027 /// let x = ListDbServersResponse::new()
20028 /// .set_db_servers([
20029 /// DbServer::default()/* use setters */,
20030 /// DbServer::default()/* use (different) setters */,
20031 /// ]);
20032 /// ```
20033 pub fn set_db_servers<T, V>(mut self, v: T) -> Self
20034 where
20035 T: std::iter::IntoIterator<Item = V>,
20036 V: std::convert::Into<crate::model::DbServer>,
20037 {
20038 use std::iter::Iterator;
20039 self.db_servers = v.into_iter().map(|i| i.into()).collect();
20040 self
20041 }
20042
20043 /// Sets the value of [next_page_token][crate::model::ListDbServersResponse::next_page_token].
20044 ///
20045 /// # Example
20046 /// ```ignore,no_run
20047 /// # use google_cloud_oracledatabase_v1::model::ListDbServersResponse;
20048 /// let x = ListDbServersResponse::new().set_next_page_token("example");
20049 /// ```
20050 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20051 self.next_page_token = v.into();
20052 self
20053 }
20054}
20055
20056impl wkt::message::Message for ListDbServersResponse {
20057 fn typename() -> &'static str {
20058 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbServersResponse"
20059 }
20060}
20061
20062#[doc(hidden)]
20063impl google_cloud_gax::paginator::internal::PageableResponse for ListDbServersResponse {
20064 type PageItem = crate::model::DbServer;
20065
20066 fn items(self) -> std::vec::Vec<Self::PageItem> {
20067 self.db_servers
20068 }
20069
20070 fn next_page_token(&self) -> std::string::String {
20071 use std::clone::Clone;
20072 self.next_page_token.clone()
20073 }
20074}
20075
20076/// The request for `DbNode.List`.
20077#[derive(Clone, Default, PartialEq)]
20078#[non_exhaustive]
20079pub struct ListDbNodesRequest {
20080 /// Required. The parent value for database node in the following format:
20081 /// projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}.
20082 /// .
20083 pub parent: std::string::String,
20084
20085 /// Optional. The maximum number of items to return.
20086 /// If unspecified, at most 50 db nodes will be returned.
20087 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
20088 pub page_size: i32,
20089
20090 /// Optional. A token identifying a page of results the node should return.
20091 pub page_token: std::string::String,
20092
20093 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20094}
20095
20096impl ListDbNodesRequest {
20097 pub fn new() -> Self {
20098 std::default::Default::default()
20099 }
20100
20101 /// Sets the value of [parent][crate::model::ListDbNodesRequest::parent].
20102 ///
20103 /// # Example
20104 /// ```ignore,no_run
20105 /// # use google_cloud_oracledatabase_v1::model::ListDbNodesRequest;
20106 /// let x = ListDbNodesRequest::new().set_parent("example");
20107 /// ```
20108 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20109 self.parent = v.into();
20110 self
20111 }
20112
20113 /// Sets the value of [page_size][crate::model::ListDbNodesRequest::page_size].
20114 ///
20115 /// # Example
20116 /// ```ignore,no_run
20117 /// # use google_cloud_oracledatabase_v1::model::ListDbNodesRequest;
20118 /// let x = ListDbNodesRequest::new().set_page_size(42);
20119 /// ```
20120 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20121 self.page_size = v.into();
20122 self
20123 }
20124
20125 /// Sets the value of [page_token][crate::model::ListDbNodesRequest::page_token].
20126 ///
20127 /// # Example
20128 /// ```ignore,no_run
20129 /// # use google_cloud_oracledatabase_v1::model::ListDbNodesRequest;
20130 /// let x = ListDbNodesRequest::new().set_page_token("example");
20131 /// ```
20132 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20133 self.page_token = v.into();
20134 self
20135 }
20136}
20137
20138impl wkt::message::Message for ListDbNodesRequest {
20139 fn typename() -> &'static str {
20140 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbNodesRequest"
20141 }
20142}
20143
20144/// The response for `DbNode.List`.
20145#[derive(Clone, Default, PartialEq)]
20146#[non_exhaustive]
20147pub struct ListDbNodesResponse {
20148 /// The list of DB Nodes
20149 pub db_nodes: std::vec::Vec<crate::model::DbNode>,
20150
20151 /// A token identifying a page of results the node should return.
20152 pub next_page_token: std::string::String,
20153
20154 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20155}
20156
20157impl ListDbNodesResponse {
20158 pub fn new() -> Self {
20159 std::default::Default::default()
20160 }
20161
20162 /// Sets the value of [db_nodes][crate::model::ListDbNodesResponse::db_nodes].
20163 ///
20164 /// # Example
20165 /// ```ignore,no_run
20166 /// # use google_cloud_oracledatabase_v1::model::ListDbNodesResponse;
20167 /// use google_cloud_oracledatabase_v1::model::DbNode;
20168 /// let x = ListDbNodesResponse::new()
20169 /// .set_db_nodes([
20170 /// DbNode::default()/* use setters */,
20171 /// DbNode::default()/* use (different) setters */,
20172 /// ]);
20173 /// ```
20174 pub fn set_db_nodes<T, V>(mut self, v: T) -> Self
20175 where
20176 T: std::iter::IntoIterator<Item = V>,
20177 V: std::convert::Into<crate::model::DbNode>,
20178 {
20179 use std::iter::Iterator;
20180 self.db_nodes = v.into_iter().map(|i| i.into()).collect();
20181 self
20182 }
20183
20184 /// Sets the value of [next_page_token][crate::model::ListDbNodesResponse::next_page_token].
20185 ///
20186 /// # Example
20187 /// ```ignore,no_run
20188 /// # use google_cloud_oracledatabase_v1::model::ListDbNodesResponse;
20189 /// let x = ListDbNodesResponse::new().set_next_page_token("example");
20190 /// ```
20191 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20192 self.next_page_token = v.into();
20193 self
20194 }
20195}
20196
20197impl wkt::message::Message for ListDbNodesResponse {
20198 fn typename() -> &'static str {
20199 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbNodesResponse"
20200 }
20201}
20202
20203#[doc(hidden)]
20204impl google_cloud_gax::paginator::internal::PageableResponse for ListDbNodesResponse {
20205 type PageItem = crate::model::DbNode;
20206
20207 fn items(self) -> std::vec::Vec<Self::PageItem> {
20208 self.db_nodes
20209 }
20210
20211 fn next_page_token(&self) -> std::string::String {
20212 use std::clone::Clone;
20213 self.next_page_token.clone()
20214 }
20215}
20216
20217/// The request for `GiVersion.List`.
20218#[derive(Clone, Default, PartialEq)]
20219#[non_exhaustive]
20220pub struct ListGiVersionsRequest {
20221 /// Required. The parent value for Grid Infrastructure Version in the following
20222 /// format: Format: projects/{project}/locations/{location}.
20223 pub parent: std::string::String,
20224
20225 /// Optional. The maximum number of items to return.
20226 /// If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) versions
20227 /// will be returned. The maximum value is 1000; values above 1000 will be
20228 /// reset to 1000.
20229 pub page_size: i32,
20230
20231 /// Optional. A token identifying a page of results the server should return.
20232 pub page_token: std::string::String,
20233
20234 /// Optional. An expression for filtering the results of the request. Only the
20235 /// shape, gcp_oracle_zone and gi_version fields are supported in this format:
20236 /// `shape="{shape}"`.
20237 pub filter: std::string::String,
20238
20239 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20240}
20241
20242impl ListGiVersionsRequest {
20243 pub fn new() -> Self {
20244 std::default::Default::default()
20245 }
20246
20247 /// Sets the value of [parent][crate::model::ListGiVersionsRequest::parent].
20248 ///
20249 /// # Example
20250 /// ```ignore,no_run
20251 /// # use google_cloud_oracledatabase_v1::model::ListGiVersionsRequest;
20252 /// let x = ListGiVersionsRequest::new().set_parent("example");
20253 /// ```
20254 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20255 self.parent = v.into();
20256 self
20257 }
20258
20259 /// Sets the value of [page_size][crate::model::ListGiVersionsRequest::page_size].
20260 ///
20261 /// # Example
20262 /// ```ignore,no_run
20263 /// # use google_cloud_oracledatabase_v1::model::ListGiVersionsRequest;
20264 /// let x = ListGiVersionsRequest::new().set_page_size(42);
20265 /// ```
20266 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20267 self.page_size = v.into();
20268 self
20269 }
20270
20271 /// Sets the value of [page_token][crate::model::ListGiVersionsRequest::page_token].
20272 ///
20273 /// # Example
20274 /// ```ignore,no_run
20275 /// # use google_cloud_oracledatabase_v1::model::ListGiVersionsRequest;
20276 /// let x = ListGiVersionsRequest::new().set_page_token("example");
20277 /// ```
20278 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20279 self.page_token = v.into();
20280 self
20281 }
20282
20283 /// Sets the value of [filter][crate::model::ListGiVersionsRequest::filter].
20284 ///
20285 /// # Example
20286 /// ```ignore,no_run
20287 /// # use google_cloud_oracledatabase_v1::model::ListGiVersionsRequest;
20288 /// let x = ListGiVersionsRequest::new().set_filter("example");
20289 /// ```
20290 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20291 self.filter = v.into();
20292 self
20293 }
20294}
20295
20296impl wkt::message::Message for ListGiVersionsRequest {
20297 fn typename() -> &'static str {
20298 "type.googleapis.com/google.cloud.oracledatabase.v1.ListGiVersionsRequest"
20299 }
20300}
20301
20302/// The response for `GiVersion.List`.
20303#[derive(Clone, Default, PartialEq)]
20304#[non_exhaustive]
20305pub struct ListGiVersionsResponse {
20306 /// The list of Oracle Grid Infrastructure (GI) versions.
20307 pub gi_versions: std::vec::Vec<crate::model::GiVersion>,
20308
20309 /// A token identifying a page of results the server should return.
20310 pub next_page_token: std::string::String,
20311
20312 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20313}
20314
20315impl ListGiVersionsResponse {
20316 pub fn new() -> Self {
20317 std::default::Default::default()
20318 }
20319
20320 /// Sets the value of [gi_versions][crate::model::ListGiVersionsResponse::gi_versions].
20321 ///
20322 /// # Example
20323 /// ```ignore,no_run
20324 /// # use google_cloud_oracledatabase_v1::model::ListGiVersionsResponse;
20325 /// use google_cloud_oracledatabase_v1::model::GiVersion;
20326 /// let x = ListGiVersionsResponse::new()
20327 /// .set_gi_versions([
20328 /// GiVersion::default()/* use setters */,
20329 /// GiVersion::default()/* use (different) setters */,
20330 /// ]);
20331 /// ```
20332 pub fn set_gi_versions<T, V>(mut self, v: T) -> Self
20333 where
20334 T: std::iter::IntoIterator<Item = V>,
20335 V: std::convert::Into<crate::model::GiVersion>,
20336 {
20337 use std::iter::Iterator;
20338 self.gi_versions = v.into_iter().map(|i| i.into()).collect();
20339 self
20340 }
20341
20342 /// Sets the value of [next_page_token][crate::model::ListGiVersionsResponse::next_page_token].
20343 ///
20344 /// # Example
20345 /// ```ignore,no_run
20346 /// # use google_cloud_oracledatabase_v1::model::ListGiVersionsResponse;
20347 /// let x = ListGiVersionsResponse::new().set_next_page_token("example");
20348 /// ```
20349 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20350 self.next_page_token = v.into();
20351 self
20352 }
20353}
20354
20355impl wkt::message::Message for ListGiVersionsResponse {
20356 fn typename() -> &'static str {
20357 "type.googleapis.com/google.cloud.oracledatabase.v1.ListGiVersionsResponse"
20358 }
20359}
20360
20361#[doc(hidden)]
20362impl google_cloud_gax::paginator::internal::PageableResponse for ListGiVersionsResponse {
20363 type PageItem = crate::model::GiVersion;
20364
20365 fn items(self) -> std::vec::Vec<Self::PageItem> {
20366 self.gi_versions
20367 }
20368
20369 fn next_page_token(&self) -> std::string::String {
20370 use std::clone::Clone;
20371 self.next_page_token.clone()
20372 }
20373}
20374
20375/// The request for `DbSystemShape.List`.
20376#[derive(Clone, Default, PartialEq)]
20377#[non_exhaustive]
20378pub struct ListDbSystemShapesRequest {
20379 /// Required. The parent value for Database System Shapes in the following
20380 /// format: projects/{project}/locations/{location}.
20381 pub parent: std::string::String,
20382
20383 /// Optional. The maximum number of items to return.
20384 /// If unspecified, at most 50 database system shapes will be returned.
20385 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
20386 pub page_size: i32,
20387
20388 /// Optional. A token identifying a page of results the server should return.
20389 pub page_token: std::string::String,
20390
20391 /// Optional. An expression for filtering the results of the request. Only the
20392 /// gcp_oracle_zone_id field is supported in this format:
20393 /// `gcp_oracle_zone_id="{gcp_oracle_zone_id}"`.
20394 pub filter: std::string::String,
20395
20396 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20397}
20398
20399impl ListDbSystemShapesRequest {
20400 pub fn new() -> Self {
20401 std::default::Default::default()
20402 }
20403
20404 /// Sets the value of [parent][crate::model::ListDbSystemShapesRequest::parent].
20405 ///
20406 /// # Example
20407 /// ```ignore,no_run
20408 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemShapesRequest;
20409 /// let x = ListDbSystemShapesRequest::new().set_parent("example");
20410 /// ```
20411 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20412 self.parent = v.into();
20413 self
20414 }
20415
20416 /// Sets the value of [page_size][crate::model::ListDbSystemShapesRequest::page_size].
20417 ///
20418 /// # Example
20419 /// ```ignore,no_run
20420 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemShapesRequest;
20421 /// let x = ListDbSystemShapesRequest::new().set_page_size(42);
20422 /// ```
20423 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20424 self.page_size = v.into();
20425 self
20426 }
20427
20428 /// Sets the value of [page_token][crate::model::ListDbSystemShapesRequest::page_token].
20429 ///
20430 /// # Example
20431 /// ```ignore,no_run
20432 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemShapesRequest;
20433 /// let x = ListDbSystemShapesRequest::new().set_page_token("example");
20434 /// ```
20435 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20436 self.page_token = v.into();
20437 self
20438 }
20439
20440 /// Sets the value of [filter][crate::model::ListDbSystemShapesRequest::filter].
20441 ///
20442 /// # Example
20443 /// ```ignore,no_run
20444 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemShapesRequest;
20445 /// let x = ListDbSystemShapesRequest::new().set_filter("example");
20446 /// ```
20447 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20448 self.filter = v.into();
20449 self
20450 }
20451}
20452
20453impl wkt::message::Message for ListDbSystemShapesRequest {
20454 fn typename() -> &'static str {
20455 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbSystemShapesRequest"
20456 }
20457}
20458
20459/// The response for `DbSystemShape.List`.
20460#[derive(Clone, Default, PartialEq)]
20461#[non_exhaustive]
20462pub struct ListDbSystemShapesResponse {
20463 /// The list of Database System shapes.
20464 pub db_system_shapes: std::vec::Vec<crate::model::DbSystemShape>,
20465
20466 /// A token identifying a page of results the server should return.
20467 pub next_page_token: std::string::String,
20468
20469 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20470}
20471
20472impl ListDbSystemShapesResponse {
20473 pub fn new() -> Self {
20474 std::default::Default::default()
20475 }
20476
20477 /// Sets the value of [db_system_shapes][crate::model::ListDbSystemShapesResponse::db_system_shapes].
20478 ///
20479 /// # Example
20480 /// ```ignore,no_run
20481 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemShapesResponse;
20482 /// use google_cloud_oracledatabase_v1::model::DbSystemShape;
20483 /// let x = ListDbSystemShapesResponse::new()
20484 /// .set_db_system_shapes([
20485 /// DbSystemShape::default()/* use setters */,
20486 /// DbSystemShape::default()/* use (different) setters */,
20487 /// ]);
20488 /// ```
20489 pub fn set_db_system_shapes<T, V>(mut self, v: T) -> Self
20490 where
20491 T: std::iter::IntoIterator<Item = V>,
20492 V: std::convert::Into<crate::model::DbSystemShape>,
20493 {
20494 use std::iter::Iterator;
20495 self.db_system_shapes = v.into_iter().map(|i| i.into()).collect();
20496 self
20497 }
20498
20499 /// Sets the value of [next_page_token][crate::model::ListDbSystemShapesResponse::next_page_token].
20500 ///
20501 /// # Example
20502 /// ```ignore,no_run
20503 /// # use google_cloud_oracledatabase_v1::model::ListDbSystemShapesResponse;
20504 /// let x = ListDbSystemShapesResponse::new().set_next_page_token("example");
20505 /// ```
20506 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20507 self.next_page_token = v.into();
20508 self
20509 }
20510}
20511
20512impl wkt::message::Message for ListDbSystemShapesResponse {
20513 fn typename() -> &'static str {
20514 "type.googleapis.com/google.cloud.oracledatabase.v1.ListDbSystemShapesResponse"
20515 }
20516}
20517
20518#[doc(hidden)]
20519impl google_cloud_gax::paginator::internal::PageableResponse for ListDbSystemShapesResponse {
20520 type PageItem = crate::model::DbSystemShape;
20521
20522 fn items(self) -> std::vec::Vec<Self::PageItem> {
20523 self.db_system_shapes
20524 }
20525
20526 fn next_page_token(&self) -> std::string::String {
20527 use std::clone::Clone;
20528 self.next_page_token.clone()
20529 }
20530}
20531
20532/// Represents the metadata of the long-running operation.
20533#[derive(Clone, Default, PartialEq)]
20534#[non_exhaustive]
20535pub struct OperationMetadata {
20536 /// Output only. The time the operation was created.
20537 pub create_time: std::option::Option<wkt::Timestamp>,
20538
20539 /// Output only. The time the operation finished running.
20540 pub end_time: std::option::Option<wkt::Timestamp>,
20541
20542 /// Output only. Server-defined resource path for the target of the operation.
20543 pub target: std::string::String,
20544
20545 /// Output only. Name of the verb executed by the operation.
20546 pub verb: std::string::String,
20547
20548 /// Output only. The status of the operation.
20549 pub status_message: std::string::String,
20550
20551 /// Output only. Identifies whether the user has requested cancellation
20552 /// of the operation. Operations that have been cancelled successfully
20553 /// have [Operation.error][] value with a
20554 /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
20555 /// `Code.CANCELLED`.
20556 ///
20557 /// [google.rpc.Status.code]: google_cloud_rpc::model::Status::code
20558 pub requested_cancellation: bool,
20559
20560 /// Output only. API version used to start the operation.
20561 pub api_version: std::string::String,
20562
20563 /// Output only. An estimated percentage of the operation that has been
20564 /// completed at a given moment of time, between 0 and 100.
20565 pub percent_complete: f64,
20566
20567 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20568}
20569
20570impl OperationMetadata {
20571 pub fn new() -> Self {
20572 std::default::Default::default()
20573 }
20574
20575 /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
20576 ///
20577 /// # Example
20578 /// ```ignore,no_run
20579 /// # use google_cloud_oracledatabase_v1::model::OperationMetadata;
20580 /// use wkt::Timestamp;
20581 /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
20582 /// ```
20583 pub fn set_create_time<T>(mut self, v: T) -> Self
20584 where
20585 T: std::convert::Into<wkt::Timestamp>,
20586 {
20587 self.create_time = std::option::Option::Some(v.into());
20588 self
20589 }
20590
20591 /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
20592 ///
20593 /// # Example
20594 /// ```ignore,no_run
20595 /// # use google_cloud_oracledatabase_v1::model::OperationMetadata;
20596 /// use wkt::Timestamp;
20597 /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
20598 /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
20599 /// ```
20600 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
20601 where
20602 T: std::convert::Into<wkt::Timestamp>,
20603 {
20604 self.create_time = v.map(|x| x.into());
20605 self
20606 }
20607
20608 /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
20609 ///
20610 /// # Example
20611 /// ```ignore,no_run
20612 /// # use google_cloud_oracledatabase_v1::model::OperationMetadata;
20613 /// use wkt::Timestamp;
20614 /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
20615 /// ```
20616 pub fn set_end_time<T>(mut self, v: T) -> Self
20617 where
20618 T: std::convert::Into<wkt::Timestamp>,
20619 {
20620 self.end_time = std::option::Option::Some(v.into());
20621 self
20622 }
20623
20624 /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
20625 ///
20626 /// # Example
20627 /// ```ignore,no_run
20628 /// # use google_cloud_oracledatabase_v1::model::OperationMetadata;
20629 /// use wkt::Timestamp;
20630 /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
20631 /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
20632 /// ```
20633 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
20634 where
20635 T: std::convert::Into<wkt::Timestamp>,
20636 {
20637 self.end_time = v.map(|x| x.into());
20638 self
20639 }
20640
20641 /// Sets the value of [target][crate::model::OperationMetadata::target].
20642 ///
20643 /// # Example
20644 /// ```ignore,no_run
20645 /// # use google_cloud_oracledatabase_v1::model::OperationMetadata;
20646 /// let x = OperationMetadata::new().set_target("example");
20647 /// ```
20648 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20649 self.target = v.into();
20650 self
20651 }
20652
20653 /// Sets the value of [verb][crate::model::OperationMetadata::verb].
20654 ///
20655 /// # Example
20656 /// ```ignore,no_run
20657 /// # use google_cloud_oracledatabase_v1::model::OperationMetadata;
20658 /// let x = OperationMetadata::new().set_verb("example");
20659 /// ```
20660 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20661 self.verb = v.into();
20662 self
20663 }
20664
20665 /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
20666 ///
20667 /// # Example
20668 /// ```ignore,no_run
20669 /// # use google_cloud_oracledatabase_v1::model::OperationMetadata;
20670 /// let x = OperationMetadata::new().set_status_message("example");
20671 /// ```
20672 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20673 self.status_message = v.into();
20674 self
20675 }
20676
20677 /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
20678 ///
20679 /// # Example
20680 /// ```ignore,no_run
20681 /// # use google_cloud_oracledatabase_v1::model::OperationMetadata;
20682 /// let x = OperationMetadata::new().set_requested_cancellation(true);
20683 /// ```
20684 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20685 self.requested_cancellation = v.into();
20686 self
20687 }
20688
20689 /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
20690 ///
20691 /// # Example
20692 /// ```ignore,no_run
20693 /// # use google_cloud_oracledatabase_v1::model::OperationMetadata;
20694 /// let x = OperationMetadata::new().set_api_version("example");
20695 /// ```
20696 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20697 self.api_version = v.into();
20698 self
20699 }
20700
20701 /// Sets the value of [percent_complete][crate::model::OperationMetadata::percent_complete].
20702 ///
20703 /// # Example
20704 /// ```ignore,no_run
20705 /// # use google_cloud_oracledatabase_v1::model::OperationMetadata;
20706 /// let x = OperationMetadata::new().set_percent_complete(42.0);
20707 /// ```
20708 pub fn set_percent_complete<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
20709 self.percent_complete = v.into();
20710 self
20711 }
20712}
20713
20714impl wkt::message::Message for OperationMetadata {
20715 fn typename() -> &'static str {
20716 "type.googleapis.com/google.cloud.oracledatabase.v1.OperationMetadata"
20717 }
20718}
20719
20720/// The request for `AutonomousDatabase.List`.
20721#[derive(Clone, Default, PartialEq)]
20722#[non_exhaustive]
20723pub struct ListAutonomousDatabasesRequest {
20724 /// Required. The parent value for the Autonomous Database in the following
20725 /// format: projects/{project}/locations/{location}.
20726 pub parent: std::string::String,
20727
20728 /// Optional. The maximum number of items to return.
20729 /// If unspecified, at most 50 Autonomous Database will be returned.
20730 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
20731 pub page_size: i32,
20732
20733 /// Optional. A token identifying a page of results the server should return.
20734 pub page_token: std::string::String,
20735
20736 /// Optional. An expression for filtering the results of the request.
20737 pub filter: std::string::String,
20738
20739 /// Optional. An expression for ordering the results of the request.
20740 pub order_by: std::string::String,
20741
20742 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20743}
20744
20745impl ListAutonomousDatabasesRequest {
20746 pub fn new() -> Self {
20747 std::default::Default::default()
20748 }
20749
20750 /// Sets the value of [parent][crate::model::ListAutonomousDatabasesRequest::parent].
20751 ///
20752 /// # Example
20753 /// ```ignore,no_run
20754 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabasesRequest;
20755 /// let x = ListAutonomousDatabasesRequest::new().set_parent("example");
20756 /// ```
20757 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20758 self.parent = v.into();
20759 self
20760 }
20761
20762 /// Sets the value of [page_size][crate::model::ListAutonomousDatabasesRequest::page_size].
20763 ///
20764 /// # Example
20765 /// ```ignore,no_run
20766 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabasesRequest;
20767 /// let x = ListAutonomousDatabasesRequest::new().set_page_size(42);
20768 /// ```
20769 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20770 self.page_size = v.into();
20771 self
20772 }
20773
20774 /// Sets the value of [page_token][crate::model::ListAutonomousDatabasesRequest::page_token].
20775 ///
20776 /// # Example
20777 /// ```ignore,no_run
20778 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabasesRequest;
20779 /// let x = ListAutonomousDatabasesRequest::new().set_page_token("example");
20780 /// ```
20781 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20782 self.page_token = v.into();
20783 self
20784 }
20785
20786 /// Sets the value of [filter][crate::model::ListAutonomousDatabasesRequest::filter].
20787 ///
20788 /// # Example
20789 /// ```ignore,no_run
20790 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabasesRequest;
20791 /// let x = ListAutonomousDatabasesRequest::new().set_filter("example");
20792 /// ```
20793 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20794 self.filter = v.into();
20795 self
20796 }
20797
20798 /// Sets the value of [order_by][crate::model::ListAutonomousDatabasesRequest::order_by].
20799 ///
20800 /// # Example
20801 /// ```ignore,no_run
20802 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabasesRequest;
20803 /// let x = ListAutonomousDatabasesRequest::new().set_order_by("example");
20804 /// ```
20805 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20806 self.order_by = v.into();
20807 self
20808 }
20809}
20810
20811impl wkt::message::Message for ListAutonomousDatabasesRequest {
20812 fn typename() -> &'static str {
20813 "type.googleapis.com/google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest"
20814 }
20815}
20816
20817/// The response for `AutonomousDatabase.List`.
20818#[derive(Clone, Default, PartialEq)]
20819#[non_exhaustive]
20820pub struct ListAutonomousDatabasesResponse {
20821 /// The list of Autonomous Databases.
20822 pub autonomous_databases: std::vec::Vec<crate::model::AutonomousDatabase>,
20823
20824 /// A token identifying a page of results the server should return.
20825 pub next_page_token: std::string::String,
20826
20827 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20828}
20829
20830impl ListAutonomousDatabasesResponse {
20831 pub fn new() -> Self {
20832 std::default::Default::default()
20833 }
20834
20835 /// Sets the value of [autonomous_databases][crate::model::ListAutonomousDatabasesResponse::autonomous_databases].
20836 ///
20837 /// # Example
20838 /// ```ignore,no_run
20839 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabasesResponse;
20840 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
20841 /// let x = ListAutonomousDatabasesResponse::new()
20842 /// .set_autonomous_databases([
20843 /// AutonomousDatabase::default()/* use setters */,
20844 /// AutonomousDatabase::default()/* use (different) setters */,
20845 /// ]);
20846 /// ```
20847 pub fn set_autonomous_databases<T, V>(mut self, v: T) -> Self
20848 where
20849 T: std::iter::IntoIterator<Item = V>,
20850 V: std::convert::Into<crate::model::AutonomousDatabase>,
20851 {
20852 use std::iter::Iterator;
20853 self.autonomous_databases = v.into_iter().map(|i| i.into()).collect();
20854 self
20855 }
20856
20857 /// Sets the value of [next_page_token][crate::model::ListAutonomousDatabasesResponse::next_page_token].
20858 ///
20859 /// # Example
20860 /// ```ignore,no_run
20861 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabasesResponse;
20862 /// let x = ListAutonomousDatabasesResponse::new().set_next_page_token("example");
20863 /// ```
20864 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20865 self.next_page_token = v.into();
20866 self
20867 }
20868}
20869
20870impl wkt::message::Message for ListAutonomousDatabasesResponse {
20871 fn typename() -> &'static str {
20872 "type.googleapis.com/google.cloud.oracledatabase.v1.ListAutonomousDatabasesResponse"
20873 }
20874}
20875
20876#[doc(hidden)]
20877impl google_cloud_gax::paginator::internal::PageableResponse for ListAutonomousDatabasesResponse {
20878 type PageItem = crate::model::AutonomousDatabase;
20879
20880 fn items(self) -> std::vec::Vec<Self::PageItem> {
20881 self.autonomous_databases
20882 }
20883
20884 fn next_page_token(&self) -> std::string::String {
20885 use std::clone::Clone;
20886 self.next_page_token.clone()
20887 }
20888}
20889
20890/// The request for `AutonomousDatabase.Get`.
20891#[derive(Clone, Default, PartialEq)]
20892#[non_exhaustive]
20893pub struct GetAutonomousDatabaseRequest {
20894 /// Required. The name of the Autonomous Database in the following format:
20895 /// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
20896 pub name: std::string::String,
20897
20898 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20899}
20900
20901impl GetAutonomousDatabaseRequest {
20902 pub fn new() -> Self {
20903 std::default::Default::default()
20904 }
20905
20906 /// Sets the value of [name][crate::model::GetAutonomousDatabaseRequest::name].
20907 ///
20908 /// # Example
20909 /// ```ignore,no_run
20910 /// # use google_cloud_oracledatabase_v1::model::GetAutonomousDatabaseRequest;
20911 /// let x = GetAutonomousDatabaseRequest::new().set_name("example");
20912 /// ```
20913 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20914 self.name = v.into();
20915 self
20916 }
20917}
20918
20919impl wkt::message::Message for GetAutonomousDatabaseRequest {
20920 fn typename() -> &'static str {
20921 "type.googleapis.com/google.cloud.oracledatabase.v1.GetAutonomousDatabaseRequest"
20922 }
20923}
20924
20925/// The request for `AutonomousDatabase.Create`.
20926#[derive(Clone, Default, PartialEq)]
20927#[non_exhaustive]
20928pub struct CreateAutonomousDatabaseRequest {
20929 /// Required. The name of the parent in the following format:
20930 /// projects/{project}/locations/{location}.
20931 pub parent: std::string::String,
20932
20933 /// Required. The ID of the Autonomous Database to create. This value is
20934 /// restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of
20935 /// 63 characters in length. The value must start with a letter and end with a
20936 /// letter or a number.
20937 pub autonomous_database_id: std::string::String,
20938
20939 /// Required. The Autonomous Database being created.
20940 pub autonomous_database: std::option::Option<crate::model::AutonomousDatabase>,
20941
20942 /// Optional. An optional ID to identify the request. This value is used to
20943 /// identify duplicate requests. If you make a request with the same request ID
20944 /// and the original request is still in progress or completed, the server
20945 /// ignores the second request. This prevents clients from
20946 /// accidentally creating duplicate commitments.
20947 ///
20948 /// The request ID must be a valid UUID with the exception that zero UUID is
20949 /// not supported (00000000-0000-0000-0000-000000000000).
20950 pub request_id: std::string::String,
20951
20952 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20953}
20954
20955impl CreateAutonomousDatabaseRequest {
20956 pub fn new() -> Self {
20957 std::default::Default::default()
20958 }
20959
20960 /// Sets the value of [parent][crate::model::CreateAutonomousDatabaseRequest::parent].
20961 ///
20962 /// # Example
20963 /// ```ignore,no_run
20964 /// # use google_cloud_oracledatabase_v1::model::CreateAutonomousDatabaseRequest;
20965 /// let x = CreateAutonomousDatabaseRequest::new().set_parent("example");
20966 /// ```
20967 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20968 self.parent = v.into();
20969 self
20970 }
20971
20972 /// Sets the value of [autonomous_database_id][crate::model::CreateAutonomousDatabaseRequest::autonomous_database_id].
20973 ///
20974 /// # Example
20975 /// ```ignore,no_run
20976 /// # use google_cloud_oracledatabase_v1::model::CreateAutonomousDatabaseRequest;
20977 /// let x = CreateAutonomousDatabaseRequest::new().set_autonomous_database_id("example");
20978 /// ```
20979 pub fn set_autonomous_database_id<T: std::convert::Into<std::string::String>>(
20980 mut self,
20981 v: T,
20982 ) -> Self {
20983 self.autonomous_database_id = v.into();
20984 self
20985 }
20986
20987 /// Sets the value of [autonomous_database][crate::model::CreateAutonomousDatabaseRequest::autonomous_database].
20988 ///
20989 /// # Example
20990 /// ```ignore,no_run
20991 /// # use google_cloud_oracledatabase_v1::model::CreateAutonomousDatabaseRequest;
20992 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
20993 /// let x = CreateAutonomousDatabaseRequest::new().set_autonomous_database(AutonomousDatabase::default()/* use setters */);
20994 /// ```
20995 pub fn set_autonomous_database<T>(mut self, v: T) -> Self
20996 where
20997 T: std::convert::Into<crate::model::AutonomousDatabase>,
20998 {
20999 self.autonomous_database = std::option::Option::Some(v.into());
21000 self
21001 }
21002
21003 /// Sets or clears the value of [autonomous_database][crate::model::CreateAutonomousDatabaseRequest::autonomous_database].
21004 ///
21005 /// # Example
21006 /// ```ignore,no_run
21007 /// # use google_cloud_oracledatabase_v1::model::CreateAutonomousDatabaseRequest;
21008 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
21009 /// let x = CreateAutonomousDatabaseRequest::new().set_or_clear_autonomous_database(Some(AutonomousDatabase::default()/* use setters */));
21010 /// let x = CreateAutonomousDatabaseRequest::new().set_or_clear_autonomous_database(None::<AutonomousDatabase>);
21011 /// ```
21012 pub fn set_or_clear_autonomous_database<T>(mut self, v: std::option::Option<T>) -> Self
21013 where
21014 T: std::convert::Into<crate::model::AutonomousDatabase>,
21015 {
21016 self.autonomous_database = v.map(|x| x.into());
21017 self
21018 }
21019
21020 /// Sets the value of [request_id][crate::model::CreateAutonomousDatabaseRequest::request_id].
21021 ///
21022 /// # Example
21023 /// ```ignore,no_run
21024 /// # use google_cloud_oracledatabase_v1::model::CreateAutonomousDatabaseRequest;
21025 /// let x = CreateAutonomousDatabaseRequest::new().set_request_id("example");
21026 /// ```
21027 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21028 self.request_id = v.into();
21029 self
21030 }
21031}
21032
21033impl wkt::message::Message for CreateAutonomousDatabaseRequest {
21034 fn typename() -> &'static str {
21035 "type.googleapis.com/google.cloud.oracledatabase.v1.CreateAutonomousDatabaseRequest"
21036 }
21037}
21038
21039/// The request for `AutonomousDatabase.Update`.
21040#[derive(Clone, Default, PartialEq)]
21041#[non_exhaustive]
21042pub struct UpdateAutonomousDatabaseRequest {
21043 /// Optional. Field mask is used to specify the fields to be overwritten in the
21044 /// Exadata resource by the update. The fields specified in the update_mask are
21045 /// relative to the resource, not the full request. A field will be overwritten
21046 /// if it is in the mask. If the user does not provide a mask then all fields
21047 /// will be overwritten.
21048 pub update_mask: std::option::Option<wkt::FieldMask>,
21049
21050 /// Required. The resource being updated
21051 pub autonomous_database: std::option::Option<crate::model::AutonomousDatabase>,
21052
21053 /// Optional. An optional ID to identify the request. This value is used to
21054 /// identify duplicate requests. If you make a request with the same request ID
21055 /// and the original request is still in progress or completed, the server
21056 /// ignores the second request. This prevents clients from
21057 /// accidentally creating duplicate commitments.
21058 ///
21059 /// The request ID must be a valid UUID with the exception that zero UUID is
21060 /// not supported (00000000-0000-0000-0000-000000000000).
21061 pub request_id: std::string::String,
21062
21063 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21064}
21065
21066impl UpdateAutonomousDatabaseRequest {
21067 pub fn new() -> Self {
21068 std::default::Default::default()
21069 }
21070
21071 /// Sets the value of [update_mask][crate::model::UpdateAutonomousDatabaseRequest::update_mask].
21072 ///
21073 /// # Example
21074 /// ```ignore,no_run
21075 /// # use google_cloud_oracledatabase_v1::model::UpdateAutonomousDatabaseRequest;
21076 /// use wkt::FieldMask;
21077 /// let x = UpdateAutonomousDatabaseRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21078 /// ```
21079 pub fn set_update_mask<T>(mut self, v: T) -> Self
21080 where
21081 T: std::convert::Into<wkt::FieldMask>,
21082 {
21083 self.update_mask = std::option::Option::Some(v.into());
21084 self
21085 }
21086
21087 /// Sets or clears the value of [update_mask][crate::model::UpdateAutonomousDatabaseRequest::update_mask].
21088 ///
21089 /// # Example
21090 /// ```ignore,no_run
21091 /// # use google_cloud_oracledatabase_v1::model::UpdateAutonomousDatabaseRequest;
21092 /// use wkt::FieldMask;
21093 /// let x = UpdateAutonomousDatabaseRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21094 /// let x = UpdateAutonomousDatabaseRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21095 /// ```
21096 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21097 where
21098 T: std::convert::Into<wkt::FieldMask>,
21099 {
21100 self.update_mask = v.map(|x| x.into());
21101 self
21102 }
21103
21104 /// Sets the value of [autonomous_database][crate::model::UpdateAutonomousDatabaseRequest::autonomous_database].
21105 ///
21106 /// # Example
21107 /// ```ignore,no_run
21108 /// # use google_cloud_oracledatabase_v1::model::UpdateAutonomousDatabaseRequest;
21109 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
21110 /// let x = UpdateAutonomousDatabaseRequest::new().set_autonomous_database(AutonomousDatabase::default()/* use setters */);
21111 /// ```
21112 pub fn set_autonomous_database<T>(mut self, v: T) -> Self
21113 where
21114 T: std::convert::Into<crate::model::AutonomousDatabase>,
21115 {
21116 self.autonomous_database = std::option::Option::Some(v.into());
21117 self
21118 }
21119
21120 /// Sets or clears the value of [autonomous_database][crate::model::UpdateAutonomousDatabaseRequest::autonomous_database].
21121 ///
21122 /// # Example
21123 /// ```ignore,no_run
21124 /// # use google_cloud_oracledatabase_v1::model::UpdateAutonomousDatabaseRequest;
21125 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabase;
21126 /// let x = UpdateAutonomousDatabaseRequest::new().set_or_clear_autonomous_database(Some(AutonomousDatabase::default()/* use setters */));
21127 /// let x = UpdateAutonomousDatabaseRequest::new().set_or_clear_autonomous_database(None::<AutonomousDatabase>);
21128 /// ```
21129 pub fn set_or_clear_autonomous_database<T>(mut self, v: std::option::Option<T>) -> Self
21130 where
21131 T: std::convert::Into<crate::model::AutonomousDatabase>,
21132 {
21133 self.autonomous_database = v.map(|x| x.into());
21134 self
21135 }
21136
21137 /// Sets the value of [request_id][crate::model::UpdateAutonomousDatabaseRequest::request_id].
21138 ///
21139 /// # Example
21140 /// ```ignore,no_run
21141 /// # use google_cloud_oracledatabase_v1::model::UpdateAutonomousDatabaseRequest;
21142 /// let x = UpdateAutonomousDatabaseRequest::new().set_request_id("example");
21143 /// ```
21144 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21145 self.request_id = v.into();
21146 self
21147 }
21148}
21149
21150impl wkt::message::Message for UpdateAutonomousDatabaseRequest {
21151 fn typename() -> &'static str {
21152 "type.googleapis.com/google.cloud.oracledatabase.v1.UpdateAutonomousDatabaseRequest"
21153 }
21154}
21155
21156/// The request for `AutonomousDatabase.Delete`.
21157#[derive(Clone, Default, PartialEq)]
21158#[non_exhaustive]
21159pub struct DeleteAutonomousDatabaseRequest {
21160 /// Required. The name of the resource in the following format:
21161 /// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
21162 pub name: std::string::String,
21163
21164 /// Optional. An optional ID to identify the request. This value is used to
21165 /// identify duplicate requests. If you make a request with the same request ID
21166 /// and the original request is still in progress or completed, the server
21167 /// ignores the second request. This prevents clients from
21168 /// accidentally creating duplicate commitments.
21169 ///
21170 /// The request ID must be a valid UUID with the exception that zero UUID is
21171 /// not supported (00000000-0000-0000-0000-000000000000).
21172 pub request_id: std::string::String,
21173
21174 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21175}
21176
21177impl DeleteAutonomousDatabaseRequest {
21178 pub fn new() -> Self {
21179 std::default::Default::default()
21180 }
21181
21182 /// Sets the value of [name][crate::model::DeleteAutonomousDatabaseRequest::name].
21183 ///
21184 /// # Example
21185 /// ```ignore,no_run
21186 /// # use google_cloud_oracledatabase_v1::model::DeleteAutonomousDatabaseRequest;
21187 /// let x = DeleteAutonomousDatabaseRequest::new().set_name("example");
21188 /// ```
21189 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21190 self.name = v.into();
21191 self
21192 }
21193
21194 /// Sets the value of [request_id][crate::model::DeleteAutonomousDatabaseRequest::request_id].
21195 ///
21196 /// # Example
21197 /// ```ignore,no_run
21198 /// # use google_cloud_oracledatabase_v1::model::DeleteAutonomousDatabaseRequest;
21199 /// let x = DeleteAutonomousDatabaseRequest::new().set_request_id("example");
21200 /// ```
21201 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21202 self.request_id = v.into();
21203 self
21204 }
21205}
21206
21207impl wkt::message::Message for DeleteAutonomousDatabaseRequest {
21208 fn typename() -> &'static str {
21209 "type.googleapis.com/google.cloud.oracledatabase.v1.DeleteAutonomousDatabaseRequest"
21210 }
21211}
21212
21213/// The request for `AutonomousDatabase.Restore`.
21214#[derive(Clone, Default, PartialEq)]
21215#[non_exhaustive]
21216pub struct RestoreAutonomousDatabaseRequest {
21217 /// Required. The name of the Autonomous Database in the following format:
21218 /// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
21219 pub name: std::string::String,
21220
21221 /// Required. The time and date to restore the database to.
21222 pub restore_time: std::option::Option<wkt::Timestamp>,
21223
21224 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21225}
21226
21227impl RestoreAutonomousDatabaseRequest {
21228 pub fn new() -> Self {
21229 std::default::Default::default()
21230 }
21231
21232 /// Sets the value of [name][crate::model::RestoreAutonomousDatabaseRequest::name].
21233 ///
21234 /// # Example
21235 /// ```ignore,no_run
21236 /// # use google_cloud_oracledatabase_v1::model::RestoreAutonomousDatabaseRequest;
21237 /// let x = RestoreAutonomousDatabaseRequest::new().set_name("example");
21238 /// ```
21239 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21240 self.name = v.into();
21241 self
21242 }
21243
21244 /// Sets the value of [restore_time][crate::model::RestoreAutonomousDatabaseRequest::restore_time].
21245 ///
21246 /// # Example
21247 /// ```ignore,no_run
21248 /// # use google_cloud_oracledatabase_v1::model::RestoreAutonomousDatabaseRequest;
21249 /// use wkt::Timestamp;
21250 /// let x = RestoreAutonomousDatabaseRequest::new().set_restore_time(Timestamp::default()/* use setters */);
21251 /// ```
21252 pub fn set_restore_time<T>(mut self, v: T) -> Self
21253 where
21254 T: std::convert::Into<wkt::Timestamp>,
21255 {
21256 self.restore_time = std::option::Option::Some(v.into());
21257 self
21258 }
21259
21260 /// Sets or clears the value of [restore_time][crate::model::RestoreAutonomousDatabaseRequest::restore_time].
21261 ///
21262 /// # Example
21263 /// ```ignore,no_run
21264 /// # use google_cloud_oracledatabase_v1::model::RestoreAutonomousDatabaseRequest;
21265 /// use wkt::Timestamp;
21266 /// let x = RestoreAutonomousDatabaseRequest::new().set_or_clear_restore_time(Some(Timestamp::default()/* use setters */));
21267 /// let x = RestoreAutonomousDatabaseRequest::new().set_or_clear_restore_time(None::<Timestamp>);
21268 /// ```
21269 pub fn set_or_clear_restore_time<T>(mut self, v: std::option::Option<T>) -> Self
21270 where
21271 T: std::convert::Into<wkt::Timestamp>,
21272 {
21273 self.restore_time = v.map(|x| x.into());
21274 self
21275 }
21276}
21277
21278impl wkt::message::Message for RestoreAutonomousDatabaseRequest {
21279 fn typename() -> &'static str {
21280 "type.googleapis.com/google.cloud.oracledatabase.v1.RestoreAutonomousDatabaseRequest"
21281 }
21282}
21283
21284/// The request for `AutonomousDatabase.Stop`.
21285#[derive(Clone, Default, PartialEq)]
21286#[non_exhaustive]
21287pub struct StopAutonomousDatabaseRequest {
21288 /// Required. The name of the Autonomous Database in the following format:
21289 /// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
21290 pub name: std::string::String,
21291
21292 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21293}
21294
21295impl StopAutonomousDatabaseRequest {
21296 pub fn new() -> Self {
21297 std::default::Default::default()
21298 }
21299
21300 /// Sets the value of [name][crate::model::StopAutonomousDatabaseRequest::name].
21301 ///
21302 /// # Example
21303 /// ```ignore,no_run
21304 /// # use google_cloud_oracledatabase_v1::model::StopAutonomousDatabaseRequest;
21305 /// let x = StopAutonomousDatabaseRequest::new().set_name("example");
21306 /// ```
21307 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21308 self.name = v.into();
21309 self
21310 }
21311}
21312
21313impl wkt::message::Message for StopAutonomousDatabaseRequest {
21314 fn typename() -> &'static str {
21315 "type.googleapis.com/google.cloud.oracledatabase.v1.StopAutonomousDatabaseRequest"
21316 }
21317}
21318
21319/// The request for `AutonomousDatabase.Start`.
21320#[derive(Clone, Default, PartialEq)]
21321#[non_exhaustive]
21322pub struct StartAutonomousDatabaseRequest {
21323 /// Required. The name of the Autonomous Database in the following format:
21324 /// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
21325 pub name: std::string::String,
21326
21327 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21328}
21329
21330impl StartAutonomousDatabaseRequest {
21331 pub fn new() -> Self {
21332 std::default::Default::default()
21333 }
21334
21335 /// Sets the value of [name][crate::model::StartAutonomousDatabaseRequest::name].
21336 ///
21337 /// # Example
21338 /// ```ignore,no_run
21339 /// # use google_cloud_oracledatabase_v1::model::StartAutonomousDatabaseRequest;
21340 /// let x = StartAutonomousDatabaseRequest::new().set_name("example");
21341 /// ```
21342 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21343 self.name = v.into();
21344 self
21345 }
21346}
21347
21348impl wkt::message::Message for StartAutonomousDatabaseRequest {
21349 fn typename() -> &'static str {
21350 "type.googleapis.com/google.cloud.oracledatabase.v1.StartAutonomousDatabaseRequest"
21351 }
21352}
21353
21354/// The request for `AutonomousDatabase.Restart`.
21355#[derive(Clone, Default, PartialEq)]
21356#[non_exhaustive]
21357pub struct RestartAutonomousDatabaseRequest {
21358 /// Required. The name of the Autonomous Database in the following format:
21359 /// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
21360 pub name: std::string::String,
21361
21362 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21363}
21364
21365impl RestartAutonomousDatabaseRequest {
21366 pub fn new() -> Self {
21367 std::default::Default::default()
21368 }
21369
21370 /// Sets the value of [name][crate::model::RestartAutonomousDatabaseRequest::name].
21371 ///
21372 /// # Example
21373 /// ```ignore,no_run
21374 /// # use google_cloud_oracledatabase_v1::model::RestartAutonomousDatabaseRequest;
21375 /// let x = RestartAutonomousDatabaseRequest::new().set_name("example");
21376 /// ```
21377 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21378 self.name = v.into();
21379 self
21380 }
21381}
21382
21383impl wkt::message::Message for RestartAutonomousDatabaseRequest {
21384 fn typename() -> &'static str {
21385 "type.googleapis.com/google.cloud.oracledatabase.v1.RestartAutonomousDatabaseRequest"
21386 }
21387}
21388
21389/// The request for `OracleDatabase.SwitchoverAutonomousDatabase`.
21390#[derive(Clone, Default, PartialEq)]
21391#[non_exhaustive]
21392pub struct SwitchoverAutonomousDatabaseRequest {
21393 /// Required. The name of the Autonomous Database in the following format:
21394 /// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
21395 pub name: std::string::String,
21396
21397 /// Required. The peer database name to switch over to.
21398 pub peer_autonomous_database: std::string::String,
21399
21400 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21401}
21402
21403impl SwitchoverAutonomousDatabaseRequest {
21404 pub fn new() -> Self {
21405 std::default::Default::default()
21406 }
21407
21408 /// Sets the value of [name][crate::model::SwitchoverAutonomousDatabaseRequest::name].
21409 ///
21410 /// # Example
21411 /// ```ignore,no_run
21412 /// # use google_cloud_oracledatabase_v1::model::SwitchoverAutonomousDatabaseRequest;
21413 /// let x = SwitchoverAutonomousDatabaseRequest::new().set_name("example");
21414 /// ```
21415 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21416 self.name = v.into();
21417 self
21418 }
21419
21420 /// Sets the value of [peer_autonomous_database][crate::model::SwitchoverAutonomousDatabaseRequest::peer_autonomous_database].
21421 ///
21422 /// # Example
21423 /// ```ignore,no_run
21424 /// # use google_cloud_oracledatabase_v1::model::SwitchoverAutonomousDatabaseRequest;
21425 /// let x = SwitchoverAutonomousDatabaseRequest::new().set_peer_autonomous_database("example");
21426 /// ```
21427 pub fn set_peer_autonomous_database<T: std::convert::Into<std::string::String>>(
21428 mut self,
21429 v: T,
21430 ) -> Self {
21431 self.peer_autonomous_database = v.into();
21432 self
21433 }
21434}
21435
21436impl wkt::message::Message for SwitchoverAutonomousDatabaseRequest {
21437 fn typename() -> &'static str {
21438 "type.googleapis.com/google.cloud.oracledatabase.v1.SwitchoverAutonomousDatabaseRequest"
21439 }
21440}
21441
21442/// The request for `OracleDatabase.FailoverAutonomousDatabase`.
21443#[derive(Clone, Default, PartialEq)]
21444#[non_exhaustive]
21445pub struct FailoverAutonomousDatabaseRequest {
21446 /// Required. The name of the Autonomous Database in the following format:
21447 /// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
21448 pub name: std::string::String,
21449
21450 /// Required. The peer database name to fail over to.
21451 pub peer_autonomous_database: std::string::String,
21452
21453 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21454}
21455
21456impl FailoverAutonomousDatabaseRequest {
21457 pub fn new() -> Self {
21458 std::default::Default::default()
21459 }
21460
21461 /// Sets the value of [name][crate::model::FailoverAutonomousDatabaseRequest::name].
21462 ///
21463 /// # Example
21464 /// ```ignore,no_run
21465 /// # use google_cloud_oracledatabase_v1::model::FailoverAutonomousDatabaseRequest;
21466 /// let x = FailoverAutonomousDatabaseRequest::new().set_name("example");
21467 /// ```
21468 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21469 self.name = v.into();
21470 self
21471 }
21472
21473 /// Sets the value of [peer_autonomous_database][crate::model::FailoverAutonomousDatabaseRequest::peer_autonomous_database].
21474 ///
21475 /// # Example
21476 /// ```ignore,no_run
21477 /// # use google_cloud_oracledatabase_v1::model::FailoverAutonomousDatabaseRequest;
21478 /// let x = FailoverAutonomousDatabaseRequest::new().set_peer_autonomous_database("example");
21479 /// ```
21480 pub fn set_peer_autonomous_database<T: std::convert::Into<std::string::String>>(
21481 mut self,
21482 v: T,
21483 ) -> Self {
21484 self.peer_autonomous_database = v.into();
21485 self
21486 }
21487}
21488
21489impl wkt::message::Message for FailoverAutonomousDatabaseRequest {
21490 fn typename() -> &'static str {
21491 "type.googleapis.com/google.cloud.oracledatabase.v1.FailoverAutonomousDatabaseRequest"
21492 }
21493}
21494
21495/// The request for `AutonomousDatabase.GenerateWallet`.
21496#[derive(Clone, Default, PartialEq)]
21497#[non_exhaustive]
21498pub struct GenerateAutonomousDatabaseWalletRequest {
21499 /// Required. The name of the Autonomous Database in the following format:
21500 /// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.
21501 pub name: std::string::String,
21502
21503 /// Optional. The type of wallet generation for the Autonomous Database. The
21504 /// default value is SINGLE.
21505 pub r#type: crate::model::GenerateType,
21506
21507 /// Optional. True when requesting regional connection strings in PDB connect
21508 /// info, applicable to cross-region Data Guard only.
21509 pub is_regional: bool,
21510
21511 /// Required. The password used to encrypt the keys inside the wallet. The
21512 /// password must be a minimum of 8 characters.
21513 pub password: std::string::String,
21514
21515 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21516}
21517
21518impl GenerateAutonomousDatabaseWalletRequest {
21519 pub fn new() -> Self {
21520 std::default::Default::default()
21521 }
21522
21523 /// Sets the value of [name][crate::model::GenerateAutonomousDatabaseWalletRequest::name].
21524 ///
21525 /// # Example
21526 /// ```ignore,no_run
21527 /// # use google_cloud_oracledatabase_v1::model::GenerateAutonomousDatabaseWalletRequest;
21528 /// let x = GenerateAutonomousDatabaseWalletRequest::new().set_name("example");
21529 /// ```
21530 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21531 self.name = v.into();
21532 self
21533 }
21534
21535 /// Sets the value of [r#type][crate::model::GenerateAutonomousDatabaseWalletRequest::type].
21536 ///
21537 /// # Example
21538 /// ```ignore,no_run
21539 /// # use google_cloud_oracledatabase_v1::model::GenerateAutonomousDatabaseWalletRequest;
21540 /// use google_cloud_oracledatabase_v1::model::GenerateType;
21541 /// let x0 = GenerateAutonomousDatabaseWalletRequest::new().set_type(GenerateType::All);
21542 /// let x1 = GenerateAutonomousDatabaseWalletRequest::new().set_type(GenerateType::Single);
21543 /// ```
21544 pub fn set_type<T: std::convert::Into<crate::model::GenerateType>>(mut self, v: T) -> Self {
21545 self.r#type = v.into();
21546 self
21547 }
21548
21549 /// Sets the value of [is_regional][crate::model::GenerateAutonomousDatabaseWalletRequest::is_regional].
21550 ///
21551 /// # Example
21552 /// ```ignore,no_run
21553 /// # use google_cloud_oracledatabase_v1::model::GenerateAutonomousDatabaseWalletRequest;
21554 /// let x = GenerateAutonomousDatabaseWalletRequest::new().set_is_regional(true);
21555 /// ```
21556 pub fn set_is_regional<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21557 self.is_regional = v.into();
21558 self
21559 }
21560
21561 /// Sets the value of [password][crate::model::GenerateAutonomousDatabaseWalletRequest::password].
21562 ///
21563 /// # Example
21564 /// ```ignore,no_run
21565 /// # use google_cloud_oracledatabase_v1::model::GenerateAutonomousDatabaseWalletRequest;
21566 /// let x = GenerateAutonomousDatabaseWalletRequest::new().set_password("example");
21567 /// ```
21568 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21569 self.password = v.into();
21570 self
21571 }
21572}
21573
21574impl wkt::message::Message for GenerateAutonomousDatabaseWalletRequest {
21575 fn typename() -> &'static str {
21576 "type.googleapis.com/google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletRequest"
21577 }
21578}
21579
21580/// The response for `AutonomousDatabase.GenerateWallet`.
21581#[derive(Clone, Default, PartialEq)]
21582#[non_exhaustive]
21583pub struct GenerateAutonomousDatabaseWalletResponse {
21584 /// Output only. The base64 encoded wallet files.
21585 pub archive_content: ::bytes::Bytes,
21586
21587 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21588}
21589
21590impl GenerateAutonomousDatabaseWalletResponse {
21591 pub fn new() -> Self {
21592 std::default::Default::default()
21593 }
21594
21595 /// Sets the value of [archive_content][crate::model::GenerateAutonomousDatabaseWalletResponse::archive_content].
21596 ///
21597 /// # Example
21598 /// ```ignore,no_run
21599 /// # use google_cloud_oracledatabase_v1::model::GenerateAutonomousDatabaseWalletResponse;
21600 /// let x = GenerateAutonomousDatabaseWalletResponse::new().set_archive_content(bytes::Bytes::from_static(b"example"));
21601 /// ```
21602 pub fn set_archive_content<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
21603 self.archive_content = v.into();
21604 self
21605 }
21606}
21607
21608impl wkt::message::Message for GenerateAutonomousDatabaseWalletResponse {
21609 fn typename() -> &'static str {
21610 "type.googleapis.com/google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletResponse"
21611 }
21612}
21613
21614/// The request for `AutonomousDbVersion.List`.
21615#[derive(Clone, Default, PartialEq)]
21616#[non_exhaustive]
21617pub struct ListAutonomousDbVersionsRequest {
21618 /// Required. The parent value for the Autonomous Database in the following
21619 /// format: projects/{project}/locations/{location}.
21620 pub parent: std::string::String,
21621
21622 /// Optional. The maximum number of items to return.
21623 /// If unspecified, at most 50 Autonomous DB Versions will be returned.
21624 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
21625 pub page_size: i32,
21626
21627 /// Optional. A token identifying a page of results the server should return.
21628 pub page_token: std::string::String,
21629
21630 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21631}
21632
21633impl ListAutonomousDbVersionsRequest {
21634 pub fn new() -> Self {
21635 std::default::Default::default()
21636 }
21637
21638 /// Sets the value of [parent][crate::model::ListAutonomousDbVersionsRequest::parent].
21639 ///
21640 /// # Example
21641 /// ```ignore,no_run
21642 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDbVersionsRequest;
21643 /// let x = ListAutonomousDbVersionsRequest::new().set_parent("example");
21644 /// ```
21645 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21646 self.parent = v.into();
21647 self
21648 }
21649
21650 /// Sets the value of [page_size][crate::model::ListAutonomousDbVersionsRequest::page_size].
21651 ///
21652 /// # Example
21653 /// ```ignore,no_run
21654 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDbVersionsRequest;
21655 /// let x = ListAutonomousDbVersionsRequest::new().set_page_size(42);
21656 /// ```
21657 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21658 self.page_size = v.into();
21659 self
21660 }
21661
21662 /// Sets the value of [page_token][crate::model::ListAutonomousDbVersionsRequest::page_token].
21663 ///
21664 /// # Example
21665 /// ```ignore,no_run
21666 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDbVersionsRequest;
21667 /// let x = ListAutonomousDbVersionsRequest::new().set_page_token("example");
21668 /// ```
21669 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21670 self.page_token = v.into();
21671 self
21672 }
21673}
21674
21675impl wkt::message::Message for ListAutonomousDbVersionsRequest {
21676 fn typename() -> &'static str {
21677 "type.googleapis.com/google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest"
21678 }
21679}
21680
21681/// The response for `AutonomousDbVersion.List`.
21682#[derive(Clone, Default, PartialEq)]
21683#[non_exhaustive]
21684pub struct ListAutonomousDbVersionsResponse {
21685 /// The list of Autonomous Database versions.
21686 pub autonomous_db_versions: std::vec::Vec<crate::model::AutonomousDbVersion>,
21687
21688 /// A token identifying a page of results the server should return.
21689 pub next_page_token: std::string::String,
21690
21691 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21692}
21693
21694impl ListAutonomousDbVersionsResponse {
21695 pub fn new() -> Self {
21696 std::default::Default::default()
21697 }
21698
21699 /// Sets the value of [autonomous_db_versions][crate::model::ListAutonomousDbVersionsResponse::autonomous_db_versions].
21700 ///
21701 /// # Example
21702 /// ```ignore,no_run
21703 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDbVersionsResponse;
21704 /// use google_cloud_oracledatabase_v1::model::AutonomousDbVersion;
21705 /// let x = ListAutonomousDbVersionsResponse::new()
21706 /// .set_autonomous_db_versions([
21707 /// AutonomousDbVersion::default()/* use setters */,
21708 /// AutonomousDbVersion::default()/* use (different) setters */,
21709 /// ]);
21710 /// ```
21711 pub fn set_autonomous_db_versions<T, V>(mut self, v: T) -> Self
21712 where
21713 T: std::iter::IntoIterator<Item = V>,
21714 V: std::convert::Into<crate::model::AutonomousDbVersion>,
21715 {
21716 use std::iter::Iterator;
21717 self.autonomous_db_versions = v.into_iter().map(|i| i.into()).collect();
21718 self
21719 }
21720
21721 /// Sets the value of [next_page_token][crate::model::ListAutonomousDbVersionsResponse::next_page_token].
21722 ///
21723 /// # Example
21724 /// ```ignore,no_run
21725 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDbVersionsResponse;
21726 /// let x = ListAutonomousDbVersionsResponse::new().set_next_page_token("example");
21727 /// ```
21728 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21729 self.next_page_token = v.into();
21730 self
21731 }
21732}
21733
21734impl wkt::message::Message for ListAutonomousDbVersionsResponse {
21735 fn typename() -> &'static str {
21736 "type.googleapis.com/google.cloud.oracledatabase.v1.ListAutonomousDbVersionsResponse"
21737 }
21738}
21739
21740#[doc(hidden)]
21741impl google_cloud_gax::paginator::internal::PageableResponse for ListAutonomousDbVersionsResponse {
21742 type PageItem = crate::model::AutonomousDbVersion;
21743
21744 fn items(self) -> std::vec::Vec<Self::PageItem> {
21745 self.autonomous_db_versions
21746 }
21747
21748 fn next_page_token(&self) -> std::string::String {
21749 use std::clone::Clone;
21750 self.next_page_token.clone()
21751 }
21752}
21753
21754/// The request for `AutonomousDatabaseCharacterSet.List`.
21755#[derive(Clone, Default, PartialEq)]
21756#[non_exhaustive]
21757pub struct ListAutonomousDatabaseCharacterSetsRequest {
21758 /// Required. The parent value for the Autonomous Database in the following
21759 /// format: projects/{project}/locations/{location}.
21760 pub parent: std::string::String,
21761
21762 /// Optional. The maximum number of items to return.
21763 /// If unspecified, at most 50 Autonomous DB Character Sets will be returned.
21764 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
21765 pub page_size: i32,
21766
21767 /// Optional. A token identifying a page of results the server should return.
21768 pub page_token: std::string::String,
21769
21770 /// Optional. An expression for filtering the results of the request. Only the
21771 /// **character_set_type** field is supported in the following format:
21772 /// `character_set_type="{characterSetType}"`. Accepted values include
21773 /// `DATABASE` and `NATIONAL`.
21774 pub filter: std::string::String,
21775
21776 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21777}
21778
21779impl ListAutonomousDatabaseCharacterSetsRequest {
21780 pub fn new() -> Self {
21781 std::default::Default::default()
21782 }
21783
21784 /// Sets the value of [parent][crate::model::ListAutonomousDatabaseCharacterSetsRequest::parent].
21785 ///
21786 /// # Example
21787 /// ```ignore,no_run
21788 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseCharacterSetsRequest;
21789 /// let x = ListAutonomousDatabaseCharacterSetsRequest::new().set_parent("example");
21790 /// ```
21791 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21792 self.parent = v.into();
21793 self
21794 }
21795
21796 /// Sets the value of [page_size][crate::model::ListAutonomousDatabaseCharacterSetsRequest::page_size].
21797 ///
21798 /// # Example
21799 /// ```ignore,no_run
21800 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseCharacterSetsRequest;
21801 /// let x = ListAutonomousDatabaseCharacterSetsRequest::new().set_page_size(42);
21802 /// ```
21803 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21804 self.page_size = v.into();
21805 self
21806 }
21807
21808 /// Sets the value of [page_token][crate::model::ListAutonomousDatabaseCharacterSetsRequest::page_token].
21809 ///
21810 /// # Example
21811 /// ```ignore,no_run
21812 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseCharacterSetsRequest;
21813 /// let x = ListAutonomousDatabaseCharacterSetsRequest::new().set_page_token("example");
21814 /// ```
21815 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21816 self.page_token = v.into();
21817 self
21818 }
21819
21820 /// Sets the value of [filter][crate::model::ListAutonomousDatabaseCharacterSetsRequest::filter].
21821 ///
21822 /// # Example
21823 /// ```ignore,no_run
21824 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseCharacterSetsRequest;
21825 /// let x = ListAutonomousDatabaseCharacterSetsRequest::new().set_filter("example");
21826 /// ```
21827 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21828 self.filter = v.into();
21829 self
21830 }
21831}
21832
21833impl wkt::message::Message for ListAutonomousDatabaseCharacterSetsRequest {
21834 fn typename() -> &'static str {
21835 "type.googleapis.com/google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest"
21836 }
21837}
21838
21839/// The response for `AutonomousDatabaseCharacterSet.List`.
21840#[derive(Clone, Default, PartialEq)]
21841#[non_exhaustive]
21842pub struct ListAutonomousDatabaseCharacterSetsResponse {
21843 /// The list of Autonomous Database Character Sets.
21844 pub autonomous_database_character_sets:
21845 std::vec::Vec<crate::model::AutonomousDatabaseCharacterSet>,
21846
21847 /// A token identifying a page of results the server should return.
21848 pub next_page_token: std::string::String,
21849
21850 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21851}
21852
21853impl ListAutonomousDatabaseCharacterSetsResponse {
21854 pub fn new() -> Self {
21855 std::default::Default::default()
21856 }
21857
21858 /// Sets the value of [autonomous_database_character_sets][crate::model::ListAutonomousDatabaseCharacterSetsResponse::autonomous_database_character_sets].
21859 ///
21860 /// # Example
21861 /// ```ignore,no_run
21862 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseCharacterSetsResponse;
21863 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseCharacterSet;
21864 /// let x = ListAutonomousDatabaseCharacterSetsResponse::new()
21865 /// .set_autonomous_database_character_sets([
21866 /// AutonomousDatabaseCharacterSet::default()/* use setters */,
21867 /// AutonomousDatabaseCharacterSet::default()/* use (different) setters */,
21868 /// ]);
21869 /// ```
21870 pub fn set_autonomous_database_character_sets<T, V>(mut self, v: T) -> Self
21871 where
21872 T: std::iter::IntoIterator<Item = V>,
21873 V: std::convert::Into<crate::model::AutonomousDatabaseCharacterSet>,
21874 {
21875 use std::iter::Iterator;
21876 self.autonomous_database_character_sets = v.into_iter().map(|i| i.into()).collect();
21877 self
21878 }
21879
21880 /// Sets the value of [next_page_token][crate::model::ListAutonomousDatabaseCharacterSetsResponse::next_page_token].
21881 ///
21882 /// # Example
21883 /// ```ignore,no_run
21884 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseCharacterSetsResponse;
21885 /// let x = ListAutonomousDatabaseCharacterSetsResponse::new().set_next_page_token("example");
21886 /// ```
21887 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21888 self.next_page_token = v.into();
21889 self
21890 }
21891}
21892
21893impl wkt::message::Message for ListAutonomousDatabaseCharacterSetsResponse {
21894 fn typename() -> &'static str {
21895 "type.googleapis.com/google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsResponse"
21896 }
21897}
21898
21899#[doc(hidden)]
21900impl google_cloud_gax::paginator::internal::PageableResponse
21901 for ListAutonomousDatabaseCharacterSetsResponse
21902{
21903 type PageItem = crate::model::AutonomousDatabaseCharacterSet;
21904
21905 fn items(self) -> std::vec::Vec<Self::PageItem> {
21906 self.autonomous_database_character_sets
21907 }
21908
21909 fn next_page_token(&self) -> std::string::String {
21910 use std::clone::Clone;
21911 self.next_page_token.clone()
21912 }
21913}
21914
21915/// The request for `AutonomousDatabaseBackup.List`.
21916#[derive(Clone, Default, PartialEq)]
21917#[non_exhaustive]
21918pub struct ListAutonomousDatabaseBackupsRequest {
21919 /// Required. The parent value for ListAutonomousDatabaseBackups in the
21920 /// following format: projects/{project}/locations/{location}.
21921 pub parent: std::string::String,
21922
21923 /// Optional. An expression for filtering the results of the request. Only the
21924 /// **autonomous_database_id** field is supported in the following format:
21925 /// `autonomous_database_id="{autonomous_database_id}"`. The accepted values
21926 /// must be a valid Autonomous Database ID, limited to the naming
21927 /// restrictions of the ID: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
21928 /// The ID must start with a letter, end with a letter or a number, and be
21929 /// a maximum of 63 characters.
21930 pub filter: std::string::String,
21931
21932 /// Optional. The maximum number of items to return.
21933 /// If unspecified, at most 50 Autonomous DB Backups will be returned.
21934 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
21935 pub page_size: i32,
21936
21937 /// Optional. A token identifying a page of results the server should return.
21938 pub page_token: std::string::String,
21939
21940 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21941}
21942
21943impl ListAutonomousDatabaseBackupsRequest {
21944 pub fn new() -> Self {
21945 std::default::Default::default()
21946 }
21947
21948 /// Sets the value of [parent][crate::model::ListAutonomousDatabaseBackupsRequest::parent].
21949 ///
21950 /// # Example
21951 /// ```ignore,no_run
21952 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseBackupsRequest;
21953 /// let x = ListAutonomousDatabaseBackupsRequest::new().set_parent("example");
21954 /// ```
21955 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21956 self.parent = v.into();
21957 self
21958 }
21959
21960 /// Sets the value of [filter][crate::model::ListAutonomousDatabaseBackupsRequest::filter].
21961 ///
21962 /// # Example
21963 /// ```ignore,no_run
21964 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseBackupsRequest;
21965 /// let x = ListAutonomousDatabaseBackupsRequest::new().set_filter("example");
21966 /// ```
21967 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21968 self.filter = v.into();
21969 self
21970 }
21971
21972 /// Sets the value of [page_size][crate::model::ListAutonomousDatabaseBackupsRequest::page_size].
21973 ///
21974 /// # Example
21975 /// ```ignore,no_run
21976 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseBackupsRequest;
21977 /// let x = ListAutonomousDatabaseBackupsRequest::new().set_page_size(42);
21978 /// ```
21979 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21980 self.page_size = v.into();
21981 self
21982 }
21983
21984 /// Sets the value of [page_token][crate::model::ListAutonomousDatabaseBackupsRequest::page_token].
21985 ///
21986 /// # Example
21987 /// ```ignore,no_run
21988 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseBackupsRequest;
21989 /// let x = ListAutonomousDatabaseBackupsRequest::new().set_page_token("example");
21990 /// ```
21991 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21992 self.page_token = v.into();
21993 self
21994 }
21995}
21996
21997impl wkt::message::Message for ListAutonomousDatabaseBackupsRequest {
21998 fn typename() -> &'static str {
21999 "type.googleapis.com/google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest"
22000 }
22001}
22002
22003/// The response for `AutonomousDatabaseBackup.List`.
22004#[derive(Clone, Default, PartialEq)]
22005#[non_exhaustive]
22006pub struct ListAutonomousDatabaseBackupsResponse {
22007 /// The list of Autonomous Database Backups.
22008 pub autonomous_database_backups: std::vec::Vec<crate::model::AutonomousDatabaseBackup>,
22009
22010 /// A token identifying a page of results the server should return.
22011 pub next_page_token: std::string::String,
22012
22013 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22014}
22015
22016impl ListAutonomousDatabaseBackupsResponse {
22017 pub fn new() -> Self {
22018 std::default::Default::default()
22019 }
22020
22021 /// Sets the value of [autonomous_database_backups][crate::model::ListAutonomousDatabaseBackupsResponse::autonomous_database_backups].
22022 ///
22023 /// # Example
22024 /// ```ignore,no_run
22025 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseBackupsResponse;
22026 /// use google_cloud_oracledatabase_v1::model::AutonomousDatabaseBackup;
22027 /// let x = ListAutonomousDatabaseBackupsResponse::new()
22028 /// .set_autonomous_database_backups([
22029 /// AutonomousDatabaseBackup::default()/* use setters */,
22030 /// AutonomousDatabaseBackup::default()/* use (different) setters */,
22031 /// ]);
22032 /// ```
22033 pub fn set_autonomous_database_backups<T, V>(mut self, v: T) -> Self
22034 where
22035 T: std::iter::IntoIterator<Item = V>,
22036 V: std::convert::Into<crate::model::AutonomousDatabaseBackup>,
22037 {
22038 use std::iter::Iterator;
22039 self.autonomous_database_backups = v.into_iter().map(|i| i.into()).collect();
22040 self
22041 }
22042
22043 /// Sets the value of [next_page_token][crate::model::ListAutonomousDatabaseBackupsResponse::next_page_token].
22044 ///
22045 /// # Example
22046 /// ```ignore,no_run
22047 /// # use google_cloud_oracledatabase_v1::model::ListAutonomousDatabaseBackupsResponse;
22048 /// let x = ListAutonomousDatabaseBackupsResponse::new().set_next_page_token("example");
22049 /// ```
22050 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22051 self.next_page_token = v.into();
22052 self
22053 }
22054}
22055
22056impl wkt::message::Message for ListAutonomousDatabaseBackupsResponse {
22057 fn typename() -> &'static str {
22058 "type.googleapis.com/google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsResponse"
22059 }
22060}
22061
22062#[doc(hidden)]
22063impl google_cloud_gax::paginator::internal::PageableResponse
22064 for ListAutonomousDatabaseBackupsResponse
22065{
22066 type PageItem = crate::model::AutonomousDatabaseBackup;
22067
22068 fn items(self) -> std::vec::Vec<Self::PageItem> {
22069 self.autonomous_database_backups
22070 }
22071
22072 fn next_page_token(&self) -> std::string::String {
22073 use std::clone::Clone;
22074 self.next_page_token.clone()
22075 }
22076}
22077
22078/// The request for `ExadbVmCluster.Create`.
22079#[derive(Clone, Default, PartialEq)]
22080#[non_exhaustive]
22081pub struct CreateExadbVmClusterRequest {
22082 /// Required. The value for parent of the ExadbVmCluster in the following
22083 /// format: projects/{project}/locations/{location}.
22084 pub parent: std::string::String,
22085
22086 /// Required. The ID of the ExadbVmCluster to create. This value is
22087 /// restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of
22088 /// 63 characters in length. The value must start with a letter and end with a
22089 /// letter or a number.
22090 pub exadb_vm_cluster_id: std::string::String,
22091
22092 /// Required. The resource being created.
22093 pub exadb_vm_cluster: std::option::Option<crate::model::ExadbVmCluster>,
22094
22095 /// Optional. An optional request ID to identify requests. Specify a unique
22096 /// request ID so that if you must retry your request, the server will know to
22097 /// ignore the request if it has already been completed. The server will
22098 /// guarantee that for at least 60 minutes since the first request.
22099 ///
22100 /// For example, consider a situation where you make an initial request and the
22101 /// request times out. If you make the request again with the same request
22102 /// ID, the server can check if original operation with the same request ID
22103 /// was received, and if so, will ignore the second request. This prevents
22104 /// clients from accidentally creating duplicate commitments.
22105 ///
22106 /// The request ID must be a valid UUID with the exception that zero UUID is
22107 /// not supported (00000000-0000-0000-0000-000000000000).
22108 pub request_id: std::string::String,
22109
22110 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22111}
22112
22113impl CreateExadbVmClusterRequest {
22114 pub fn new() -> Self {
22115 std::default::Default::default()
22116 }
22117
22118 /// Sets the value of [parent][crate::model::CreateExadbVmClusterRequest::parent].
22119 ///
22120 /// # Example
22121 /// ```ignore,no_run
22122 /// # use google_cloud_oracledatabase_v1::model::CreateExadbVmClusterRequest;
22123 /// let x = CreateExadbVmClusterRequest::new().set_parent("example");
22124 /// ```
22125 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22126 self.parent = v.into();
22127 self
22128 }
22129
22130 /// Sets the value of [exadb_vm_cluster_id][crate::model::CreateExadbVmClusterRequest::exadb_vm_cluster_id].
22131 ///
22132 /// # Example
22133 /// ```ignore,no_run
22134 /// # use google_cloud_oracledatabase_v1::model::CreateExadbVmClusterRequest;
22135 /// let x = CreateExadbVmClusterRequest::new().set_exadb_vm_cluster_id("example");
22136 /// ```
22137 pub fn set_exadb_vm_cluster_id<T: std::convert::Into<std::string::String>>(
22138 mut self,
22139 v: T,
22140 ) -> Self {
22141 self.exadb_vm_cluster_id = v.into();
22142 self
22143 }
22144
22145 /// Sets the value of [exadb_vm_cluster][crate::model::CreateExadbVmClusterRequest::exadb_vm_cluster].
22146 ///
22147 /// # Example
22148 /// ```ignore,no_run
22149 /// # use google_cloud_oracledatabase_v1::model::CreateExadbVmClusterRequest;
22150 /// use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
22151 /// let x = CreateExadbVmClusterRequest::new().set_exadb_vm_cluster(ExadbVmCluster::default()/* use setters */);
22152 /// ```
22153 pub fn set_exadb_vm_cluster<T>(mut self, v: T) -> Self
22154 where
22155 T: std::convert::Into<crate::model::ExadbVmCluster>,
22156 {
22157 self.exadb_vm_cluster = std::option::Option::Some(v.into());
22158 self
22159 }
22160
22161 /// Sets or clears the value of [exadb_vm_cluster][crate::model::CreateExadbVmClusterRequest::exadb_vm_cluster].
22162 ///
22163 /// # Example
22164 /// ```ignore,no_run
22165 /// # use google_cloud_oracledatabase_v1::model::CreateExadbVmClusterRequest;
22166 /// use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
22167 /// let x = CreateExadbVmClusterRequest::new().set_or_clear_exadb_vm_cluster(Some(ExadbVmCluster::default()/* use setters */));
22168 /// let x = CreateExadbVmClusterRequest::new().set_or_clear_exadb_vm_cluster(None::<ExadbVmCluster>);
22169 /// ```
22170 pub fn set_or_clear_exadb_vm_cluster<T>(mut self, v: std::option::Option<T>) -> Self
22171 where
22172 T: std::convert::Into<crate::model::ExadbVmCluster>,
22173 {
22174 self.exadb_vm_cluster = v.map(|x| x.into());
22175 self
22176 }
22177
22178 /// Sets the value of [request_id][crate::model::CreateExadbVmClusterRequest::request_id].
22179 ///
22180 /// # Example
22181 /// ```ignore,no_run
22182 /// # use google_cloud_oracledatabase_v1::model::CreateExadbVmClusterRequest;
22183 /// let x = CreateExadbVmClusterRequest::new().set_request_id("example");
22184 /// ```
22185 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22186 self.request_id = v.into();
22187 self
22188 }
22189}
22190
22191impl wkt::message::Message for CreateExadbVmClusterRequest {
22192 fn typename() -> &'static str {
22193 "type.googleapis.com/google.cloud.oracledatabase.v1.CreateExadbVmClusterRequest"
22194 }
22195}
22196
22197/// The request for `ExadbVmCluster.Delete`.
22198#[derive(Clone, Default, PartialEq)]
22199#[non_exhaustive]
22200pub struct DeleteExadbVmClusterRequest {
22201 /// Required. The name of the ExadbVmCluster in the following format:
22202 /// projects/{project}/locations/{location}/exadbVmClusters/{exadb_vm_cluster}.
22203 pub name: std::string::String,
22204
22205 /// Optional. An optional ID to identify the request. This value is used to
22206 /// identify duplicate requests. If you make a request with the same request ID
22207 /// and the original request is still in progress or completed, the server
22208 /// ignores the second request. This prevents clients from
22209 /// accidentally creating duplicate commitments.
22210 ///
22211 /// The request ID must be a valid UUID with the exception that zero UUID is
22212 /// not supported (00000000-0000-0000-0000-000000000000).
22213 pub request_id: std::string::String,
22214
22215 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22216}
22217
22218impl DeleteExadbVmClusterRequest {
22219 pub fn new() -> Self {
22220 std::default::Default::default()
22221 }
22222
22223 /// Sets the value of [name][crate::model::DeleteExadbVmClusterRequest::name].
22224 ///
22225 /// # Example
22226 /// ```ignore,no_run
22227 /// # use google_cloud_oracledatabase_v1::model::DeleteExadbVmClusterRequest;
22228 /// let x = DeleteExadbVmClusterRequest::new().set_name("example");
22229 /// ```
22230 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22231 self.name = v.into();
22232 self
22233 }
22234
22235 /// Sets the value of [request_id][crate::model::DeleteExadbVmClusterRequest::request_id].
22236 ///
22237 /// # Example
22238 /// ```ignore,no_run
22239 /// # use google_cloud_oracledatabase_v1::model::DeleteExadbVmClusterRequest;
22240 /// let x = DeleteExadbVmClusterRequest::new().set_request_id("example");
22241 /// ```
22242 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22243 self.request_id = v.into();
22244 self
22245 }
22246}
22247
22248impl wkt::message::Message for DeleteExadbVmClusterRequest {
22249 fn typename() -> &'static str {
22250 "type.googleapis.com/google.cloud.oracledatabase.v1.DeleteExadbVmClusterRequest"
22251 }
22252}
22253
22254/// The request for `ExadbVmCluster.Get`.
22255#[derive(Clone, Default, PartialEq)]
22256#[non_exhaustive]
22257pub struct GetExadbVmClusterRequest {
22258 /// Required. The name of the ExadbVmCluster in the following format:
22259 /// projects/{project}/locations/{location}/exadbVmClusters/{exadb_vm_cluster}.
22260 pub name: std::string::String,
22261
22262 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22263}
22264
22265impl GetExadbVmClusterRequest {
22266 pub fn new() -> Self {
22267 std::default::Default::default()
22268 }
22269
22270 /// Sets the value of [name][crate::model::GetExadbVmClusterRequest::name].
22271 ///
22272 /// # Example
22273 /// ```ignore,no_run
22274 /// # use google_cloud_oracledatabase_v1::model::GetExadbVmClusterRequest;
22275 /// let x = GetExadbVmClusterRequest::new().set_name("example");
22276 /// ```
22277 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22278 self.name = v.into();
22279 self
22280 }
22281}
22282
22283impl wkt::message::Message for GetExadbVmClusterRequest {
22284 fn typename() -> &'static str {
22285 "type.googleapis.com/google.cloud.oracledatabase.v1.GetExadbVmClusterRequest"
22286 }
22287}
22288
22289/// The request for `ExadbVmCluster.List`.
22290#[derive(Clone, Default, PartialEq)]
22291#[non_exhaustive]
22292pub struct ListExadbVmClustersRequest {
22293 /// Required. The parent value for ExadbVmClusters in the following format:
22294 /// projects/{project}/locations/{location}.
22295 pub parent: std::string::String,
22296
22297 /// Optional. The maximum number of items to return.
22298 /// If unspecified, at most 50 ExadbVmClusters will be returned.
22299 /// The maximum value is 1000; values above 1000 will be coerced to 1000.
22300 pub page_size: i32,
22301
22302 /// Optional. A token identifying a page of results the server should return.
22303 pub page_token: std::string::String,
22304
22305 /// Optional. An expression for filtering the results of the request.
22306 pub filter: std::string::String,
22307
22308 /// Optional. An expression for ordering the results of the request.
22309 pub order_by: std::string::String,
22310
22311 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22312}
22313
22314impl ListExadbVmClustersRequest {
22315 pub fn new() -> Self {
22316 std::default::Default::default()
22317 }
22318
22319 /// Sets the value of [parent][crate::model::ListExadbVmClustersRequest::parent].
22320 ///
22321 /// # Example
22322 /// ```ignore,no_run
22323 /// # use google_cloud_oracledatabase_v1::model::ListExadbVmClustersRequest;
22324 /// let x = ListExadbVmClustersRequest::new().set_parent("example");
22325 /// ```
22326 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22327 self.parent = v.into();
22328 self
22329 }
22330
22331 /// Sets the value of [page_size][crate::model::ListExadbVmClustersRequest::page_size].
22332 ///
22333 /// # Example
22334 /// ```ignore,no_run
22335 /// # use google_cloud_oracledatabase_v1::model::ListExadbVmClustersRequest;
22336 /// let x = ListExadbVmClustersRequest::new().set_page_size(42);
22337 /// ```
22338 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
22339 self.page_size = v.into();
22340 self
22341 }
22342
22343 /// Sets the value of [page_token][crate::model::ListExadbVmClustersRequest::page_token].
22344 ///
22345 /// # Example
22346 /// ```ignore,no_run
22347 /// # use google_cloud_oracledatabase_v1::model::ListExadbVmClustersRequest;
22348 /// let x = ListExadbVmClustersRequest::new().set_page_token("example");
22349 /// ```
22350 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22351 self.page_token = v.into();
22352 self
22353 }
22354
22355 /// Sets the value of [filter][crate::model::ListExadbVmClustersRequest::filter].
22356 ///
22357 /// # Example
22358 /// ```ignore,no_run
22359 /// # use google_cloud_oracledatabase_v1::model::ListExadbVmClustersRequest;
22360 /// let x = ListExadbVmClustersRequest::new().set_filter("example");
22361 /// ```
22362 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22363 self.filter = v.into();
22364 self
22365 }
22366
22367 /// Sets the value of [order_by][crate::model::ListExadbVmClustersRequest::order_by].
22368 ///
22369 /// # Example
22370 /// ```ignore,no_run
22371 /// # use google_cloud_oracledatabase_v1::model::ListExadbVmClustersRequest;
22372 /// let x = ListExadbVmClustersRequest::new().set_order_by("example");
22373 /// ```
22374 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22375 self.order_by = v.into();
22376 self
22377 }
22378}
22379
22380impl wkt::message::Message for ListExadbVmClustersRequest {
22381 fn typename() -> &'static str {
22382 "type.googleapis.com/google.cloud.oracledatabase.v1.ListExadbVmClustersRequest"
22383 }
22384}
22385
22386/// The response for `ExadbVmCluster.List`.
22387#[derive(Clone, Default, PartialEq)]
22388#[non_exhaustive]
22389pub struct ListExadbVmClustersResponse {
22390 /// The list of ExadbVmClusters.
22391 pub exadb_vm_clusters: std::vec::Vec<crate::model::ExadbVmCluster>,
22392
22393 /// A token identifying a page of results the server should return.
22394 pub next_page_token: std::string::String,
22395
22396 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22397}
22398
22399impl ListExadbVmClustersResponse {
22400 pub fn new() -> Self {
22401 std::default::Default::default()
22402 }
22403
22404 /// Sets the value of [exadb_vm_clusters][crate::model::ListExadbVmClustersResponse::exadb_vm_clusters].
22405 ///
22406 /// # Example
22407 /// ```ignore,no_run
22408 /// # use google_cloud_oracledatabase_v1::model::ListExadbVmClustersResponse;
22409 /// use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
22410 /// let x = ListExadbVmClustersResponse::new()
22411 /// .set_exadb_vm_clusters([
22412 /// ExadbVmCluster::default()/* use setters */,
22413 /// ExadbVmCluster::default()/* use (different) setters */,
22414 /// ]);
22415 /// ```
22416 pub fn set_exadb_vm_clusters<T, V>(mut self, v: T) -> Self
22417 where
22418 T: std::iter::IntoIterator<Item = V>,
22419 V: std::convert::Into<crate::model::ExadbVmCluster>,
22420 {
22421 use std::iter::Iterator;
22422 self.exadb_vm_clusters = v.into_iter().map(|i| i.into()).collect();
22423 self
22424 }
22425
22426 /// Sets the value of [next_page_token][crate::model::ListExadbVmClustersResponse::next_page_token].
22427 ///
22428 /// # Example
22429 /// ```ignore,no_run
22430 /// # use google_cloud_oracledatabase_v1::model::ListExadbVmClustersResponse;
22431 /// let x = ListExadbVmClustersResponse::new().set_next_page_token("example");
22432 /// ```
22433 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22434 self.next_page_token = v.into();
22435 self
22436 }
22437}
22438
22439impl wkt::message::Message for ListExadbVmClustersResponse {
22440 fn typename() -> &'static str {
22441 "type.googleapis.com/google.cloud.oracledatabase.v1.ListExadbVmClustersResponse"
22442 }
22443}
22444
22445#[doc(hidden)]
22446impl google_cloud_gax::paginator::internal::PageableResponse for ListExadbVmClustersResponse {
22447 type PageItem = crate::model::ExadbVmCluster;
22448
22449 fn items(self) -> std::vec::Vec<Self::PageItem> {
22450 self.exadb_vm_clusters
22451 }
22452
22453 fn next_page_token(&self) -> std::string::String {
22454 use std::clone::Clone;
22455 self.next_page_token.clone()
22456 }
22457}
22458
22459/// The request for `ExadbVmCluster.Update`. We only support adding the
22460/// Virtual Machine to the ExadbVmCluster. Rest of the fields in ExadbVmCluster
22461/// are immutable.
22462#[derive(Clone, Default, PartialEq)]
22463#[non_exhaustive]
22464pub struct UpdateExadbVmClusterRequest {
22465 /// Optional. A mask specifying which fields in th VM Cluster should be
22466 /// updated. A field specified in the mask is overwritten. If a mask isn't
22467 /// provided then all the fields in the VM Cluster are overwritten.
22468 pub update_mask: std::option::Option<wkt::FieldMask>,
22469
22470 /// Required. The resource being updated.
22471 pub exadb_vm_cluster: std::option::Option<crate::model::ExadbVmCluster>,
22472
22473 /// Optional. An optional ID to identify the request. This value is used to
22474 /// identify duplicate requests. If you make a request with the same request ID
22475 /// and the original request is still in progress or completed, the server
22476 /// ignores the second request. This prevents clients from
22477 /// accidentally creating duplicate commitments.
22478 ///
22479 /// The request ID must be a valid UUID with the exception that zero UUID is
22480 /// not supported (00000000-0000-0000-0000-000000000000).
22481 pub request_id: std::string::String,
22482
22483 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22484}
22485
22486impl UpdateExadbVmClusterRequest {
22487 pub fn new() -> Self {
22488 std::default::Default::default()
22489 }
22490
22491 /// Sets the value of [update_mask][crate::model::UpdateExadbVmClusterRequest::update_mask].
22492 ///
22493 /// # Example
22494 /// ```ignore,no_run
22495 /// # use google_cloud_oracledatabase_v1::model::UpdateExadbVmClusterRequest;
22496 /// use wkt::FieldMask;
22497 /// let x = UpdateExadbVmClusterRequest::new().set_update_mask(FieldMask::default()/* use setters */);
22498 /// ```
22499 pub fn set_update_mask<T>(mut self, v: T) -> Self
22500 where
22501 T: std::convert::Into<wkt::FieldMask>,
22502 {
22503 self.update_mask = std::option::Option::Some(v.into());
22504 self
22505 }
22506
22507 /// Sets or clears the value of [update_mask][crate::model::UpdateExadbVmClusterRequest::update_mask].
22508 ///
22509 /// # Example
22510 /// ```ignore,no_run
22511 /// # use google_cloud_oracledatabase_v1::model::UpdateExadbVmClusterRequest;
22512 /// use wkt::FieldMask;
22513 /// let x = UpdateExadbVmClusterRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
22514 /// let x = UpdateExadbVmClusterRequest::new().set_or_clear_update_mask(None::<FieldMask>);
22515 /// ```
22516 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
22517 where
22518 T: std::convert::Into<wkt::FieldMask>,
22519 {
22520 self.update_mask = v.map(|x| x.into());
22521 self
22522 }
22523
22524 /// Sets the value of [exadb_vm_cluster][crate::model::UpdateExadbVmClusterRequest::exadb_vm_cluster].
22525 ///
22526 /// # Example
22527 /// ```ignore,no_run
22528 /// # use google_cloud_oracledatabase_v1::model::UpdateExadbVmClusterRequest;
22529 /// use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
22530 /// let x = UpdateExadbVmClusterRequest::new().set_exadb_vm_cluster(ExadbVmCluster::default()/* use setters */);
22531 /// ```
22532 pub fn set_exadb_vm_cluster<T>(mut self, v: T) -> Self
22533 where
22534 T: std::convert::Into<crate::model::ExadbVmCluster>,
22535 {
22536 self.exadb_vm_cluster = std::option::Option::Some(v.into());
22537 self
22538 }
22539
22540 /// Sets or clears the value of [exadb_vm_cluster][crate::model::UpdateExadbVmClusterRequest::exadb_vm_cluster].
22541 ///
22542 /// # Example
22543 /// ```ignore,no_run
22544 /// # use google_cloud_oracledatabase_v1::model::UpdateExadbVmClusterRequest;
22545 /// use google_cloud_oracledatabase_v1::model::ExadbVmCluster;
22546 /// let x = UpdateExadbVmClusterRequest::new().set_or_clear_exadb_vm_cluster(Some(ExadbVmCluster::default()/* use setters */));
22547 /// let x = UpdateExadbVmClusterRequest::new().set_or_clear_exadb_vm_cluster(None::<ExadbVmCluster>);
22548 /// ```
22549 pub fn set_or_clear_exadb_vm_cluster<T>(mut self, v: std::option::Option<T>) -> Self
22550 where
22551 T: std::convert::Into<crate::model::ExadbVmCluster>,
22552 {
22553 self.exadb_vm_cluster = v.map(|x| x.into());
22554 self
22555 }
22556
22557 /// Sets the value of [request_id][crate::model::UpdateExadbVmClusterRequest::request_id].
22558 ///
22559 /// # Example
22560 /// ```ignore,no_run
22561 /// # use google_cloud_oracledatabase_v1::model::UpdateExadbVmClusterRequest;
22562 /// let x = UpdateExadbVmClusterRequest::new().set_request_id("example");
22563 /// ```
22564 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22565 self.request_id = v.into();
22566 self
22567 }
22568}
22569
22570impl wkt::message::Message for UpdateExadbVmClusterRequest {
22571 fn typename() -> &'static str {
22572 "type.googleapis.com/google.cloud.oracledatabase.v1.UpdateExadbVmClusterRequest"
22573 }
22574}
22575
22576/// The request for `ExadbVmCluster.RemoveVirtualMachine`.
22577#[derive(Clone, Default, PartialEq)]
22578#[non_exhaustive]
22579pub struct RemoveVirtualMachineExadbVmClusterRequest {
22580 /// Required. The name of the ExadbVmCluster in the following format:
22581 /// projects/{project}/locations/{location}/exadbVmClusters/{exadb_vm_cluster}.
22582 pub name: std::string::String,
22583
22584 /// Optional. An optional ID to identify the request. This value is used to
22585 /// identify duplicate requests. If you make a request with the same request ID
22586 /// and the original request is still in progress or completed, the server
22587 /// ignores the second request. This prevents clients from
22588 /// accidentally creating duplicate commitments.
22589 ///
22590 /// The request ID must be a valid UUID with the exception that zero UUID is
22591 /// not supported (00000000-0000-0000-0000-000000000000).
22592 pub request_id: std::string::String,
22593
22594 /// Required. The list of host names of db nodes to be removed from the
22595 /// ExadbVmCluster.
22596 pub hostnames: std::vec::Vec<std::string::String>,
22597
22598 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22599}
22600
22601impl RemoveVirtualMachineExadbVmClusterRequest {
22602 pub fn new() -> Self {
22603 std::default::Default::default()
22604 }
22605
22606 /// Sets the value of [name][crate::model::RemoveVirtualMachineExadbVmClusterRequest::name].
22607 ///
22608 /// # Example
22609 /// ```ignore,no_run
22610 /// # use google_cloud_oracledatabase_v1::model::RemoveVirtualMachineExadbVmClusterRequest;
22611 /// let x = RemoveVirtualMachineExadbVmClusterRequest::new().set_name("example");
22612 /// ```
22613 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22614 self.name = v.into();
22615 self
22616 }
22617
22618 /// Sets the value of [request_id][crate::model::RemoveVirtualMachineExadbVmClusterRequest::request_id].
22619 ///
22620 /// # Example
22621 /// ```ignore,no_run
22622 /// # use google_cloud_oracledatabase_v1::model::RemoveVirtualMachineExadbVmClusterRequest;
22623 /// let x = RemoveVirtualMachineExadbVmClusterRequest::new().set_request_id("example");
22624 /// ```
22625 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22626 self.request_id = v.into();
22627 self
22628 }
22629
22630 /// Sets the value of [hostnames][crate::model::RemoveVirtualMachineExadbVmClusterRequest::hostnames].
22631 ///
22632 /// # Example
22633 /// ```ignore,no_run
22634 /// # use google_cloud_oracledatabase_v1::model::RemoveVirtualMachineExadbVmClusterRequest;
22635 /// let x = RemoveVirtualMachineExadbVmClusterRequest::new().set_hostnames(["a", "b", "c"]);
22636 /// ```
22637 pub fn set_hostnames<T, V>(mut self, v: T) -> Self
22638 where
22639 T: std::iter::IntoIterator<Item = V>,
22640 V: std::convert::Into<std::string::String>,
22641 {
22642 use std::iter::Iterator;
22643 self.hostnames = v.into_iter().map(|i| i.into()).collect();
22644 self
22645 }
22646}
22647
22648impl wkt::message::Message for RemoveVirtualMachineExadbVmClusterRequest {
22649 fn typename() -> &'static str {
22650 "type.googleapis.com/google.cloud.oracledatabase.v1.RemoveVirtualMachineExadbVmClusterRequest"
22651 }
22652}
22653
22654/// The PluggableDatabase resource.
22655/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/PluggableDatabase/>
22656#[derive(Clone, Default, PartialEq)]
22657#[non_exhaustive]
22658pub struct PluggableDatabase {
22659 /// Identifier. The name of the PluggableDatabase resource in the following
22660 /// format:
22661 /// projects/{project}/locations/{region}/pluggableDatabases/{pluggable_database}
22662 pub name: std::string::String,
22663
22664 /// Optional. The properties of the PluggableDatabase.
22665 pub properties: std::option::Option<crate::model::PluggableDatabaseProperties>,
22666
22667 /// Output only. HTTPS link to OCI resources exposed to Customer via UI
22668 /// Interface.
22669 pub oci_url: std::string::String,
22670
22671 /// Output only. The date and time that the PluggableDatabase was created.
22672 pub create_time: std::option::Option<wkt::Timestamp>,
22673
22674 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22675}
22676
22677impl PluggableDatabase {
22678 pub fn new() -> Self {
22679 std::default::Default::default()
22680 }
22681
22682 /// Sets the value of [name][crate::model::PluggableDatabase::name].
22683 ///
22684 /// # Example
22685 /// ```ignore,no_run
22686 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabase;
22687 /// let x = PluggableDatabase::new().set_name("example");
22688 /// ```
22689 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22690 self.name = v.into();
22691 self
22692 }
22693
22694 /// Sets the value of [properties][crate::model::PluggableDatabase::properties].
22695 ///
22696 /// # Example
22697 /// ```ignore,no_run
22698 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabase;
22699 /// use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22700 /// let x = PluggableDatabase::new().set_properties(PluggableDatabaseProperties::default()/* use setters */);
22701 /// ```
22702 pub fn set_properties<T>(mut self, v: T) -> Self
22703 where
22704 T: std::convert::Into<crate::model::PluggableDatabaseProperties>,
22705 {
22706 self.properties = std::option::Option::Some(v.into());
22707 self
22708 }
22709
22710 /// Sets or clears the value of [properties][crate::model::PluggableDatabase::properties].
22711 ///
22712 /// # Example
22713 /// ```ignore,no_run
22714 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabase;
22715 /// use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22716 /// let x = PluggableDatabase::new().set_or_clear_properties(Some(PluggableDatabaseProperties::default()/* use setters */));
22717 /// let x = PluggableDatabase::new().set_or_clear_properties(None::<PluggableDatabaseProperties>);
22718 /// ```
22719 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
22720 where
22721 T: std::convert::Into<crate::model::PluggableDatabaseProperties>,
22722 {
22723 self.properties = v.map(|x| x.into());
22724 self
22725 }
22726
22727 /// Sets the value of [oci_url][crate::model::PluggableDatabase::oci_url].
22728 ///
22729 /// # Example
22730 /// ```ignore,no_run
22731 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabase;
22732 /// let x = PluggableDatabase::new().set_oci_url("example");
22733 /// ```
22734 pub fn set_oci_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22735 self.oci_url = v.into();
22736 self
22737 }
22738
22739 /// Sets the value of [create_time][crate::model::PluggableDatabase::create_time].
22740 ///
22741 /// # Example
22742 /// ```ignore,no_run
22743 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabase;
22744 /// use wkt::Timestamp;
22745 /// let x = PluggableDatabase::new().set_create_time(Timestamp::default()/* use setters */);
22746 /// ```
22747 pub fn set_create_time<T>(mut self, v: T) -> Self
22748 where
22749 T: std::convert::Into<wkt::Timestamp>,
22750 {
22751 self.create_time = std::option::Option::Some(v.into());
22752 self
22753 }
22754
22755 /// Sets or clears the value of [create_time][crate::model::PluggableDatabase::create_time].
22756 ///
22757 /// # Example
22758 /// ```ignore,no_run
22759 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabase;
22760 /// use wkt::Timestamp;
22761 /// let x = PluggableDatabase::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
22762 /// let x = PluggableDatabase::new().set_or_clear_create_time(None::<Timestamp>);
22763 /// ```
22764 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
22765 where
22766 T: std::convert::Into<wkt::Timestamp>,
22767 {
22768 self.create_time = v.map(|x| x.into());
22769 self
22770 }
22771}
22772
22773impl wkt::message::Message for PluggableDatabase {
22774 fn typename() -> &'static str {
22775 "type.googleapis.com/google.cloud.oracledatabase.v1.PluggableDatabase"
22776 }
22777}
22778
22779/// The properties of a PluggableDatabase.
22780#[derive(Clone, Default, PartialEq)]
22781#[non_exhaustive]
22782pub struct PluggableDatabaseProperties {
22783 /// Required. The OCID of the compartment.
22784 pub compartment_id: std::string::String,
22785
22786 /// Optional. The Connection strings used to connect to the Oracle Database.
22787 pub connection_strings: std::option::Option<crate::model::PluggableDatabaseConnectionStrings>,
22788
22789 /// Required. The OCID of the CDB.
22790 pub container_database_ocid: std::string::String,
22791
22792 /// Optional. Defined tags for this resource. Each key is predefined and scoped
22793 /// to a namespace.
22794 pub defined_tags: std::collections::HashMap<
22795 std::string::String,
22796 crate::model::pluggable_database_properties::DefinedTagValue,
22797 >,
22798
22799 /// Optional. Free-form tags for this resource. Each tag is a simple key-value
22800 /// pair with no predefined name, type, or namespace.
22801 pub freeform_tags: std::collections::HashMap<std::string::String, std::string::String>,
22802
22803 /// Output only. The OCID of the pluggable database.
22804 pub ocid: std::string::String,
22805
22806 /// Optional. The restricted mode of the pluggable database. If a pluggable
22807 /// database is opened in restricted mode, the user needs both create a session
22808 /// and have restricted session privileges to connect to it.
22809 pub is_restricted: bool,
22810
22811 /// Output only. Additional information about the current lifecycle state.
22812 pub lifecycle_details: std::string::String,
22813
22814 /// Output only. The current state of the pluggable database.
22815 pub lifecycle_state:
22816 crate::model::pluggable_database_properties::PluggableDatabaseLifecycleState,
22817
22818 /// Required. The database name.
22819 pub pdb_name: std::string::String,
22820
22821 /// Optional. Pluggable Database Node Level Details
22822 pub pdb_node_level_details: std::vec::Vec<crate::model::PluggableDatabaseNodeLevelDetails>,
22823
22824 /// Output only. The configuration of the Database Management service.
22825 pub database_management_config: std::option::Option<crate::model::DatabaseManagementConfig>,
22826
22827 /// Output only. The status of Operations Insights for this Database.
22828 pub operations_insights_state:
22829 crate::model::pluggable_database_properties::OperationsInsightsState,
22830
22831 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22832}
22833
22834impl PluggableDatabaseProperties {
22835 pub fn new() -> Self {
22836 std::default::Default::default()
22837 }
22838
22839 /// Sets the value of [compartment_id][crate::model::PluggableDatabaseProperties::compartment_id].
22840 ///
22841 /// # Example
22842 /// ```ignore,no_run
22843 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22844 /// let x = PluggableDatabaseProperties::new().set_compartment_id("example");
22845 /// ```
22846 pub fn set_compartment_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22847 self.compartment_id = v.into();
22848 self
22849 }
22850
22851 /// Sets the value of [connection_strings][crate::model::PluggableDatabaseProperties::connection_strings].
22852 ///
22853 /// # Example
22854 /// ```ignore,no_run
22855 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22856 /// use google_cloud_oracledatabase_v1::model::PluggableDatabaseConnectionStrings;
22857 /// let x = PluggableDatabaseProperties::new().set_connection_strings(PluggableDatabaseConnectionStrings::default()/* use setters */);
22858 /// ```
22859 pub fn set_connection_strings<T>(mut self, v: T) -> Self
22860 where
22861 T: std::convert::Into<crate::model::PluggableDatabaseConnectionStrings>,
22862 {
22863 self.connection_strings = std::option::Option::Some(v.into());
22864 self
22865 }
22866
22867 /// Sets or clears the value of [connection_strings][crate::model::PluggableDatabaseProperties::connection_strings].
22868 ///
22869 /// # Example
22870 /// ```ignore,no_run
22871 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22872 /// use google_cloud_oracledatabase_v1::model::PluggableDatabaseConnectionStrings;
22873 /// let x = PluggableDatabaseProperties::new().set_or_clear_connection_strings(Some(PluggableDatabaseConnectionStrings::default()/* use setters */));
22874 /// let x = PluggableDatabaseProperties::new().set_or_clear_connection_strings(None::<PluggableDatabaseConnectionStrings>);
22875 /// ```
22876 pub fn set_or_clear_connection_strings<T>(mut self, v: std::option::Option<T>) -> Self
22877 where
22878 T: std::convert::Into<crate::model::PluggableDatabaseConnectionStrings>,
22879 {
22880 self.connection_strings = v.map(|x| x.into());
22881 self
22882 }
22883
22884 /// Sets the value of [container_database_ocid][crate::model::PluggableDatabaseProperties::container_database_ocid].
22885 ///
22886 /// # Example
22887 /// ```ignore,no_run
22888 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22889 /// let x = PluggableDatabaseProperties::new().set_container_database_ocid("example");
22890 /// ```
22891 pub fn set_container_database_ocid<T: std::convert::Into<std::string::String>>(
22892 mut self,
22893 v: T,
22894 ) -> Self {
22895 self.container_database_ocid = v.into();
22896 self
22897 }
22898
22899 /// Sets the value of [defined_tags][crate::model::PluggableDatabaseProperties::defined_tags].
22900 ///
22901 /// # Example
22902 /// ```ignore,no_run
22903 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22904 /// use google_cloud_oracledatabase_v1::model::pluggable_database_properties::DefinedTagValue;
22905 /// let x = PluggableDatabaseProperties::new().set_defined_tags([
22906 /// ("key0", DefinedTagValue::default()/* use setters */),
22907 /// ("key1", DefinedTagValue::default()/* use (different) setters */),
22908 /// ]);
22909 /// ```
22910 pub fn set_defined_tags<T, K, V>(mut self, v: T) -> Self
22911 where
22912 T: std::iter::IntoIterator<Item = (K, V)>,
22913 K: std::convert::Into<std::string::String>,
22914 V: std::convert::Into<crate::model::pluggable_database_properties::DefinedTagValue>,
22915 {
22916 use std::iter::Iterator;
22917 self.defined_tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
22918 self
22919 }
22920
22921 /// Sets the value of [freeform_tags][crate::model::PluggableDatabaseProperties::freeform_tags].
22922 ///
22923 /// # Example
22924 /// ```ignore,no_run
22925 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22926 /// let x = PluggableDatabaseProperties::new().set_freeform_tags([
22927 /// ("key0", "abc"),
22928 /// ("key1", "xyz"),
22929 /// ]);
22930 /// ```
22931 pub fn set_freeform_tags<T, K, V>(mut self, v: T) -> Self
22932 where
22933 T: std::iter::IntoIterator<Item = (K, V)>,
22934 K: std::convert::Into<std::string::String>,
22935 V: std::convert::Into<std::string::String>,
22936 {
22937 use std::iter::Iterator;
22938 self.freeform_tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
22939 self
22940 }
22941
22942 /// Sets the value of [ocid][crate::model::PluggableDatabaseProperties::ocid].
22943 ///
22944 /// # Example
22945 /// ```ignore,no_run
22946 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22947 /// let x = PluggableDatabaseProperties::new().set_ocid("example");
22948 /// ```
22949 pub fn set_ocid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22950 self.ocid = v.into();
22951 self
22952 }
22953
22954 /// Sets the value of [is_restricted][crate::model::PluggableDatabaseProperties::is_restricted].
22955 ///
22956 /// # Example
22957 /// ```ignore,no_run
22958 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22959 /// let x = PluggableDatabaseProperties::new().set_is_restricted(true);
22960 /// ```
22961 pub fn set_is_restricted<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22962 self.is_restricted = v.into();
22963 self
22964 }
22965
22966 /// Sets the value of [lifecycle_details][crate::model::PluggableDatabaseProperties::lifecycle_details].
22967 ///
22968 /// # Example
22969 /// ```ignore,no_run
22970 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22971 /// let x = PluggableDatabaseProperties::new().set_lifecycle_details("example");
22972 /// ```
22973 pub fn set_lifecycle_details<T: std::convert::Into<std::string::String>>(
22974 mut self,
22975 v: T,
22976 ) -> Self {
22977 self.lifecycle_details = v.into();
22978 self
22979 }
22980
22981 /// Sets the value of [lifecycle_state][crate::model::PluggableDatabaseProperties::lifecycle_state].
22982 ///
22983 /// # Example
22984 /// ```ignore,no_run
22985 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
22986 /// use google_cloud_oracledatabase_v1::model::pluggable_database_properties::PluggableDatabaseLifecycleState;
22987 /// let x0 = PluggableDatabaseProperties::new().set_lifecycle_state(PluggableDatabaseLifecycleState::Provisioning);
22988 /// let x1 = PluggableDatabaseProperties::new().set_lifecycle_state(PluggableDatabaseLifecycleState::Available);
22989 /// let x2 = PluggableDatabaseProperties::new().set_lifecycle_state(PluggableDatabaseLifecycleState::Terminating);
22990 /// ```
22991 pub fn set_lifecycle_state<
22992 T: std::convert::Into<
22993 crate::model::pluggable_database_properties::PluggableDatabaseLifecycleState,
22994 >,
22995 >(
22996 mut self,
22997 v: T,
22998 ) -> Self {
22999 self.lifecycle_state = v.into();
23000 self
23001 }
23002
23003 /// Sets the value of [pdb_name][crate::model::PluggableDatabaseProperties::pdb_name].
23004 ///
23005 /// # Example
23006 /// ```ignore,no_run
23007 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
23008 /// let x = PluggableDatabaseProperties::new().set_pdb_name("example");
23009 /// ```
23010 pub fn set_pdb_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23011 self.pdb_name = v.into();
23012 self
23013 }
23014
23015 /// Sets the value of [pdb_node_level_details][crate::model::PluggableDatabaseProperties::pdb_node_level_details].
23016 ///
23017 /// # Example
23018 /// ```ignore,no_run
23019 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
23020 /// use google_cloud_oracledatabase_v1::model::PluggableDatabaseNodeLevelDetails;
23021 /// let x = PluggableDatabaseProperties::new()
23022 /// .set_pdb_node_level_details([
23023 /// PluggableDatabaseNodeLevelDetails::default()/* use setters */,
23024 /// PluggableDatabaseNodeLevelDetails::default()/* use (different) setters */,
23025 /// ]);
23026 /// ```
23027 pub fn set_pdb_node_level_details<T, V>(mut self, v: T) -> Self
23028 where
23029 T: std::iter::IntoIterator<Item = V>,
23030 V: std::convert::Into<crate::model::PluggableDatabaseNodeLevelDetails>,
23031 {
23032 use std::iter::Iterator;
23033 self.pdb_node_level_details = v.into_iter().map(|i| i.into()).collect();
23034 self
23035 }
23036
23037 /// Sets the value of [database_management_config][crate::model::PluggableDatabaseProperties::database_management_config].
23038 ///
23039 /// # Example
23040 /// ```ignore,no_run
23041 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
23042 /// use google_cloud_oracledatabase_v1::model::DatabaseManagementConfig;
23043 /// let x = PluggableDatabaseProperties::new().set_database_management_config(DatabaseManagementConfig::default()/* use setters */);
23044 /// ```
23045 pub fn set_database_management_config<T>(mut self, v: T) -> Self
23046 where
23047 T: std::convert::Into<crate::model::DatabaseManagementConfig>,
23048 {
23049 self.database_management_config = std::option::Option::Some(v.into());
23050 self
23051 }
23052
23053 /// Sets or clears the value of [database_management_config][crate::model::PluggableDatabaseProperties::database_management_config].
23054 ///
23055 /// # Example
23056 /// ```ignore,no_run
23057 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
23058 /// use google_cloud_oracledatabase_v1::model::DatabaseManagementConfig;
23059 /// let x = PluggableDatabaseProperties::new().set_or_clear_database_management_config(Some(DatabaseManagementConfig::default()/* use setters */));
23060 /// let x = PluggableDatabaseProperties::new().set_or_clear_database_management_config(None::<DatabaseManagementConfig>);
23061 /// ```
23062 pub fn set_or_clear_database_management_config<T>(mut self, v: std::option::Option<T>) -> Self
23063 where
23064 T: std::convert::Into<crate::model::DatabaseManagementConfig>,
23065 {
23066 self.database_management_config = v.map(|x| x.into());
23067 self
23068 }
23069
23070 /// Sets the value of [operations_insights_state][crate::model::PluggableDatabaseProperties::operations_insights_state].
23071 ///
23072 /// # Example
23073 /// ```ignore,no_run
23074 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseProperties;
23075 /// use google_cloud_oracledatabase_v1::model::pluggable_database_properties::OperationsInsightsState;
23076 /// let x0 = PluggableDatabaseProperties::new().set_operations_insights_state(OperationsInsightsState::Enabling);
23077 /// let x1 = PluggableDatabaseProperties::new().set_operations_insights_state(OperationsInsightsState::Enabled);
23078 /// let x2 = PluggableDatabaseProperties::new().set_operations_insights_state(OperationsInsightsState::Disabling);
23079 /// ```
23080 pub fn set_operations_insights_state<
23081 T: std::convert::Into<crate::model::pluggable_database_properties::OperationsInsightsState>,
23082 >(
23083 mut self,
23084 v: T,
23085 ) -> Self {
23086 self.operations_insights_state = v.into();
23087 self
23088 }
23089}
23090
23091impl wkt::message::Message for PluggableDatabaseProperties {
23092 fn typename() -> &'static str {
23093 "type.googleapis.com/google.cloud.oracledatabase.v1.PluggableDatabaseProperties"
23094 }
23095}
23096
23097/// Defines additional types related to [PluggableDatabaseProperties].
23098pub mod pluggable_database_properties {
23099 #[allow(unused_imports)]
23100 use super::*;
23101
23102 /// Wrapper message for the value of a defined tag.
23103 #[derive(Clone, Default, PartialEq)]
23104 #[non_exhaustive]
23105 pub struct DefinedTagValue {
23106 /// The tags within the namespace.
23107 pub tags: std::collections::HashMap<std::string::String, std::string::String>,
23108
23109 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23110 }
23111
23112 impl DefinedTagValue {
23113 pub fn new() -> Self {
23114 std::default::Default::default()
23115 }
23116
23117 /// Sets the value of [tags][crate::model::pluggable_database_properties::DefinedTagValue::tags].
23118 ///
23119 /// # Example
23120 /// ```ignore,no_run
23121 /// # use google_cloud_oracledatabase_v1::model::pluggable_database_properties::DefinedTagValue;
23122 /// let x = DefinedTagValue::new().set_tags([
23123 /// ("key0", "abc"),
23124 /// ("key1", "xyz"),
23125 /// ]);
23126 /// ```
23127 pub fn set_tags<T, K, V>(mut self, v: T) -> Self
23128 where
23129 T: std::iter::IntoIterator<Item = (K, V)>,
23130 K: std::convert::Into<std::string::String>,
23131 V: std::convert::Into<std::string::String>,
23132 {
23133 use std::iter::Iterator;
23134 self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
23135 self
23136 }
23137 }
23138
23139 impl wkt::message::Message for DefinedTagValue {
23140 fn typename() -> &'static str {
23141 "type.googleapis.com/google.cloud.oracledatabase.v1.PluggableDatabaseProperties.DefinedTagValue"
23142 }
23143 }
23144
23145 /// The various lifecycle states of the PluggableDatabase.
23146 ///
23147 /// # Working with unknown values
23148 ///
23149 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23150 /// additional enum variants at any time. Adding new variants is not considered
23151 /// a breaking change. Applications should write their code in anticipation of:
23152 ///
23153 /// - New values appearing in future releases of the client library, **and**
23154 /// - New values received dynamically, without application changes.
23155 ///
23156 /// Please consult the [Working with enums] section in the user guide for some
23157 /// guidelines.
23158 ///
23159 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23160 #[derive(Clone, Debug, PartialEq)]
23161 #[non_exhaustive]
23162 pub enum PluggableDatabaseLifecycleState {
23163 /// The lifecycle state is unspecified.
23164 Unspecified,
23165 /// The pluggable database is provisioning.
23166 Provisioning,
23167 /// The pluggable database is available.
23168 Available,
23169 /// The pluggable database is terminating.
23170 Terminating,
23171 /// The pluggable database is terminated.
23172 Terminated,
23173 /// The pluggable database is updating.
23174 Updating,
23175 /// The pluggable database is in a failed state.
23176 Failed,
23177 /// The pluggable database is relocating.
23178 Relocating,
23179 /// The pluggable database is relocated.
23180 Relocated,
23181 /// The pluggable database is refreshing.
23182 Refreshing,
23183 /// The pluggable database is restoring.
23184 RestoreInProgress,
23185 /// The pluggable database restore failed.
23186 RestoreFailed,
23187 /// The pluggable database is backing up.
23188 BackupInProgress,
23189 /// The pluggable database is disabled.
23190 Disabled,
23191 /// If set, the enum was initialized with an unknown value.
23192 ///
23193 /// Applications can examine the value using [PluggableDatabaseLifecycleState::value] or
23194 /// [PluggableDatabaseLifecycleState::name].
23195 UnknownValue(pluggable_database_lifecycle_state::UnknownValue),
23196 }
23197
23198 #[doc(hidden)]
23199 pub mod pluggable_database_lifecycle_state {
23200 #[allow(unused_imports)]
23201 use super::*;
23202 #[derive(Clone, Debug, PartialEq)]
23203 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23204 }
23205
23206 impl PluggableDatabaseLifecycleState {
23207 /// Gets the enum value.
23208 ///
23209 /// Returns `None` if the enum contains an unknown value deserialized from
23210 /// the string representation of enums.
23211 pub fn value(&self) -> std::option::Option<i32> {
23212 match self {
23213 Self::Unspecified => std::option::Option::Some(0),
23214 Self::Provisioning => std::option::Option::Some(1),
23215 Self::Available => std::option::Option::Some(2),
23216 Self::Terminating => std::option::Option::Some(3),
23217 Self::Terminated => std::option::Option::Some(4),
23218 Self::Updating => std::option::Option::Some(5),
23219 Self::Failed => std::option::Option::Some(6),
23220 Self::Relocating => std::option::Option::Some(7),
23221 Self::Relocated => std::option::Option::Some(8),
23222 Self::Refreshing => std::option::Option::Some(9),
23223 Self::RestoreInProgress => std::option::Option::Some(10),
23224 Self::RestoreFailed => std::option::Option::Some(11),
23225 Self::BackupInProgress => std::option::Option::Some(12),
23226 Self::Disabled => std::option::Option::Some(13),
23227 Self::UnknownValue(u) => u.0.value(),
23228 }
23229 }
23230
23231 /// Gets the enum value as a string.
23232 ///
23233 /// Returns `None` if the enum contains an unknown value deserialized from
23234 /// the integer representation of enums.
23235 pub fn name(&self) -> std::option::Option<&str> {
23236 match self {
23237 Self::Unspecified => {
23238 std::option::Option::Some("PLUGGABLE_DATABASE_LIFECYCLE_STATE_UNSPECIFIED")
23239 }
23240 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
23241 Self::Available => std::option::Option::Some("AVAILABLE"),
23242 Self::Terminating => std::option::Option::Some("TERMINATING"),
23243 Self::Terminated => std::option::Option::Some("TERMINATED"),
23244 Self::Updating => std::option::Option::Some("UPDATING"),
23245 Self::Failed => std::option::Option::Some("FAILED"),
23246 Self::Relocating => std::option::Option::Some("RELOCATING"),
23247 Self::Relocated => std::option::Option::Some("RELOCATED"),
23248 Self::Refreshing => std::option::Option::Some("REFRESHING"),
23249 Self::RestoreInProgress => std::option::Option::Some("RESTORE_IN_PROGRESS"),
23250 Self::RestoreFailed => std::option::Option::Some("RESTORE_FAILED"),
23251 Self::BackupInProgress => std::option::Option::Some("BACKUP_IN_PROGRESS"),
23252 Self::Disabled => std::option::Option::Some("DISABLED"),
23253 Self::UnknownValue(u) => u.0.name(),
23254 }
23255 }
23256 }
23257
23258 impl std::default::Default for PluggableDatabaseLifecycleState {
23259 fn default() -> Self {
23260 use std::convert::From;
23261 Self::from(0)
23262 }
23263 }
23264
23265 impl std::fmt::Display for PluggableDatabaseLifecycleState {
23266 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23267 wkt::internal::display_enum(f, self.name(), self.value())
23268 }
23269 }
23270
23271 impl std::convert::From<i32> for PluggableDatabaseLifecycleState {
23272 fn from(value: i32) -> Self {
23273 match value {
23274 0 => Self::Unspecified,
23275 1 => Self::Provisioning,
23276 2 => Self::Available,
23277 3 => Self::Terminating,
23278 4 => Self::Terminated,
23279 5 => Self::Updating,
23280 6 => Self::Failed,
23281 7 => Self::Relocating,
23282 8 => Self::Relocated,
23283 9 => Self::Refreshing,
23284 10 => Self::RestoreInProgress,
23285 11 => Self::RestoreFailed,
23286 12 => Self::BackupInProgress,
23287 13 => Self::Disabled,
23288 _ => Self::UnknownValue(pluggable_database_lifecycle_state::UnknownValue(
23289 wkt::internal::UnknownEnumValue::Integer(value),
23290 )),
23291 }
23292 }
23293 }
23294
23295 impl std::convert::From<&str> for PluggableDatabaseLifecycleState {
23296 fn from(value: &str) -> Self {
23297 use std::string::ToString;
23298 match value {
23299 "PLUGGABLE_DATABASE_LIFECYCLE_STATE_UNSPECIFIED" => Self::Unspecified,
23300 "PROVISIONING" => Self::Provisioning,
23301 "AVAILABLE" => Self::Available,
23302 "TERMINATING" => Self::Terminating,
23303 "TERMINATED" => Self::Terminated,
23304 "UPDATING" => Self::Updating,
23305 "FAILED" => Self::Failed,
23306 "RELOCATING" => Self::Relocating,
23307 "RELOCATED" => Self::Relocated,
23308 "REFRESHING" => Self::Refreshing,
23309 "RESTORE_IN_PROGRESS" => Self::RestoreInProgress,
23310 "RESTORE_FAILED" => Self::RestoreFailed,
23311 "BACKUP_IN_PROGRESS" => Self::BackupInProgress,
23312 "DISABLED" => Self::Disabled,
23313 _ => Self::UnknownValue(pluggable_database_lifecycle_state::UnknownValue(
23314 wkt::internal::UnknownEnumValue::String(value.to_string()),
23315 )),
23316 }
23317 }
23318 }
23319
23320 impl serde::ser::Serialize for PluggableDatabaseLifecycleState {
23321 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23322 where
23323 S: serde::Serializer,
23324 {
23325 match self {
23326 Self::Unspecified => serializer.serialize_i32(0),
23327 Self::Provisioning => serializer.serialize_i32(1),
23328 Self::Available => serializer.serialize_i32(2),
23329 Self::Terminating => serializer.serialize_i32(3),
23330 Self::Terminated => serializer.serialize_i32(4),
23331 Self::Updating => serializer.serialize_i32(5),
23332 Self::Failed => serializer.serialize_i32(6),
23333 Self::Relocating => serializer.serialize_i32(7),
23334 Self::Relocated => serializer.serialize_i32(8),
23335 Self::Refreshing => serializer.serialize_i32(9),
23336 Self::RestoreInProgress => serializer.serialize_i32(10),
23337 Self::RestoreFailed => serializer.serialize_i32(11),
23338 Self::BackupInProgress => serializer.serialize_i32(12),
23339 Self::Disabled => serializer.serialize_i32(13),
23340 Self::UnknownValue(u) => u.0.serialize(serializer),
23341 }
23342 }
23343 }
23344
23345 impl<'de> serde::de::Deserialize<'de> for PluggableDatabaseLifecycleState {
23346 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23347 where
23348 D: serde::Deserializer<'de>,
23349 {
23350 deserializer.deserialize_any(wkt::internal::EnumVisitor::<PluggableDatabaseLifecycleState>::new(
23351 ".google.cloud.oracledatabase.v1.PluggableDatabaseProperties.PluggableDatabaseLifecycleState"))
23352 }
23353 }
23354
23355 /// The status of Operations Insights for this Database.
23356 ///
23357 /// # Working with unknown values
23358 ///
23359 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23360 /// additional enum variants at any time. Adding new variants is not considered
23361 /// a breaking change. Applications should write their code in anticipation of:
23362 ///
23363 /// - New values appearing in future releases of the client library, **and**
23364 /// - New values received dynamically, without application changes.
23365 ///
23366 /// Please consult the [Working with enums] section in the user guide for some
23367 /// guidelines.
23368 ///
23369 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23370 #[derive(Clone, Debug, PartialEq)]
23371 #[non_exhaustive]
23372 pub enum OperationsInsightsState {
23373 /// The status is not specified.
23374 Unspecified,
23375 /// Operations Insights is enabling.
23376 Enabling,
23377 /// Operations Insights is enabled.
23378 Enabled,
23379 /// Operations Insights is disabling.
23380 Disabling,
23381 /// Operations Insights is not enabled.
23382 NotEnabled,
23383 /// Operations Insights failed to enable.
23384 FailedEnabling,
23385 /// Operations Insights failed to disable.
23386 FailedDisabling,
23387 /// If set, the enum was initialized with an unknown value.
23388 ///
23389 /// Applications can examine the value using [OperationsInsightsState::value] or
23390 /// [OperationsInsightsState::name].
23391 UnknownValue(operations_insights_state::UnknownValue),
23392 }
23393
23394 #[doc(hidden)]
23395 pub mod operations_insights_state {
23396 #[allow(unused_imports)]
23397 use super::*;
23398 #[derive(Clone, Debug, PartialEq)]
23399 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23400 }
23401
23402 impl OperationsInsightsState {
23403 /// Gets the enum value.
23404 ///
23405 /// Returns `None` if the enum contains an unknown value deserialized from
23406 /// the string representation of enums.
23407 pub fn value(&self) -> std::option::Option<i32> {
23408 match self {
23409 Self::Unspecified => std::option::Option::Some(0),
23410 Self::Enabling => std::option::Option::Some(1),
23411 Self::Enabled => std::option::Option::Some(2),
23412 Self::Disabling => std::option::Option::Some(3),
23413 Self::NotEnabled => std::option::Option::Some(4),
23414 Self::FailedEnabling => std::option::Option::Some(5),
23415 Self::FailedDisabling => std::option::Option::Some(6),
23416 Self::UnknownValue(u) => u.0.value(),
23417 }
23418 }
23419
23420 /// Gets the enum value as a string.
23421 ///
23422 /// Returns `None` if the enum contains an unknown value deserialized from
23423 /// the integer representation of enums.
23424 pub fn name(&self) -> std::option::Option<&str> {
23425 match self {
23426 Self::Unspecified => {
23427 std::option::Option::Some("OPERATIONS_INSIGHTS_STATE_UNSPECIFIED")
23428 }
23429 Self::Enabling => std::option::Option::Some("ENABLING"),
23430 Self::Enabled => std::option::Option::Some("ENABLED"),
23431 Self::Disabling => std::option::Option::Some("DISABLING"),
23432 Self::NotEnabled => std::option::Option::Some("NOT_ENABLED"),
23433 Self::FailedEnabling => std::option::Option::Some("FAILED_ENABLING"),
23434 Self::FailedDisabling => std::option::Option::Some("FAILED_DISABLING"),
23435 Self::UnknownValue(u) => u.0.name(),
23436 }
23437 }
23438 }
23439
23440 impl std::default::Default for OperationsInsightsState {
23441 fn default() -> Self {
23442 use std::convert::From;
23443 Self::from(0)
23444 }
23445 }
23446
23447 impl std::fmt::Display for OperationsInsightsState {
23448 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23449 wkt::internal::display_enum(f, self.name(), self.value())
23450 }
23451 }
23452
23453 impl std::convert::From<i32> for OperationsInsightsState {
23454 fn from(value: i32) -> Self {
23455 match value {
23456 0 => Self::Unspecified,
23457 1 => Self::Enabling,
23458 2 => Self::Enabled,
23459 3 => Self::Disabling,
23460 4 => Self::NotEnabled,
23461 5 => Self::FailedEnabling,
23462 6 => Self::FailedDisabling,
23463 _ => Self::UnknownValue(operations_insights_state::UnknownValue(
23464 wkt::internal::UnknownEnumValue::Integer(value),
23465 )),
23466 }
23467 }
23468 }
23469
23470 impl std::convert::From<&str> for OperationsInsightsState {
23471 fn from(value: &str) -> Self {
23472 use std::string::ToString;
23473 match value {
23474 "OPERATIONS_INSIGHTS_STATE_UNSPECIFIED" => Self::Unspecified,
23475 "ENABLING" => Self::Enabling,
23476 "ENABLED" => Self::Enabled,
23477 "DISABLING" => Self::Disabling,
23478 "NOT_ENABLED" => Self::NotEnabled,
23479 "FAILED_ENABLING" => Self::FailedEnabling,
23480 "FAILED_DISABLING" => Self::FailedDisabling,
23481 _ => Self::UnknownValue(operations_insights_state::UnknownValue(
23482 wkt::internal::UnknownEnumValue::String(value.to_string()),
23483 )),
23484 }
23485 }
23486 }
23487
23488 impl serde::ser::Serialize for OperationsInsightsState {
23489 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23490 where
23491 S: serde::Serializer,
23492 {
23493 match self {
23494 Self::Unspecified => serializer.serialize_i32(0),
23495 Self::Enabling => serializer.serialize_i32(1),
23496 Self::Enabled => serializer.serialize_i32(2),
23497 Self::Disabling => serializer.serialize_i32(3),
23498 Self::NotEnabled => serializer.serialize_i32(4),
23499 Self::FailedEnabling => serializer.serialize_i32(5),
23500 Self::FailedDisabling => serializer.serialize_i32(6),
23501 Self::UnknownValue(u) => u.0.serialize(serializer),
23502 }
23503 }
23504 }
23505
23506 impl<'de> serde::de::Deserialize<'de> for OperationsInsightsState {
23507 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23508 where
23509 D: serde::Deserializer<'de>,
23510 {
23511 deserializer.deserialize_any(wkt::internal::EnumVisitor::<OperationsInsightsState>::new(
23512 ".google.cloud.oracledatabase.v1.PluggableDatabaseProperties.OperationsInsightsState"))
23513 }
23514 }
23515}
23516
23517/// The connection strings used to connect to the Oracle Database.
23518#[derive(Clone, Default, PartialEq)]
23519#[non_exhaustive]
23520pub struct PluggableDatabaseConnectionStrings {
23521 /// Optional. All connection strings to use to connect to the pluggable
23522 /// database.
23523 pub all_connection_strings: std::collections::HashMap<std::string::String, std::string::String>,
23524
23525 /// Optional. The default connection string to use to connect to the pluggable
23526 /// database.
23527 pub pdb_default: std::string::String,
23528
23529 /// Optional. The default connection string to use to connect to the pluggable
23530 /// database using IP.
23531 pub pdb_ip_default: std::string::String,
23532
23533 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23534}
23535
23536impl PluggableDatabaseConnectionStrings {
23537 pub fn new() -> Self {
23538 std::default::Default::default()
23539 }
23540
23541 /// Sets the value of [all_connection_strings][crate::model::PluggableDatabaseConnectionStrings::all_connection_strings].
23542 ///
23543 /// # Example
23544 /// ```ignore,no_run
23545 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseConnectionStrings;
23546 /// let x = PluggableDatabaseConnectionStrings::new().set_all_connection_strings([
23547 /// ("key0", "abc"),
23548 /// ("key1", "xyz"),
23549 /// ]);
23550 /// ```
23551 pub fn set_all_connection_strings<T, K, V>(mut self, v: T) -> Self
23552 where
23553 T: std::iter::IntoIterator<Item = (K, V)>,
23554 K: std::convert::Into<std::string::String>,
23555 V: std::convert::Into<std::string::String>,
23556 {
23557 use std::iter::Iterator;
23558 self.all_connection_strings = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
23559 self
23560 }
23561
23562 /// Sets the value of [pdb_default][crate::model::PluggableDatabaseConnectionStrings::pdb_default].
23563 ///
23564 /// # Example
23565 /// ```ignore,no_run
23566 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseConnectionStrings;
23567 /// let x = PluggableDatabaseConnectionStrings::new().set_pdb_default("example");
23568 /// ```
23569 pub fn set_pdb_default<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23570 self.pdb_default = v.into();
23571 self
23572 }
23573
23574 /// Sets the value of [pdb_ip_default][crate::model::PluggableDatabaseConnectionStrings::pdb_ip_default].
23575 ///
23576 /// # Example
23577 /// ```ignore,no_run
23578 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseConnectionStrings;
23579 /// let x = PluggableDatabaseConnectionStrings::new().set_pdb_ip_default("example");
23580 /// ```
23581 pub fn set_pdb_ip_default<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23582 self.pdb_ip_default = v.into();
23583 self
23584 }
23585}
23586
23587impl wkt::message::Message for PluggableDatabaseConnectionStrings {
23588 fn typename() -> &'static str {
23589 "type.googleapis.com/google.cloud.oracledatabase.v1.PluggableDatabaseConnectionStrings"
23590 }
23591}
23592
23593/// The Pluggable Database Node Level Details.
23594#[derive(Clone, Default, PartialEq)]
23595#[non_exhaustive]
23596pub struct PluggableDatabaseNodeLevelDetails {
23597 /// Required. The Node name of the Database home.
23598 pub node_name: std::string::String,
23599
23600 /// Required. The mode that the pluggable database is in to open it.
23601 pub open_mode: crate::model::pluggable_database_node_level_details::PluggableDatabaseOpenMode,
23602
23603 /// Required. The OCID of the Pluggable Database.
23604 pub pluggable_database_id: std::string::String,
23605
23606 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23607}
23608
23609impl PluggableDatabaseNodeLevelDetails {
23610 pub fn new() -> Self {
23611 std::default::Default::default()
23612 }
23613
23614 /// Sets the value of [node_name][crate::model::PluggableDatabaseNodeLevelDetails::node_name].
23615 ///
23616 /// # Example
23617 /// ```ignore,no_run
23618 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseNodeLevelDetails;
23619 /// let x = PluggableDatabaseNodeLevelDetails::new().set_node_name("example");
23620 /// ```
23621 pub fn set_node_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23622 self.node_name = v.into();
23623 self
23624 }
23625
23626 /// Sets the value of [open_mode][crate::model::PluggableDatabaseNodeLevelDetails::open_mode].
23627 ///
23628 /// # Example
23629 /// ```ignore,no_run
23630 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseNodeLevelDetails;
23631 /// use google_cloud_oracledatabase_v1::model::pluggable_database_node_level_details::PluggableDatabaseOpenMode;
23632 /// let x0 = PluggableDatabaseNodeLevelDetails::new().set_open_mode(PluggableDatabaseOpenMode::ReadOnly);
23633 /// let x1 = PluggableDatabaseNodeLevelDetails::new().set_open_mode(PluggableDatabaseOpenMode::ReadWrite);
23634 /// let x2 = PluggableDatabaseNodeLevelDetails::new().set_open_mode(PluggableDatabaseOpenMode::Mounted);
23635 /// ```
23636 pub fn set_open_mode<
23637 T: std::convert::Into<
23638 crate::model::pluggable_database_node_level_details::PluggableDatabaseOpenMode,
23639 >,
23640 >(
23641 mut self,
23642 v: T,
23643 ) -> Self {
23644 self.open_mode = v.into();
23645 self
23646 }
23647
23648 /// Sets the value of [pluggable_database_id][crate::model::PluggableDatabaseNodeLevelDetails::pluggable_database_id].
23649 ///
23650 /// # Example
23651 /// ```ignore,no_run
23652 /// # use google_cloud_oracledatabase_v1::model::PluggableDatabaseNodeLevelDetails;
23653 /// let x = PluggableDatabaseNodeLevelDetails::new().set_pluggable_database_id("example");
23654 /// ```
23655 pub fn set_pluggable_database_id<T: std::convert::Into<std::string::String>>(
23656 mut self,
23657 v: T,
23658 ) -> Self {
23659 self.pluggable_database_id = v.into();
23660 self
23661 }
23662}
23663
23664impl wkt::message::Message for PluggableDatabaseNodeLevelDetails {
23665 fn typename() -> &'static str {
23666 "type.googleapis.com/google.cloud.oracledatabase.v1.PluggableDatabaseNodeLevelDetails"
23667 }
23668}
23669
23670/// Defines additional types related to [PluggableDatabaseNodeLevelDetails].
23671pub mod pluggable_database_node_level_details {
23672 #[allow(unused_imports)]
23673 use super::*;
23674
23675 /// The mode that the pluggable database is in to open it.
23676 ///
23677 /// # Working with unknown values
23678 ///
23679 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23680 /// additional enum variants at any time. Adding new variants is not considered
23681 /// a breaking change. Applications should write their code in anticipation of:
23682 ///
23683 /// - New values appearing in future releases of the client library, **and**
23684 /// - New values received dynamically, without application changes.
23685 ///
23686 /// Please consult the [Working with enums] section in the user guide for some
23687 /// guidelines.
23688 ///
23689 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23690 #[derive(Clone, Debug, PartialEq)]
23691 #[non_exhaustive]
23692 pub enum PluggableDatabaseOpenMode {
23693 /// The open mode is unspecified.
23694 Unspecified,
23695 /// The pluggable database is opened in read-only mode.
23696 ReadOnly,
23697 /// The pluggable database is opened in read-write mode.
23698 ReadWrite,
23699 /// The pluggable database is mounted.
23700 Mounted,
23701 /// The pluggable database is migrated.
23702 Migrate,
23703 /// If set, the enum was initialized with an unknown value.
23704 ///
23705 /// Applications can examine the value using [PluggableDatabaseOpenMode::value] or
23706 /// [PluggableDatabaseOpenMode::name].
23707 UnknownValue(pluggable_database_open_mode::UnknownValue),
23708 }
23709
23710 #[doc(hidden)]
23711 pub mod pluggable_database_open_mode {
23712 #[allow(unused_imports)]
23713 use super::*;
23714 #[derive(Clone, Debug, PartialEq)]
23715 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23716 }
23717
23718 impl PluggableDatabaseOpenMode {
23719 /// Gets the enum value.
23720 ///
23721 /// Returns `None` if the enum contains an unknown value deserialized from
23722 /// the string representation of enums.
23723 pub fn value(&self) -> std::option::Option<i32> {
23724 match self {
23725 Self::Unspecified => std::option::Option::Some(0),
23726 Self::ReadOnly => std::option::Option::Some(1),
23727 Self::ReadWrite => std::option::Option::Some(2),
23728 Self::Mounted => std::option::Option::Some(3),
23729 Self::Migrate => std::option::Option::Some(4),
23730 Self::UnknownValue(u) => u.0.value(),
23731 }
23732 }
23733
23734 /// Gets the enum value as a string.
23735 ///
23736 /// Returns `None` if the enum contains an unknown value deserialized from
23737 /// the integer representation of enums.
23738 pub fn name(&self) -> std::option::Option<&str> {
23739 match self {
23740 Self::Unspecified => {
23741 std::option::Option::Some("PLUGGABLE_DATABASE_OPEN_MODE_UNSPECIFIED")
23742 }
23743 Self::ReadOnly => std::option::Option::Some("READ_ONLY"),
23744 Self::ReadWrite => std::option::Option::Some("READ_WRITE"),
23745 Self::Mounted => std::option::Option::Some("MOUNTED"),
23746 Self::Migrate => std::option::Option::Some("MIGRATE"),
23747 Self::UnknownValue(u) => u.0.name(),
23748 }
23749 }
23750 }
23751
23752 impl std::default::Default for PluggableDatabaseOpenMode {
23753 fn default() -> Self {
23754 use std::convert::From;
23755 Self::from(0)
23756 }
23757 }
23758
23759 impl std::fmt::Display for PluggableDatabaseOpenMode {
23760 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23761 wkt::internal::display_enum(f, self.name(), self.value())
23762 }
23763 }
23764
23765 impl std::convert::From<i32> for PluggableDatabaseOpenMode {
23766 fn from(value: i32) -> Self {
23767 match value {
23768 0 => Self::Unspecified,
23769 1 => Self::ReadOnly,
23770 2 => Self::ReadWrite,
23771 3 => Self::Mounted,
23772 4 => Self::Migrate,
23773 _ => Self::UnknownValue(pluggable_database_open_mode::UnknownValue(
23774 wkt::internal::UnknownEnumValue::Integer(value),
23775 )),
23776 }
23777 }
23778 }
23779
23780 impl std::convert::From<&str> for PluggableDatabaseOpenMode {
23781 fn from(value: &str) -> Self {
23782 use std::string::ToString;
23783 match value {
23784 "PLUGGABLE_DATABASE_OPEN_MODE_UNSPECIFIED" => Self::Unspecified,
23785 "READ_ONLY" => Self::ReadOnly,
23786 "READ_WRITE" => Self::ReadWrite,
23787 "MOUNTED" => Self::Mounted,
23788 "MIGRATE" => Self::Migrate,
23789 _ => Self::UnknownValue(pluggable_database_open_mode::UnknownValue(
23790 wkt::internal::UnknownEnumValue::String(value.to_string()),
23791 )),
23792 }
23793 }
23794 }
23795
23796 impl serde::ser::Serialize for PluggableDatabaseOpenMode {
23797 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23798 where
23799 S: serde::Serializer,
23800 {
23801 match self {
23802 Self::Unspecified => serializer.serialize_i32(0),
23803 Self::ReadOnly => serializer.serialize_i32(1),
23804 Self::ReadWrite => serializer.serialize_i32(2),
23805 Self::Mounted => serializer.serialize_i32(3),
23806 Self::Migrate => serializer.serialize_i32(4),
23807 Self::UnknownValue(u) => u.0.serialize(serializer),
23808 }
23809 }
23810 }
23811
23812 impl<'de> serde::de::Deserialize<'de> for PluggableDatabaseOpenMode {
23813 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23814 where
23815 D: serde::Deserializer<'de>,
23816 {
23817 deserializer.deserialize_any(wkt::internal::EnumVisitor::<PluggableDatabaseOpenMode>::new(
23818 ".google.cloud.oracledatabase.v1.PluggableDatabaseNodeLevelDetails.PluggableDatabaseOpenMode"))
23819 }
23820 }
23821}
23822
23823/// The configuration of the Database Management service.
23824#[derive(Clone, Default, PartialEq)]
23825#[non_exhaustive]
23826pub struct DatabaseManagementConfig {
23827 /// Output only. The status of the Database Management service.
23828 pub management_state: crate::model::database_management_config::ManagementState,
23829
23830 /// Output only. The Database Management type.
23831 pub management_type: crate::model::database_management_config::ManagementType,
23832
23833 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23834}
23835
23836impl DatabaseManagementConfig {
23837 pub fn new() -> Self {
23838 std::default::Default::default()
23839 }
23840
23841 /// Sets the value of [management_state][crate::model::DatabaseManagementConfig::management_state].
23842 ///
23843 /// # Example
23844 /// ```ignore,no_run
23845 /// # use google_cloud_oracledatabase_v1::model::DatabaseManagementConfig;
23846 /// use google_cloud_oracledatabase_v1::model::database_management_config::ManagementState;
23847 /// let x0 = DatabaseManagementConfig::new().set_management_state(ManagementState::Enabling);
23848 /// let x1 = DatabaseManagementConfig::new().set_management_state(ManagementState::Enabled);
23849 /// let x2 = DatabaseManagementConfig::new().set_management_state(ManagementState::Disabling);
23850 /// ```
23851 pub fn set_management_state<
23852 T: std::convert::Into<crate::model::database_management_config::ManagementState>,
23853 >(
23854 mut self,
23855 v: T,
23856 ) -> Self {
23857 self.management_state = v.into();
23858 self
23859 }
23860
23861 /// Sets the value of [management_type][crate::model::DatabaseManagementConfig::management_type].
23862 ///
23863 /// # Example
23864 /// ```ignore,no_run
23865 /// # use google_cloud_oracledatabase_v1::model::DatabaseManagementConfig;
23866 /// use google_cloud_oracledatabase_v1::model::database_management_config::ManagementType;
23867 /// let x0 = DatabaseManagementConfig::new().set_management_type(ManagementType::Basic);
23868 /// let x1 = DatabaseManagementConfig::new().set_management_type(ManagementType::Advanced);
23869 /// ```
23870 pub fn set_management_type<
23871 T: std::convert::Into<crate::model::database_management_config::ManagementType>,
23872 >(
23873 mut self,
23874 v: T,
23875 ) -> Self {
23876 self.management_type = v.into();
23877 self
23878 }
23879}
23880
23881impl wkt::message::Message for DatabaseManagementConfig {
23882 fn typename() -> &'static str {
23883 "type.googleapis.com/google.cloud.oracledatabase.v1.DatabaseManagementConfig"
23884 }
23885}
23886
23887/// Defines additional types related to [DatabaseManagementConfig].
23888pub mod database_management_config {
23889 #[allow(unused_imports)]
23890 use super::*;
23891
23892 /// The status of the Database Management service.
23893 ///
23894 /// # Working with unknown values
23895 ///
23896 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
23897 /// additional enum variants at any time. Adding new variants is not considered
23898 /// a breaking change. Applications should write their code in anticipation of:
23899 ///
23900 /// - New values appearing in future releases of the client library, **and**
23901 /// - New values received dynamically, without application changes.
23902 ///
23903 /// Please consult the [Working with enums] section in the user guide for some
23904 /// guidelines.
23905 ///
23906 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
23907 #[derive(Clone, Debug, PartialEq)]
23908 #[non_exhaustive]
23909 pub enum ManagementState {
23910 /// The status is not specified.
23911 Unspecified,
23912 /// The Database Management service is enabling.
23913 Enabling,
23914 /// The Database Management service is enabled.
23915 Enabled,
23916 /// The Database Management service is disabling.
23917 Disabling,
23918 /// The Database Management service is disabled.
23919 Disabled,
23920 /// The Database Management service is updating.
23921 Updating,
23922 /// The Database Management service failed to enable.
23923 FailedEnabling,
23924 /// The Database Management service failed to disable.
23925 FailedDisabling,
23926 /// The Database Management service failed to update.
23927 FailedUpdating,
23928 /// If set, the enum was initialized with an unknown value.
23929 ///
23930 /// Applications can examine the value using [ManagementState::value] or
23931 /// [ManagementState::name].
23932 UnknownValue(management_state::UnknownValue),
23933 }
23934
23935 #[doc(hidden)]
23936 pub mod management_state {
23937 #[allow(unused_imports)]
23938 use super::*;
23939 #[derive(Clone, Debug, PartialEq)]
23940 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23941 }
23942
23943 impl ManagementState {
23944 /// Gets the enum value.
23945 ///
23946 /// Returns `None` if the enum contains an unknown value deserialized from
23947 /// the string representation of enums.
23948 pub fn value(&self) -> std::option::Option<i32> {
23949 match self {
23950 Self::Unspecified => std::option::Option::Some(0),
23951 Self::Enabling => std::option::Option::Some(1),
23952 Self::Enabled => std::option::Option::Some(2),
23953 Self::Disabling => std::option::Option::Some(3),
23954 Self::Disabled => std::option::Option::Some(4),
23955 Self::Updating => std::option::Option::Some(5),
23956 Self::FailedEnabling => std::option::Option::Some(6),
23957 Self::FailedDisabling => std::option::Option::Some(7),
23958 Self::FailedUpdating => std::option::Option::Some(8),
23959 Self::UnknownValue(u) => u.0.value(),
23960 }
23961 }
23962
23963 /// Gets the enum value as a string.
23964 ///
23965 /// Returns `None` if the enum contains an unknown value deserialized from
23966 /// the integer representation of enums.
23967 pub fn name(&self) -> std::option::Option<&str> {
23968 match self {
23969 Self::Unspecified => std::option::Option::Some("MANAGEMENT_STATE_UNSPECIFIED"),
23970 Self::Enabling => std::option::Option::Some("ENABLING"),
23971 Self::Enabled => std::option::Option::Some("ENABLED"),
23972 Self::Disabling => std::option::Option::Some("DISABLING"),
23973 Self::Disabled => std::option::Option::Some("DISABLED"),
23974 Self::Updating => std::option::Option::Some("UPDATING"),
23975 Self::FailedEnabling => std::option::Option::Some("FAILED_ENABLING"),
23976 Self::FailedDisabling => std::option::Option::Some("FAILED_DISABLING"),
23977 Self::FailedUpdating => std::option::Option::Some("FAILED_UPDATING"),
23978 Self::UnknownValue(u) => u.0.name(),
23979 }
23980 }
23981 }
23982
23983 impl std::default::Default for ManagementState {
23984 fn default() -> Self {
23985 use std::convert::From;
23986 Self::from(0)
23987 }
23988 }
23989
23990 impl std::fmt::Display for ManagementState {
23991 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23992 wkt::internal::display_enum(f, self.name(), self.value())
23993 }
23994 }
23995
23996 impl std::convert::From<i32> for ManagementState {
23997 fn from(value: i32) -> Self {
23998 match value {
23999 0 => Self::Unspecified,
24000 1 => Self::Enabling,
24001 2 => Self::Enabled,
24002 3 => Self::Disabling,
24003 4 => Self::Disabled,
24004 5 => Self::Updating,
24005 6 => Self::FailedEnabling,
24006 7 => Self::FailedDisabling,
24007 8 => Self::FailedUpdating,
24008 _ => Self::UnknownValue(management_state::UnknownValue(
24009 wkt::internal::UnknownEnumValue::Integer(value),
24010 )),
24011 }
24012 }
24013 }
24014
24015 impl std::convert::From<&str> for ManagementState {
24016 fn from(value: &str) -> Self {
24017 use std::string::ToString;
24018 match value {
24019 "MANAGEMENT_STATE_UNSPECIFIED" => Self::Unspecified,
24020 "ENABLING" => Self::Enabling,
24021 "ENABLED" => Self::Enabled,
24022 "DISABLING" => Self::Disabling,
24023 "DISABLED" => Self::Disabled,
24024 "UPDATING" => Self::Updating,
24025 "FAILED_ENABLING" => Self::FailedEnabling,
24026 "FAILED_DISABLING" => Self::FailedDisabling,
24027 "FAILED_UPDATING" => Self::FailedUpdating,
24028 _ => Self::UnknownValue(management_state::UnknownValue(
24029 wkt::internal::UnknownEnumValue::String(value.to_string()),
24030 )),
24031 }
24032 }
24033 }
24034
24035 impl serde::ser::Serialize for ManagementState {
24036 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24037 where
24038 S: serde::Serializer,
24039 {
24040 match self {
24041 Self::Unspecified => serializer.serialize_i32(0),
24042 Self::Enabling => serializer.serialize_i32(1),
24043 Self::Enabled => serializer.serialize_i32(2),
24044 Self::Disabling => serializer.serialize_i32(3),
24045 Self::Disabled => serializer.serialize_i32(4),
24046 Self::Updating => serializer.serialize_i32(5),
24047 Self::FailedEnabling => serializer.serialize_i32(6),
24048 Self::FailedDisabling => serializer.serialize_i32(7),
24049 Self::FailedUpdating => serializer.serialize_i32(8),
24050 Self::UnknownValue(u) => u.0.serialize(serializer),
24051 }
24052 }
24053 }
24054
24055 impl<'de> serde::de::Deserialize<'de> for ManagementState {
24056 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24057 where
24058 D: serde::Deserializer<'de>,
24059 {
24060 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ManagementState>::new(
24061 ".google.cloud.oracledatabase.v1.DatabaseManagementConfig.ManagementState",
24062 ))
24063 }
24064 }
24065
24066 /// The Database Management type.
24067 ///
24068 /// # Working with unknown values
24069 ///
24070 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24071 /// additional enum variants at any time. Adding new variants is not considered
24072 /// a breaking change. Applications should write their code in anticipation of:
24073 ///
24074 /// - New values appearing in future releases of the client library, **and**
24075 /// - New values received dynamically, without application changes.
24076 ///
24077 /// Please consult the [Working with enums] section in the user guide for some
24078 /// guidelines.
24079 ///
24080 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24081 #[derive(Clone, Debug, PartialEq)]
24082 #[non_exhaustive]
24083 pub enum ManagementType {
24084 /// The type is not specified.
24085 Unspecified,
24086 /// Basic Database Management.
24087 Basic,
24088 /// Advanced Database Management.
24089 Advanced,
24090 /// If set, the enum was initialized with an unknown value.
24091 ///
24092 /// Applications can examine the value using [ManagementType::value] or
24093 /// [ManagementType::name].
24094 UnknownValue(management_type::UnknownValue),
24095 }
24096
24097 #[doc(hidden)]
24098 pub mod management_type {
24099 #[allow(unused_imports)]
24100 use super::*;
24101 #[derive(Clone, Debug, PartialEq)]
24102 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24103 }
24104
24105 impl ManagementType {
24106 /// Gets the enum value.
24107 ///
24108 /// Returns `None` if the enum contains an unknown value deserialized from
24109 /// the string representation of enums.
24110 pub fn value(&self) -> std::option::Option<i32> {
24111 match self {
24112 Self::Unspecified => std::option::Option::Some(0),
24113 Self::Basic => std::option::Option::Some(1),
24114 Self::Advanced => std::option::Option::Some(2),
24115 Self::UnknownValue(u) => u.0.value(),
24116 }
24117 }
24118
24119 /// Gets the enum value as a string.
24120 ///
24121 /// Returns `None` if the enum contains an unknown value deserialized from
24122 /// the integer representation of enums.
24123 pub fn name(&self) -> std::option::Option<&str> {
24124 match self {
24125 Self::Unspecified => std::option::Option::Some("MANAGEMENT_TYPE_UNSPECIFIED"),
24126 Self::Basic => std::option::Option::Some("BASIC"),
24127 Self::Advanced => std::option::Option::Some("ADVANCED"),
24128 Self::UnknownValue(u) => u.0.name(),
24129 }
24130 }
24131 }
24132
24133 impl std::default::Default for ManagementType {
24134 fn default() -> Self {
24135 use std::convert::From;
24136 Self::from(0)
24137 }
24138 }
24139
24140 impl std::fmt::Display for ManagementType {
24141 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24142 wkt::internal::display_enum(f, self.name(), self.value())
24143 }
24144 }
24145
24146 impl std::convert::From<i32> for ManagementType {
24147 fn from(value: i32) -> Self {
24148 match value {
24149 0 => Self::Unspecified,
24150 1 => Self::Basic,
24151 2 => Self::Advanced,
24152 _ => Self::UnknownValue(management_type::UnknownValue(
24153 wkt::internal::UnknownEnumValue::Integer(value),
24154 )),
24155 }
24156 }
24157 }
24158
24159 impl std::convert::From<&str> for ManagementType {
24160 fn from(value: &str) -> Self {
24161 use std::string::ToString;
24162 match value {
24163 "MANAGEMENT_TYPE_UNSPECIFIED" => Self::Unspecified,
24164 "BASIC" => Self::Basic,
24165 "ADVANCED" => Self::Advanced,
24166 _ => Self::UnknownValue(management_type::UnknownValue(
24167 wkt::internal::UnknownEnumValue::String(value.to_string()),
24168 )),
24169 }
24170 }
24171 }
24172
24173 impl serde::ser::Serialize for ManagementType {
24174 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24175 where
24176 S: serde::Serializer,
24177 {
24178 match self {
24179 Self::Unspecified => serializer.serialize_i32(0),
24180 Self::Basic => serializer.serialize_i32(1),
24181 Self::Advanced => serializer.serialize_i32(2),
24182 Self::UnknownValue(u) => u.0.serialize(serializer),
24183 }
24184 }
24185 }
24186
24187 impl<'de> serde::de::Deserialize<'de> for ManagementType {
24188 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24189 where
24190 D: serde::Deserializer<'de>,
24191 {
24192 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ManagementType>::new(
24193 ".google.cloud.oracledatabase.v1.DatabaseManagementConfig.ManagementType",
24194 ))
24195 }
24196 }
24197}
24198
24199/// The request for `PluggableDatabase.Get`.
24200#[derive(Clone, Default, PartialEq)]
24201#[non_exhaustive]
24202pub struct GetPluggableDatabaseRequest {
24203 /// Required. The name of the PluggableDatabase resource in the following
24204 /// format:
24205 /// projects/{project}/locations/{region}/pluggableDatabases/{pluggable_database}
24206 pub name: std::string::String,
24207
24208 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24209}
24210
24211impl GetPluggableDatabaseRequest {
24212 pub fn new() -> Self {
24213 std::default::Default::default()
24214 }
24215
24216 /// Sets the value of [name][crate::model::GetPluggableDatabaseRequest::name].
24217 ///
24218 /// # Example
24219 /// ```ignore,no_run
24220 /// # use google_cloud_oracledatabase_v1::model::GetPluggableDatabaseRequest;
24221 /// let x = GetPluggableDatabaseRequest::new().set_name("example");
24222 /// ```
24223 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24224 self.name = v.into();
24225 self
24226 }
24227}
24228
24229impl wkt::message::Message for GetPluggableDatabaseRequest {
24230 fn typename() -> &'static str {
24231 "type.googleapis.com/google.cloud.oracledatabase.v1.GetPluggableDatabaseRequest"
24232 }
24233}
24234
24235/// The request for `PluggableDatabase.List`.
24236#[derive(Clone, Default, PartialEq)]
24237#[non_exhaustive]
24238pub struct ListPluggableDatabasesRequest {
24239 /// Required. The parent, which owns this collection of PluggableDatabases.
24240 /// Format: projects/{project}/locations/{location}
24241 pub parent: std::string::String,
24242
24243 /// Optional. The maximum number of PluggableDatabases to return. The service
24244 /// may return fewer than this value.
24245 pub page_size: i32,
24246
24247 /// Optional. A page token, received from a previous `ListPluggableDatabases`
24248 /// call. Provide this to retrieve the subsequent page.
24249 ///
24250 /// When paginating, all other parameters provided to `ListPluggableDatabases`
24251 /// must match the call that provided the page token.
24252 pub page_token: std::string::String,
24253
24254 /// Optional. An expression for filtering the results of the request. List for
24255 /// pluggable databases is supported only with a valid container database (full
24256 /// resource name) filter in this format:
24257 /// `database="projects/{project}/locations/{location}/databases/{database}"`
24258 pub filter: std::string::String,
24259
24260 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24261}
24262
24263impl ListPluggableDatabasesRequest {
24264 pub fn new() -> Self {
24265 std::default::Default::default()
24266 }
24267
24268 /// Sets the value of [parent][crate::model::ListPluggableDatabasesRequest::parent].
24269 ///
24270 /// # Example
24271 /// ```ignore,no_run
24272 /// # use google_cloud_oracledatabase_v1::model::ListPluggableDatabasesRequest;
24273 /// let x = ListPluggableDatabasesRequest::new().set_parent("example");
24274 /// ```
24275 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24276 self.parent = v.into();
24277 self
24278 }
24279
24280 /// Sets the value of [page_size][crate::model::ListPluggableDatabasesRequest::page_size].
24281 ///
24282 /// # Example
24283 /// ```ignore,no_run
24284 /// # use google_cloud_oracledatabase_v1::model::ListPluggableDatabasesRequest;
24285 /// let x = ListPluggableDatabasesRequest::new().set_page_size(42);
24286 /// ```
24287 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24288 self.page_size = v.into();
24289 self
24290 }
24291
24292 /// Sets the value of [page_token][crate::model::ListPluggableDatabasesRequest::page_token].
24293 ///
24294 /// # Example
24295 /// ```ignore,no_run
24296 /// # use google_cloud_oracledatabase_v1::model::ListPluggableDatabasesRequest;
24297 /// let x = ListPluggableDatabasesRequest::new().set_page_token("example");
24298 /// ```
24299 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24300 self.page_token = v.into();
24301 self
24302 }
24303
24304 /// Sets the value of [filter][crate::model::ListPluggableDatabasesRequest::filter].
24305 ///
24306 /// # Example
24307 /// ```ignore,no_run
24308 /// # use google_cloud_oracledatabase_v1::model::ListPluggableDatabasesRequest;
24309 /// let x = ListPluggableDatabasesRequest::new().set_filter("example");
24310 /// ```
24311 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24312 self.filter = v.into();
24313 self
24314 }
24315}
24316
24317impl wkt::message::Message for ListPluggableDatabasesRequest {
24318 fn typename() -> &'static str {
24319 "type.googleapis.com/google.cloud.oracledatabase.v1.ListPluggableDatabasesRequest"
24320 }
24321}
24322
24323/// The response for `PluggableDatabase.List`.
24324#[derive(Clone, Default, PartialEq)]
24325#[non_exhaustive]
24326pub struct ListPluggableDatabasesResponse {
24327 /// The list of PluggableDatabases.
24328 pub pluggable_databases: std::vec::Vec<crate::model::PluggableDatabase>,
24329
24330 /// A token identifying a page of results the server should return.
24331 pub next_page_token: std::string::String,
24332
24333 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24334}
24335
24336impl ListPluggableDatabasesResponse {
24337 pub fn new() -> Self {
24338 std::default::Default::default()
24339 }
24340
24341 /// Sets the value of [pluggable_databases][crate::model::ListPluggableDatabasesResponse::pluggable_databases].
24342 ///
24343 /// # Example
24344 /// ```ignore,no_run
24345 /// # use google_cloud_oracledatabase_v1::model::ListPluggableDatabasesResponse;
24346 /// use google_cloud_oracledatabase_v1::model::PluggableDatabase;
24347 /// let x = ListPluggableDatabasesResponse::new()
24348 /// .set_pluggable_databases([
24349 /// PluggableDatabase::default()/* use setters */,
24350 /// PluggableDatabase::default()/* use (different) setters */,
24351 /// ]);
24352 /// ```
24353 pub fn set_pluggable_databases<T, V>(mut self, v: T) -> Self
24354 where
24355 T: std::iter::IntoIterator<Item = V>,
24356 V: std::convert::Into<crate::model::PluggableDatabase>,
24357 {
24358 use std::iter::Iterator;
24359 self.pluggable_databases = v.into_iter().map(|i| i.into()).collect();
24360 self
24361 }
24362
24363 /// Sets the value of [next_page_token][crate::model::ListPluggableDatabasesResponse::next_page_token].
24364 ///
24365 /// # Example
24366 /// ```ignore,no_run
24367 /// # use google_cloud_oracledatabase_v1::model::ListPluggableDatabasesResponse;
24368 /// let x = ListPluggableDatabasesResponse::new().set_next_page_token("example");
24369 /// ```
24370 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24371 self.next_page_token = v.into();
24372 self
24373 }
24374}
24375
24376impl wkt::message::Message for ListPluggableDatabasesResponse {
24377 fn typename() -> &'static str {
24378 "type.googleapis.com/google.cloud.oracledatabase.v1.ListPluggableDatabasesResponse"
24379 }
24380}
24381
24382#[doc(hidden)]
24383impl google_cloud_gax::paginator::internal::PageableResponse for ListPluggableDatabasesResponse {
24384 type PageItem = crate::model::PluggableDatabase;
24385
24386 fn items(self) -> std::vec::Vec<Self::PageItem> {
24387 self.pluggable_databases
24388 }
24389
24390 fn next_page_token(&self) -> std::string::String {
24391 use std::clone::Clone;
24392 self.next_page_token.clone()
24393 }
24394}
24395
24396/// Details of the Cloud VM Cluster resource.
24397/// <https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/CloudVmCluster/>
24398#[derive(Clone, Default, PartialEq)]
24399#[non_exhaustive]
24400pub struct CloudVmCluster {
24401 /// Identifier. The name of the VM Cluster resource with the format:
24402 /// projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster}
24403 pub name: std::string::String,
24404
24405 /// Required. The name of the Exadata Infrastructure resource on which VM
24406 /// cluster resource is created, in the following format:
24407 /// projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure}
24408 pub exadata_infrastructure: std::string::String,
24409
24410 /// Optional. User friendly name for this resource.
24411 pub display_name: std::string::String,
24412
24413 /// Optional. Various properties of the VM Cluster.
24414 pub properties: std::option::Option<crate::model::CloudVmClusterProperties>,
24415
24416 /// Optional. Labels or tags associated with the VM Cluster.
24417 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
24418
24419 /// Output only. The date and time that the VM cluster was created.
24420 pub create_time: std::option::Option<wkt::Timestamp>,
24421
24422 /// Optional. Network settings. CIDR to use for cluster IP allocation.
24423 pub cidr: std::string::String,
24424
24425 /// Optional. CIDR range of the backup subnet.
24426 pub backup_subnet_cidr: std::string::String,
24427
24428 /// Optional. The name of the VPC network.
24429 /// Format: projects/{project}/global/networks/{network}
24430 pub network: std::string::String,
24431
24432 /// Output only. The GCP Oracle zone where Oracle CloudVmCluster is hosted.
24433 /// This will be the same as the gcp_oracle_zone of the
24434 /// CloudExadataInfrastructure. Example: us-east4-b-r2.
24435 pub gcp_oracle_zone: std::string::String,
24436
24437 /// Optional. The name of the OdbNetwork associated with the VM Cluster.
24438 /// Format:
24439 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}
24440 /// It is optional but if specified, this should match the parent ODBNetwork of
24441 /// the odb_subnet and backup_odb_subnet.
24442 pub odb_network: std::string::String,
24443
24444 /// Optional. The name of the OdbSubnet associated with the VM Cluster for
24445 /// IP allocation. Format:
24446 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
24447 pub odb_subnet: std::string::String,
24448
24449 /// Optional. The name of the backup OdbSubnet associated with the VM Cluster.
24450 /// Format:
24451 /// projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
24452 pub backup_odb_subnet: std::string::String,
24453
24454 /// Output only. The identity connector details which will allow OCI to
24455 /// securely access the resources in the customer project.
24456 pub identity_connector: std::option::Option<crate::model::IdentityConnector>,
24457
24458 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24459}
24460
24461impl CloudVmCluster {
24462 pub fn new() -> Self {
24463 std::default::Default::default()
24464 }
24465
24466 /// Sets the value of [name][crate::model::CloudVmCluster::name].
24467 ///
24468 /// # Example
24469 /// ```ignore,no_run
24470 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24471 /// let x = CloudVmCluster::new().set_name("example");
24472 /// ```
24473 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24474 self.name = v.into();
24475 self
24476 }
24477
24478 /// Sets the value of [exadata_infrastructure][crate::model::CloudVmCluster::exadata_infrastructure].
24479 ///
24480 /// # Example
24481 /// ```ignore,no_run
24482 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24483 /// let x = CloudVmCluster::new().set_exadata_infrastructure("example");
24484 /// ```
24485 pub fn set_exadata_infrastructure<T: std::convert::Into<std::string::String>>(
24486 mut self,
24487 v: T,
24488 ) -> Self {
24489 self.exadata_infrastructure = v.into();
24490 self
24491 }
24492
24493 /// Sets the value of [display_name][crate::model::CloudVmCluster::display_name].
24494 ///
24495 /// # Example
24496 /// ```ignore,no_run
24497 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24498 /// let x = CloudVmCluster::new().set_display_name("example");
24499 /// ```
24500 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24501 self.display_name = v.into();
24502 self
24503 }
24504
24505 /// Sets the value of [properties][crate::model::CloudVmCluster::properties].
24506 ///
24507 /// # Example
24508 /// ```ignore,no_run
24509 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24510 /// use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24511 /// let x = CloudVmCluster::new().set_properties(CloudVmClusterProperties::default()/* use setters */);
24512 /// ```
24513 pub fn set_properties<T>(mut self, v: T) -> Self
24514 where
24515 T: std::convert::Into<crate::model::CloudVmClusterProperties>,
24516 {
24517 self.properties = std::option::Option::Some(v.into());
24518 self
24519 }
24520
24521 /// Sets or clears the value of [properties][crate::model::CloudVmCluster::properties].
24522 ///
24523 /// # Example
24524 /// ```ignore,no_run
24525 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24526 /// use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24527 /// let x = CloudVmCluster::new().set_or_clear_properties(Some(CloudVmClusterProperties::default()/* use setters */));
24528 /// let x = CloudVmCluster::new().set_or_clear_properties(None::<CloudVmClusterProperties>);
24529 /// ```
24530 pub fn set_or_clear_properties<T>(mut self, v: std::option::Option<T>) -> Self
24531 where
24532 T: std::convert::Into<crate::model::CloudVmClusterProperties>,
24533 {
24534 self.properties = v.map(|x| x.into());
24535 self
24536 }
24537
24538 /// Sets the value of [labels][crate::model::CloudVmCluster::labels].
24539 ///
24540 /// # Example
24541 /// ```ignore,no_run
24542 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24543 /// let x = CloudVmCluster::new().set_labels([
24544 /// ("key0", "abc"),
24545 /// ("key1", "xyz"),
24546 /// ]);
24547 /// ```
24548 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
24549 where
24550 T: std::iter::IntoIterator<Item = (K, V)>,
24551 K: std::convert::Into<std::string::String>,
24552 V: std::convert::Into<std::string::String>,
24553 {
24554 use std::iter::Iterator;
24555 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
24556 self
24557 }
24558
24559 /// Sets the value of [create_time][crate::model::CloudVmCluster::create_time].
24560 ///
24561 /// # Example
24562 /// ```ignore,no_run
24563 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24564 /// use wkt::Timestamp;
24565 /// let x = CloudVmCluster::new().set_create_time(Timestamp::default()/* use setters */);
24566 /// ```
24567 pub fn set_create_time<T>(mut self, v: T) -> Self
24568 where
24569 T: std::convert::Into<wkt::Timestamp>,
24570 {
24571 self.create_time = std::option::Option::Some(v.into());
24572 self
24573 }
24574
24575 /// Sets or clears the value of [create_time][crate::model::CloudVmCluster::create_time].
24576 ///
24577 /// # Example
24578 /// ```ignore,no_run
24579 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24580 /// use wkt::Timestamp;
24581 /// let x = CloudVmCluster::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
24582 /// let x = CloudVmCluster::new().set_or_clear_create_time(None::<Timestamp>);
24583 /// ```
24584 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
24585 where
24586 T: std::convert::Into<wkt::Timestamp>,
24587 {
24588 self.create_time = v.map(|x| x.into());
24589 self
24590 }
24591
24592 /// Sets the value of [cidr][crate::model::CloudVmCluster::cidr].
24593 ///
24594 /// # Example
24595 /// ```ignore,no_run
24596 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24597 /// let x = CloudVmCluster::new().set_cidr("example");
24598 /// ```
24599 pub fn set_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24600 self.cidr = v.into();
24601 self
24602 }
24603
24604 /// Sets the value of [backup_subnet_cidr][crate::model::CloudVmCluster::backup_subnet_cidr].
24605 ///
24606 /// # Example
24607 /// ```ignore,no_run
24608 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24609 /// let x = CloudVmCluster::new().set_backup_subnet_cidr("example");
24610 /// ```
24611 pub fn set_backup_subnet_cidr<T: std::convert::Into<std::string::String>>(
24612 mut self,
24613 v: T,
24614 ) -> Self {
24615 self.backup_subnet_cidr = v.into();
24616 self
24617 }
24618
24619 /// Sets the value of [network][crate::model::CloudVmCluster::network].
24620 ///
24621 /// # Example
24622 /// ```ignore,no_run
24623 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24624 /// let x = CloudVmCluster::new().set_network("example");
24625 /// ```
24626 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24627 self.network = v.into();
24628 self
24629 }
24630
24631 /// Sets the value of [gcp_oracle_zone][crate::model::CloudVmCluster::gcp_oracle_zone].
24632 ///
24633 /// # Example
24634 /// ```ignore,no_run
24635 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24636 /// let x = CloudVmCluster::new().set_gcp_oracle_zone("example");
24637 /// ```
24638 pub fn set_gcp_oracle_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24639 self.gcp_oracle_zone = v.into();
24640 self
24641 }
24642
24643 /// Sets the value of [odb_network][crate::model::CloudVmCluster::odb_network].
24644 ///
24645 /// # Example
24646 /// ```ignore,no_run
24647 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24648 /// let x = CloudVmCluster::new().set_odb_network("example");
24649 /// ```
24650 pub fn set_odb_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24651 self.odb_network = v.into();
24652 self
24653 }
24654
24655 /// Sets the value of [odb_subnet][crate::model::CloudVmCluster::odb_subnet].
24656 ///
24657 /// # Example
24658 /// ```ignore,no_run
24659 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24660 /// let x = CloudVmCluster::new().set_odb_subnet("example");
24661 /// ```
24662 pub fn set_odb_subnet<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24663 self.odb_subnet = v.into();
24664 self
24665 }
24666
24667 /// Sets the value of [backup_odb_subnet][crate::model::CloudVmCluster::backup_odb_subnet].
24668 ///
24669 /// # Example
24670 /// ```ignore,no_run
24671 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24672 /// let x = CloudVmCluster::new().set_backup_odb_subnet("example");
24673 /// ```
24674 pub fn set_backup_odb_subnet<T: std::convert::Into<std::string::String>>(
24675 mut self,
24676 v: T,
24677 ) -> Self {
24678 self.backup_odb_subnet = v.into();
24679 self
24680 }
24681
24682 /// Sets the value of [identity_connector][crate::model::CloudVmCluster::identity_connector].
24683 ///
24684 /// # Example
24685 /// ```ignore,no_run
24686 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24687 /// use google_cloud_oracledatabase_v1::model::IdentityConnector;
24688 /// let x = CloudVmCluster::new().set_identity_connector(IdentityConnector::default()/* use setters */);
24689 /// ```
24690 pub fn set_identity_connector<T>(mut self, v: T) -> Self
24691 where
24692 T: std::convert::Into<crate::model::IdentityConnector>,
24693 {
24694 self.identity_connector = std::option::Option::Some(v.into());
24695 self
24696 }
24697
24698 /// Sets or clears the value of [identity_connector][crate::model::CloudVmCluster::identity_connector].
24699 ///
24700 /// # Example
24701 /// ```ignore,no_run
24702 /// # use google_cloud_oracledatabase_v1::model::CloudVmCluster;
24703 /// use google_cloud_oracledatabase_v1::model::IdentityConnector;
24704 /// let x = CloudVmCluster::new().set_or_clear_identity_connector(Some(IdentityConnector::default()/* use setters */));
24705 /// let x = CloudVmCluster::new().set_or_clear_identity_connector(None::<IdentityConnector>);
24706 /// ```
24707 pub fn set_or_clear_identity_connector<T>(mut self, v: std::option::Option<T>) -> Self
24708 where
24709 T: std::convert::Into<crate::model::IdentityConnector>,
24710 {
24711 self.identity_connector = v.map(|x| x.into());
24712 self
24713 }
24714}
24715
24716impl wkt::message::Message for CloudVmCluster {
24717 fn typename() -> &'static str {
24718 "type.googleapis.com/google.cloud.oracledatabase.v1.CloudVmCluster"
24719 }
24720}
24721
24722/// Various properties and settings associated with Exadata VM cluster.
24723#[derive(Clone, Default, PartialEq)]
24724#[non_exhaustive]
24725pub struct CloudVmClusterProperties {
24726 /// Output only. Oracle Cloud Infrastructure ID of VM Cluster.
24727 pub ocid: std::string::String,
24728
24729 /// Required. License type of VM Cluster.
24730 pub license_type: crate::model::cloud_vm_cluster_properties::LicenseType,
24731
24732 /// Optional. Grid Infrastructure Version.
24733 pub gi_version: std::string::String,
24734
24735 /// Optional. Time zone of VM Cluster to set. Defaults to UTC if not specified.
24736 pub time_zone: std::option::Option<google_cloud_type::model::TimeZone>,
24737
24738 /// Optional. SSH public keys to be stored with cluster.
24739 pub ssh_public_keys: std::vec::Vec<std::string::String>,
24740
24741 /// Optional. Number of database servers.
24742 pub node_count: i32,
24743
24744 /// Output only. Shape of VM Cluster.
24745 pub shape: std::string::String,
24746
24747 /// Optional. OCPU count per VM. Minimum is 0.1.
24748 pub ocpu_count: f32,
24749
24750 /// Optional. Memory allocated in GBs.
24751 pub memory_size_gb: i32,
24752
24753 /// Optional. Local storage per VM.
24754 pub db_node_storage_size_gb: i32,
24755
24756 /// Output only. The storage allocation for the disk group, in gigabytes (GB).
24757 pub storage_size_gb: i32,
24758
24759 /// Optional. The data disk group size to be allocated in TBs.
24760 pub data_storage_size_tb: f64,
24761
24762 /// Optional. The type of redundancy.
24763 pub disk_redundancy: crate::model::cloud_vm_cluster_properties::DiskRedundancy,
24764
24765 /// Optional. Use exadata sparse snapshots.
24766 pub sparse_diskgroup_enabled: bool,
24767
24768 /// Optional. Use local backup.
24769 pub local_backup_enabled: bool,
24770
24771 /// Optional. Prefix for VM cluster host names.
24772 pub hostname_prefix: std::string::String,
24773
24774 /// Optional. Data collection options for diagnostics.
24775 pub diagnostics_data_collection_options:
24776 std::option::Option<crate::model::DataCollectionOptions>,
24777
24778 /// Output only. State of the cluster.
24779 pub state: crate::model::cloud_vm_cluster_properties::State,
24780
24781 /// Output only. SCAN listener port - TCP
24782 pub scan_listener_port_tcp: i32,
24783
24784 /// Output only. SCAN listener port - TLS
24785 pub scan_listener_port_tcp_ssl: i32,
24786
24787 /// Output only. Parent DNS domain where SCAN DNS and hosts names are
24788 /// qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com
24789 pub domain: std::string::String,
24790
24791 /// Output only. SCAN DNS name.
24792 /// ex: sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com
24793 pub scan_dns: std::string::String,
24794
24795 /// Output only. host name without domain.
24796 /// format: "<hostname_prefix>-" with some suffix.
24797 /// ex: sp2-yi0xq where "sp2" is the hostname_prefix.
24798 pub hostname: std::string::String,
24799
24800 /// Required. Number of enabled CPU cores.
24801 pub cpu_core_count: i32,
24802
24803 /// Optional. Operating system version of the image.
24804 pub system_version: std::string::String,
24805
24806 /// Output only. OCIDs of scan IPs.
24807 pub scan_ip_ids: std::vec::Vec<std::string::String>,
24808
24809 /// Output only. OCID of scan DNS record.
24810 pub scan_dns_record_id: std::string::String,
24811
24812 /// Output only. Deep link to the OCI console to view this resource.
24813 pub oci_url: std::string::String,
24814
24815 /// Optional. OCID of database servers.
24816 pub db_server_ocids: std::vec::Vec<std::string::String>,
24817
24818 /// Output only. Compartment ID of cluster.
24819 pub compartment_id: std::string::String,
24820
24821 /// Output only. DNS listener IP.
24822 pub dns_listener_ip: std::string::String,
24823
24824 /// Optional. OCI Cluster name.
24825 pub cluster_name: std::string::String,
24826
24827 /// Output only. The compute model of the VM Cluster.
24828 pub compute_model: crate::model::ComputeModel,
24829
24830 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24831}
24832
24833impl CloudVmClusterProperties {
24834 pub fn new() -> Self {
24835 std::default::Default::default()
24836 }
24837
24838 /// Sets the value of [ocid][crate::model::CloudVmClusterProperties::ocid].
24839 ///
24840 /// # Example
24841 /// ```ignore,no_run
24842 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24843 /// let x = CloudVmClusterProperties::new().set_ocid("example");
24844 /// ```
24845 pub fn set_ocid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24846 self.ocid = v.into();
24847 self
24848 }
24849
24850 /// Sets the value of [license_type][crate::model::CloudVmClusterProperties::license_type].
24851 ///
24852 /// # Example
24853 /// ```ignore,no_run
24854 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24855 /// use google_cloud_oracledatabase_v1::model::cloud_vm_cluster_properties::LicenseType;
24856 /// let x0 = CloudVmClusterProperties::new().set_license_type(LicenseType::LicenseIncluded);
24857 /// let x1 = CloudVmClusterProperties::new().set_license_type(LicenseType::BringYourOwnLicense);
24858 /// ```
24859 pub fn set_license_type<
24860 T: std::convert::Into<crate::model::cloud_vm_cluster_properties::LicenseType>,
24861 >(
24862 mut self,
24863 v: T,
24864 ) -> Self {
24865 self.license_type = v.into();
24866 self
24867 }
24868
24869 /// Sets the value of [gi_version][crate::model::CloudVmClusterProperties::gi_version].
24870 ///
24871 /// # Example
24872 /// ```ignore,no_run
24873 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24874 /// let x = CloudVmClusterProperties::new().set_gi_version("example");
24875 /// ```
24876 pub fn set_gi_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24877 self.gi_version = v.into();
24878 self
24879 }
24880
24881 /// Sets the value of [time_zone][crate::model::CloudVmClusterProperties::time_zone].
24882 ///
24883 /// # Example
24884 /// ```ignore,no_run
24885 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24886 /// use google_cloud_type::model::TimeZone;
24887 /// let x = CloudVmClusterProperties::new().set_time_zone(TimeZone::default()/* use setters */);
24888 /// ```
24889 pub fn set_time_zone<T>(mut self, v: T) -> Self
24890 where
24891 T: std::convert::Into<google_cloud_type::model::TimeZone>,
24892 {
24893 self.time_zone = std::option::Option::Some(v.into());
24894 self
24895 }
24896
24897 /// Sets or clears the value of [time_zone][crate::model::CloudVmClusterProperties::time_zone].
24898 ///
24899 /// # Example
24900 /// ```ignore,no_run
24901 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24902 /// use google_cloud_type::model::TimeZone;
24903 /// let x = CloudVmClusterProperties::new().set_or_clear_time_zone(Some(TimeZone::default()/* use setters */));
24904 /// let x = CloudVmClusterProperties::new().set_or_clear_time_zone(None::<TimeZone>);
24905 /// ```
24906 pub fn set_or_clear_time_zone<T>(mut self, v: std::option::Option<T>) -> Self
24907 where
24908 T: std::convert::Into<google_cloud_type::model::TimeZone>,
24909 {
24910 self.time_zone = v.map(|x| x.into());
24911 self
24912 }
24913
24914 /// Sets the value of [ssh_public_keys][crate::model::CloudVmClusterProperties::ssh_public_keys].
24915 ///
24916 /// # Example
24917 /// ```ignore,no_run
24918 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24919 /// let x = CloudVmClusterProperties::new().set_ssh_public_keys(["a", "b", "c"]);
24920 /// ```
24921 pub fn set_ssh_public_keys<T, V>(mut self, v: T) -> Self
24922 where
24923 T: std::iter::IntoIterator<Item = V>,
24924 V: std::convert::Into<std::string::String>,
24925 {
24926 use std::iter::Iterator;
24927 self.ssh_public_keys = v.into_iter().map(|i| i.into()).collect();
24928 self
24929 }
24930
24931 /// Sets the value of [node_count][crate::model::CloudVmClusterProperties::node_count].
24932 ///
24933 /// # Example
24934 /// ```ignore,no_run
24935 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24936 /// let x = CloudVmClusterProperties::new().set_node_count(42);
24937 /// ```
24938 pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24939 self.node_count = v.into();
24940 self
24941 }
24942
24943 /// Sets the value of [shape][crate::model::CloudVmClusterProperties::shape].
24944 ///
24945 /// # Example
24946 /// ```ignore,no_run
24947 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24948 /// let x = CloudVmClusterProperties::new().set_shape("example");
24949 /// ```
24950 pub fn set_shape<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24951 self.shape = v.into();
24952 self
24953 }
24954
24955 /// Sets the value of [ocpu_count][crate::model::CloudVmClusterProperties::ocpu_count].
24956 ///
24957 /// # Example
24958 /// ```ignore,no_run
24959 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24960 /// let x = CloudVmClusterProperties::new().set_ocpu_count(42.0);
24961 /// ```
24962 pub fn set_ocpu_count<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
24963 self.ocpu_count = v.into();
24964 self
24965 }
24966
24967 /// Sets the value of [memory_size_gb][crate::model::CloudVmClusterProperties::memory_size_gb].
24968 ///
24969 /// # Example
24970 /// ```ignore,no_run
24971 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24972 /// let x = CloudVmClusterProperties::new().set_memory_size_gb(42);
24973 /// ```
24974 pub fn set_memory_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24975 self.memory_size_gb = v.into();
24976 self
24977 }
24978
24979 /// Sets the value of [db_node_storage_size_gb][crate::model::CloudVmClusterProperties::db_node_storage_size_gb].
24980 ///
24981 /// # Example
24982 /// ```ignore,no_run
24983 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24984 /// let x = CloudVmClusterProperties::new().set_db_node_storage_size_gb(42);
24985 /// ```
24986 pub fn set_db_node_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24987 self.db_node_storage_size_gb = v.into();
24988 self
24989 }
24990
24991 /// Sets the value of [storage_size_gb][crate::model::CloudVmClusterProperties::storage_size_gb].
24992 ///
24993 /// # Example
24994 /// ```ignore,no_run
24995 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
24996 /// let x = CloudVmClusterProperties::new().set_storage_size_gb(42);
24997 /// ```
24998 pub fn set_storage_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24999 self.storage_size_gb = v.into();
25000 self
25001 }
25002
25003 /// Sets the value of [data_storage_size_tb][crate::model::CloudVmClusterProperties::data_storage_size_tb].
25004 ///
25005 /// # Example
25006 /// ```ignore,no_run
25007 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25008 /// let x = CloudVmClusterProperties::new().set_data_storage_size_tb(42.0);
25009 /// ```
25010 pub fn set_data_storage_size_tb<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
25011 self.data_storage_size_tb = v.into();
25012 self
25013 }
25014
25015 /// Sets the value of [disk_redundancy][crate::model::CloudVmClusterProperties::disk_redundancy].
25016 ///
25017 /// # Example
25018 /// ```ignore,no_run
25019 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25020 /// use google_cloud_oracledatabase_v1::model::cloud_vm_cluster_properties::DiskRedundancy;
25021 /// let x0 = CloudVmClusterProperties::new().set_disk_redundancy(DiskRedundancy::High);
25022 /// let x1 = CloudVmClusterProperties::new().set_disk_redundancy(DiskRedundancy::Normal);
25023 /// ```
25024 pub fn set_disk_redundancy<
25025 T: std::convert::Into<crate::model::cloud_vm_cluster_properties::DiskRedundancy>,
25026 >(
25027 mut self,
25028 v: T,
25029 ) -> Self {
25030 self.disk_redundancy = v.into();
25031 self
25032 }
25033
25034 /// Sets the value of [sparse_diskgroup_enabled][crate::model::CloudVmClusterProperties::sparse_diskgroup_enabled].
25035 ///
25036 /// # Example
25037 /// ```ignore,no_run
25038 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25039 /// let x = CloudVmClusterProperties::new().set_sparse_diskgroup_enabled(true);
25040 /// ```
25041 pub fn set_sparse_diskgroup_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25042 self.sparse_diskgroup_enabled = v.into();
25043 self
25044 }
25045
25046 /// Sets the value of [local_backup_enabled][crate::model::CloudVmClusterProperties::local_backup_enabled].
25047 ///
25048 /// # Example
25049 /// ```ignore,no_run
25050 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25051 /// let x = CloudVmClusterProperties::new().set_local_backup_enabled(true);
25052 /// ```
25053 pub fn set_local_backup_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25054 self.local_backup_enabled = v.into();
25055 self
25056 }
25057
25058 /// Sets the value of [hostname_prefix][crate::model::CloudVmClusterProperties::hostname_prefix].
25059 ///
25060 /// # Example
25061 /// ```ignore,no_run
25062 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25063 /// let x = CloudVmClusterProperties::new().set_hostname_prefix("example");
25064 /// ```
25065 pub fn set_hostname_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25066 self.hostname_prefix = v.into();
25067 self
25068 }
25069
25070 /// Sets the value of [diagnostics_data_collection_options][crate::model::CloudVmClusterProperties::diagnostics_data_collection_options].
25071 ///
25072 /// # Example
25073 /// ```ignore,no_run
25074 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25075 /// use google_cloud_oracledatabase_v1::model::DataCollectionOptions;
25076 /// let x = CloudVmClusterProperties::new().set_diagnostics_data_collection_options(DataCollectionOptions::default()/* use setters */);
25077 /// ```
25078 pub fn set_diagnostics_data_collection_options<T>(mut self, v: T) -> Self
25079 where
25080 T: std::convert::Into<crate::model::DataCollectionOptions>,
25081 {
25082 self.diagnostics_data_collection_options = std::option::Option::Some(v.into());
25083 self
25084 }
25085
25086 /// Sets or clears the value of [diagnostics_data_collection_options][crate::model::CloudVmClusterProperties::diagnostics_data_collection_options].
25087 ///
25088 /// # Example
25089 /// ```ignore,no_run
25090 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25091 /// use google_cloud_oracledatabase_v1::model::DataCollectionOptions;
25092 /// let x = CloudVmClusterProperties::new().set_or_clear_diagnostics_data_collection_options(Some(DataCollectionOptions::default()/* use setters */));
25093 /// let x = CloudVmClusterProperties::new().set_or_clear_diagnostics_data_collection_options(None::<DataCollectionOptions>);
25094 /// ```
25095 pub fn set_or_clear_diagnostics_data_collection_options<T>(
25096 mut self,
25097 v: std::option::Option<T>,
25098 ) -> Self
25099 where
25100 T: std::convert::Into<crate::model::DataCollectionOptions>,
25101 {
25102 self.diagnostics_data_collection_options = v.map(|x| x.into());
25103 self
25104 }
25105
25106 /// Sets the value of [state][crate::model::CloudVmClusterProperties::state].
25107 ///
25108 /// # Example
25109 /// ```ignore,no_run
25110 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25111 /// use google_cloud_oracledatabase_v1::model::cloud_vm_cluster_properties::State;
25112 /// let x0 = CloudVmClusterProperties::new().set_state(State::Provisioning);
25113 /// let x1 = CloudVmClusterProperties::new().set_state(State::Available);
25114 /// let x2 = CloudVmClusterProperties::new().set_state(State::Updating);
25115 /// ```
25116 pub fn set_state<T: std::convert::Into<crate::model::cloud_vm_cluster_properties::State>>(
25117 mut self,
25118 v: T,
25119 ) -> Self {
25120 self.state = v.into();
25121 self
25122 }
25123
25124 /// Sets the value of [scan_listener_port_tcp][crate::model::CloudVmClusterProperties::scan_listener_port_tcp].
25125 ///
25126 /// # Example
25127 /// ```ignore,no_run
25128 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25129 /// let x = CloudVmClusterProperties::new().set_scan_listener_port_tcp(42);
25130 /// ```
25131 pub fn set_scan_listener_port_tcp<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
25132 self.scan_listener_port_tcp = v.into();
25133 self
25134 }
25135
25136 /// Sets the value of [scan_listener_port_tcp_ssl][crate::model::CloudVmClusterProperties::scan_listener_port_tcp_ssl].
25137 ///
25138 /// # Example
25139 /// ```ignore,no_run
25140 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25141 /// let x = CloudVmClusterProperties::new().set_scan_listener_port_tcp_ssl(42);
25142 /// ```
25143 pub fn set_scan_listener_port_tcp_ssl<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
25144 self.scan_listener_port_tcp_ssl = v.into();
25145 self
25146 }
25147
25148 /// Sets the value of [domain][crate::model::CloudVmClusterProperties::domain].
25149 ///
25150 /// # Example
25151 /// ```ignore,no_run
25152 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25153 /// let x = CloudVmClusterProperties::new().set_domain("example");
25154 /// ```
25155 pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25156 self.domain = v.into();
25157 self
25158 }
25159
25160 /// Sets the value of [scan_dns][crate::model::CloudVmClusterProperties::scan_dns].
25161 ///
25162 /// # Example
25163 /// ```ignore,no_run
25164 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25165 /// let x = CloudVmClusterProperties::new().set_scan_dns("example");
25166 /// ```
25167 pub fn set_scan_dns<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25168 self.scan_dns = v.into();
25169 self
25170 }
25171
25172 /// Sets the value of [hostname][crate::model::CloudVmClusterProperties::hostname].
25173 ///
25174 /// # Example
25175 /// ```ignore,no_run
25176 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25177 /// let x = CloudVmClusterProperties::new().set_hostname("example");
25178 /// ```
25179 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25180 self.hostname = v.into();
25181 self
25182 }
25183
25184 /// Sets the value of [cpu_core_count][crate::model::CloudVmClusterProperties::cpu_core_count].
25185 ///
25186 /// # Example
25187 /// ```ignore,no_run
25188 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25189 /// let x = CloudVmClusterProperties::new().set_cpu_core_count(42);
25190 /// ```
25191 pub fn set_cpu_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
25192 self.cpu_core_count = v.into();
25193 self
25194 }
25195
25196 /// Sets the value of [system_version][crate::model::CloudVmClusterProperties::system_version].
25197 ///
25198 /// # Example
25199 /// ```ignore,no_run
25200 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25201 /// let x = CloudVmClusterProperties::new().set_system_version("example");
25202 /// ```
25203 pub fn set_system_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25204 self.system_version = v.into();
25205 self
25206 }
25207
25208 /// Sets the value of [scan_ip_ids][crate::model::CloudVmClusterProperties::scan_ip_ids].
25209 ///
25210 /// # Example
25211 /// ```ignore,no_run
25212 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25213 /// let x = CloudVmClusterProperties::new().set_scan_ip_ids(["a", "b", "c"]);
25214 /// ```
25215 pub fn set_scan_ip_ids<T, V>(mut self, v: T) -> Self
25216 where
25217 T: std::iter::IntoIterator<Item = V>,
25218 V: std::convert::Into<std::string::String>,
25219 {
25220 use std::iter::Iterator;
25221 self.scan_ip_ids = v.into_iter().map(|i| i.into()).collect();
25222 self
25223 }
25224
25225 /// Sets the value of [scan_dns_record_id][crate::model::CloudVmClusterProperties::scan_dns_record_id].
25226 ///
25227 /// # Example
25228 /// ```ignore,no_run
25229 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25230 /// let x = CloudVmClusterProperties::new().set_scan_dns_record_id("example");
25231 /// ```
25232 pub fn set_scan_dns_record_id<T: std::convert::Into<std::string::String>>(
25233 mut self,
25234 v: T,
25235 ) -> Self {
25236 self.scan_dns_record_id = v.into();
25237 self
25238 }
25239
25240 /// Sets the value of [oci_url][crate::model::CloudVmClusterProperties::oci_url].
25241 ///
25242 /// # Example
25243 /// ```ignore,no_run
25244 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25245 /// let x = CloudVmClusterProperties::new().set_oci_url("example");
25246 /// ```
25247 pub fn set_oci_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25248 self.oci_url = v.into();
25249 self
25250 }
25251
25252 /// Sets the value of [db_server_ocids][crate::model::CloudVmClusterProperties::db_server_ocids].
25253 ///
25254 /// # Example
25255 /// ```ignore,no_run
25256 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25257 /// let x = CloudVmClusterProperties::new().set_db_server_ocids(["a", "b", "c"]);
25258 /// ```
25259 pub fn set_db_server_ocids<T, V>(mut self, v: T) -> Self
25260 where
25261 T: std::iter::IntoIterator<Item = V>,
25262 V: std::convert::Into<std::string::String>,
25263 {
25264 use std::iter::Iterator;
25265 self.db_server_ocids = v.into_iter().map(|i| i.into()).collect();
25266 self
25267 }
25268
25269 /// Sets the value of [compartment_id][crate::model::CloudVmClusterProperties::compartment_id].
25270 ///
25271 /// # Example
25272 /// ```ignore,no_run
25273 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25274 /// let x = CloudVmClusterProperties::new().set_compartment_id("example");
25275 /// ```
25276 pub fn set_compartment_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25277 self.compartment_id = v.into();
25278 self
25279 }
25280
25281 /// Sets the value of [dns_listener_ip][crate::model::CloudVmClusterProperties::dns_listener_ip].
25282 ///
25283 /// # Example
25284 /// ```ignore,no_run
25285 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25286 /// let x = CloudVmClusterProperties::new().set_dns_listener_ip("example");
25287 /// ```
25288 pub fn set_dns_listener_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25289 self.dns_listener_ip = v.into();
25290 self
25291 }
25292
25293 /// Sets the value of [cluster_name][crate::model::CloudVmClusterProperties::cluster_name].
25294 ///
25295 /// # Example
25296 /// ```ignore,no_run
25297 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25298 /// let x = CloudVmClusterProperties::new().set_cluster_name("example");
25299 /// ```
25300 pub fn set_cluster_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25301 self.cluster_name = v.into();
25302 self
25303 }
25304
25305 /// Sets the value of [compute_model][crate::model::CloudVmClusterProperties::compute_model].
25306 ///
25307 /// # Example
25308 /// ```ignore,no_run
25309 /// # use google_cloud_oracledatabase_v1::model::CloudVmClusterProperties;
25310 /// use google_cloud_oracledatabase_v1::model::ComputeModel;
25311 /// let x0 = CloudVmClusterProperties::new().set_compute_model(ComputeModel::Ecpu);
25312 /// let x1 = CloudVmClusterProperties::new().set_compute_model(ComputeModel::Ocpu);
25313 /// ```
25314 pub fn set_compute_model<T: std::convert::Into<crate::model::ComputeModel>>(
25315 mut self,
25316 v: T,
25317 ) -> Self {
25318 self.compute_model = v.into();
25319 self
25320 }
25321}
25322
25323impl wkt::message::Message for CloudVmClusterProperties {
25324 fn typename() -> &'static str {
25325 "type.googleapis.com/google.cloud.oracledatabase.v1.CloudVmClusterProperties"
25326 }
25327}
25328
25329/// Defines additional types related to [CloudVmClusterProperties].
25330pub mod cloud_vm_cluster_properties {
25331 #[allow(unused_imports)]
25332 use super::*;
25333
25334 /// Different licenses supported.
25335 ///
25336 /// # Working with unknown values
25337 ///
25338 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25339 /// additional enum variants at any time. Adding new variants is not considered
25340 /// a breaking change. Applications should write their code in anticipation of:
25341 ///
25342 /// - New values appearing in future releases of the client library, **and**
25343 /// - New values received dynamically, without application changes.
25344 ///
25345 /// Please consult the [Working with enums] section in the user guide for some
25346 /// guidelines.
25347 ///
25348 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25349 #[derive(Clone, Debug, PartialEq)]
25350 #[non_exhaustive]
25351 pub enum LicenseType {
25352 /// Unspecified
25353 Unspecified,
25354 /// License included part of offer
25355 LicenseIncluded,
25356 /// Bring your own license
25357 BringYourOwnLicense,
25358 /// If set, the enum was initialized with an unknown value.
25359 ///
25360 /// Applications can examine the value using [LicenseType::value] or
25361 /// [LicenseType::name].
25362 UnknownValue(license_type::UnknownValue),
25363 }
25364
25365 #[doc(hidden)]
25366 pub mod license_type {
25367 #[allow(unused_imports)]
25368 use super::*;
25369 #[derive(Clone, Debug, PartialEq)]
25370 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25371 }
25372
25373 impl LicenseType {
25374 /// Gets the enum value.
25375 ///
25376 /// Returns `None` if the enum contains an unknown value deserialized from
25377 /// the string representation of enums.
25378 pub fn value(&self) -> std::option::Option<i32> {
25379 match self {
25380 Self::Unspecified => std::option::Option::Some(0),
25381 Self::LicenseIncluded => std::option::Option::Some(1),
25382 Self::BringYourOwnLicense => std::option::Option::Some(2),
25383 Self::UnknownValue(u) => u.0.value(),
25384 }
25385 }
25386
25387 /// Gets the enum value as a string.
25388 ///
25389 /// Returns `None` if the enum contains an unknown value deserialized from
25390 /// the integer representation of enums.
25391 pub fn name(&self) -> std::option::Option<&str> {
25392 match self {
25393 Self::Unspecified => std::option::Option::Some("LICENSE_TYPE_UNSPECIFIED"),
25394 Self::LicenseIncluded => std::option::Option::Some("LICENSE_INCLUDED"),
25395 Self::BringYourOwnLicense => std::option::Option::Some("BRING_YOUR_OWN_LICENSE"),
25396 Self::UnknownValue(u) => u.0.name(),
25397 }
25398 }
25399 }
25400
25401 impl std::default::Default for LicenseType {
25402 fn default() -> Self {
25403 use std::convert::From;
25404 Self::from(0)
25405 }
25406 }
25407
25408 impl std::fmt::Display for LicenseType {
25409 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25410 wkt::internal::display_enum(f, self.name(), self.value())
25411 }
25412 }
25413
25414 impl std::convert::From<i32> for LicenseType {
25415 fn from(value: i32) -> Self {
25416 match value {
25417 0 => Self::Unspecified,
25418 1 => Self::LicenseIncluded,
25419 2 => Self::BringYourOwnLicense,
25420 _ => Self::UnknownValue(license_type::UnknownValue(
25421 wkt::internal::UnknownEnumValue::Integer(value),
25422 )),
25423 }
25424 }
25425 }
25426
25427 impl std::convert::From<&str> for LicenseType {
25428 fn from(value: &str) -> Self {
25429 use std::string::ToString;
25430 match value {
25431 "LICENSE_TYPE_UNSPECIFIED" => Self::Unspecified,
25432 "LICENSE_INCLUDED" => Self::LicenseIncluded,
25433 "BRING_YOUR_OWN_LICENSE" => Self::BringYourOwnLicense,
25434 _ => Self::UnknownValue(license_type::UnknownValue(
25435 wkt::internal::UnknownEnumValue::String(value.to_string()),
25436 )),
25437 }
25438 }
25439 }
25440
25441 impl serde::ser::Serialize for LicenseType {
25442 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25443 where
25444 S: serde::Serializer,
25445 {
25446 match self {
25447 Self::Unspecified => serializer.serialize_i32(0),
25448 Self::LicenseIncluded => serializer.serialize_i32(1),
25449 Self::BringYourOwnLicense => serializer.serialize_i32(2),
25450 Self::UnknownValue(u) => u.0.serialize(serializer),
25451 }
25452 }
25453 }
25454
25455 impl<'de> serde::de::Deserialize<'de> for LicenseType {
25456 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25457 where
25458 D: serde::Deserializer<'de>,
25459 {
25460 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LicenseType>::new(
25461 ".google.cloud.oracledatabase.v1.CloudVmClusterProperties.LicenseType",
25462 ))
25463 }
25464 }
25465
25466 /// Types of disk redundancy provided by Oracle.
25467 ///
25468 /// # Working with unknown values
25469 ///
25470 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25471 /// additional enum variants at any time. Adding new variants is not considered
25472 /// a breaking change. Applications should write their code in anticipation of:
25473 ///
25474 /// - New values appearing in future releases of the client library, **and**
25475 /// - New values received dynamically, without application changes.
25476 ///
25477 /// Please consult the [Working with enums] section in the user guide for some
25478 /// guidelines.
25479 ///
25480 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25481 #[derive(Clone, Debug, PartialEq)]
25482 #[non_exhaustive]
25483 pub enum DiskRedundancy {
25484 /// Unspecified.
25485 Unspecified,
25486 /// High - 3 way mirror.
25487 High,
25488 /// Normal - 2 way mirror.
25489 Normal,
25490 /// If set, the enum was initialized with an unknown value.
25491 ///
25492 /// Applications can examine the value using [DiskRedundancy::value] or
25493 /// [DiskRedundancy::name].
25494 UnknownValue(disk_redundancy::UnknownValue),
25495 }
25496
25497 #[doc(hidden)]
25498 pub mod disk_redundancy {
25499 #[allow(unused_imports)]
25500 use super::*;
25501 #[derive(Clone, Debug, PartialEq)]
25502 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25503 }
25504
25505 impl DiskRedundancy {
25506 /// Gets the enum value.
25507 ///
25508 /// Returns `None` if the enum contains an unknown value deserialized from
25509 /// the string representation of enums.
25510 pub fn value(&self) -> std::option::Option<i32> {
25511 match self {
25512 Self::Unspecified => std::option::Option::Some(0),
25513 Self::High => std::option::Option::Some(1),
25514 Self::Normal => std::option::Option::Some(2),
25515 Self::UnknownValue(u) => u.0.value(),
25516 }
25517 }
25518
25519 /// Gets the enum value as a string.
25520 ///
25521 /// Returns `None` if the enum contains an unknown value deserialized from
25522 /// the integer representation of enums.
25523 pub fn name(&self) -> std::option::Option<&str> {
25524 match self {
25525 Self::Unspecified => std::option::Option::Some("DISK_REDUNDANCY_UNSPECIFIED"),
25526 Self::High => std::option::Option::Some("HIGH"),
25527 Self::Normal => std::option::Option::Some("NORMAL"),
25528 Self::UnknownValue(u) => u.0.name(),
25529 }
25530 }
25531 }
25532
25533 impl std::default::Default for DiskRedundancy {
25534 fn default() -> Self {
25535 use std::convert::From;
25536 Self::from(0)
25537 }
25538 }
25539
25540 impl std::fmt::Display for DiskRedundancy {
25541 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25542 wkt::internal::display_enum(f, self.name(), self.value())
25543 }
25544 }
25545
25546 impl std::convert::From<i32> for DiskRedundancy {
25547 fn from(value: i32) -> Self {
25548 match value {
25549 0 => Self::Unspecified,
25550 1 => Self::High,
25551 2 => Self::Normal,
25552 _ => Self::UnknownValue(disk_redundancy::UnknownValue(
25553 wkt::internal::UnknownEnumValue::Integer(value),
25554 )),
25555 }
25556 }
25557 }
25558
25559 impl std::convert::From<&str> for DiskRedundancy {
25560 fn from(value: &str) -> Self {
25561 use std::string::ToString;
25562 match value {
25563 "DISK_REDUNDANCY_UNSPECIFIED" => Self::Unspecified,
25564 "HIGH" => Self::High,
25565 "NORMAL" => Self::Normal,
25566 _ => Self::UnknownValue(disk_redundancy::UnknownValue(
25567 wkt::internal::UnknownEnumValue::String(value.to_string()),
25568 )),
25569 }
25570 }
25571 }
25572
25573 impl serde::ser::Serialize for DiskRedundancy {
25574 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25575 where
25576 S: serde::Serializer,
25577 {
25578 match self {
25579 Self::Unspecified => serializer.serialize_i32(0),
25580 Self::High => serializer.serialize_i32(1),
25581 Self::Normal => serializer.serialize_i32(2),
25582 Self::UnknownValue(u) => u.0.serialize(serializer),
25583 }
25584 }
25585 }
25586
25587 impl<'de> serde::de::Deserialize<'de> for DiskRedundancy {
25588 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25589 where
25590 D: serde::Deserializer<'de>,
25591 {
25592 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DiskRedundancy>::new(
25593 ".google.cloud.oracledatabase.v1.CloudVmClusterProperties.DiskRedundancy",
25594 ))
25595 }
25596 }
25597
25598 /// The various lifecycle states of the VM cluster.
25599 ///
25600 /// # Working with unknown values
25601 ///
25602 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25603 /// additional enum variants at any time. Adding new variants is not considered
25604 /// a breaking change. Applications should write their code in anticipation of:
25605 ///
25606 /// - New values appearing in future releases of the client library, **and**
25607 /// - New values received dynamically, without application changes.
25608 ///
25609 /// Please consult the [Working with enums] section in the user guide for some
25610 /// guidelines.
25611 ///
25612 /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25613 #[derive(Clone, Debug, PartialEq)]
25614 #[non_exhaustive]
25615 pub enum State {
25616 /// Default unspecified value.
25617 Unspecified,
25618 /// Indicates that the resource is in provisioning state.
25619 Provisioning,
25620 /// Indicates that the resource is in available state.
25621 Available,
25622 /// Indicates that the resource is in updating state.
25623 Updating,
25624 /// Indicates that the resource is in terminating state.
25625 Terminating,
25626 /// Indicates that the resource is in terminated state.
25627 Terminated,
25628 /// Indicates that the resource is in failed state.
25629 Failed,
25630 /// Indicates that the resource is in maintenance in progress state.
25631 MaintenanceInProgress,
25632 /// If set, the enum was initialized with an unknown value.
25633 ///
25634 /// Applications can examine the value using [State::value] or
25635 /// [State::name].
25636 UnknownValue(state::UnknownValue),
25637 }
25638
25639 #[doc(hidden)]
25640 pub mod state {
25641 #[allow(unused_imports)]
25642 use super::*;
25643 #[derive(Clone, Debug, PartialEq)]
25644 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25645 }
25646
25647 impl State {
25648 /// Gets the enum value.
25649 ///
25650 /// Returns `None` if the enum contains an unknown value deserialized from
25651 /// the string representation of enums.
25652 pub fn value(&self) -> std::option::Option<i32> {
25653 match self {
25654 Self::Unspecified => std::option::Option::Some(0),
25655 Self::Provisioning => std::option::Option::Some(1),
25656 Self::Available => std::option::Option::Some(2),
25657 Self::Updating => std::option::Option::Some(3),
25658 Self::Terminating => std::option::Option::Some(4),
25659 Self::Terminated => std::option::Option::Some(5),
25660 Self::Failed => std::option::Option::Some(6),
25661 Self::MaintenanceInProgress => std::option::Option::Some(7),
25662 Self::UnknownValue(u) => u.0.value(),
25663 }
25664 }
25665
25666 /// Gets the enum value as a string.
25667 ///
25668 /// Returns `None` if the enum contains an unknown value deserialized from
25669 /// the integer representation of enums.
25670 pub fn name(&self) -> std::option::Option<&str> {
25671 match self {
25672 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
25673 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
25674 Self::Available => std::option::Option::Some("AVAILABLE"),
25675 Self::Updating => std::option::Option::Some("UPDATING"),
25676 Self::Terminating => std::option::Option::Some("TERMINATING"),
25677 Self::Terminated => std::option::Option::Some("TERMINATED"),
25678 Self::Failed => std::option::Option::Some("FAILED"),
25679 Self::MaintenanceInProgress => std::option::Option::Some("MAINTENANCE_IN_PROGRESS"),
25680 Self::UnknownValue(u) => u.0.name(),
25681 }
25682 }
25683 }
25684
25685 impl std::default::Default for State {
25686 fn default() -> Self {
25687 use std::convert::From;
25688 Self::from(0)
25689 }
25690 }
25691
25692 impl std::fmt::Display for State {
25693 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25694 wkt::internal::display_enum(f, self.name(), self.value())
25695 }
25696 }
25697
25698 impl std::convert::From<i32> for State {
25699 fn from(value: i32) -> Self {
25700 match value {
25701 0 => Self::Unspecified,
25702 1 => Self::Provisioning,
25703 2 => Self::Available,
25704 3 => Self::Updating,
25705 4 => Self::Terminating,
25706 5 => Self::Terminated,
25707 6 => Self::Failed,
25708 7 => Self::MaintenanceInProgress,
25709 _ => Self::UnknownValue(state::UnknownValue(
25710 wkt::internal::UnknownEnumValue::Integer(value),
25711 )),
25712 }
25713 }
25714 }
25715
25716 impl std::convert::From<&str> for State {
25717 fn from(value: &str) -> Self {
25718 use std::string::ToString;
25719 match value {
25720 "STATE_UNSPECIFIED" => Self::Unspecified,
25721 "PROVISIONING" => Self::Provisioning,
25722 "AVAILABLE" => Self::Available,
25723 "UPDATING" => Self::Updating,
25724 "TERMINATING" => Self::Terminating,
25725 "TERMINATED" => Self::Terminated,
25726 "FAILED" => Self::Failed,
25727 "MAINTENANCE_IN_PROGRESS" => Self::MaintenanceInProgress,
25728 _ => Self::UnknownValue(state::UnknownValue(
25729 wkt::internal::UnknownEnumValue::String(value.to_string()),
25730 )),
25731 }
25732 }
25733 }
25734
25735 impl serde::ser::Serialize for State {
25736 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25737 where
25738 S: serde::Serializer,
25739 {
25740 match self {
25741 Self::Unspecified => serializer.serialize_i32(0),
25742 Self::Provisioning => serializer.serialize_i32(1),
25743 Self::Available => serializer.serialize_i32(2),
25744 Self::Updating => serializer.serialize_i32(3),
25745 Self::Terminating => serializer.serialize_i32(4),
25746 Self::Terminated => serializer.serialize_i32(5),
25747 Self::Failed => serializer.serialize_i32(6),
25748 Self::MaintenanceInProgress => serializer.serialize_i32(7),
25749 Self::UnknownValue(u) => u.0.serialize(serializer),
25750 }
25751 }
25752 }
25753
25754 impl<'de> serde::de::Deserialize<'de> for State {
25755 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25756 where
25757 D: serde::Deserializer<'de>,
25758 {
25759 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
25760 ".google.cloud.oracledatabase.v1.CloudVmClusterProperties.State",
25761 ))
25762 }
25763 }
25764}
25765
25766/// Data collection options for diagnostics.
25767#[derive(Clone, Default, PartialEq)]
25768#[non_exhaustive]
25769pub struct DataCollectionOptions {
25770 /// Optional. Indicates whether diagnostic collection is enabled for the VM
25771 /// cluster
25772 pub diagnostics_events_enabled: bool,
25773
25774 /// Optional. Indicates whether health monitoring is enabled for the VM cluster
25775 pub health_monitoring_enabled: bool,
25776
25777 /// Optional. Indicates whether incident logs and trace collection are enabled
25778 /// for the VM cluster
25779 pub incident_logs_enabled: bool,
25780
25781 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25782}
25783
25784impl DataCollectionOptions {
25785 pub fn new() -> Self {
25786 std::default::Default::default()
25787 }
25788
25789 /// Sets the value of [diagnostics_events_enabled][crate::model::DataCollectionOptions::diagnostics_events_enabled].
25790 ///
25791 /// # Example
25792 /// ```ignore,no_run
25793 /// # use google_cloud_oracledatabase_v1::model::DataCollectionOptions;
25794 /// let x = DataCollectionOptions::new().set_diagnostics_events_enabled(true);
25795 /// ```
25796 pub fn set_diagnostics_events_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25797 self.diagnostics_events_enabled = v.into();
25798 self
25799 }
25800
25801 /// Sets the value of [health_monitoring_enabled][crate::model::DataCollectionOptions::health_monitoring_enabled].
25802 ///
25803 /// # Example
25804 /// ```ignore,no_run
25805 /// # use google_cloud_oracledatabase_v1::model::DataCollectionOptions;
25806 /// let x = DataCollectionOptions::new().set_health_monitoring_enabled(true);
25807 /// ```
25808 pub fn set_health_monitoring_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25809 self.health_monitoring_enabled = v.into();
25810 self
25811 }
25812
25813 /// Sets the value of [incident_logs_enabled][crate::model::DataCollectionOptions::incident_logs_enabled].
25814 ///
25815 /// # Example
25816 /// ```ignore,no_run
25817 /// # use google_cloud_oracledatabase_v1::model::DataCollectionOptions;
25818 /// let x = DataCollectionOptions::new().set_incident_logs_enabled(true);
25819 /// ```
25820 pub fn set_incident_logs_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25821 self.incident_logs_enabled = v.into();
25822 self
25823 }
25824}
25825
25826impl wkt::message::Message for DataCollectionOptions {
25827 fn typename() -> &'static str {
25828 "type.googleapis.com/google.cloud.oracledatabase.v1.DataCollectionOptions"
25829 }
25830}
25831
25832/// The type of wallet generation.
25833///
25834/// # Working with unknown values
25835///
25836/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25837/// additional enum variants at any time. Adding new variants is not considered
25838/// a breaking change. Applications should write their code in anticipation of:
25839///
25840/// - New values appearing in future releases of the client library, **and**
25841/// - New values received dynamically, without application changes.
25842///
25843/// Please consult the [Working with enums] section in the user guide for some
25844/// guidelines.
25845///
25846/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25847#[derive(Clone, Debug, PartialEq)]
25848#[non_exhaustive]
25849pub enum GenerateType {
25850 /// Default unspecified value.
25851 Unspecified,
25852 /// Used to generate wallet for all databases in the region.
25853 All,
25854 /// Used to generate wallet for a single database.
25855 Single,
25856 /// If set, the enum was initialized with an unknown value.
25857 ///
25858 /// Applications can examine the value using [GenerateType::value] or
25859 /// [GenerateType::name].
25860 UnknownValue(generate_type::UnknownValue),
25861}
25862
25863#[doc(hidden)]
25864pub mod generate_type {
25865 #[allow(unused_imports)]
25866 use super::*;
25867 #[derive(Clone, Debug, PartialEq)]
25868 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25869}
25870
25871impl GenerateType {
25872 /// Gets the enum value.
25873 ///
25874 /// Returns `None` if the enum contains an unknown value deserialized from
25875 /// the string representation of enums.
25876 pub fn value(&self) -> std::option::Option<i32> {
25877 match self {
25878 Self::Unspecified => std::option::Option::Some(0),
25879 Self::All => std::option::Option::Some(1),
25880 Self::Single => std::option::Option::Some(2),
25881 Self::UnknownValue(u) => u.0.value(),
25882 }
25883 }
25884
25885 /// Gets the enum value as a string.
25886 ///
25887 /// Returns `None` if the enum contains an unknown value deserialized from
25888 /// the integer representation of enums.
25889 pub fn name(&self) -> std::option::Option<&str> {
25890 match self {
25891 Self::Unspecified => std::option::Option::Some("GENERATE_TYPE_UNSPECIFIED"),
25892 Self::All => std::option::Option::Some("ALL"),
25893 Self::Single => std::option::Option::Some("SINGLE"),
25894 Self::UnknownValue(u) => u.0.name(),
25895 }
25896 }
25897}
25898
25899impl std::default::Default for GenerateType {
25900 fn default() -> Self {
25901 use std::convert::From;
25902 Self::from(0)
25903 }
25904}
25905
25906impl std::fmt::Display for GenerateType {
25907 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25908 wkt::internal::display_enum(f, self.name(), self.value())
25909 }
25910}
25911
25912impl std::convert::From<i32> for GenerateType {
25913 fn from(value: i32) -> Self {
25914 match value {
25915 0 => Self::Unspecified,
25916 1 => Self::All,
25917 2 => Self::Single,
25918 _ => Self::UnknownValue(generate_type::UnknownValue(
25919 wkt::internal::UnknownEnumValue::Integer(value),
25920 )),
25921 }
25922 }
25923}
25924
25925impl std::convert::From<&str> for GenerateType {
25926 fn from(value: &str) -> Self {
25927 use std::string::ToString;
25928 match value {
25929 "GENERATE_TYPE_UNSPECIFIED" => Self::Unspecified,
25930 "ALL" => Self::All,
25931 "SINGLE" => Self::Single,
25932 _ => Self::UnknownValue(generate_type::UnknownValue(
25933 wkt::internal::UnknownEnumValue::String(value.to_string()),
25934 )),
25935 }
25936 }
25937}
25938
25939impl serde::ser::Serialize for GenerateType {
25940 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25941 where
25942 S: serde::Serializer,
25943 {
25944 match self {
25945 Self::Unspecified => serializer.serialize_i32(0),
25946 Self::All => serializer.serialize_i32(1),
25947 Self::Single => serializer.serialize_i32(2),
25948 Self::UnknownValue(u) => u.0.serialize(serializer),
25949 }
25950 }
25951}
25952
25953impl<'de> serde::de::Deserialize<'de> for GenerateType {
25954 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25955 where
25956 D: serde::Deserializer<'de>,
25957 {
25958 deserializer.deserialize_any(wkt::internal::EnumVisitor::<GenerateType>::new(
25959 ".google.cloud.oracledatabase.v1.GenerateType",
25960 ))
25961 }
25962}
25963
25964/// The various lifecycle states of the Autonomous Database.
25965///
25966/// # Working with unknown values
25967///
25968/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25969/// additional enum variants at any time. Adding new variants is not considered
25970/// a breaking change. Applications should write their code in anticipation of:
25971///
25972/// - New values appearing in future releases of the client library, **and**
25973/// - New values received dynamically, without application changes.
25974///
25975/// Please consult the [Working with enums] section in the user guide for some
25976/// guidelines.
25977///
25978/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25979#[derive(Clone, Debug, PartialEq)]
25980#[non_exhaustive]
25981pub enum State {
25982 /// Default unspecified value.
25983 Unspecified,
25984 /// Indicates that the Autonomous Database is in provisioning state.
25985 Provisioning,
25986 /// Indicates that the Autonomous Database is in available state.
25987 Available,
25988 /// Indicates that the Autonomous Database is in stopping state.
25989 Stopping,
25990 /// Indicates that the Autonomous Database is in stopped state.
25991 Stopped,
25992 /// Indicates that the Autonomous Database is in starting state.
25993 Starting,
25994 /// Indicates that the Autonomous Database is in terminating state.
25995 Terminating,
25996 /// Indicates that the Autonomous Database is in terminated state.
25997 Terminated,
25998 /// Indicates that the Autonomous Database is in unavailable state.
25999 Unavailable,
26000 /// Indicates that the Autonomous Database restore is in progress.
26001 RestoreInProgress,
26002 /// Indicates that the Autonomous Database failed to restore.
26003 RestoreFailed,
26004 /// Indicates that the Autonomous Database backup is in progress.
26005 BackupInProgress,
26006 /// Indicates that the Autonomous Database scale is in progress.
26007 ScaleInProgress,
26008 /// Indicates that the Autonomous Database is available but needs attention
26009 /// state.
26010 AvailableNeedsAttention,
26011 /// Indicates that the Autonomous Database is in updating state.
26012 Updating,
26013 /// Indicates that the Autonomous Database's maintenance is in progress state.
26014 MaintenanceInProgress,
26015 /// Indicates that the Autonomous Database is in restarting state.
26016 Restarting,
26017 /// Indicates that the Autonomous Database is in recreating state.
26018 Recreating,
26019 /// Indicates that the Autonomous Database's role change is in progress state.
26020 RoleChangeInProgress,
26021 /// Indicates that the Autonomous Database is in upgrading state.
26022 Upgrading,
26023 /// Indicates that the Autonomous Database is in inaccessible state.
26024 Inaccessible,
26025 /// Indicates that the Autonomous Database is in standby state.
26026 Standby,
26027 /// If set, the enum was initialized with an unknown value.
26028 ///
26029 /// Applications can examine the value using [State::value] or
26030 /// [State::name].
26031 UnknownValue(state::UnknownValue),
26032}
26033
26034#[doc(hidden)]
26035pub mod state {
26036 #[allow(unused_imports)]
26037 use super::*;
26038 #[derive(Clone, Debug, PartialEq)]
26039 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26040}
26041
26042impl State {
26043 /// Gets the enum value.
26044 ///
26045 /// Returns `None` if the enum contains an unknown value deserialized from
26046 /// the string representation of enums.
26047 pub fn value(&self) -> std::option::Option<i32> {
26048 match self {
26049 Self::Unspecified => std::option::Option::Some(0),
26050 Self::Provisioning => std::option::Option::Some(1),
26051 Self::Available => std::option::Option::Some(2),
26052 Self::Stopping => std::option::Option::Some(3),
26053 Self::Stopped => std::option::Option::Some(4),
26054 Self::Starting => std::option::Option::Some(5),
26055 Self::Terminating => std::option::Option::Some(6),
26056 Self::Terminated => std::option::Option::Some(7),
26057 Self::Unavailable => std::option::Option::Some(8),
26058 Self::RestoreInProgress => std::option::Option::Some(9),
26059 Self::RestoreFailed => std::option::Option::Some(10),
26060 Self::BackupInProgress => std::option::Option::Some(11),
26061 Self::ScaleInProgress => std::option::Option::Some(12),
26062 Self::AvailableNeedsAttention => std::option::Option::Some(13),
26063 Self::Updating => std::option::Option::Some(14),
26064 Self::MaintenanceInProgress => std::option::Option::Some(15),
26065 Self::Restarting => std::option::Option::Some(16),
26066 Self::Recreating => std::option::Option::Some(17),
26067 Self::RoleChangeInProgress => std::option::Option::Some(18),
26068 Self::Upgrading => std::option::Option::Some(19),
26069 Self::Inaccessible => std::option::Option::Some(20),
26070 Self::Standby => std::option::Option::Some(21),
26071 Self::UnknownValue(u) => u.0.value(),
26072 }
26073 }
26074
26075 /// Gets the enum value as a string.
26076 ///
26077 /// Returns `None` if the enum contains an unknown value deserialized from
26078 /// the integer representation of enums.
26079 pub fn name(&self) -> std::option::Option<&str> {
26080 match self {
26081 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
26082 Self::Provisioning => std::option::Option::Some("PROVISIONING"),
26083 Self::Available => std::option::Option::Some("AVAILABLE"),
26084 Self::Stopping => std::option::Option::Some("STOPPING"),
26085 Self::Stopped => std::option::Option::Some("STOPPED"),
26086 Self::Starting => std::option::Option::Some("STARTING"),
26087 Self::Terminating => std::option::Option::Some("TERMINATING"),
26088 Self::Terminated => std::option::Option::Some("TERMINATED"),
26089 Self::Unavailable => std::option::Option::Some("UNAVAILABLE"),
26090 Self::RestoreInProgress => std::option::Option::Some("RESTORE_IN_PROGRESS"),
26091 Self::RestoreFailed => std::option::Option::Some("RESTORE_FAILED"),
26092 Self::BackupInProgress => std::option::Option::Some("BACKUP_IN_PROGRESS"),
26093 Self::ScaleInProgress => std::option::Option::Some("SCALE_IN_PROGRESS"),
26094 Self::AvailableNeedsAttention => std::option::Option::Some("AVAILABLE_NEEDS_ATTENTION"),
26095 Self::Updating => std::option::Option::Some("UPDATING"),
26096 Self::MaintenanceInProgress => std::option::Option::Some("MAINTENANCE_IN_PROGRESS"),
26097 Self::Restarting => std::option::Option::Some("RESTARTING"),
26098 Self::Recreating => std::option::Option::Some("RECREATING"),
26099 Self::RoleChangeInProgress => std::option::Option::Some("ROLE_CHANGE_IN_PROGRESS"),
26100 Self::Upgrading => std::option::Option::Some("UPGRADING"),
26101 Self::Inaccessible => std::option::Option::Some("INACCESSIBLE"),
26102 Self::Standby => std::option::Option::Some("STANDBY"),
26103 Self::UnknownValue(u) => u.0.name(),
26104 }
26105 }
26106}
26107
26108impl std::default::Default for State {
26109 fn default() -> Self {
26110 use std::convert::From;
26111 Self::from(0)
26112 }
26113}
26114
26115impl std::fmt::Display for State {
26116 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26117 wkt::internal::display_enum(f, self.name(), self.value())
26118 }
26119}
26120
26121impl std::convert::From<i32> for State {
26122 fn from(value: i32) -> Self {
26123 match value {
26124 0 => Self::Unspecified,
26125 1 => Self::Provisioning,
26126 2 => Self::Available,
26127 3 => Self::Stopping,
26128 4 => Self::Stopped,
26129 5 => Self::Starting,
26130 6 => Self::Terminating,
26131 7 => Self::Terminated,
26132 8 => Self::Unavailable,
26133 9 => Self::RestoreInProgress,
26134 10 => Self::RestoreFailed,
26135 11 => Self::BackupInProgress,
26136 12 => Self::ScaleInProgress,
26137 13 => Self::AvailableNeedsAttention,
26138 14 => Self::Updating,
26139 15 => Self::MaintenanceInProgress,
26140 16 => Self::Restarting,
26141 17 => Self::Recreating,
26142 18 => Self::RoleChangeInProgress,
26143 19 => Self::Upgrading,
26144 20 => Self::Inaccessible,
26145 21 => Self::Standby,
26146 _ => Self::UnknownValue(state::UnknownValue(
26147 wkt::internal::UnknownEnumValue::Integer(value),
26148 )),
26149 }
26150 }
26151}
26152
26153impl std::convert::From<&str> for State {
26154 fn from(value: &str) -> Self {
26155 use std::string::ToString;
26156 match value {
26157 "STATE_UNSPECIFIED" => Self::Unspecified,
26158 "PROVISIONING" => Self::Provisioning,
26159 "AVAILABLE" => Self::Available,
26160 "STOPPING" => Self::Stopping,
26161 "STOPPED" => Self::Stopped,
26162 "STARTING" => Self::Starting,
26163 "TERMINATING" => Self::Terminating,
26164 "TERMINATED" => Self::Terminated,
26165 "UNAVAILABLE" => Self::Unavailable,
26166 "RESTORE_IN_PROGRESS" => Self::RestoreInProgress,
26167 "RESTORE_FAILED" => Self::RestoreFailed,
26168 "BACKUP_IN_PROGRESS" => Self::BackupInProgress,
26169 "SCALE_IN_PROGRESS" => Self::ScaleInProgress,
26170 "AVAILABLE_NEEDS_ATTENTION" => Self::AvailableNeedsAttention,
26171 "UPDATING" => Self::Updating,
26172 "MAINTENANCE_IN_PROGRESS" => Self::MaintenanceInProgress,
26173 "RESTARTING" => Self::Restarting,
26174 "RECREATING" => Self::Recreating,
26175 "ROLE_CHANGE_IN_PROGRESS" => Self::RoleChangeInProgress,
26176 "UPGRADING" => Self::Upgrading,
26177 "INACCESSIBLE" => Self::Inaccessible,
26178 "STANDBY" => Self::Standby,
26179 _ => Self::UnknownValue(state::UnknownValue(
26180 wkt::internal::UnknownEnumValue::String(value.to_string()),
26181 )),
26182 }
26183 }
26184}
26185
26186impl serde::ser::Serialize for State {
26187 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26188 where
26189 S: serde::Serializer,
26190 {
26191 match self {
26192 Self::Unspecified => serializer.serialize_i32(0),
26193 Self::Provisioning => serializer.serialize_i32(1),
26194 Self::Available => serializer.serialize_i32(2),
26195 Self::Stopping => serializer.serialize_i32(3),
26196 Self::Stopped => serializer.serialize_i32(4),
26197 Self::Starting => serializer.serialize_i32(5),
26198 Self::Terminating => serializer.serialize_i32(6),
26199 Self::Terminated => serializer.serialize_i32(7),
26200 Self::Unavailable => serializer.serialize_i32(8),
26201 Self::RestoreInProgress => serializer.serialize_i32(9),
26202 Self::RestoreFailed => serializer.serialize_i32(10),
26203 Self::BackupInProgress => serializer.serialize_i32(11),
26204 Self::ScaleInProgress => serializer.serialize_i32(12),
26205 Self::AvailableNeedsAttention => serializer.serialize_i32(13),
26206 Self::Updating => serializer.serialize_i32(14),
26207 Self::MaintenanceInProgress => serializer.serialize_i32(15),
26208 Self::Restarting => serializer.serialize_i32(16),
26209 Self::Recreating => serializer.serialize_i32(17),
26210 Self::RoleChangeInProgress => serializer.serialize_i32(18),
26211 Self::Upgrading => serializer.serialize_i32(19),
26212 Self::Inaccessible => serializer.serialize_i32(20),
26213 Self::Standby => serializer.serialize_i32(21),
26214 Self::UnknownValue(u) => u.0.serialize(serializer),
26215 }
26216 }
26217}
26218
26219impl<'de> serde::de::Deserialize<'de> for State {
26220 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26221 where
26222 D: serde::Deserializer<'de>,
26223 {
26224 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
26225 ".google.cloud.oracledatabase.v1.State",
26226 ))
26227 }
26228}
26229
26230/// The state of the Operations Insights for this Autonomous Database.
26231///
26232/// # Working with unknown values
26233///
26234/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26235/// additional enum variants at any time. Adding new variants is not considered
26236/// a breaking change. Applications should write their code in anticipation of:
26237///
26238/// - New values appearing in future releases of the client library, **and**
26239/// - New values received dynamically, without application changes.
26240///
26241/// Please consult the [Working with enums] section in the user guide for some
26242/// guidelines.
26243///
26244/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26245#[derive(Clone, Debug, PartialEq)]
26246#[non_exhaustive]
26247pub enum OperationsInsightsState {
26248 /// Default unspecified value.
26249 Unspecified,
26250 /// Enabling status for operation insights.
26251 Enabling,
26252 /// Enabled status for operation insights.
26253 Enabled,
26254 /// Disabling status for operation insights.
26255 Disabling,
26256 /// Not Enabled status for operation insights.
26257 NotEnabled,
26258 /// Failed enabling status for operation insights.
26259 FailedEnabling,
26260 /// Failed disabling status for operation insights.
26261 FailedDisabling,
26262 /// If set, the enum was initialized with an unknown value.
26263 ///
26264 /// Applications can examine the value using [OperationsInsightsState::value] or
26265 /// [OperationsInsightsState::name].
26266 UnknownValue(operations_insights_state::UnknownValue),
26267}
26268
26269#[doc(hidden)]
26270pub mod operations_insights_state {
26271 #[allow(unused_imports)]
26272 use super::*;
26273 #[derive(Clone, Debug, PartialEq)]
26274 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26275}
26276
26277impl OperationsInsightsState {
26278 /// Gets the enum value.
26279 ///
26280 /// Returns `None` if the enum contains an unknown value deserialized from
26281 /// the string representation of enums.
26282 pub fn value(&self) -> std::option::Option<i32> {
26283 match self {
26284 Self::Unspecified => std::option::Option::Some(0),
26285 Self::Enabling => std::option::Option::Some(1),
26286 Self::Enabled => std::option::Option::Some(2),
26287 Self::Disabling => std::option::Option::Some(3),
26288 Self::NotEnabled => std::option::Option::Some(4),
26289 Self::FailedEnabling => std::option::Option::Some(5),
26290 Self::FailedDisabling => std::option::Option::Some(6),
26291 Self::UnknownValue(u) => u.0.value(),
26292 }
26293 }
26294
26295 /// Gets the enum value as a string.
26296 ///
26297 /// Returns `None` if the enum contains an unknown value deserialized from
26298 /// the integer representation of enums.
26299 pub fn name(&self) -> std::option::Option<&str> {
26300 match self {
26301 Self::Unspecified => std::option::Option::Some("OPERATIONS_INSIGHTS_STATE_UNSPECIFIED"),
26302 Self::Enabling => std::option::Option::Some("ENABLING"),
26303 Self::Enabled => std::option::Option::Some("ENABLED"),
26304 Self::Disabling => std::option::Option::Some("DISABLING"),
26305 Self::NotEnabled => std::option::Option::Some("NOT_ENABLED"),
26306 Self::FailedEnabling => std::option::Option::Some("FAILED_ENABLING"),
26307 Self::FailedDisabling => std::option::Option::Some("FAILED_DISABLING"),
26308 Self::UnknownValue(u) => u.0.name(),
26309 }
26310 }
26311}
26312
26313impl std::default::Default for OperationsInsightsState {
26314 fn default() -> Self {
26315 use std::convert::From;
26316 Self::from(0)
26317 }
26318}
26319
26320impl std::fmt::Display for OperationsInsightsState {
26321 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26322 wkt::internal::display_enum(f, self.name(), self.value())
26323 }
26324}
26325
26326impl std::convert::From<i32> for OperationsInsightsState {
26327 fn from(value: i32) -> Self {
26328 match value {
26329 0 => Self::Unspecified,
26330 1 => Self::Enabling,
26331 2 => Self::Enabled,
26332 3 => Self::Disabling,
26333 4 => Self::NotEnabled,
26334 5 => Self::FailedEnabling,
26335 6 => Self::FailedDisabling,
26336 _ => Self::UnknownValue(operations_insights_state::UnknownValue(
26337 wkt::internal::UnknownEnumValue::Integer(value),
26338 )),
26339 }
26340 }
26341}
26342
26343impl std::convert::From<&str> for OperationsInsightsState {
26344 fn from(value: &str) -> Self {
26345 use std::string::ToString;
26346 match value {
26347 "OPERATIONS_INSIGHTS_STATE_UNSPECIFIED" => Self::Unspecified,
26348 "ENABLING" => Self::Enabling,
26349 "ENABLED" => Self::Enabled,
26350 "DISABLING" => Self::Disabling,
26351 "NOT_ENABLED" => Self::NotEnabled,
26352 "FAILED_ENABLING" => Self::FailedEnabling,
26353 "FAILED_DISABLING" => Self::FailedDisabling,
26354 _ => Self::UnknownValue(operations_insights_state::UnknownValue(
26355 wkt::internal::UnknownEnumValue::String(value.to_string()),
26356 )),
26357 }
26358 }
26359}
26360
26361impl serde::ser::Serialize for OperationsInsightsState {
26362 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26363 where
26364 S: serde::Serializer,
26365 {
26366 match self {
26367 Self::Unspecified => serializer.serialize_i32(0),
26368 Self::Enabling => serializer.serialize_i32(1),
26369 Self::Enabled => serializer.serialize_i32(2),
26370 Self::Disabling => serializer.serialize_i32(3),
26371 Self::NotEnabled => serializer.serialize_i32(4),
26372 Self::FailedEnabling => serializer.serialize_i32(5),
26373 Self::FailedDisabling => serializer.serialize_i32(6),
26374 Self::UnknownValue(u) => u.0.serialize(serializer),
26375 }
26376 }
26377}
26378
26379impl<'de> serde::de::Deserialize<'de> for OperationsInsightsState {
26380 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26381 where
26382 D: serde::Deserializer<'de>,
26383 {
26384 deserializer.deserialize_any(wkt::internal::EnumVisitor::<OperationsInsightsState>::new(
26385 ".google.cloud.oracledatabase.v1.OperationsInsightsState",
26386 ))
26387 }
26388}
26389
26390/// The various states available for the Autonomous Database workload type.
26391///
26392/// # Working with unknown values
26393///
26394/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26395/// additional enum variants at any time. Adding new variants is not considered
26396/// a breaking change. Applications should write their code in anticipation of:
26397///
26398/// - New values appearing in future releases of the client library, **and**
26399/// - New values received dynamically, without application changes.
26400///
26401/// Please consult the [Working with enums] section in the user guide for some
26402/// guidelines.
26403///
26404/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26405#[derive(Clone, Debug, PartialEq)]
26406#[non_exhaustive]
26407pub enum DBWorkload {
26408 /// Default unspecified value.
26409 Unspecified,
26410 /// Autonomous Transaction Processing database.
26411 Oltp,
26412 /// Autonomous Data Warehouse database.
26413 Dw,
26414 /// Autonomous JSON Database.
26415 Ajd,
26416 /// Autonomous Database with the Oracle APEX Application Development workload
26417 /// type.
26418 Apex,
26419 /// If set, the enum was initialized with an unknown value.
26420 ///
26421 /// Applications can examine the value using [DBWorkload::value] or
26422 /// [DBWorkload::name].
26423 UnknownValue(db_workload::UnknownValue),
26424}
26425
26426#[doc(hidden)]
26427pub mod db_workload {
26428 #[allow(unused_imports)]
26429 use super::*;
26430 #[derive(Clone, Debug, PartialEq)]
26431 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26432}
26433
26434impl DBWorkload {
26435 /// Gets the enum value.
26436 ///
26437 /// Returns `None` if the enum contains an unknown value deserialized from
26438 /// the string representation of enums.
26439 pub fn value(&self) -> std::option::Option<i32> {
26440 match self {
26441 Self::Unspecified => std::option::Option::Some(0),
26442 Self::Oltp => std::option::Option::Some(1),
26443 Self::Dw => std::option::Option::Some(2),
26444 Self::Ajd => std::option::Option::Some(3),
26445 Self::Apex => std::option::Option::Some(4),
26446 Self::UnknownValue(u) => u.0.value(),
26447 }
26448 }
26449
26450 /// Gets the enum value as a string.
26451 ///
26452 /// Returns `None` if the enum contains an unknown value deserialized from
26453 /// the integer representation of enums.
26454 pub fn name(&self) -> std::option::Option<&str> {
26455 match self {
26456 Self::Unspecified => std::option::Option::Some("DB_WORKLOAD_UNSPECIFIED"),
26457 Self::Oltp => std::option::Option::Some("OLTP"),
26458 Self::Dw => std::option::Option::Some("DW"),
26459 Self::Ajd => std::option::Option::Some("AJD"),
26460 Self::Apex => std::option::Option::Some("APEX"),
26461 Self::UnknownValue(u) => u.0.name(),
26462 }
26463 }
26464}
26465
26466impl std::default::Default for DBWorkload {
26467 fn default() -> Self {
26468 use std::convert::From;
26469 Self::from(0)
26470 }
26471}
26472
26473impl std::fmt::Display for DBWorkload {
26474 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26475 wkt::internal::display_enum(f, self.name(), self.value())
26476 }
26477}
26478
26479impl std::convert::From<i32> for DBWorkload {
26480 fn from(value: i32) -> Self {
26481 match value {
26482 0 => Self::Unspecified,
26483 1 => Self::Oltp,
26484 2 => Self::Dw,
26485 3 => Self::Ajd,
26486 4 => Self::Apex,
26487 _ => Self::UnknownValue(db_workload::UnknownValue(
26488 wkt::internal::UnknownEnumValue::Integer(value),
26489 )),
26490 }
26491 }
26492}
26493
26494impl std::convert::From<&str> for DBWorkload {
26495 fn from(value: &str) -> Self {
26496 use std::string::ToString;
26497 match value {
26498 "DB_WORKLOAD_UNSPECIFIED" => Self::Unspecified,
26499 "OLTP" => Self::Oltp,
26500 "DW" => Self::Dw,
26501 "AJD" => Self::Ajd,
26502 "APEX" => Self::Apex,
26503 _ => Self::UnknownValue(db_workload::UnknownValue(
26504 wkt::internal::UnknownEnumValue::String(value.to_string()),
26505 )),
26506 }
26507 }
26508}
26509
26510impl serde::ser::Serialize for DBWorkload {
26511 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26512 where
26513 S: serde::Serializer,
26514 {
26515 match self {
26516 Self::Unspecified => serializer.serialize_i32(0),
26517 Self::Oltp => serializer.serialize_i32(1),
26518 Self::Dw => serializer.serialize_i32(2),
26519 Self::Ajd => serializer.serialize_i32(3),
26520 Self::Apex => serializer.serialize_i32(4),
26521 Self::UnknownValue(u) => u.0.serialize(serializer),
26522 }
26523 }
26524}
26525
26526impl<'de> serde::de::Deserialize<'de> for DBWorkload {
26527 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26528 where
26529 D: serde::Deserializer<'de>,
26530 {
26531 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DBWorkload>::new(
26532 ".google.cloud.oracledatabase.v1.DBWorkload",
26533 ))
26534 }
26535}
26536
26537/// The compute model of the Exadata Infrastructure, VM Cluster and Autonomous
26538/// Database.
26539///
26540/// # Working with unknown values
26541///
26542/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26543/// additional enum variants at any time. Adding new variants is not considered
26544/// a breaking change. Applications should write their code in anticipation of:
26545///
26546/// - New values appearing in future releases of the client library, **and**
26547/// - New values received dynamically, without application changes.
26548///
26549/// Please consult the [Working with enums] section in the user guide for some
26550/// guidelines.
26551///
26552/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26553#[derive(Clone, Debug, PartialEq)]
26554#[non_exhaustive]
26555pub enum ComputeModel {
26556 /// Unspecified compute model.
26557 Unspecified,
26558 /// Abstract measure of compute resources. ECPUs are based on the number of
26559 /// cores elastically allocated from a pool of compute and storage servers.
26560 Ecpu,
26561 /// Physical measure of compute resources. OCPUs are based on the physical
26562 /// core of a processor.
26563 Ocpu,
26564 /// If set, the enum was initialized with an unknown value.
26565 ///
26566 /// Applications can examine the value using [ComputeModel::value] or
26567 /// [ComputeModel::name].
26568 UnknownValue(compute_model::UnknownValue),
26569}
26570
26571#[doc(hidden)]
26572pub mod compute_model {
26573 #[allow(unused_imports)]
26574 use super::*;
26575 #[derive(Clone, Debug, PartialEq)]
26576 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26577}
26578
26579impl ComputeModel {
26580 /// Gets the enum value.
26581 ///
26582 /// Returns `None` if the enum contains an unknown value deserialized from
26583 /// the string representation of enums.
26584 pub fn value(&self) -> std::option::Option<i32> {
26585 match self {
26586 Self::Unspecified => std::option::Option::Some(0),
26587 Self::Ecpu => std::option::Option::Some(1),
26588 Self::Ocpu => std::option::Option::Some(2),
26589 Self::UnknownValue(u) => u.0.value(),
26590 }
26591 }
26592
26593 /// Gets the enum value as a string.
26594 ///
26595 /// Returns `None` if the enum contains an unknown value deserialized from
26596 /// the integer representation of enums.
26597 pub fn name(&self) -> std::option::Option<&str> {
26598 match self {
26599 Self::Unspecified => std::option::Option::Some("COMPUTE_MODEL_UNSPECIFIED"),
26600 Self::Ecpu => std::option::Option::Some("COMPUTE_MODEL_ECPU"),
26601 Self::Ocpu => std::option::Option::Some("COMPUTE_MODEL_OCPU"),
26602 Self::UnknownValue(u) => u.0.name(),
26603 }
26604 }
26605}
26606
26607impl std::default::Default for ComputeModel {
26608 fn default() -> Self {
26609 use std::convert::From;
26610 Self::from(0)
26611 }
26612}
26613
26614impl std::fmt::Display for ComputeModel {
26615 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26616 wkt::internal::display_enum(f, self.name(), self.value())
26617 }
26618}
26619
26620impl std::convert::From<i32> for ComputeModel {
26621 fn from(value: i32) -> Self {
26622 match value {
26623 0 => Self::Unspecified,
26624 1 => Self::Ecpu,
26625 2 => Self::Ocpu,
26626 _ => Self::UnknownValue(compute_model::UnknownValue(
26627 wkt::internal::UnknownEnumValue::Integer(value),
26628 )),
26629 }
26630 }
26631}
26632
26633impl std::convert::From<&str> for ComputeModel {
26634 fn from(value: &str) -> Self {
26635 use std::string::ToString;
26636 match value {
26637 "COMPUTE_MODEL_UNSPECIFIED" => Self::Unspecified,
26638 "COMPUTE_MODEL_ECPU" => Self::Ecpu,
26639 "COMPUTE_MODEL_OCPU" => Self::Ocpu,
26640 _ => Self::UnknownValue(compute_model::UnknownValue(
26641 wkt::internal::UnknownEnumValue::String(value.to_string()),
26642 )),
26643 }
26644 }
26645}
26646
26647impl serde::ser::Serialize for ComputeModel {
26648 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26649 where
26650 S: serde::Serializer,
26651 {
26652 match self {
26653 Self::Unspecified => serializer.serialize_i32(0),
26654 Self::Ecpu => serializer.serialize_i32(1),
26655 Self::Ocpu => serializer.serialize_i32(2),
26656 Self::UnknownValue(u) => u.0.serialize(serializer),
26657 }
26658 }
26659}
26660
26661impl<'de> serde::de::Deserialize<'de> for ComputeModel {
26662 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26663 where
26664 D: serde::Deserializer<'de>,
26665 {
26666 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComputeModel>::new(
26667 ".google.cloud.oracledatabase.v1.ComputeModel",
26668 ))
26669 }
26670}