Skip to main content

googleapis_tonic_google_cloud_sql_v1beta4/vec_u8_hash_map/
google.cloud.sql.v1beta4.rs

1// This file is @generated by prost-build.
2/// An entry for an Access Control list.
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct AclEntry {
5    /// The allowlisted value for the access control list.
6    #[prost(string, tag = "1")]
7    pub value: ::prost::alloc::string::String,
8    /// The time when this access control entry expires in
9    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
10    /// `2012-11-15T16:19:00.094Z`.
11    #[prost(message, optional, tag = "2")]
12    pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
13    /// Optional. A label to identify this entry.
14    #[prost(string, tag = "3")]
15    pub name: ::prost::alloc::string::String,
16    /// This is always `sql#aclEntry`.
17    #[prost(string, tag = "4")]
18    pub kind: ::prost::alloc::string::String,
19}
20/// An Admin API warning message.
21#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
22pub struct ApiWarning {
23    /// Code to uniquely identify the warning type.
24    #[prost(enumeration = "api_warning::SqlApiWarningCode", tag = "1")]
25    pub code: i32,
26    /// The warning message.
27    #[prost(string, tag = "2")]
28    pub message: ::prost::alloc::string::String,
29    /// The region name for REGION_UNREACHABLE warning.
30    #[prost(string, tag = "3")]
31    pub region: ::prost::alloc::string::String,
32}
33/// Nested message and enum types in `ApiWarning`.
34pub mod api_warning {
35    #[derive(
36        Clone,
37        Copy,
38        Debug,
39        PartialEq,
40        Eq,
41        Hash,
42        PartialOrd,
43        Ord,
44        ::prost::Enumeration
45    )]
46    #[repr(i32)]
47    pub enum SqlApiWarningCode {
48        /// An unknown or unset warning type from Cloud SQL API.
49        Unspecified = 0,
50        /// Warning when one or more regions are not reachable.  The returned result
51        /// set may be incomplete.
52        RegionUnreachable = 1,
53        /// Warning when user provided maxResults parameter exceeds the limit.  The
54        /// returned result set may be incomplete.
55        MaxResultsExceedsLimit = 2,
56        /// Warning when user tries to create/update a user with credentials that
57        /// have previously been compromised by a public data breach.
58        CompromisedCredentials = 3,
59        /// Warning when the operation succeeds but some non-critical workflow state
60        /// failed.
61        InternalStateFailure = 4,
62    }
63    impl SqlApiWarningCode {
64        /// String value of the enum field names used in the ProtoBuf definition.
65        ///
66        /// The values are not transformed in any way and thus are considered stable
67        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
68        pub fn as_str_name(&self) -> &'static str {
69            match self {
70                Self::Unspecified => "SQL_API_WARNING_CODE_UNSPECIFIED",
71                Self::RegionUnreachable => "REGION_UNREACHABLE",
72                Self::MaxResultsExceedsLimit => "MAX_RESULTS_EXCEEDS_LIMIT",
73                Self::CompromisedCredentials => "COMPROMISED_CREDENTIALS",
74                Self::InternalStateFailure => "INTERNAL_STATE_FAILURE",
75            }
76        }
77        /// Creates an enum from field names used in the ProtoBuf definition.
78        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
79            match value {
80                "SQL_API_WARNING_CODE_UNSPECIFIED" => Some(Self::Unspecified),
81                "REGION_UNREACHABLE" => Some(Self::RegionUnreachable),
82                "MAX_RESULTS_EXCEEDS_LIMIT" => Some(Self::MaxResultsExceedsLimit),
83                "COMPROMISED_CREDENTIALS" => Some(Self::CompromisedCredentials),
84                "INTERNAL_STATE_FAILURE" => Some(Self::InternalStateFailure),
85                _ => None,
86            }
87        }
88    }
89}
90/// We currently only support backup retention by specifying the number
91/// of backups we will retain.
92#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
93pub struct BackupRetentionSettings {
94    /// The unit that 'retained_backups' represents.
95    #[prost(enumeration = "backup_retention_settings::RetentionUnit", tag = "1")]
96    pub retention_unit: i32,
97    /// Depending on the value of retention_unit, this is used to determine
98    /// if a backup needs to be deleted.  If retention_unit is 'COUNT', we will
99    /// retain this many backups.
100    #[prost(message, optional, tag = "2")]
101    pub retained_backups: ::core::option::Option<i32>,
102}
103/// Nested message and enum types in `BackupRetentionSettings`.
104pub mod backup_retention_settings {
105    /// The units that retained_backups specifies, we only support COUNT.
106    #[derive(
107        Clone,
108        Copy,
109        Debug,
110        PartialEq,
111        Eq,
112        Hash,
113        PartialOrd,
114        Ord,
115        ::prost::Enumeration
116    )]
117    #[repr(i32)]
118    pub enum RetentionUnit {
119        /// Backup retention unit is unspecified, will be treated as COUNT.
120        Unspecified = 0,
121        /// Retention will be by count, eg. "retain the most recent 7 backups".
122        Count = 1,
123    }
124    impl RetentionUnit {
125        /// String value of the enum field names used in the ProtoBuf definition.
126        ///
127        /// The values are not transformed in any way and thus are considered stable
128        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
129        pub fn as_str_name(&self) -> &'static str {
130            match self {
131                Self::Unspecified => "RETENTION_UNIT_UNSPECIFIED",
132                Self::Count => "COUNT",
133            }
134        }
135        /// Creates an enum from field names used in the ProtoBuf definition.
136        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
137            match value {
138                "RETENTION_UNIT_UNSPECIFIED" => Some(Self::Unspecified),
139                "COUNT" => Some(Self::Count),
140                _ => None,
141            }
142        }
143    }
144}
145/// Database instance backup configuration.
146#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
147pub struct BackupConfiguration {
148    /// Start time for the daily backup configuration in UTC timezone in the 24
149    /// hour format - `HH:MM`.
150    #[prost(string, tag = "1")]
151    pub start_time: ::prost::alloc::string::String,
152    /// Whether this configuration is enabled.
153    #[prost(message, optional, tag = "2")]
154    pub enabled: ::core::option::Option<bool>,
155    /// This is always `sql#backupConfiguration`.
156    #[prost(string, tag = "3")]
157    pub kind: ::prost::alloc::string::String,
158    /// (MySQL only) Whether binary log is enabled. If backup configuration is
159    /// disabled, binarylog must be disabled as well.
160    #[prost(message, optional, tag = "4")]
161    pub binary_log_enabled: ::core::option::Option<bool>,
162    /// Reserved for future use.
163    #[prost(message, optional, tag = "5")]
164    pub replication_log_archiving_enabled: ::core::option::Option<bool>,
165    /// Location of the backup
166    #[prost(string, tag = "6")]
167    pub location: ::prost::alloc::string::String,
168    /// Whether point in time recovery is enabled.
169    #[prost(message, optional, tag = "7")]
170    pub point_in_time_recovery_enabled: ::core::option::Option<bool>,
171    /// The number of days of transaction logs we retain for point in time
172    /// restore, from 1-7.
173    #[prost(message, optional, tag = "9")]
174    pub transaction_log_retention_days: ::core::option::Option<i32>,
175    /// Backup retention settings.
176    #[prost(message, optional, tag = "10")]
177    pub backup_retention_settings: ::core::option::Option<BackupRetentionSettings>,
178    /// Output only. This value contains the storage location of transactional logs
179    /// for the database for point-in-time recovery.
180    #[prost(
181        enumeration = "backup_configuration::TransactionalLogStorageState",
182        optional,
183        tag = "11"
184    )]
185    pub transactional_log_storage_state: ::core::option::Option<i32>,
186    /// Output only. Backup tier that manages the backups for the instance.
187    #[prost(enumeration = "backup_configuration::BackupTier", optional, tag = "12")]
188    pub backup_tier: ::core::option::Option<i32>,
189}
190/// Nested message and enum types in `BackupConfiguration`.
191pub mod backup_configuration {
192    /// This value contains the storage location of the transactional logs
193    /// used to perform point-in-time recovery (PITR) for the database.
194    #[derive(
195        Clone,
196        Copy,
197        Debug,
198        PartialEq,
199        Eq,
200        Hash,
201        PartialOrd,
202        Ord,
203        ::prost::Enumeration
204    )]
205    #[repr(i32)]
206    pub enum TransactionalLogStorageState {
207        /// Unspecified.
208        Unspecified = 0,
209        /// The transaction logs used for PITR for the instance are stored
210        /// on a data disk.
211        Disk = 1,
212        /// The transaction logs used for PITR for the instance are switching from
213        /// being stored on a data disk to being stored in Cloud Storage.
214        /// Only applicable to MySQL.
215        SwitchingToCloudStorage = 2,
216        /// The transaction logs used for PITR for the instance are now stored
217        /// in Cloud Storage. Previously, they were stored on a data disk.
218        /// Only applicable to MySQL.
219        SwitchedToCloudStorage = 3,
220        /// The transaction logs used for PITR for the instance are stored in
221        /// Cloud Storage. Only applicable to MySQL and PostgreSQL.
222        CloudStorage = 4,
223    }
224    impl TransactionalLogStorageState {
225        /// String value of the enum field names used in the ProtoBuf definition.
226        ///
227        /// The values are not transformed in any way and thus are considered stable
228        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
229        pub fn as_str_name(&self) -> &'static str {
230            match self {
231                Self::Unspecified => "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED",
232                Self::Disk => "DISK",
233                Self::SwitchingToCloudStorage => "SWITCHING_TO_CLOUD_STORAGE",
234                Self::SwitchedToCloudStorage => "SWITCHED_TO_CLOUD_STORAGE",
235                Self::CloudStorage => "CLOUD_STORAGE",
236            }
237        }
238        /// Creates an enum from field names used in the ProtoBuf definition.
239        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
240            match value {
241                "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
242                "DISK" => Some(Self::Disk),
243                "SWITCHING_TO_CLOUD_STORAGE" => Some(Self::SwitchingToCloudStorage),
244                "SWITCHED_TO_CLOUD_STORAGE" => Some(Self::SwitchedToCloudStorage),
245                "CLOUD_STORAGE" => Some(Self::CloudStorage),
246                _ => None,
247            }
248        }
249    }
250    /// Backup tier that manages the backups for the instance.
251    #[derive(
252        Clone,
253        Copy,
254        Debug,
255        PartialEq,
256        Eq,
257        Hash,
258        PartialOrd,
259        Ord,
260        ::prost::Enumeration
261    )]
262    #[repr(i32)]
263    pub enum BackupTier {
264        /// Unspecified.
265        Unspecified = 0,
266        /// Instance is managed by Cloud SQL.
267        Standard = 1,
268        /// Deprecated: ADVANCED is deprecated. Please use ENHANCED instead.
269        #[deprecated]
270        Advanced = 2,
271        /// Instance is managed by Google Cloud Backup and DR Service.
272        Enhanced = 3,
273    }
274    impl BackupTier {
275        /// String value of the enum field names used in the ProtoBuf definition.
276        ///
277        /// The values are not transformed in any way and thus are considered stable
278        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
279        pub fn as_str_name(&self) -> &'static str {
280            match self {
281                Self::Unspecified => "BACKUP_TIER_UNSPECIFIED",
282                Self::Standard => "STANDARD",
283                #[allow(deprecated)]
284                Self::Advanced => "ADVANCED",
285                Self::Enhanced => "ENHANCED",
286            }
287        }
288        /// Creates an enum from field names used in the ProtoBuf definition.
289        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
290            match value {
291                "BACKUP_TIER_UNSPECIFIED" => Some(Self::Unspecified),
292                "STANDARD" => Some(Self::Standard),
293                "ADVANCED" => Some(#[allow(deprecated)] Self::Advanced),
294                "ENHANCED" => Some(Self::Enhanced),
295                _ => None,
296            }
297        }
298    }
299}
300/// A BackupRun resource.
301#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
302pub struct BackupRun {
303    /// This is always `sql#backupRun`.
304    #[prost(string, tag = "1")]
305    pub kind: ::prost::alloc::string::String,
306    /// The status of this run.
307    #[prost(enumeration = "SqlBackupRunStatus", tag = "2")]
308    pub status: i32,
309    /// The time the run was enqueued in UTC timezone in
310    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
311    /// `2012-11-15T16:19:00.094Z`.
312    #[prost(message, optional, tag = "3")]
313    pub enqueued_time: ::core::option::Option<::prost_types::Timestamp>,
314    /// The identifier for this backup run. Unique only for a specific Cloud SQL
315    /// instance.
316    #[prost(int64, tag = "4")]
317    pub id: i64,
318    /// The time the backup operation actually started in UTC timezone in
319    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
320    /// `2012-11-15T16:19:00.094Z`.
321    #[prost(message, optional, tag = "5")]
322    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
323    /// The time the backup operation completed in UTC timezone in
324    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
325    /// `2012-11-15T16:19:00.094Z`.
326    #[prost(message, optional, tag = "6")]
327    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
328    /// Information about why the backup operation failed. This is only present if
329    /// the run has the FAILED status.
330    #[prost(message, optional, tag = "7")]
331    pub error: ::core::option::Option<OperationError>,
332    /// The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL".
333    /// This field defaults to "ON_DEMAND" and is ignored, when specified for
334    /// insert requests.
335    #[prost(enumeration = "SqlBackupRunType", tag = "8")]
336    pub r#type: i32,
337    /// The description of this run, only applicable to on-demand backups.
338    #[prost(string, tag = "9")]
339    pub description: ::prost::alloc::string::String,
340    /// The start time of the backup window during which this the backup was
341    /// attempted in [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for
342    /// example `2012-11-15T16:19:00.094Z`.
343    #[prost(message, optional, tag = "10")]
344    pub window_start_time: ::core::option::Option<::prost_types::Timestamp>,
345    /// Name of the database instance.
346    #[prost(string, tag = "11")]
347    pub instance: ::prost::alloc::string::String,
348    /// The URI of this resource.
349    #[prost(string, tag = "12")]
350    pub self_link: ::prost::alloc::string::String,
351    /// Location of the backups.
352    #[prost(string, tag = "13")]
353    pub location: ::prost::alloc::string::String,
354    /// Output only. The instance database version at the time this backup was
355    /// made.
356    #[prost(enumeration = "SqlDatabaseVersion", tag = "15")]
357    pub database_version: i32,
358    /// Encryption configuration specific to a backup.
359    #[prost(message, optional, tag = "16")]
360    pub disk_encryption_configuration: ::core::option::Option<
361        DiskEncryptionConfiguration,
362    >,
363    /// Encryption status specific to a backup.
364    #[prost(message, optional, tag = "17")]
365    pub disk_encryption_status: ::core::option::Option<DiskEncryptionStatus>,
366    /// Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
367    #[prost(enumeration = "SqlBackupKind", tag = "19")]
368    pub backup_kind: i32,
369    /// Backup time zone to prevent restores to an instance with
370    /// a different time zone. Now relevant only for SQL Server.
371    #[prost(string, tag = "23")]
372    pub time_zone: ::prost::alloc::string::String,
373    /// Output only. The maximum chargeable bytes for the backup.
374    #[prost(int64, optional, tag = "24")]
375    pub max_chargeable_bytes: ::core::option::Option<i64>,
376}
377/// A backup resource.
378#[derive(Clone, PartialEq, ::prost::Message)]
379pub struct Backup {
380    /// Output only. The resource name of the backup.
381    /// Format: projects/{project}/backups/{backup}.
382    #[prost(string, tag = "1")]
383    pub name: ::prost::alloc::string::String,
384    /// Output only. This is always `sql#backup`.
385    #[prost(string, tag = "2")]
386    pub kind: ::prost::alloc::string::String,
387    /// Output only. The URI of this resource.
388    #[prost(string, tag = "3")]
389    pub self_link: ::prost::alloc::string::String,
390    /// Output only. The type of this backup. The type can be "AUTOMATED",
391    /// "ON_DEMAND", or “FINAL”.
392    #[prost(enumeration = "backup::SqlBackupType", tag = "4")]
393    pub r#type: i32,
394    /// The description of this backup.
395    #[prost(string, tag = "5")]
396    pub description: ::prost::alloc::string::String,
397    /// The name of the database instance.
398    #[prost(string, tag = "6")]
399    pub instance: ::prost::alloc::string::String,
400    /// The storage location of the backups. The location can be multi-regional.
401    #[prost(string, tag = "7")]
402    pub location: ::prost::alloc::string::String,
403    /// Output only. This output contains the following values:
404    /// start_time: All database writes up to this time are available.
405    /// end_time: Any database writes after this time aren't available.
406    #[prost(message, optional, tag = "8")]
407    pub backup_interval: ::core::option::Option<super::super::super::r#type::Interval>,
408    /// Output only. The state of this backup.
409    #[prost(enumeration = "backup::SqlBackupState", tag = "9")]
410    pub state: i32,
411    /// Output only. Information about why the backup operation fails (for example,
412    /// when the backup state fails).
413    #[prost(message, optional, tag = "10")]
414    pub error: ::core::option::Option<OperationError>,
415    /// Output only. This output contains the encryption configuration for a backup
416    /// and the resource name of the KMS key for disk encryption.
417    #[prost(string, tag = "11")]
418    pub kms_key: ::prost::alloc::string::String,
419    /// Output only. This output contains the encryption status for a backup and
420    /// the version of the KMS key that's used to encrypt the Cloud SQL instance.
421    #[prost(string, tag = "12")]
422    pub kms_key_version: ::prost::alloc::string::String,
423    /// Output only. Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
424    #[prost(enumeration = "SqlBackupKind", tag = "13")]
425    pub backup_kind: i32,
426    /// Output only. This output contains a backup time zone. If a Cloud SQL for
427    /// SQL Server instance has a different time zone from the backup's time zone,
428    /// then the restore to the instance doesn't happen.
429    #[prost(string, tag = "15")]
430    pub time_zone: ::prost::alloc::string::String,
431    /// Output only. The database version of the instance of at the time this
432    /// backup was made.
433    #[prost(enumeration = "SqlDatabaseVersion", tag = "20")]
434    pub database_version: i32,
435    /// Output only. The maximum chargeable bytes for the backup.
436    #[prost(int64, optional, tag = "23")]
437    pub max_chargeable_bytes: ::core::option::Option<i64>,
438    /// Optional. Output only. Timestamp in UTC of when the instance associated
439    /// with this backup is deleted.
440    #[prost(message, optional, tag = "24")]
441    pub instance_deletion_time: ::core::option::Option<::prost_types::Timestamp>,
442    /// Optional. Output only. Instance setting of the source instance that's
443    /// associated with this backup.
444    #[prost(message, optional, tag = "25")]
445    pub instance_settings: ::core::option::Option<DatabaseInstance>,
446    /// Output only. The mapping to backup run resource used for IAM validations.
447    #[prost(string, tag = "26")]
448    pub backup_run: ::prost::alloc::string::String,
449    /// Output only. This status indicates whether the backup satisfies PZS.
450    ///
451    /// The status is reserved for future use.
452    #[prost(message, optional, tag = "27")]
453    pub satisfies_pzs: ::core::option::Option<bool>,
454    /// Output only. This status indicates whether the backup satisfies PZI.
455    ///
456    /// The status is reserved for future use.
457    #[prost(message, optional, tag = "28")]
458    pub satisfies_pzi: ::core::option::Option<bool>,
459    #[prost(oneof = "backup::Expiration", tags = "16, 17")]
460    pub expiration: ::core::option::Option<backup::Expiration>,
461}
462/// Nested message and enum types in `Backup`.
463pub mod backup {
464    /// The backup type.
465    #[derive(
466        Clone,
467        Copy,
468        Debug,
469        PartialEq,
470        Eq,
471        Hash,
472        PartialOrd,
473        Ord,
474        ::prost::Enumeration
475    )]
476    #[repr(i32)]
477    pub enum SqlBackupType {
478        /// This is an unknown backup type.
479        Unspecified = 0,
480        /// The backup schedule triggers a backup automatically.
481        Automated = 1,
482        /// The user triggers a backup manually.
483        OnDemand = 2,
484        /// The backup that's created when the instance is deleted.
485        Final = 3,
486    }
487    impl SqlBackupType {
488        /// String value of the enum field names used in the ProtoBuf definition.
489        ///
490        /// The values are not transformed in any way and thus are considered stable
491        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
492        pub fn as_str_name(&self) -> &'static str {
493            match self {
494                Self::Unspecified => "SQL_BACKUP_TYPE_UNSPECIFIED",
495                Self::Automated => "AUTOMATED",
496                Self::OnDemand => "ON_DEMAND",
497                Self::Final => "FINAL",
498            }
499        }
500        /// Creates an enum from field names used in the ProtoBuf definition.
501        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
502            match value {
503                "SQL_BACKUP_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
504                "AUTOMATED" => Some(Self::Automated),
505                "ON_DEMAND" => Some(Self::OnDemand),
506                "FINAL" => Some(Self::Final),
507                _ => None,
508            }
509        }
510    }
511    /// The backup's state
512    #[derive(
513        Clone,
514        Copy,
515        Debug,
516        PartialEq,
517        Eq,
518        Hash,
519        PartialOrd,
520        Ord,
521        ::prost::Enumeration
522    )]
523    #[repr(i32)]
524    pub enum SqlBackupState {
525        /// The state of the backup is unknown.
526        Unspecified = 0,
527        /// The backup that's added to a queue.
528        Enqueued = 1,
529        /// The backup is in progress.
530        Running = 2,
531        /// The backup failed.
532        Failed = 3,
533        /// The backup is successful.
534        Successful = 4,
535        /// The backup is being deleted.
536        Deleting = 5,
537        /// Deletion of the backup failed.
538        DeletionFailed = 6,
539    }
540    impl SqlBackupState {
541        /// String value of the enum field names used in the ProtoBuf definition.
542        ///
543        /// The values are not transformed in any way and thus are considered stable
544        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
545        pub fn as_str_name(&self) -> &'static str {
546            match self {
547                Self::Unspecified => "SQL_BACKUP_STATE_UNSPECIFIED",
548                Self::Enqueued => "ENQUEUED",
549                Self::Running => "RUNNING",
550                Self::Failed => "FAILED",
551                Self::Successful => "SUCCESSFUL",
552                Self::Deleting => "DELETING",
553                Self::DeletionFailed => "DELETION_FAILED",
554            }
555        }
556        /// Creates an enum from field names used in the ProtoBuf definition.
557        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
558            match value {
559                "SQL_BACKUP_STATE_UNSPECIFIED" => Some(Self::Unspecified),
560                "ENQUEUED" => Some(Self::Enqueued),
561                "RUNNING" => Some(Self::Running),
562                "FAILED" => Some(Self::Failed),
563                "SUCCESSFUL" => Some(Self::Successful),
564                "DELETING" => Some(Self::Deleting),
565                "DELETION_FAILED" => Some(Self::DeletionFailed),
566                _ => None,
567            }
568        }
569    }
570    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
571    pub enum Expiration {
572        /// Input only. The time-to-live (TTL) interval for this resource (in days).
573        /// For example: ttlDays:7, means 7 days from the current time. The
574        /// expiration time can't exceed 365 days from the time that the backup is
575        /// created.
576        #[prost(int64, tag = "16")]
577        TtlDays(i64),
578        /// Backup expiration time.
579        /// A UTC timestamp of when this resource expired.
580        #[prost(message, tag = "17")]
581        ExpiryTime(::prost_types::Timestamp),
582    }
583}
584/// Backup run list results.
585#[derive(Clone, PartialEq, ::prost::Message)]
586pub struct BackupRunsListResponse {
587    /// This is always `sql#backupRunsList`.
588    #[prost(string, tag = "1")]
589    pub kind: ::prost::alloc::string::String,
590    /// A list of backup runs in reverse chronological order of the enqueued time.
591    #[prost(message, repeated, tag = "2")]
592    pub items: ::prost::alloc::vec::Vec<BackupRun>,
593    /// The continuation token, used to page through large result sets. Provide
594    /// this value in a subsequent request to return the next page of results.
595    #[prost(string, tag = "3")]
596    pub next_page_token: ::prost::alloc::string::String,
597}
598/// Binary log coordinates.
599#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
600pub struct BinLogCoordinates {
601    /// Name of the binary log file for a Cloud SQL instance.
602    #[prost(string, tag = "1")]
603    pub bin_log_file_name: ::prost::alloc::string::String,
604    /// Position (offset) within the binary log file.
605    #[prost(int64, tag = "2")]
606    pub bin_log_position: i64,
607    /// This is always `sql#binLogCoordinates`.
608    #[prost(string, tag = "3")]
609    pub kind: ::prost::alloc::string::String,
610}
611/// Backup context.
612#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
613pub struct BackupContext {
614    /// The identifier of the backup.
615    #[prost(int64, tag = "1")]
616    pub backup_id: i64,
617    /// This is always `sql#backupContext`.
618    #[prost(string, tag = "2")]
619    pub kind: ::prost::alloc::string::String,
620    /// The name of the backup.
621    /// Format: projects/{project}/backups/{backup}
622    #[prost(string, tag = "3")]
623    pub name: ::prost::alloc::string::String,
624}
625/// Database instance clone context.
626#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
627pub struct CloneContext {
628    /// This is always `sql#cloneContext`.
629    #[prost(string, tag = "1")]
630    pub kind: ::prost::alloc::string::String,
631    /// Reserved for future use.
632    #[prost(int64, tag = "2")]
633    pub pitr_timestamp_ms: i64,
634    /// Name of the Cloud SQL instance to be created as a clone.
635    #[prost(string, tag = "3")]
636    pub destination_instance_name: ::prost::alloc::string::String,
637    /// Binary log coordinates, if specified, identify the position up to which the
638    /// source instance is cloned. If not specified, the source instance is
639    /// cloned up to the most recent binary log coordinates.
640    #[prost(message, optional, tag = "4")]
641    pub bin_log_coordinates: ::core::option::Option<BinLogCoordinates>,
642    /// Timestamp, if specified, identifies the time to which the source instance
643    /// is cloned.
644    #[prost(message, optional, tag = "5")]
645    pub point_in_time: ::core::option::Option<::prost_types::Timestamp>,
646    /// The name of the allocated ip range for the private ip Cloud SQL instance.
647    /// For example: "google-managed-services-default". If set, the cloned instance
648    /// ip will be created in the allocated range. The range name must comply with
649    /// [RFC 1035](<https://tools.ietf.org/html/rfc1035>). Specifically, the name
650    /// must be 1-63 characters long and match the regular expression
651    /// [a-z](\[-a-z0-9\]*[a-z0-9])?.
652    /// Reserved for future use.
653    #[prost(string, tag = "6")]
654    pub allocated_ip_range: ::prost::alloc::string::String,
655    /// (SQL Server only) Clone only the specified databases from the source
656    /// instance. Clone all databases if empty.
657    #[prost(string, repeated, tag = "9")]
658    pub database_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
659    /// Optional. Copy clone and point-in-time recovery clone of an instance to the
660    /// specified zone. If no zone is specified, clone to the same primary zone as
661    /// the source instance.
662    #[prost(string, optional, tag = "10")]
663    pub preferred_zone: ::core::option::Option<::prost::alloc::string::String>,
664    /// Optional. Copy clone and point-in-time recovery clone of a regional
665    /// instance in the specified zones. If not specified, clone to the same
666    /// secondary zone as the source instance. This value cannot be the same as the
667    /// preferred_zone field.
668    #[prost(string, optional, tag = "11")]
669    pub preferred_secondary_zone: ::core::option::Option<::prost::alloc::string::String>,
670    /// The timestamp used to identify the time when the source instance is
671    /// deleted. If this instance is deleted, then you must set the timestamp.
672    #[prost(message, optional, tag = "12")]
673    pub source_instance_deletion_time: ::core::option::Option<::prost_types::Timestamp>,
674    /// Optional. The project ID of the destination project where the cloned
675    /// instance will be created. To perform a cross-project clone, this field is
676    /// required. If not specified, the clone is created in the same project
677    /// as the source instance.
678    #[prost(string, optional, tag = "13")]
679    pub destination_project: ::core::option::Option<::prost::alloc::string::String>,
680    /// Optional. The fully qualified URI of the VPC network to which the cloned
681    /// instance will be connected via Private Services Access for private IP. For
682    /// example:`projects/my-network-project/global/networks/my-network`. This
683    /// field is only required for cross-project cloning.
684    #[prost(string, optional, tag = "14")]
685    pub destination_network: ::core::option::Option<::prost::alloc::string::String>,
686}
687/// Represents a SQL database on the Cloud SQL instance.
688#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
689pub struct Database {
690    /// This is always `sql#database`.
691    #[prost(string, tag = "1")]
692    pub kind: ::prost::alloc::string::String,
693    /// The Cloud SQL charset value.
694    #[prost(string, tag = "2")]
695    pub charset: ::prost::alloc::string::String,
696    /// The Cloud SQL collation value.
697    #[prost(string, tag = "3")]
698    pub collation: ::prost::alloc::string::String,
699    /// This field is deprecated and will be removed from a future version of the
700    /// API.
701    #[prost(string, tag = "4")]
702    pub etag: ::prost::alloc::string::String,
703    /// The name of the database in the Cloud SQL instance. This does not include
704    /// the project ID or instance name.
705    #[prost(string, tag = "5")]
706    pub name: ::prost::alloc::string::String,
707    /// The name of the Cloud SQL instance. This does not include the project ID.
708    #[prost(string, tag = "6")]
709    pub instance: ::prost::alloc::string::String,
710    /// The URI of this resource.
711    #[prost(string, tag = "7")]
712    pub self_link: ::prost::alloc::string::String,
713    /// The project ID of the project containing the Cloud SQL database. The Google
714    /// apps domain is prefixed if applicable.
715    #[prost(string, tag = "8")]
716    pub project: ::prost::alloc::string::String,
717    #[prost(oneof = "database::DatabaseDetails", tags = "9")]
718    pub database_details: ::core::option::Option<database::DatabaseDetails>,
719}
720/// Nested message and enum types in `Database`.
721pub mod database {
722    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
723    pub enum DatabaseDetails {
724        #[prost(message, tag = "9")]
725        SqlserverDatabaseDetails(super::SqlServerDatabaseDetails),
726    }
727}
728/// Represents a Sql Server database on the Cloud SQL instance.
729#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
730pub struct SqlServerDatabaseDetails {
731    /// The version of SQL Server with which the database is to be made compatible
732    #[prost(int32, tag = "1")]
733    pub compatibility_level: i32,
734    /// The recovery model of a SQL Server database
735    #[prost(string, tag = "2")]
736    pub recovery_model: ::prost::alloc::string::String,
737}
738/// Database flags for Cloud SQL instances.
739#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
740pub struct DatabaseFlags {
741    /// The name of the flag. These flags are passed at instance startup, so
742    /// include both server options and system variables. Flags are
743    /// specified with underscores, not hyphens. For more information, see
744    /// [Configuring Database Flags](<https://cloud.google.com/sql/docs/mysql/flags>)
745    /// in the Cloud SQL documentation.
746    #[prost(string, tag = "1")]
747    pub name: ::prost::alloc::string::String,
748    /// The value of the flag. Boolean flags are set to `on` for true
749    /// and `off` for false. This field must be omitted if the flag
750    /// doesn't take a value.
751    #[prost(string, tag = "2")]
752    pub value: ::prost::alloc::string::String,
753}
754/// Initial sync flags for certain Cloud SQL APIs.
755/// Currently used for the MySQL external server initial dump.
756#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
757pub struct SyncFlags {
758    /// The name of the flag.
759    #[prost(string, tag = "1")]
760    pub name: ::prost::alloc::string::String,
761    /// The value of the flag. This field must be omitted if the flag
762    /// doesn't take a value.
763    #[prost(string, tag = "2")]
764    pub value: ::prost::alloc::string::String,
765}
766/// Reference to another Cloud SQL instance.
767#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
768pub struct InstanceReference {
769    /// The name of the Cloud SQL instance being referenced.
770    /// This does not include the project ID.
771    #[prost(string, tag = "1")]
772    pub name: ::prost::alloc::string::String,
773    /// The region of the Cloud SQL instance being referenced.
774    #[prost(string, tag = "2")]
775    pub region: ::prost::alloc::string::String,
776    /// The project ID of the Cloud SQL instance being referenced.
777    /// The default is the same project ID as the instance references it.
778    #[prost(string, tag = "3")]
779    pub project: ::prost::alloc::string::String,
780}
781/// A Cloud SQL instance resource.
782#[derive(Clone, PartialEq, ::prost::Message)]
783pub struct DatabaseInstance {
784    /// This is always `sql#instance`.
785    #[prost(string, tag = "1")]
786    pub kind: ::prost::alloc::string::String,
787    /// The current serving state of the Cloud SQL instance.
788    #[prost(enumeration = "database_instance::SqlInstanceState", tag = "2")]
789    pub state: i32,
790    /// The database engine type and version. The `databaseVersion` field cannot
791    /// be changed after instance creation.
792    #[prost(enumeration = "SqlDatabaseVersion", tag = "3")]
793    pub database_version: i32,
794    /// The user settings.
795    #[prost(message, optional, tag = "4")]
796    pub settings: ::core::option::Option<Settings>,
797    /// This field is deprecated and will be removed from a future version of the
798    /// API. Use the `settings.settingsVersion` field instead.
799    #[prost(string, tag = "5")]
800    pub etag: ::prost::alloc::string::String,
801    /// The name and status of the failover replica.
802    #[prost(message, optional, tag = "6")]
803    pub failover_replica: ::core::option::Option<database_instance::SqlFailoverReplica>,
804    /// The name of the instance which will act as primary in the replication
805    /// setup.
806    #[prost(string, tag = "7")]
807    pub master_instance_name: ::prost::alloc::string::String,
808    /// The replicas of the instance.
809    #[prost(string, repeated, tag = "8")]
810    pub replica_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
811    /// The maximum disk size of the instance in bytes.
812    #[deprecated]
813    #[prost(message, optional, tag = "9")]
814    pub max_disk_size: ::core::option::Option<i64>,
815    /// The current disk usage of the instance in bytes. This property has been
816    /// deprecated. Use the
817    /// "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
818    /// Monitoring API instead. Please see [this
819    /// announcement](<https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ>)
820    /// for details.
821    #[deprecated]
822    #[prost(message, optional, tag = "10")]
823    pub current_disk_size: ::core::option::Option<i64>,
824    /// The assigned IP addresses for the instance.
825    #[prost(message, repeated, tag = "11")]
826    pub ip_addresses: ::prost::alloc::vec::Vec<IpMapping>,
827    /// SSL configuration.
828    #[prost(message, optional, tag = "12")]
829    pub server_ca_cert: ::core::option::Option<SslCert>,
830    /// The instance type.
831    #[prost(enumeration = "SqlInstanceType", tag = "13")]
832    pub instance_type: i32,
833    /// The project ID of the project containing the Cloud SQL instance. The Google
834    /// apps domain is prefixed if applicable.
835    #[prost(string, tag = "14")]
836    pub project: ::prost::alloc::string::String,
837    /// The IPv6 address assigned to the instance.
838    /// (Deprecated) This property was applicable only
839    /// to First Generation instances.
840    #[deprecated]
841    #[prost(string, tag = "15")]
842    pub ipv6_address: ::prost::alloc::string::String,
843    /// The service account email address assigned to the instance. \This
844    /// property is read-only.
845    #[prost(string, tag = "16")]
846    pub service_account_email_address: ::prost::alloc::string::String,
847    /// Configuration specific to on-premises instances.
848    #[prost(message, optional, tag = "17")]
849    pub on_premises_configuration: ::core::option::Option<OnPremisesConfiguration>,
850    /// Configuration specific to failover replicas and read replicas.
851    #[prost(message, optional, tag = "18")]
852    pub replica_configuration: ::core::option::Option<ReplicaConfiguration>,
853    /// The backend type.
854    /// `SECOND_GEN`: Cloud SQL database instance.
855    /// `EXTERNAL`: A database server that is not managed by Google.
856    ///
857    /// This property is read-only; use the `tier` property in the `settings`
858    /// object to determine the database type.
859    #[prost(enumeration = "SqlBackendType", tag = "19")]
860    pub backend_type: i32,
861    /// The URI of this resource.
862    #[prost(string, tag = "20")]
863    pub self_link: ::prost::alloc::string::String,
864    /// If the instance state is SUSPENDED, the reason for the suspension.
865    #[prost(enumeration = "SqlSuspensionReason", repeated, tag = "21")]
866    pub suspension_reason: ::prost::alloc::vec::Vec<i32>,
867    /// Connection name of the Cloud SQL instance used in connection strings.
868    #[prost(string, tag = "22")]
869    pub connection_name: ::prost::alloc::string::String,
870    /// Name of the Cloud SQL instance. This does not include the project ID.
871    #[prost(string, tag = "23")]
872    pub name: ::prost::alloc::string::String,
873    /// The geographical region of the Cloud SQL instance.
874    ///
875    /// It can be one of the
876    /// [regions](<https://cloud.google.com/sql/docs/mysql/locations#location-r>)
877    /// where Cloud SQL operates:
878    ///
879    /// For example,  `asia-east1`, `europe-west1`, and  `us-central1`.
880    /// The default value is `us-central1`.
881    #[prost(string, tag = "24")]
882    pub region: ::prost::alloc::string::String,
883    /// The Compute Engine zone that the instance is currently serving from. This
884    /// value could be different from the zone that was specified when the instance
885    /// was created if the instance has failed over to its secondary zone. WARNING:
886    /// Changing this might restart the instance.
887    #[prost(string, tag = "25")]
888    pub gce_zone: ::prost::alloc::string::String,
889    /// The Compute Engine zone that the failover instance is currently serving
890    /// from for a regional instance. This value could be different
891    /// from the zone that was specified when the instance
892    /// was created if the instance has failed over to its secondary/failover zone.
893    #[prost(string, tag = "34")]
894    pub secondary_gce_zone: ::prost::alloc::string::String,
895    /// Disk encryption configuration specific to an instance.
896    #[prost(message, optional, tag = "26")]
897    pub disk_encryption_configuration: ::core::option::Option<
898        DiskEncryptionConfiguration,
899    >,
900    /// Disk encryption status specific to an instance.
901    #[prost(message, optional, tag = "27")]
902    pub disk_encryption_status: ::core::option::Option<DiskEncryptionStatus>,
903    /// Initial root password. Use only on creation. You must set root passwords
904    /// before you can connect to PostgreSQL instances.
905    #[prost(string, tag = "29")]
906    pub root_password: ::prost::alloc::string::String,
907    /// The start time of any upcoming scheduled maintenance for this instance.
908    #[prost(message, optional, tag = "30")]
909    pub scheduled_maintenance: ::core::option::Option<
910        database_instance::SqlScheduledMaintenance,
911    >,
912    /// This status indicates whether the instance satisfies PZS.
913    ///
914    /// The status is reserved for future use.
915    #[prost(message, optional, tag = "35")]
916    pub satisfies_pzs: ::core::option::Option<bool>,
917    /// Output only. Stores the current database version running on the instance
918    /// including minor version such as `MYSQL_8_0_18`.
919    #[prost(string, tag = "40")]
920    pub database_installed_version: ::prost::alloc::string::String,
921    /// This field represents the report generated by the proactive database
922    /// wellness job for OutOfDisk issues.
923    ///
924    /// * Writers:
925    /// * the proactive database wellness job for OOD.
926    /// * Readers:
927    /// * the proactive database wellness job
928    #[prost(message, optional, tag = "38")]
929    pub out_of_disk_report: ::core::option::Option<
930        database_instance::SqlOutOfDiskReport,
931    >,
932    /// Output only. The time when the instance was created in
933    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
934    /// `2012-11-15T16:19:00.094Z`.
935    #[prost(message, optional, tag = "39")]
936    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
937    /// Output only. List all maintenance versions applicable on the instance
938    #[prost(string, repeated, tag = "41")]
939    pub available_maintenance_versions: ::prost::alloc::vec::Vec<
940        ::prost::alloc::string::String,
941    >,
942    /// The current software version on the instance.
943    #[prost(string, tag = "42")]
944    pub maintenance_version: ::prost::alloc::string::String,
945    /// Output only. All database versions that are available for upgrade.
946    #[prost(message, repeated, tag = "45")]
947    pub upgradable_database_versions: ::prost::alloc::vec::Vec<AvailableDatabaseVersion>,
948    /// The SQL network architecture for the instance.
949    #[prost(
950        enumeration = "database_instance::SqlNetworkArchitecture",
951        optional,
952        tag = "47"
953    )]
954    pub sql_network_architecture: ::core::option::Option<i32>,
955    /// Output only. The link to service attachment of PSC instance.
956    #[prost(string, optional, tag = "48")]
957    pub psc_service_attachment_link: ::core::option::Option<
958        ::prost::alloc::string::String,
959    >,
960    /// Output only. The dns name of the instance.
961    #[prost(string, optional, tag = "49")]
962    pub dns_name: ::core::option::Option<::prost::alloc::string::String>,
963    /// Output only. DEPRECATED: please use write_endpoint instead.
964    #[deprecated]
965    #[prost(string, optional, tag = "51")]
966    pub primary_dns_name: ::core::option::Option<::prost::alloc::string::String>,
967    /// Output only. The dns name of the primary instance in a replication group.
968    #[prost(string, optional, tag = "52")]
969    pub write_endpoint: ::core::option::Option<::prost::alloc::string::String>,
970    /// A primary instance and disaster recovery (DR) replica pair.
971    /// A DR replica is a cross-region replica that you designate
972    /// for failover in the event that the primary instance
973    /// experiences regional failure.
974    /// Applicable to MySQL and PostgreSQL.
975    #[prost(message, optional, tag = "54")]
976    pub replication_cluster: ::core::option::Option<ReplicationCluster>,
977    /// Gemini instance configuration.
978    #[prost(message, optional, tag = "55")]
979    pub gemini_config: ::core::option::Option<GeminiInstanceConfig>,
980    /// Output only. This status indicates whether the instance satisfies PZI.
981    ///
982    /// The status is reserved for future use.
983    #[prost(message, optional, tag = "56")]
984    pub satisfies_pzi: ::core::option::Option<bool>,
985    /// Input only. Whether Cloud SQL is enabled to switch storing point-in-time
986    /// recovery log files from a data disk to Cloud Storage.
987    #[prost(message, optional, tag = "57")]
988    pub switch_transaction_logs_to_cloud_storage_enabled: ::core::option::Option<bool>,
989    /// Input only. Determines whether an in-place major version upgrade of
990    /// replicas happens when an in-place major version upgrade of a primary
991    /// instance is initiated.
992    #[prost(message, optional, tag = "59")]
993    pub include_replicas_for_major_version_upgrade: ::core::option::Option<bool>,
994    /// Optional. Input only. Immutable. Tag keys and tag values that are bound to
995    /// this instance. You must represent each item in the map as:
996    /// `"<tag-key-namespaced-name>" : "<tag-value-short-name>"`.
997    ///
998    /// For example, a single resource can have the following tags:
999    ///
1000    /// ```text,
1001    ///   "123/environment": "production",
1002    ///   "123/costCenter": "marketing",
1003    /// ```
1004    ///
1005    /// For more information on tag creation and management, see
1006    /// <https://cloud.google.com/resource-manager/docs/tags/tags-overview.>
1007    #[prost(map = "string, string", tag = "60")]
1008    pub tags: ::std::collections::HashMap<
1009        ::prost::alloc::string::String,
1010        ::prost::alloc::string::String,
1011    >,
1012    /// The number of read pool nodes in a read pool.
1013    #[prost(int32, optional, tag = "63")]
1014    pub node_count: ::core::option::Option<i32>,
1015    /// Output only. Entries containing information about each read pool node of
1016    /// the read pool.
1017    #[prost(message, repeated, tag = "64")]
1018    pub nodes: ::prost::alloc::vec::Vec<database_instance::PoolNodeConfig>,
1019    /// Output only. The list of DNS names used by this instance.
1020    #[prost(message, repeated, tag = "67")]
1021    pub dns_names: ::prost::alloc::vec::Vec<DnsNameMapping>,
1022}
1023/// Nested message and enum types in `DatabaseInstance`.
1024pub mod database_instance {
1025    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1026    pub struct SqlFailoverReplica {
1027        /// The name of the failover replica. If specified at instance creation, a
1028        /// failover replica is created for the instance. The name
1029        /// doesn't include the project ID.
1030        #[prost(string, tag = "1")]
1031        pub name: ::prost::alloc::string::String,
1032        /// The availability status of the failover replica. A false status indicates
1033        /// that the failover replica is out of sync. The primary instance can only
1034        /// failover to the failover replica when the status is true.
1035        #[prost(message, optional, tag = "2")]
1036        pub available: ::core::option::Option<bool>,
1037    }
1038    /// Any scheduled maintenance for this instance.
1039    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1040    pub struct SqlScheduledMaintenance {
1041        /// The start time of any upcoming scheduled maintenance for this instance.
1042        #[prost(message, optional, tag = "1")]
1043        pub start_time: ::core::option::Option<::prost_types::Timestamp>,
1044        #[deprecated]
1045        #[prost(bool, tag = "2")]
1046        pub can_defer: bool,
1047        /// If the scheduled maintenance can be rescheduled.
1048        #[prost(bool, tag = "3")]
1049        pub can_reschedule: bool,
1050        /// Maintenance cannot be rescheduled to start beyond this deadline.
1051        #[prost(message, optional, tag = "4")]
1052        pub schedule_deadline_time: ::core::option::Option<::prost_types::Timestamp>,
1053    }
1054    /// This message wraps up the information written by out-of-disk detection job.
1055    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1056    pub struct SqlOutOfDiskReport {
1057        /// This field represents the state generated by the proactive database
1058        /// wellness job for OutOfDisk issues.
1059        ///
1060        /// * Writers:
1061        /// * the proactive database wellness job for OOD.
1062        /// * Readers:
1063        /// * the proactive database wellness job
1064        #[prost(
1065            enumeration = "sql_out_of_disk_report::SqlOutOfDiskState",
1066            optional,
1067            tag = "1"
1068        )]
1069        pub sql_out_of_disk_state: ::core::option::Option<i32>,
1070        /// The minimum recommended increase size in GigaBytes
1071        /// This field is consumed by the frontend
1072        ///
1073        /// * Writers:
1074        /// * the proactive database wellness job for OOD.
1075        /// * Readers:
1076        #[prost(int32, optional, tag = "2")]
1077        pub sql_min_recommended_increase_size_gb: ::core::option::Option<i32>,
1078    }
1079    /// Nested message and enum types in `SqlOutOfDiskReport`.
1080    pub mod sql_out_of_disk_report {
1081        /// This enum lists all possible states regarding out-of-disk issues.
1082        #[derive(
1083            Clone,
1084            Copy,
1085            Debug,
1086            PartialEq,
1087            Eq,
1088            Hash,
1089            PartialOrd,
1090            Ord,
1091            ::prost::Enumeration
1092        )]
1093        #[repr(i32)]
1094        pub enum SqlOutOfDiskState {
1095            /// Unspecified state
1096            Unspecified = 0,
1097            /// The instance has plenty space on data disk
1098            Normal = 1,
1099            /// Data disk is almost used up. It is shutdown to prevent data
1100            /// corruption.
1101            SoftShutdown = 2,
1102        }
1103        impl SqlOutOfDiskState {
1104            /// String value of the enum field names used in the ProtoBuf definition.
1105            ///
1106            /// The values are not transformed in any way and thus are considered stable
1107            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1108            pub fn as_str_name(&self) -> &'static str {
1109                match self {
1110                    Self::Unspecified => "SQL_OUT_OF_DISK_STATE_UNSPECIFIED",
1111                    Self::Normal => "NORMAL",
1112                    Self::SoftShutdown => "SOFT_SHUTDOWN",
1113                }
1114            }
1115            /// Creates an enum from field names used in the ProtoBuf definition.
1116            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1117                match value {
1118                    "SQL_OUT_OF_DISK_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1119                    "NORMAL" => Some(Self::Normal),
1120                    "SOFT_SHUTDOWN" => Some(Self::SoftShutdown),
1121                    _ => None,
1122                }
1123            }
1124        }
1125    }
1126    /// Details of a single read pool node of a read pool.
1127    #[derive(Clone, PartialEq, ::prost::Message)]
1128    pub struct PoolNodeConfig {
1129        /// Output only. The name of the read pool node, to be used for retrieving
1130        /// metrics and logs.
1131        #[prost(string, optional, tag = "1")]
1132        pub name: ::core::option::Option<::prost::alloc::string::String>,
1133        /// Output only. The zone of the read pool node.
1134        #[prost(string, optional, tag = "2")]
1135        pub gce_zone: ::core::option::Option<::prost::alloc::string::String>,
1136        /// Output only. Mappings containing IP addresses that can be used to connect
1137        /// to the read pool node.
1138        #[prost(message, repeated, tag = "3")]
1139        pub ip_addresses: ::prost::alloc::vec::Vec<super::IpMapping>,
1140        /// Output only. The DNS name of the read pool node.
1141        #[prost(string, optional, tag = "4")]
1142        pub dns_name: ::core::option::Option<::prost::alloc::string::String>,
1143        /// Output only. The current state of the read pool node.
1144        #[prost(enumeration = "SqlInstanceState", optional, tag = "5")]
1145        pub state: ::core::option::Option<i32>,
1146        /// Output only. The list of DNS names used by this read pool node.
1147        #[prost(message, repeated, tag = "6")]
1148        pub dns_names: ::prost::alloc::vec::Vec<super::DnsNameMapping>,
1149        /// Output only. The Private Service Connect (PSC) service attachment of the
1150        /// read pool node.
1151        #[prost(string, optional, tag = "7")]
1152        pub psc_service_attachment_link: ::core::option::Option<
1153            ::prost::alloc::string::String,
1154        >,
1155        /// Output only. The list of settings for requested automatically-setup
1156        /// Private Service Connect (PSC) consumer endpoints that can be used to
1157        /// connect to this read pool node.
1158        #[prost(message, repeated, tag = "8")]
1159        pub psc_auto_connections: ::prost::alloc::vec::Vec<
1160            super::PscAutoConnectionConfig,
1161        >,
1162    }
1163    /// The current serving state of the database instance.
1164    #[derive(
1165        Clone,
1166        Copy,
1167        Debug,
1168        PartialEq,
1169        Eq,
1170        Hash,
1171        PartialOrd,
1172        Ord,
1173        ::prost::Enumeration
1174    )]
1175    #[repr(i32)]
1176    pub enum SqlInstanceState {
1177        /// The state of the instance is unknown.
1178        Unspecified = 0,
1179        /// The instance is running, or has been stopped by owner.
1180        Runnable = 1,
1181        /// The instance is not available, for example due to problems with billing.
1182        Suspended = 2,
1183        /// The instance is being deleted.
1184        PendingDelete = 3,
1185        /// The instance is being created.
1186        PendingCreate = 4,
1187        /// The instance is down for maintenance.
1188        Maintenance = 5,
1189        /// The creation of the instance failed or a fatal error occurred during
1190        /// maintenance.
1191        Failed = 6,
1192        /// Deprecated
1193        #[deprecated]
1194        OnlineMaintenance = 7,
1195        /// (Applicable to read pool nodes only.) The read pool node needs to be
1196        /// repaired. The database might be unavailable.
1197        Repairing = 8,
1198    }
1199    impl SqlInstanceState {
1200        /// String value of the enum field names used in the ProtoBuf definition.
1201        ///
1202        /// The values are not transformed in any way and thus are considered stable
1203        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1204        pub fn as_str_name(&self) -> &'static str {
1205            match self {
1206                Self::Unspecified => "SQL_INSTANCE_STATE_UNSPECIFIED",
1207                Self::Runnable => "RUNNABLE",
1208                Self::Suspended => "SUSPENDED",
1209                Self::PendingDelete => "PENDING_DELETE",
1210                Self::PendingCreate => "PENDING_CREATE",
1211                Self::Maintenance => "MAINTENANCE",
1212                Self::Failed => "FAILED",
1213                #[allow(deprecated)]
1214                Self::OnlineMaintenance => "ONLINE_MAINTENANCE",
1215                Self::Repairing => "REPAIRING",
1216            }
1217        }
1218        /// Creates an enum from field names used in the ProtoBuf definition.
1219        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1220            match value {
1221                "SQL_INSTANCE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1222                "RUNNABLE" => Some(Self::Runnable),
1223                "SUSPENDED" => Some(Self::Suspended),
1224                "PENDING_DELETE" => Some(Self::PendingDelete),
1225                "PENDING_CREATE" => Some(Self::PendingCreate),
1226                "MAINTENANCE" => Some(Self::Maintenance),
1227                "FAILED" => Some(Self::Failed),
1228                "ONLINE_MAINTENANCE" => {
1229                    Some(#[allow(deprecated)] Self::OnlineMaintenance)
1230                }
1231                "REPAIRING" => Some(Self::Repairing),
1232                _ => None,
1233            }
1234        }
1235    }
1236    /// The SQL network architecture for the instance.
1237    #[derive(
1238        Clone,
1239        Copy,
1240        Debug,
1241        PartialEq,
1242        Eq,
1243        Hash,
1244        PartialOrd,
1245        Ord,
1246        ::prost::Enumeration
1247    )]
1248    #[repr(i32)]
1249    pub enum SqlNetworkArchitecture {
1250        Unspecified = 0,
1251        /// The instance uses the new network architecture.
1252        NewNetworkArchitecture = 1,
1253        /// The instance uses the old network architecture.
1254        OldNetworkArchitecture = 2,
1255    }
1256    impl SqlNetworkArchitecture {
1257        /// String value of the enum field names used in the ProtoBuf definition.
1258        ///
1259        /// The values are not transformed in any way and thus are considered stable
1260        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1261        pub fn as_str_name(&self) -> &'static str {
1262            match self {
1263                Self::Unspecified => "SQL_NETWORK_ARCHITECTURE_UNSPECIFIED",
1264                Self::NewNetworkArchitecture => "NEW_NETWORK_ARCHITECTURE",
1265                Self::OldNetworkArchitecture => "OLD_NETWORK_ARCHITECTURE",
1266            }
1267        }
1268        /// Creates an enum from field names used in the ProtoBuf definition.
1269        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1270            match value {
1271                "SQL_NETWORK_ARCHITECTURE_UNSPECIFIED" => Some(Self::Unspecified),
1272                "NEW_NETWORK_ARCHITECTURE" => Some(Self::NewNetworkArchitecture),
1273                "OLD_NETWORK_ARCHITECTURE" => Some(Self::OldNetworkArchitecture),
1274                _ => None,
1275            }
1276        }
1277    }
1278}
1279/// DNS metadata.
1280#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1281pub struct DnsNameMapping {
1282    /// Output only. The DNS name.
1283    #[prost(string, tag = "1")]
1284    pub name: ::prost::alloc::string::String,
1285    /// Output only. The connection type of the DNS name.
1286    #[prost(enumeration = "dns_name_mapping::ConnectionType", tag = "2")]
1287    pub connection_type: i32,
1288    /// Output only. The scope that the DNS name applies to.
1289    #[prost(enumeration = "dns_name_mapping::DnsScope", tag = "3")]
1290    pub dns_scope: i32,
1291    /// Output only. The manager for this DNS record.
1292    #[prost(enumeration = "dns_name_mapping::RecordManager", tag = "4")]
1293    pub record_manager: i32,
1294}
1295/// Nested message and enum types in `DnsNameMapping`.
1296pub mod dns_name_mapping {
1297    /// The connection type of the DNS name.
1298    #[derive(
1299        Clone,
1300        Copy,
1301        Debug,
1302        PartialEq,
1303        Eq,
1304        Hash,
1305        PartialOrd,
1306        Ord,
1307        ::prost::Enumeration
1308    )]
1309    #[repr(i32)]
1310    pub enum ConnectionType {
1311        /// Unknown connection type.
1312        Unspecified = 0,
1313        /// Public IP.
1314        Public = 1,
1315        /// Private services access (private IP).
1316        PrivateServicesAccess = 2,
1317        /// Private Service Connect.
1318        PrivateServiceConnect = 3,
1319    }
1320    impl ConnectionType {
1321        /// String value of the enum field names used in the ProtoBuf definition.
1322        ///
1323        /// The values are not transformed in any way and thus are considered stable
1324        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1325        pub fn as_str_name(&self) -> &'static str {
1326            match self {
1327                Self::Unspecified => "CONNECTION_TYPE_UNSPECIFIED",
1328                Self::Public => "PUBLIC",
1329                Self::PrivateServicesAccess => "PRIVATE_SERVICES_ACCESS",
1330                Self::PrivateServiceConnect => "PRIVATE_SERVICE_CONNECT",
1331            }
1332        }
1333        /// Creates an enum from field names used in the ProtoBuf definition.
1334        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1335            match value {
1336                "CONNECTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1337                "PUBLIC" => Some(Self::Public),
1338                "PRIVATE_SERVICES_ACCESS" => Some(Self::PrivateServicesAccess),
1339                "PRIVATE_SERVICE_CONNECT" => Some(Self::PrivateServiceConnect),
1340                _ => None,
1341            }
1342        }
1343    }
1344    /// The scope that the DNS name applies to.
1345    #[derive(
1346        Clone,
1347        Copy,
1348        Debug,
1349        PartialEq,
1350        Eq,
1351        Hash,
1352        PartialOrd,
1353        Ord,
1354        ::prost::Enumeration
1355    )]
1356    #[repr(i32)]
1357    pub enum DnsScope {
1358        /// DNS scope not set. This value should not be used.
1359        Unspecified = 0,
1360        /// Indicates an instance-level DNS name.
1361        Instance = 1,
1362        /// Indicates a cluster-level DNS name.
1363        Cluster = 2,
1364    }
1365    impl DnsScope {
1366        /// String value of the enum field names used in the ProtoBuf definition.
1367        ///
1368        /// The values are not transformed in any way and thus are considered stable
1369        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1370        pub fn as_str_name(&self) -> &'static str {
1371            match self {
1372                Self::Unspecified => "DNS_SCOPE_UNSPECIFIED",
1373                Self::Instance => "INSTANCE",
1374                Self::Cluster => "CLUSTER",
1375            }
1376        }
1377        /// Creates an enum from field names used in the ProtoBuf definition.
1378        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1379            match value {
1380                "DNS_SCOPE_UNSPECIFIED" => Some(Self::Unspecified),
1381                "INSTANCE" => Some(Self::Instance),
1382                "CLUSTER" => Some(Self::Cluster),
1383                _ => None,
1384            }
1385        }
1386    }
1387    /// The system responsible for managing the DNS record.
1388    #[derive(
1389        Clone,
1390        Copy,
1391        Debug,
1392        PartialEq,
1393        Eq,
1394        Hash,
1395        PartialOrd,
1396        Ord,
1397        ::prost::Enumeration
1398    )]
1399    #[repr(i32)]
1400    pub enum RecordManager {
1401        /// Record manager not set. This value should not be used.
1402        Unspecified = 0,
1403        /// The record may be managed by the customer. It is not automatically
1404        /// managed by Cloud SQL automation.
1405        Customer = 1,
1406        /// The record is managed by Cloud SQL, which will create, update, and delete
1407        /// the DNS records for the zone automatically when the Cloud SQL database
1408        /// instance is created or updated.
1409        CloudSqlAutomation = 2,
1410    }
1411    impl RecordManager {
1412        /// String value of the enum field names used in the ProtoBuf definition.
1413        ///
1414        /// The values are not transformed in any way and thus are considered stable
1415        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1416        pub fn as_str_name(&self) -> &'static str {
1417            match self {
1418                Self::Unspecified => "RECORD_MANAGER_UNSPECIFIED",
1419                Self::Customer => "CUSTOMER",
1420                Self::CloudSqlAutomation => "CLOUD_SQL_AUTOMATION",
1421            }
1422        }
1423        /// Creates an enum from field names used in the ProtoBuf definition.
1424        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1425            match value {
1426                "RECORD_MANAGER_UNSPECIFIED" => Some(Self::Unspecified),
1427                "CUSTOMER" => Some(Self::Customer),
1428                "CLOUD_SQL_AUTOMATION" => Some(Self::CloudSqlAutomation),
1429                _ => None,
1430            }
1431        }
1432    }
1433}
1434/// Gemini instance configuration.
1435#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1436pub struct GeminiInstanceConfig {
1437    /// Output only. Whether Gemini is enabled.
1438    #[prost(bool, optional, tag = "1")]
1439    pub entitled: ::core::option::Option<bool>,
1440    /// Output only. Whether the vacuum management is enabled.
1441    #[prost(bool, optional, tag = "2")]
1442    pub google_vacuum_mgmt_enabled: ::core::option::Option<bool>,
1443    /// Output only. Whether canceling the out-of-memory (OOM) session is enabled.
1444    #[prost(bool, optional, tag = "3")]
1445    pub oom_session_cancel_enabled: ::core::option::Option<bool>,
1446    /// Output only. Whether the active query is enabled.
1447    #[prost(bool, optional, tag = "4")]
1448    pub active_query_enabled: ::core::option::Option<bool>,
1449    /// Output only. Whether the index advisor is enabled.
1450    #[prost(bool, optional, tag = "5")]
1451    pub index_advisor_enabled: ::core::option::Option<bool>,
1452    /// Output only. Whether the flag recommender is enabled.
1453    #[prost(bool, optional, tag = "6")]
1454    pub flag_recommender_enabled: ::core::option::Option<bool>,
1455}
1456/// A primary instance and disaster recovery (DR) replica pair.
1457/// A DR replica is a cross-region replica that you designate for failover
1458/// in the event that the primary instance has regional failure.
1459/// Applicable to MySQL and PostgreSQL.
1460#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1461pub struct ReplicationCluster {
1462    /// Output only. If set, this field indicates this instance has a private
1463    /// service access (PSA) DNS endpoint that is pointing to the primary instance
1464    /// of the cluster. If this instance is the primary, then the DNS endpoint
1465    /// points to this instance. After a switchover or replica failover operation,
1466    /// this DNS endpoint points to the promoted instance. This is a read-only
1467    /// field, returned to the user as information. This field can exist even if a
1468    /// standalone instance doesn't have a DR replica yet or the DR replica is
1469    /// deleted.
1470    #[prost(string, optional, tag = "1")]
1471    pub psa_write_endpoint: ::core::option::Option<::prost::alloc::string::String>,
1472    /// Optional. If the instance is a primary instance, then this field identifies
1473    /// the disaster recovery (DR) replica. A DR replica is an optional
1474    /// configuration for Enterprise Plus edition instances. If the instance is a
1475    /// read replica, then the field is not set. Set this field to a replica name
1476    /// to designate a DR replica for a primary instance. Remove the replica name
1477    /// to remove the DR replica designation.
1478    #[prost(string, optional, tag = "2")]
1479    pub failover_dr_replica_name: ::core::option::Option<::prost::alloc::string::String>,
1480    /// Output only. Read-only field that indicates whether the replica is a DR
1481    /// replica. This field is not set if the instance is a primary instance.
1482    #[prost(bool, optional, tag = "4")]
1483    pub dr_replica: ::core::option::Option<bool>,
1484}
1485/// An available database version. It can be a major or a minor version.
1486#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1487pub struct AvailableDatabaseVersion {
1488    /// The version's major version name.
1489    #[prost(string, optional, tag = "3")]
1490    pub major_version: ::core::option::Option<::prost::alloc::string::String>,
1491    /// The database version name. For MySQL 8.0, this string provides the database
1492    /// major and minor version.
1493    #[prost(string, optional, tag = "8")]
1494    pub name: ::core::option::Option<::prost::alloc::string::String>,
1495    /// The database version's display name.
1496    #[prost(string, optional, tag = "9")]
1497    pub display_name: ::core::option::Option<::prost::alloc::string::String>,
1498}
1499/// Database list response.
1500#[derive(Clone, PartialEq, ::prost::Message)]
1501pub struct DatabasesListResponse {
1502    /// This is always `sql#databasesList`.
1503    #[prost(string, tag = "1")]
1504    pub kind: ::prost::alloc::string::String,
1505    /// List of database resources in the instance.
1506    #[prost(message, repeated, tag = "2")]
1507    pub items: ::prost::alloc::vec::Vec<Database>,
1508}
1509/// Read-replica configuration for connecting to the on-premises primary
1510/// instance.
1511#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1512pub struct DemoteMasterConfiguration {
1513    /// This is always `sql#demoteMasterConfiguration`.
1514    #[prost(string, tag = "1")]
1515    pub kind: ::prost::alloc::string::String,
1516    /// MySQL specific configuration when replicating from a MySQL on-premises
1517    /// primary instance. Replication configuration information such as the
1518    /// username, password, certificates, and keys are not stored in the instance
1519    /// metadata. The configuration information is used only to set up the
1520    /// replication connection and is stored by MySQL in a file named
1521    /// `master.info` in the data directory.
1522    #[prost(message, optional, tag = "2")]
1523    pub mysql_replica_configuration: ::core::option::Option<
1524        DemoteMasterMySqlReplicaConfiguration,
1525    >,
1526}
1527/// Database instance demote primary instance context.
1528#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1529pub struct DemoteMasterContext {
1530    /// This is always `sql#demoteMasterContext`.
1531    #[prost(string, tag = "1")]
1532    pub kind: ::prost::alloc::string::String,
1533    /// Verify the GTID consistency for demote operation. Default value:
1534    /// `True`. Setting this flag to `false` enables you to bypass the GTID
1535    /// consistency check between on-premises primary instance and Cloud SQL
1536    /// instance during the demotion operation but also exposes you to the risk of
1537    /// future replication failures. Change the value only if you know the reason
1538    /// for the GTID divergence and are confident that doing so will not cause any
1539    /// replication issues.
1540    #[prost(message, optional, tag = "2")]
1541    pub verify_gtid_consistency: ::core::option::Option<bool>,
1542    /// The name of the instance which will act as on-premises primary instance
1543    /// in the replication setup.
1544    #[prost(string, tag = "3")]
1545    pub master_instance_name: ::prost::alloc::string::String,
1546    /// Configuration specific to read-replicas replicating from the on-premises
1547    /// primary instance.
1548    #[prost(message, optional, tag = "4")]
1549    pub replica_configuration: ::core::option::Option<DemoteMasterConfiguration>,
1550    /// Flag to skip replication setup on the instance.
1551    #[prost(bool, tag = "5")]
1552    pub skip_replication_setup: bool,
1553}
1554/// Read-replica configuration specific to MySQL databases.
1555#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1556pub struct DemoteMasterMySqlReplicaConfiguration {
1557    /// This is always `sql#demoteMasterMysqlReplicaConfiguration`.
1558    #[prost(string, tag = "1")]
1559    pub kind: ::prost::alloc::string::String,
1560    /// The username for the replication connection.
1561    #[prost(string, tag = "2")]
1562    pub username: ::prost::alloc::string::String,
1563    /// The password for the replication connection.
1564    #[prost(string, tag = "3")]
1565    pub password: ::prost::alloc::string::String,
1566    /// PEM representation of the replica's private key. The corresponding public
1567    /// key is encoded in the client's certificate. The format of the replica's
1568    /// private key can be either PKCS #1 or PKCS #8.
1569    #[prost(string, tag = "4")]
1570    pub client_key: ::prost::alloc::string::String,
1571    /// PEM representation of the replica's x509 certificate.
1572    #[prost(string, tag = "5")]
1573    pub client_certificate: ::prost::alloc::string::String,
1574    /// PEM representation of the trusted CA's x509 certificate.
1575    #[prost(string, tag = "6")]
1576    pub ca_certificate: ::prost::alloc::string::String,
1577}
1578/// This context is used to demote an existing standalone instance to be
1579/// a Cloud SQL read replica for an external database server.
1580#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1581pub struct DemoteContext {
1582    /// This is always `sql#demoteContext`.
1583    #[prost(string, tag = "1")]
1584    pub kind: ::prost::alloc::string::String,
1585    /// Required. The name of the instance which acts as an on-premises primary
1586    /// instance in the replication setup.
1587    #[prost(string, tag = "2")]
1588    pub source_representative_instance_name: ::prost::alloc::string::String,
1589}
1590/// Database instance export context.
1591#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1592pub struct ExportContext {
1593    /// The path to the file in Google Cloud Storage where the export will be
1594    /// stored. The URI is in the form `gs://bucketName/fileName`. If the file
1595    /// already exists, the request succeeds, but the operation fails. If
1596    /// `fileType` is `SQL` and the filename ends with .gz,
1597    /// the contents are compressed.
1598    #[prost(string, tag = "1")]
1599    pub uri: ::prost::alloc::string::String,
1600    /// Databases to be exported. <br /> `MySQL instances:` If
1601    /// `fileType` is `SQL` and no database is specified, all
1602    /// databases are exported, except for the `mysql` system database.
1603    /// If `fileType` is `CSV`, you can specify one database,
1604    /// either by using this property or by using the
1605    /// `csvExportOptions.selectQuery` property, which takes precedence
1606    /// over this property. <br /> `PostgreSQL instances:` If you don't specify a
1607    /// database by name, all user databases in the instance are
1608    /// exported. This excludes system databases and Cloud SQL databases used to
1609    /// manage internal operations. Exporting all user databases is only available
1610    /// for directory-formatted parallel export. If `fileType` is `CSV`,
1611    /// this database must match the one specified in the
1612    /// `csvExportOptions.selectQuery` property. <br /> `SQL Server  instances:` You must specify one database to be exported, and the
1613    /// `fileType` must be `BAK`.
1614    #[prost(string, repeated, tag = "2")]
1615    pub databases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1616    /// This is always `sql#exportContext`.
1617    #[prost(string, tag = "3")]
1618    pub kind: ::prost::alloc::string::String,
1619    /// Options for exporting data as SQL statements.
1620    #[prost(message, optional, tag = "4")]
1621    pub sql_export_options: ::core::option::Option<export_context::SqlExportOptions>,
1622    /// Options for exporting data as CSV. `MySQL` and `PostgreSQL`
1623    /// instances only.
1624    #[prost(message, optional, tag = "5")]
1625    pub csv_export_options: ::core::option::Option<export_context::SqlCsvExportOptions>,
1626    /// The file type for the specified uri.
1627    #[prost(enumeration = "SqlFileType", tag = "6")]
1628    pub file_type: i32,
1629    /// Whether to perform a serverless export.
1630    #[prost(message, optional, tag = "8")]
1631    pub offload: ::core::option::Option<bool>,
1632    /// Options for exporting data as BAK files.
1633    #[prost(message, optional, tag = "9")]
1634    pub bak_export_options: ::core::option::Option<export_context::SqlBakExportOptions>,
1635    /// Optional. Export parameters specific to SQL Server TDE certificates
1636    #[prost(message, optional, tag = "10")]
1637    pub tde_export_options: ::core::option::Option<export_context::SqlTdeExportOptions>,
1638}
1639/// Nested message and enum types in `ExportContext`.
1640pub mod export_context {
1641    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1642    pub struct SqlCsvExportOptions {
1643        /// The select query used to extract the data.
1644        #[prost(string, tag = "1")]
1645        pub select_query: ::prost::alloc::string::String,
1646        /// Specifies the character that should appear before a data character that
1647        /// needs to be escaped.
1648        #[prost(string, tag = "2")]
1649        pub escape_character: ::prost::alloc::string::String,
1650        /// Specifies the quoting character to be used when a data value is quoted.
1651        #[prost(string, tag = "3")]
1652        pub quote_character: ::prost::alloc::string::String,
1653        /// Specifies the character that separates columns within each row (line) of
1654        /// the file.
1655        #[prost(string, tag = "4")]
1656        pub fields_terminated_by: ::prost::alloc::string::String,
1657        /// This is used to separate lines. If a line does not contain all fields,
1658        /// the rest of the columns are set to their default values.
1659        #[prost(string, tag = "6")]
1660        pub lines_terminated_by: ::prost::alloc::string::String,
1661    }
1662    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1663    pub struct SqlExportOptions {
1664        /// Tables to export, or that were exported, from the specified database. If
1665        /// you specify tables, specify one and only one database. For PostgreSQL
1666        /// instances, you can specify only one table.
1667        #[prost(string, repeated, tag = "1")]
1668        pub tables: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1669        /// Export only schemas.
1670        #[prost(message, optional, tag = "2")]
1671        pub schema_only: ::core::option::Option<bool>,
1672        #[prost(message, optional, tag = "3")]
1673        pub mysql_export_options: ::core::option::Option<
1674            sql_export_options::MysqlExportOptions,
1675        >,
1676        /// Optional. The number of threads to use for parallel export.
1677        #[prost(message, optional, tag = "4")]
1678        pub threads: ::core::option::Option<i32>,
1679        /// Optional. Whether or not the export should be parallel.
1680        #[prost(message, optional, tag = "5")]
1681        pub parallel: ::core::option::Option<bool>,
1682        /// Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.
1683        #[prost(message, optional, tag = "6")]
1684        pub postgres_export_options: ::core::option::Option<
1685            sql_export_options::PostgresExportOptions,
1686        >,
1687    }
1688    /// Nested message and enum types in `SqlExportOptions`.
1689    pub mod sql_export_options {
1690        /// Options for exporting from MySQL.
1691        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1692        pub struct MysqlExportOptions {
1693            /// Option to include SQL statement required to set up replication. If set
1694            /// to `1`, the dump file includes a CHANGE MASTER TO statement with the
1695            /// binary log coordinates, and --set-gtid-purged is set to ON. If set to
1696            /// `2`, the CHANGE MASTER TO statement is written as a SQL comment and
1697            /// has no effect. If set to any value other than `1`, --set-gtid-purged
1698            /// is set to OFF.
1699            #[prost(message, optional, tag = "1")]
1700            pub master_data: ::core::option::Option<i32>,
1701        }
1702        /// Options for exporting from a Cloud SQL for PostgreSQL instance.
1703        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1704        pub struct PostgresExportOptions {
1705            /// Optional. Use this option to include DROP <code>\<object\></code>
1706            /// SQL statements. Use these statements to delete database objects before
1707            /// running the import operation.
1708            #[prost(message, optional, tag = "1")]
1709            pub clean: ::core::option::Option<bool>,
1710            /// Optional. Option to include an IF EXISTS SQL statement with each DROP
1711            /// statement produced by clean.
1712            #[prost(message, optional, tag = "2")]
1713            pub if_exists: ::core::option::Option<bool>,
1714        }
1715    }
1716    /// Options for exporting BAK files (SQL Server-only)
1717    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1718    pub struct SqlBakExportOptions {
1719        /// Whether or not the export should be striped.
1720        #[prost(message, optional, tag = "1")]
1721        pub striped: ::core::option::Option<bool>,
1722        /// Option for specifying how many stripes to use for the export.
1723        /// If blank, and the value of the striped field is true,
1724        /// the number of stripes is automatically chosen.
1725        #[prost(message, optional, tag = "2")]
1726        pub stripe_count: ::core::option::Option<i32>,
1727        /// Type of this bak file will be export, FULL or DIFF, SQL Server only
1728        #[prost(enumeration = "super::BakType", tag = "4")]
1729        pub bak_type: i32,
1730        /// Deprecated: copy_only is deprecated. Use differential_base instead
1731        #[deprecated]
1732        #[prost(message, optional, tag = "5")]
1733        pub copy_only: ::core::option::Option<bool>,
1734        /// Whether or not the backup can be used as a differential base
1735        /// copy_only backup can not be served as differential base
1736        #[prost(message, optional, tag = "6")]
1737        pub differential_base: ::core::option::Option<bool>,
1738        /// Optional. The begin timestamp when transaction log will be included in
1739        /// the export operation. [RFC 3339](<https://tools.ietf.org/html/rfc3339>)
1740        /// format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all
1741        /// available logs from the beginning of retention period will be included.
1742        /// Only applied to Cloud SQL for SQL Server.
1743        #[prost(message, optional, tag = "7")]
1744        pub export_log_start_time: ::core::option::Option<::prost_types::Timestamp>,
1745        /// Optional. The end timestamp when transaction log will be included in the
1746        /// export operation. [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format
1747        /// (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all
1748        /// available logs until current time will be included. Only applied to Cloud
1749        /// SQL for SQL Server.
1750        #[prost(message, optional, tag = "8")]
1751        pub export_log_end_time: ::core::option::Option<::prost_types::Timestamp>,
1752    }
1753    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1754    pub struct SqlTdeExportOptions {
1755        /// Required. Path to the TDE certificate public key
1756        /// in the form gs://bucketName/fileName.
1757        /// The instance must have write access to the location.
1758        /// Applicable only for SQL Server instances.
1759        #[prost(string, tag = "1")]
1760        pub certificate_path: ::prost::alloc::string::String,
1761        /// Required. Path to the TDE certificate private key
1762        /// in the form gs://bucketName/fileName.
1763        /// The instance must have write access to the location.
1764        /// Applicable only for SQL Server instances.
1765        #[prost(string, tag = "2")]
1766        pub private_key_path: ::prost::alloc::string::String,
1767        /// Required. Password that encrypts the private key.
1768        #[prost(string, tag = "3")]
1769        pub private_key_password: ::prost::alloc::string::String,
1770        /// Required. Certificate name.
1771        /// Applicable only for SQL Server instances.
1772        #[prost(string, tag = "5")]
1773        pub name: ::prost::alloc::string::String,
1774    }
1775}
1776/// Database instance failover context.
1777#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1778pub struct FailoverContext {
1779    /// The current settings version of this instance. Request will be rejected if
1780    /// this version doesn't match the current settings version.
1781    #[prost(int64, tag = "1")]
1782    pub settings_version: i64,
1783    /// This is always `sql#failoverContext`.
1784    #[prost(string, tag = "2")]
1785    pub kind: ::prost::alloc::string::String,
1786}
1787/// A flag resource.
1788#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1789pub struct Flag {
1790    /// This is the name of the flag. Flag names always use underscores, not
1791    /// hyphens, for example: `max_allowed_packet`
1792    #[prost(string, tag = "1")]
1793    pub name: ::prost::alloc::string::String,
1794    /// The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`,
1795    /// `INTEGER` or `NONE`. `NONE` is used for flags which do not take a
1796    /// value, such as `skip_grant_tables`.
1797    #[prost(enumeration = "SqlFlagType", tag = "2")]
1798    pub r#type: i32,
1799    /// The database version this flag applies to. Can be
1800    /// MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`,
1801    /// or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,
1802    /// `POSTGRES_11` or `POSTGRES_12`. SQL Server instances:
1803    /// `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`,
1804    /// `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,
1805    /// `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or
1806    /// `SQLSERVER_2019_WEB`.
1807    /// See [the complete
1808    /// list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
1809    #[prost(enumeration = "SqlDatabaseVersion", repeated, tag = "3")]
1810    pub applies_to: ::prost::alloc::vec::Vec<i32>,
1811    /// For `STRING` flags, a list of strings that the value can be set to.
1812    #[prost(string, repeated, tag = "4")]
1813    pub allowed_string_values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1814    /// For `INTEGER` flags, the minimum allowed value.
1815    #[prost(message, optional, tag = "5")]
1816    pub min_value: ::core::option::Option<i64>,
1817    /// For `INTEGER` flags, the maximum allowed value.
1818    #[prost(message, optional, tag = "6")]
1819    pub max_value: ::core::option::Option<i64>,
1820    /// Indicates whether changing this flag will trigger a database restart. Only
1821    /// applicable to Second Generation instances.
1822    #[prost(message, optional, tag = "7")]
1823    pub requires_restart: ::core::option::Option<bool>,
1824    /// This is always `sql#flag`.
1825    #[prost(string, tag = "8")]
1826    pub kind: ::prost::alloc::string::String,
1827    /// Whether or not the flag is considered in beta.
1828    #[prost(message, optional, tag = "9")]
1829    pub in_beta: ::core::option::Option<bool>,
1830    /// Use this field if only certain integers are accepted. Can be combined
1831    /// with min_value and max_value to add additional values.
1832    #[prost(int64, repeated, tag = "10")]
1833    pub allowed_int_values: ::prost::alloc::vec::Vec<i64>,
1834    /// Scope of flag.
1835    #[prost(enumeration = "SqlFlagScope", tag = "15")]
1836    pub flag_scope: i32,
1837    /// Recommended flag value for UI display.
1838    #[prost(oneof = "flag::RecommendedValue", tags = "16, 17")]
1839    pub recommended_value: ::core::option::Option<flag::RecommendedValue>,
1840}
1841/// Nested message and enum types in `Flag`.
1842pub mod flag {
1843    /// Recommended flag value for UI display.
1844    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1845    pub enum RecommendedValue {
1846        /// Recommended flag value in string format for UI display.
1847        #[prost(string, tag = "16")]
1848        RecommendedStringValue(::prost::alloc::string::String),
1849        /// Recommended flag value in integer format for UI display.
1850        #[prost(message, tag = "17")]
1851        RecommendedIntValue(i64),
1852    }
1853}
1854/// Flags list response.
1855#[derive(Clone, PartialEq, ::prost::Message)]
1856pub struct FlagsListResponse {
1857    /// This is always `sql#flagsList`.
1858    #[prost(string, tag = "1")]
1859    pub kind: ::prost::alloc::string::String,
1860    /// List of flags.
1861    #[prost(message, repeated, tag = "2")]
1862    pub items: ::prost::alloc::vec::Vec<Flag>,
1863}
1864/// Database instance import context.
1865#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1866pub struct ImportContext {
1867    /// Path to the import file in Cloud Storage, in the form
1868    /// `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported
1869    /// when `fileType` is `SQL`. The instance must have
1870    /// write permissions to the bucket and read access to the file.
1871    #[prost(string, tag = "1")]
1872    pub uri: ::prost::alloc::string::String,
1873    /// The target database for the import. If `fileType` is `SQL`, this field
1874    /// is required only if the import file does not specify a database, and is
1875    /// overridden by any database specification in the import file. For entire
1876    /// instance parallel import operations, the database is overridden by the
1877    /// database name stored in subdirectory name. If
1878    /// `fileType` is `CSV`, one database must be specified.
1879    #[prost(string, tag = "2")]
1880    pub database: ::prost::alloc::string::String,
1881    /// This is always `sql#importContext`.
1882    #[prost(string, tag = "3")]
1883    pub kind: ::prost::alloc::string::String,
1884    /// The file type for the specified uri.
1885    ///
1886    /// * `SQL`: The file contains SQL statements.
1887    /// * `CSV`: The file contains CSV data.
1888    /// * `BAK`: The file contains backup data for a SQL Server instance.
1889    #[prost(enumeration = "SqlFileType", tag = "4")]
1890    pub file_type: i32,
1891    /// Options for importing data as CSV.
1892    #[prost(message, optional, tag = "5")]
1893    pub csv_import_options: ::core::option::Option<import_context::SqlCsvImportOptions>,
1894    /// The PostgreSQL user for this import operation. PostgreSQL instances only.
1895    #[prost(string, tag = "6")]
1896    pub import_user: ::prost::alloc::string::String,
1897    /// Import parameters specific to SQL Server .BAK files
1898    #[prost(message, optional, tag = "7")]
1899    pub bak_import_options: ::core::option::Option<import_context::SqlBakImportOptions>,
1900    /// Optional. Options for importing data from SQL statements.
1901    #[prost(message, optional, tag = "8")]
1902    pub sql_import_options: ::core::option::Option<import_context::SqlImportOptions>,
1903    /// Optional. Import parameters specific to SQL Server .TDE files
1904    /// Import parameters specific to SQL Server TDE certificates
1905    #[prost(message, optional, tag = "9")]
1906    pub tde_import_options: ::core::option::Option<import_context::SqlTdeImportOptions>,
1907}
1908/// Nested message and enum types in `ImportContext`.
1909pub mod import_context {
1910    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1911    pub struct SqlImportOptions {
1912        /// Optional. The number of threads to use for parallel import.
1913        #[prost(message, optional, tag = "1")]
1914        pub threads: ::core::option::Option<i32>,
1915        /// Optional. Whether or not the import should be parallel.
1916        #[prost(message, optional, tag = "2")]
1917        pub parallel: ::core::option::Option<bool>,
1918        /// Optional. Options for importing from a Cloud SQL for PostgreSQL instance.
1919        #[prost(message, optional, tag = "3")]
1920        pub postgres_import_options: ::core::option::Option<
1921            sql_import_options::PostgresImportOptions,
1922        >,
1923    }
1924    /// Nested message and enum types in `SqlImportOptions`.
1925    pub mod sql_import_options {
1926        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1927        pub struct PostgresImportOptions {
1928            /// Optional. The --clean flag for the pg_restore utility. This flag
1929            /// applies only if you enabled Cloud SQL to import files in parallel.
1930            #[prost(message, optional, tag = "1")]
1931            pub clean: ::core::option::Option<bool>,
1932            /// Optional. The --if-exists flag for the pg_restore utility. This flag
1933            /// applies only if you enabled Cloud SQL to import files in parallel.
1934            #[prost(message, optional, tag = "2")]
1935            pub if_exists: ::core::option::Option<bool>,
1936        }
1937    }
1938    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1939    pub struct SqlCsvImportOptions {
1940        /// The table to which CSV data is imported.
1941        #[prost(string, tag = "1")]
1942        pub table: ::prost::alloc::string::String,
1943        /// The columns to which CSV data is imported. If not specified, all columns
1944        /// of the database table are loaded with CSV data.
1945        #[prost(string, repeated, tag = "2")]
1946        pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1947        /// Specifies the character that should appear before a data character that
1948        /// needs to be escaped.
1949        #[prost(string, tag = "4")]
1950        pub escape_character: ::prost::alloc::string::String,
1951        /// Specifies the quoting character to be used when a data value is quoted.
1952        #[prost(string, tag = "5")]
1953        pub quote_character: ::prost::alloc::string::String,
1954        /// Specifies the character that separates columns within each row (line) of
1955        /// the file.
1956        #[prost(string, tag = "6")]
1957        pub fields_terminated_by: ::prost::alloc::string::String,
1958        /// This is used to separate lines. If a line does not contain all fields,
1959        /// the rest of the columns are set to their default values.
1960        #[prost(string, tag = "8")]
1961        pub lines_terminated_by: ::prost::alloc::string::String,
1962    }
1963    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1964    pub struct SqlBakImportOptions {
1965        #[prost(message, optional, tag = "1")]
1966        pub encryption_options: ::core::option::Option<
1967            sql_bak_import_options::EncryptionOptions,
1968        >,
1969        /// Whether or not the backup set being restored is striped.
1970        /// Applies only to Cloud SQL for SQL Server.
1971        #[prost(message, optional, tag = "2")]
1972        pub striped: ::core::option::Option<bool>,
1973        /// Whether or not the backup importing will restore database
1974        /// with NORECOVERY option.
1975        /// Applies only to Cloud SQL for SQL Server.
1976        #[prost(message, optional, tag = "4")]
1977        pub no_recovery: ::core::option::Option<bool>,
1978        /// Whether or not the backup importing request will just bring database
1979        /// online without downloading Bak content only one of "no_recovery" and
1980        /// "recovery_only" can be true otherwise error will return. Applies only to
1981        /// Cloud SQL for SQL Server.
1982        #[prost(message, optional, tag = "5")]
1983        pub recovery_only: ::core::option::Option<bool>,
1984        /// Type of the bak content, FULL or DIFF.
1985        #[prost(enumeration = "super::BakType", tag = "6")]
1986        pub bak_type: i32,
1987        /// Optional. The timestamp when the import should stop. This timestamp is in
1988        /// the [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format (for example,
1989        /// `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT
1990        /// keyword and applies to Cloud SQL for SQL Server only.
1991        #[prost(message, optional, tag = "7")]
1992        pub stop_at: ::core::option::Option<::prost_types::Timestamp>,
1993        /// Optional. The marked transaction where the import should stop. This field
1994        /// is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL
1995        /// Server only.
1996        #[prost(string, tag = "8")]
1997        pub stop_at_mark: ::prost::alloc::string::String,
1998    }
1999    /// Nested message and enum types in `SqlBakImportOptions`.
2000    pub mod sql_bak_import_options {
2001        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2002        pub struct EncryptionOptions {
2003            /// Path to the Certificate (.cer) in Cloud Storage, in the form
2004            /// `gs://bucketName/fileName`. The instance must have write permissions
2005            /// to the bucket and read access to the file.
2006            #[prost(string, tag = "1")]
2007            pub cert_path: ::prost::alloc::string::String,
2008            /// Path to the Certificate Private Key (.pvk)  in Cloud Storage, in the
2009            /// form `gs://bucketName/fileName`. The instance must have write
2010            /// permissions to the bucket and read access to the file.
2011            #[prost(string, tag = "2")]
2012            pub pvk_path: ::prost::alloc::string::String,
2013            /// Password that encrypts the private key
2014            #[prost(string, tag = "3")]
2015            pub pvk_password: ::prost::alloc::string::String,
2016            /// Optional. Whether the imported file remains encrypted.
2017            #[prost(message, optional, tag = "5")]
2018            pub keep_encrypted: ::core::option::Option<bool>,
2019        }
2020    }
2021    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2022    pub struct SqlTdeImportOptions {
2023        /// Required. Path to the TDE certificate public key
2024        /// in the form gs://bucketName/fileName.
2025        /// The instance must have read access to the file.
2026        /// Applicable only for SQL Server instances.
2027        #[prost(string, tag = "1")]
2028        pub certificate_path: ::prost::alloc::string::String,
2029        /// Required. Path to the TDE certificate private key
2030        /// in the form gs://bucketName/fileName.
2031        /// The instance must have read access to the file.
2032        /// Applicable only for SQL Server instances.
2033        #[prost(string, tag = "2")]
2034        pub private_key_path: ::prost::alloc::string::String,
2035        /// Required. Password that encrypts the private key.
2036        #[prost(string, tag = "3")]
2037        pub private_key_password: ::prost::alloc::string::String,
2038        /// Required. Certificate name.
2039        /// Applicable only for SQL Server instances.
2040        #[prost(string, tag = "5")]
2041        pub name: ::prost::alloc::string::String,
2042    }
2043}
2044/// Database instance clone request.
2045#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2046pub struct InstancesCloneRequest {
2047    /// Contains details about the clone operation.
2048    #[prost(message, optional, tag = "1")]
2049    pub clone_context: ::core::option::Option<CloneContext>,
2050}
2051/// Database demote primary instance request.
2052#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2053pub struct InstancesDemoteMasterRequest {
2054    /// Contains details about the demoteMaster operation.
2055    #[prost(message, optional, tag = "1")]
2056    pub demote_master_context: ::core::option::Option<DemoteMasterContext>,
2057}
2058/// This request is used to demote an existing standalone instance to be a
2059/// Cloud SQL read replica for an external database server.
2060#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2061pub struct InstancesDemoteRequest {
2062    /// Required. This context is used to demote an existing standalone instance to
2063    /// be a Cloud SQL read replica for an external database server.
2064    #[prost(message, optional, tag = "1")]
2065    pub demote_context: ::core::option::Option<DemoteContext>,
2066}
2067/// Database instance export request.
2068#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2069pub struct InstancesExportRequest {
2070    /// Contains details about the export operation.
2071    #[prost(message, optional, tag = "1")]
2072    pub export_context: ::core::option::Option<ExportContext>,
2073}
2074/// Instance failover request.
2075#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2076pub struct InstancesFailoverRequest {
2077    /// Failover Context.
2078    #[prost(message, optional, tag = "1")]
2079    pub failover_context: ::core::option::Option<FailoverContext>,
2080}
2081/// Database instance import request.
2082#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2083pub struct InstancesImportRequest {
2084    /// Contains details about the import operation.
2085    #[prost(message, optional, tag = "1")]
2086    pub import_context: ::core::option::Option<ImportContext>,
2087}
2088/// Request for Pre-checks for MVU
2089#[derive(Clone, PartialEq, ::prost::Message)]
2090pub struct InstancesPreCheckMajorVersionUpgradeRequest {
2091    /// Required. Contains details about the pre-check major version upgrade
2092    /// operation.
2093    #[prost(message, optional, tag = "1")]
2094    pub pre_check_major_version_upgrade_context: ::core::option::Option<
2095        PreCheckMajorVersionUpgradeContext,
2096    >,
2097}
2098/// MySQL-specific external server sync settings.
2099#[derive(Clone, PartialEq, ::prost::Message)]
2100pub struct MySqlSyncConfig {
2101    /// Flags to use for the initial dump.
2102    #[prost(message, repeated, tag = "1")]
2103    pub initial_sync_flags: ::prost::alloc::vec::Vec<SyncFlags>,
2104}
2105/// Database instances list response.
2106#[derive(Clone, PartialEq, ::prost::Message)]
2107pub struct InstancesListResponse {
2108    /// This is always `sql#instancesList`.
2109    #[prost(string, tag = "1")]
2110    pub kind: ::prost::alloc::string::String,
2111    /// List of warnings that occurred while handling the request.
2112    #[prost(message, repeated, tag = "2")]
2113    pub warnings: ::prost::alloc::vec::Vec<ApiWarning>,
2114    /// List of database instance resources.
2115    #[prost(message, repeated, tag = "3")]
2116    pub items: ::prost::alloc::vec::Vec<DatabaseInstance>,
2117    /// The continuation token, used to page through large result sets. Provide
2118    /// this value in a subsequent request to return the next page of results.
2119    #[prost(string, tag = "4")]
2120    pub next_page_token: ::prost::alloc::string::String,
2121}
2122/// Instances ListServerCas response.
2123#[derive(Clone, PartialEq, ::prost::Message)]
2124pub struct InstancesListServerCasResponse {
2125    /// List of server CA certificates for the instance.
2126    #[prost(message, repeated, tag = "1")]
2127    pub certs: ::prost::alloc::vec::Vec<SslCert>,
2128    #[prost(string, tag = "2")]
2129    pub active_version: ::prost::alloc::string::String,
2130    /// This is always `sql#instancesListServerCas`.
2131    #[prost(string, tag = "3")]
2132    pub kind: ::prost::alloc::string::String,
2133}
2134/// Instances ListServerCertificatess response.
2135#[derive(Clone, PartialEq, ::prost::Message)]
2136pub struct InstancesListServerCertificatesResponse {
2137    /// List of server CA certificates for the instance.
2138    #[prost(message, repeated, tag = "1")]
2139    pub ca_certs: ::prost::alloc::vec::Vec<SslCert>,
2140    /// List of server certificates for the instance, signed by the corresponding
2141    /// CA from the `ca_certs` list.
2142    #[prost(message, repeated, tag = "2")]
2143    pub server_certs: ::prost::alloc::vec::Vec<SslCert>,
2144    /// The `sha1_fingerprint` of the active certificate from `server_certs`.
2145    #[prost(string, tag = "3")]
2146    pub active_version: ::prost::alloc::string::String,
2147    /// This is always `sql#instancesListServerCertificates`.
2148    #[prost(string, tag = "4")]
2149    pub kind: ::prost::alloc::string::String,
2150}
2151/// Instances ListEntraIdCertificates response.
2152#[derive(Clone, PartialEq, ::prost::Message)]
2153pub struct InstancesListEntraIdCertificatesResponse {
2154    /// List of Entra ID certificates for the instance.
2155    #[prost(message, repeated, tag = "1")]
2156    pub certs: ::prost::alloc::vec::Vec<SslCert>,
2157    /// The `sha1_fingerprint` of the active certificate from `certs`.
2158    #[prost(string, tag = "2")]
2159    pub active_version: ::prost::alloc::string::String,
2160    /// This is always `sql#instancesListEntraIdCertificates`.
2161    #[prost(string, tag = "3")]
2162    pub kind: ::prost::alloc::string::String,
2163}
2164/// Database instance restore backup request.
2165#[derive(Clone, PartialEq, ::prost::Message)]
2166pub struct InstancesRestoreBackupRequest {
2167    /// Parameters required to perform the restore backup operation.
2168    #[prost(message, optional, tag = "1")]
2169    pub restore_backup_context: ::core::option::Option<RestoreBackupContext>,
2170    /// The name of the backup that's used to restore a Cloud SQL instance:
2171    /// Format:  projects/{project-id}/backups/{backup-uid}. Only one of
2172    /// restore_backup_context, backup, backupdr_backup can be passed to the input.
2173    #[prost(string, tag = "2")]
2174    pub backup: ::prost::alloc::string::String,
2175    /// The name of the backup that's used to restore a Cloud SQL instance:
2176    /// Format:
2177    /// "projects/{project-id}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup-uid}".
2178    /// Only one of restore_backup_context, backup, backupdr_backup can be
2179    /// passed to the input.
2180    #[prost(string, tag = "4")]
2181    pub backupdr_backup: ::prost::alloc::string::String,
2182    /// Optional. By using this parameter, Cloud SQL overrides any instance
2183    /// settings stored in the backup you are restoring from. You can't change the
2184    /// instance's major database version and you can only increase the disk size.
2185    /// You can use this field to restore new instances only. This field is not
2186    /// applicable for restore to existing instances.
2187    #[prost(message, optional, tag = "3")]
2188    pub restore_instance_settings: ::core::option::Option<DatabaseInstance>,
2189    /// Optional. This field has the same purpose as restore_instance_settings,
2190    /// changes any instance settings stored in the backup you are restoring from.
2191    /// With the difference that these fields are cleared in the settings.
2192    #[prost(string, repeated, tag = "5")]
2193    pub restore_instance_clear_overrides_field_names: ::prost::alloc::vec::Vec<
2194        ::prost::alloc::string::String,
2195    >,
2196}
2197/// Rotate Server CA request.
2198#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2199pub struct InstancesRotateServerCaRequest {
2200    /// Contains details about the rotate server CA operation.
2201    #[prost(message, optional, tag = "1")]
2202    pub rotate_server_ca_context: ::core::option::Option<RotateServerCaContext>,
2203}
2204/// Rotate Server Certificate request.
2205#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2206pub struct InstancesRotateServerCertificateRequest {
2207    /// Optional. Contains details about the rotate server CA operation.
2208    #[prost(message, optional, tag = "1")]
2209    pub rotate_server_certificate_context: ::core::option::Option<
2210        RotateServerCertificateContext,
2211    >,
2212}
2213/// Rotate Entra ID Certificate request.
2214#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2215pub struct InstancesRotateEntraIdCertificateRequest {
2216    /// Optional. Contains details about the rotate Entra ID certificate operation.
2217    #[prost(message, optional, tag = "1")]
2218    pub rotate_entra_id_certificate_context: ::core::option::Option<
2219        RotateEntraIdCertificateContext,
2220    >,
2221}
2222/// Instance truncate log request.
2223#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2224pub struct InstancesTruncateLogRequest {
2225    /// Contains details about the truncate log operation.
2226    #[prost(message, optional, tag = "1")]
2227    pub truncate_log_context: ::core::option::Option<TruncateLogContext>,
2228}
2229/// Request to acquire an SSRS lease for an instance.
2230#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2231pub struct InstancesAcquireSsrsLeaseRequest {
2232    /// Contains details about the acquire SSRS lease operation.
2233    #[prost(message, optional, tag = "1")]
2234    pub acquire_ssrs_lease_context: ::core::option::Option<AcquireSsrsLeaseContext>,
2235}
2236/// Context to perform a point-in-time restore of an instance managed by
2237/// Backup and Disaster Recovery (DR) Service.
2238#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2239pub struct PointInTimeRestoreContext {
2240    /// The Backup and Disaster Recovery (DR) Service Datasource URI.
2241    /// Format:
2242    /// projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/{datasource}.
2243    #[prost(string, optional, tag = "1")]
2244    pub datasource: ::core::option::Option<::prost::alloc::string::String>,
2245    /// Required. The date and time to which you want to restore the instance.
2246    #[prost(message, optional, tag = "2")]
2247    pub point_in_time: ::core::option::Option<::prost_types::Timestamp>,
2248    /// Target instance name.
2249    #[prost(string, optional, tag = "3")]
2250    pub target_instance: ::core::option::Option<::prost::alloc::string::String>,
2251    /// Optional. The resource link for the VPC network from which the Cloud SQL
2252    /// instance is accessible for private IP. For example,
2253    /// `/projects/myProject/global/networks/default`.
2254    #[prost(string, optional, tag = "4")]
2255    pub private_network: ::core::option::Option<::prost::alloc::string::String>,
2256    /// Optional. The name of the allocated IP range for the internal IP Cloud SQL
2257    /// instance. For example: "google-managed-services-default". If you set this,
2258    /// then Cloud SQL creates the IP address for the cloned instance in the
2259    /// allocated range. This range must comply with [RFC
2260    /// 1035](<https://tools.ietf.org/html/rfc1035>) standards. Specifically, the
2261    /// name must be 1-63 characters long and match the regular expression
2262    /// [a-z](\[-a-z0-9\]*[a-z0-9])?. Reserved for future use.
2263    #[prost(string, optional, tag = "5")]
2264    pub allocated_ip_range: ::core::option::Option<::prost::alloc::string::String>,
2265    /// Optional. Point-in-time recovery of an instance to the specified zone. If
2266    /// no zone is specified, then clone to the same primary zone as the source
2267    /// instance.
2268    #[prost(string, optional, tag = "6")]
2269    pub preferred_zone: ::core::option::Option<::prost::alloc::string::String>,
2270    /// Optional. Point-in-time recovery of a regional instance in the specified
2271    /// zones. If not specified, clone to the same secondary zone as the source
2272    /// instance. This value cannot be the same as the preferred_zone field.
2273    #[prost(string, optional, tag = "9")]
2274    pub preferred_secondary_zone: ::core::option::Option<::prost::alloc::string::String>,
2275}
2276/// Perform disk shrink context.
2277#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2278pub struct PerformDiskShrinkContext {
2279    /// The target disk shrink size in GigaBytes.
2280    #[prost(int64, tag = "1")]
2281    pub target_size_gb: i64,
2282}
2283/// Structured PreCheckResponse containing message, type, and required
2284/// actions.
2285#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2286pub struct PreCheckResponse {
2287    /// The message to be displayed to the user.
2288    #[prost(string, optional, tag = "2")]
2289    pub message: ::core::option::Option<::prost::alloc::string::String>,
2290    /// The type of message whether it is an info, warning, or error.
2291    #[prost(enumeration = "pre_check_response::MessageType", optional, tag = "3")]
2292    pub message_type: ::core::option::Option<i32>,
2293    /// The actions that the user needs to take. Use repeated for multiple
2294    /// actions.
2295    #[prost(string, repeated, tag = "4")]
2296    pub actions_required: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2297}
2298/// Nested message and enum types in `PreCheckResponse`.
2299pub mod pre_check_response {
2300    /// The type of message which can be an info, a warning, or an error that
2301    /// requires user intervention.
2302    #[derive(
2303        Clone,
2304        Copy,
2305        Debug,
2306        PartialEq,
2307        Eq,
2308        Hash,
2309        PartialOrd,
2310        Ord,
2311        ::prost::Enumeration
2312    )]
2313    #[repr(i32)]
2314    pub enum MessageType {
2315        /// Default unspecified value to prevent unintended behavior changes.
2316        Unspecified = 0,
2317        /// General informational messages that don't require action.
2318        Info = 1,
2319        /// Warnings that might impact the upgrade but don't block it.
2320        Warning = 2,
2321        /// Errors that a user must resolve before proceeding with the upgrade.
2322        Error = 3,
2323    }
2324    impl MessageType {
2325        /// String value of the enum field names used in the ProtoBuf definition.
2326        ///
2327        /// The values are not transformed in any way and thus are considered stable
2328        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2329        pub fn as_str_name(&self) -> &'static str {
2330            match self {
2331                Self::Unspecified => "MESSAGE_TYPE_UNSPECIFIED",
2332                Self::Info => "INFO",
2333                Self::Warning => "WARNING",
2334                Self::Error => "ERROR",
2335            }
2336        }
2337        /// Creates an enum from field names used in the ProtoBuf definition.
2338        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2339            match value {
2340                "MESSAGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2341                "INFO" => Some(Self::Info),
2342                "WARNING" => Some(Self::Warning),
2343                "ERROR" => Some(Self::Error),
2344                _ => None,
2345            }
2346        }
2347    }
2348}
2349/// Pre-check major version upgrade context.
2350#[derive(Clone, PartialEq, ::prost::Message)]
2351pub struct PreCheckMajorVersionUpgradeContext {
2352    /// Required. The target database version to upgrade to.
2353    #[prost(enumeration = "SqlDatabaseVersion", tag = "1")]
2354    pub target_database_version: i32,
2355    /// Output only. The responses from the precheck operation.
2356    #[prost(message, repeated, tag = "2")]
2357    pub pre_check_response: ::prost::alloc::vec::Vec<PreCheckResponse>,
2358    /// Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.
2359    #[prost(string, tag = "3")]
2360    pub kind: ::prost::alloc::string::String,
2361}
2362/// Instance get disk shrink config response.
2363#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2364pub struct SqlInstancesGetDiskShrinkConfigResponse {
2365    /// This is always `sql#getDiskShrinkConfig`.
2366    #[prost(string, tag = "1")]
2367    pub kind: ::prost::alloc::string::String,
2368    /// The minimum size to which a disk can be shrunk in GigaBytes.
2369    #[prost(int64, tag = "2")]
2370    pub minimal_target_size_gb: i64,
2371    /// Additional message to customers.
2372    #[prost(string, tag = "3")]
2373    pub message: ::prost::alloc::string::String,
2374}
2375/// Instance verify external sync settings response.
2376#[derive(Clone, PartialEq, ::prost::Message)]
2377pub struct SqlInstancesVerifyExternalSyncSettingsResponse {
2378    /// This is always `sql#migrationSettingErrorList`.
2379    #[prost(string, tag = "1")]
2380    pub kind: ::prost::alloc::string::String,
2381    /// List of migration violations.
2382    #[prost(message, repeated, tag = "2")]
2383    pub errors: ::prost::alloc::vec::Vec<SqlExternalSyncSettingError>,
2384    /// List of migration warnings.
2385    #[prost(message, repeated, tag = "3")]
2386    pub warnings: ::prost::alloc::vec::Vec<SqlExternalSyncSettingError>,
2387}
2388/// External primary instance migration setting error/warning.
2389#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2390pub struct SqlExternalSyncSettingError {
2391    /// Can be `sql#externalSyncSettingError` or
2392    /// `sql#externalSyncSettingWarning`.
2393    #[prost(string, tag = "1")]
2394    pub kind: ::prost::alloc::string::String,
2395    /// Identifies the specific error that occurred.
2396    #[prost(
2397        enumeration = "sql_external_sync_setting_error::SqlExternalSyncSettingErrorType",
2398        tag = "2"
2399    )]
2400    pub r#type: i32,
2401    /// Additional information about the error encountered.
2402    #[prost(string, tag = "3")]
2403    pub detail: ::prost::alloc::string::String,
2404}
2405/// Nested message and enum types in `SqlExternalSyncSettingError`.
2406pub mod sql_external_sync_setting_error {
2407    #[derive(
2408        Clone,
2409        Copy,
2410        Debug,
2411        PartialEq,
2412        Eq,
2413        Hash,
2414        PartialOrd,
2415        Ord,
2416        ::prost::Enumeration
2417    )]
2418    #[repr(i32)]
2419    pub enum SqlExternalSyncSettingErrorType {
2420        Unspecified = 0,
2421        ConnectionFailure = 1,
2422        BinlogNotEnabled = 2,
2423        IncompatibleDatabaseVersion = 3,
2424        ReplicaAlreadySetup = 4,
2425        /// The replication user is missing privileges that are required.
2426        InsufficientPrivilege = 5,
2427        /// Unsupported migration type.
2428        UnsupportedMigrationType = 6,
2429        /// No pglogical extension installed on databases, applicable for postgres.
2430        NoPglogicalInstalled = 7,
2431        /// pglogical node already exists on databases, applicable for postgres.
2432        PglogicalNodeAlreadyExists = 8,
2433        /// The value of parameter wal_level is not set to logical.
2434        InvalidWalLevel = 9,
2435        /// The value of parameter shared_preload_libraries does not include
2436        /// pglogical.
2437        InvalidSharedPreloadLibrary = 10,
2438        /// The value of parameter max_replication_slots is not sufficient.
2439        InsufficientMaxReplicationSlots = 11,
2440        /// The value of parameter max_wal_senders is not sufficient.
2441        InsufficientMaxWalSenders = 12,
2442        /// The value of parameter max_worker_processes is not sufficient.
2443        InsufficientMaxWorkerProcesses = 13,
2444        /// Extensions installed are either not supported or having unsupported
2445        /// versions
2446        UnsupportedExtensions = 14,
2447        /// The value of parameter rds.logical_replication is not set to 1.
2448        InvalidRdsLogicalReplication = 15,
2449        /// The primary instance logging setup doesn't allow EM sync.
2450        InvalidLoggingSetup = 16,
2451        /// The primary instance database parameter setup doesn't allow EM sync.
2452        InvalidDbParam = 17,
2453        /// The gtid_mode is not supported, applicable for MySQL.
2454        UnsupportedGtidMode = 18,
2455        /// SQL Server Agent is not running.
2456        SqlserverAgentNotRunning = 19,
2457        /// The table definition is not support due to missing primary key or replica
2458        /// identity, applicable for postgres. Note that this is a warning and won't
2459        /// block the migration.
2460        UnsupportedTableDefinition = 20,
2461        /// The customer has a definer that will break EM setup.
2462        UnsupportedDefiner = 21,
2463        /// SQL Server @@SERVERNAME does not match actual host name.
2464        SqlserverServernameMismatch = 22,
2465        /// The primary instance has been setup and will fail the setup.
2466        PrimaryAlreadySetup = 23,
2467        /// The primary instance has unsupported binary log format.
2468        UnsupportedBinlogFormat = 24,
2469        /// The primary instance's binary log retention setting.
2470        BinlogRetentionSetting = 25,
2471        /// The primary instance has tables with unsupported storage engine.
2472        UnsupportedStorageEngine = 26,
2473        /// Source has tables with limited support
2474        /// eg: PostgreSQL tables without primary keys.
2475        LimitedSupportTables = 27,
2476        /// The replica instance contains existing data.
2477        ExistingDataInReplica = 28,
2478        /// The replication user is missing privileges that are optional.
2479        MissingOptionalPrivileges = 29,
2480        /// Additional BACKUP_ADMIN privilege is granted to the replication user
2481        /// which may lock source MySQL 8 instance for DDLs during initial sync.
2482        RiskyBackupAdminPrivilege = 30,
2483        /// The Cloud Storage bucket is missing necessary permissions.
2484        InsufficientGcsPermissions = 31,
2485        /// The Cloud Storage bucket has an error in the file or contains invalid
2486        /// file information.
2487        InvalidFileInfo = 32,
2488        /// The source instance has unsupported database settings for migration.
2489        UnsupportedDatabaseSettings = 33,
2490        /// The replication user is missing parallel import specific privileges.
2491        /// (e.g. LOCK TABLES) for MySQL.
2492        MysqlParallelImportInsufficientPrivilege = 34,
2493        /// The global variable local_infile is off on external server replica.
2494        LocalInfileOff = 35,
2495        /// This code instructs customers to turn on point-in-time recovery manually
2496        /// for the instance after promoting the Cloud SQL for PostgreSQL instance.
2497        TurnOnPitrAfterPromote = 36,
2498        /// The minor version of replica database is incompatible with the source.
2499        IncompatibleDatabaseMinorVersion = 37,
2500        /// This warning message indicates that Cloud SQL uses the maximum number of
2501        /// subscriptions to migrate data from the source to the destination.
2502        SourceMaxSubscriptions = 38,
2503        /// Unable to verify definers on the source for MySQL.
2504        UnableToVerifyDefiners = 39,
2505        /// If a time out occurs while the subscription counts are calculated, then
2506        /// this value is set to 1. Otherwise, this value is set to 2.
2507        SubscriptionCalculationStatus = 40,
2508        /// Count of subscriptions needed to sync source data for PostgreSQL
2509        /// database.
2510        PgSubscriptionCount = 41,
2511        /// Final parallel level that is used to do migration.
2512        PgSyncParallelLevel = 42,
2513        /// The disk size of the replica instance is smaller than the data size of
2514        /// the source instance.
2515        InsufficientDiskSize = 43,
2516        /// The data size of the source instance is greater than 1 TB, the number of
2517        /// cores of the replica instance is less than 8, and the memory of the
2518        /// replica is less than 32 GB.
2519        InsufficientMachineTier = 44,
2520        /// The warning message indicates the unsupported extensions will not be
2521        /// migrated to the destination.
2522        UnsupportedExtensionsNotMigrated = 45,
2523        /// The warning message indicates the pg_cron extension and settings will not
2524        /// be migrated to the destination.
2525        ExtensionsNotMigrated = 46,
2526        /// The error message indicates that pg_cron flags are enabled on the
2527        /// destination which is not supported during the migration.
2528        PgCronFlagEnabledInReplica = 47,
2529        /// This error message indicates that the specified extensions are not
2530        /// enabled on destination instance. For example, before you can migrate
2531        /// data to the destination instance, you must enable the PGAudit extension
2532        /// on the instance.
2533        ExtensionsNotEnabledInReplica = 48,
2534        /// The source database has generated columns that can't be migrated. Please
2535        /// change them to regular columns before migration.
2536        UnsupportedColumns = 49,
2537        /// The source database has users that aren't created in the replica.
2538        /// First, create all users, which are in the pg_user_mappings table
2539        /// of the source database, in the destination instance. Then, perform the
2540        /// migration.
2541        UsersNotCreatedInReplica = 50,
2542        /// The selected objects include system objects that aren't supported for
2543        /// migration.
2544        UnsupportedSystemObjects = 51,
2545        /// The source database has tables with the FULL or NOTHING replica identity.
2546        /// Before starting your migration, either remove the identity or change it
2547        /// to DEFAULT. Note that this is an error and will block the migration.
2548        UnsupportedTablesWithReplicaIdentity = 52,
2549        /// The selected objects don't exist on the source instance.
2550        SelectedObjectsNotExistOnSource = 53,
2551        /// PSC only destination instance does not have a network attachment URI.
2552        PscOnlyInstanceWithNoNetworkAttachmentUri = 54,
2553        /// Selected objects reference unselected objects. Based on their object type
2554        /// (foreign key constraint or view), selected objects will fail during
2555        /// migration.
2556        SelectedObjectsReferenceUnselectedObjects = 55,
2557        /// The migration will delete existing data in the replica; set
2558        /// \[replica_overwrite_enabled\]\[google.cloud.sql.v1beta4.SqlInstancesStartExternalSyncRequest.replica_overwrite_enabled\]
2559        /// in the request to acknowledge this. This is an error. MySQL only.
2560        PromptDeleteExisting = 56,
2561        /// The migration will delete existing data in the replica;
2562        /// \[replica_overwrite_enabled\]\[google.cloud.sql.v1beta4.SqlInstancesStartExternalSyncRequest.replica_overwrite_enabled\]
2563        /// was set in the request acknowledging this. This is a warning rather than
2564        /// an error. MySQL only.
2565        WillDeleteExisting = 57,
2566        /// The replication user is missing specific privileges to setup DDL
2567        /// replication. (e.g. CREATE EVENT TRIGGER, CREATE SCHEMA) for PostgreSQL.
2568        PgDdlReplicationInsufficientPrivilege = 58,
2569    }
2570    impl SqlExternalSyncSettingErrorType {
2571        /// String value of the enum field names used in the ProtoBuf definition.
2572        ///
2573        /// The values are not transformed in any way and thus are considered stable
2574        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2575        pub fn as_str_name(&self) -> &'static str {
2576            match self {
2577                Self::Unspecified => "SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED",
2578                Self::ConnectionFailure => "CONNECTION_FAILURE",
2579                Self::BinlogNotEnabled => "BINLOG_NOT_ENABLED",
2580                Self::IncompatibleDatabaseVersion => "INCOMPATIBLE_DATABASE_VERSION",
2581                Self::ReplicaAlreadySetup => "REPLICA_ALREADY_SETUP",
2582                Self::InsufficientPrivilege => "INSUFFICIENT_PRIVILEGE",
2583                Self::UnsupportedMigrationType => "UNSUPPORTED_MIGRATION_TYPE",
2584                Self::NoPglogicalInstalled => "NO_PGLOGICAL_INSTALLED",
2585                Self::PglogicalNodeAlreadyExists => "PGLOGICAL_NODE_ALREADY_EXISTS",
2586                Self::InvalidWalLevel => "INVALID_WAL_LEVEL",
2587                Self::InvalidSharedPreloadLibrary => "INVALID_SHARED_PRELOAD_LIBRARY",
2588                Self::InsufficientMaxReplicationSlots => {
2589                    "INSUFFICIENT_MAX_REPLICATION_SLOTS"
2590                }
2591                Self::InsufficientMaxWalSenders => "INSUFFICIENT_MAX_WAL_SENDERS",
2592                Self::InsufficientMaxWorkerProcesses => {
2593                    "INSUFFICIENT_MAX_WORKER_PROCESSES"
2594                }
2595                Self::UnsupportedExtensions => "UNSUPPORTED_EXTENSIONS",
2596                Self::InvalidRdsLogicalReplication => "INVALID_RDS_LOGICAL_REPLICATION",
2597                Self::InvalidLoggingSetup => "INVALID_LOGGING_SETUP",
2598                Self::InvalidDbParam => "INVALID_DB_PARAM",
2599                Self::UnsupportedGtidMode => "UNSUPPORTED_GTID_MODE",
2600                Self::SqlserverAgentNotRunning => "SQLSERVER_AGENT_NOT_RUNNING",
2601                Self::UnsupportedTableDefinition => "UNSUPPORTED_TABLE_DEFINITION",
2602                Self::UnsupportedDefiner => "UNSUPPORTED_DEFINER",
2603                Self::SqlserverServernameMismatch => "SQLSERVER_SERVERNAME_MISMATCH",
2604                Self::PrimaryAlreadySetup => "PRIMARY_ALREADY_SETUP",
2605                Self::UnsupportedBinlogFormat => "UNSUPPORTED_BINLOG_FORMAT",
2606                Self::BinlogRetentionSetting => "BINLOG_RETENTION_SETTING",
2607                Self::UnsupportedStorageEngine => "UNSUPPORTED_STORAGE_ENGINE",
2608                Self::LimitedSupportTables => "LIMITED_SUPPORT_TABLES",
2609                Self::ExistingDataInReplica => "EXISTING_DATA_IN_REPLICA",
2610                Self::MissingOptionalPrivileges => "MISSING_OPTIONAL_PRIVILEGES",
2611                Self::RiskyBackupAdminPrivilege => "RISKY_BACKUP_ADMIN_PRIVILEGE",
2612                Self::InsufficientGcsPermissions => "INSUFFICIENT_GCS_PERMISSIONS",
2613                Self::InvalidFileInfo => "INVALID_FILE_INFO",
2614                Self::UnsupportedDatabaseSettings => "UNSUPPORTED_DATABASE_SETTINGS",
2615                Self::MysqlParallelImportInsufficientPrivilege => {
2616                    "MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE"
2617                }
2618                Self::LocalInfileOff => "LOCAL_INFILE_OFF",
2619                Self::TurnOnPitrAfterPromote => "TURN_ON_PITR_AFTER_PROMOTE",
2620                Self::IncompatibleDatabaseMinorVersion => {
2621                    "INCOMPATIBLE_DATABASE_MINOR_VERSION"
2622                }
2623                Self::SourceMaxSubscriptions => "SOURCE_MAX_SUBSCRIPTIONS",
2624                Self::UnableToVerifyDefiners => "UNABLE_TO_VERIFY_DEFINERS",
2625                Self::SubscriptionCalculationStatus => "SUBSCRIPTION_CALCULATION_STATUS",
2626                Self::PgSubscriptionCount => "PG_SUBSCRIPTION_COUNT",
2627                Self::PgSyncParallelLevel => "PG_SYNC_PARALLEL_LEVEL",
2628                Self::InsufficientDiskSize => "INSUFFICIENT_DISK_SIZE",
2629                Self::InsufficientMachineTier => "INSUFFICIENT_MACHINE_TIER",
2630                Self::UnsupportedExtensionsNotMigrated => {
2631                    "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED"
2632                }
2633                Self::ExtensionsNotMigrated => "EXTENSIONS_NOT_MIGRATED",
2634                Self::PgCronFlagEnabledInReplica => "PG_CRON_FLAG_ENABLED_IN_REPLICA",
2635                Self::ExtensionsNotEnabledInReplica => {
2636                    "EXTENSIONS_NOT_ENABLED_IN_REPLICA"
2637                }
2638                Self::UnsupportedColumns => "UNSUPPORTED_COLUMNS",
2639                Self::UsersNotCreatedInReplica => "USERS_NOT_CREATED_IN_REPLICA",
2640                Self::UnsupportedSystemObjects => "UNSUPPORTED_SYSTEM_OBJECTS",
2641                Self::UnsupportedTablesWithReplicaIdentity => {
2642                    "UNSUPPORTED_TABLES_WITH_REPLICA_IDENTITY"
2643                }
2644                Self::SelectedObjectsNotExistOnSource => {
2645                    "SELECTED_OBJECTS_NOT_EXIST_ON_SOURCE"
2646                }
2647                Self::PscOnlyInstanceWithNoNetworkAttachmentUri => {
2648                    "PSC_ONLY_INSTANCE_WITH_NO_NETWORK_ATTACHMENT_URI"
2649                }
2650                Self::SelectedObjectsReferenceUnselectedObjects => {
2651                    "SELECTED_OBJECTS_REFERENCE_UNSELECTED_OBJECTS"
2652                }
2653                Self::PromptDeleteExisting => "PROMPT_DELETE_EXISTING",
2654                Self::WillDeleteExisting => "WILL_DELETE_EXISTING",
2655                Self::PgDdlReplicationInsufficientPrivilege => {
2656                    "PG_DDL_REPLICATION_INSUFFICIENT_PRIVILEGE"
2657                }
2658            }
2659        }
2660        /// Creates an enum from field names used in the ProtoBuf definition.
2661        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2662            match value {
2663                "SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED" => {
2664                    Some(Self::Unspecified)
2665                }
2666                "CONNECTION_FAILURE" => Some(Self::ConnectionFailure),
2667                "BINLOG_NOT_ENABLED" => Some(Self::BinlogNotEnabled),
2668                "INCOMPATIBLE_DATABASE_VERSION" => {
2669                    Some(Self::IncompatibleDatabaseVersion)
2670                }
2671                "REPLICA_ALREADY_SETUP" => Some(Self::ReplicaAlreadySetup),
2672                "INSUFFICIENT_PRIVILEGE" => Some(Self::InsufficientPrivilege),
2673                "UNSUPPORTED_MIGRATION_TYPE" => Some(Self::UnsupportedMigrationType),
2674                "NO_PGLOGICAL_INSTALLED" => Some(Self::NoPglogicalInstalled),
2675                "PGLOGICAL_NODE_ALREADY_EXISTS" => Some(Self::PglogicalNodeAlreadyExists),
2676                "INVALID_WAL_LEVEL" => Some(Self::InvalidWalLevel),
2677                "INVALID_SHARED_PRELOAD_LIBRARY" => {
2678                    Some(Self::InvalidSharedPreloadLibrary)
2679                }
2680                "INSUFFICIENT_MAX_REPLICATION_SLOTS" => {
2681                    Some(Self::InsufficientMaxReplicationSlots)
2682                }
2683                "INSUFFICIENT_MAX_WAL_SENDERS" => Some(Self::InsufficientMaxWalSenders),
2684                "INSUFFICIENT_MAX_WORKER_PROCESSES" => {
2685                    Some(Self::InsufficientMaxWorkerProcesses)
2686                }
2687                "UNSUPPORTED_EXTENSIONS" => Some(Self::UnsupportedExtensions),
2688                "INVALID_RDS_LOGICAL_REPLICATION" => {
2689                    Some(Self::InvalidRdsLogicalReplication)
2690                }
2691                "INVALID_LOGGING_SETUP" => Some(Self::InvalidLoggingSetup),
2692                "INVALID_DB_PARAM" => Some(Self::InvalidDbParam),
2693                "UNSUPPORTED_GTID_MODE" => Some(Self::UnsupportedGtidMode),
2694                "SQLSERVER_AGENT_NOT_RUNNING" => Some(Self::SqlserverAgentNotRunning),
2695                "UNSUPPORTED_TABLE_DEFINITION" => Some(Self::UnsupportedTableDefinition),
2696                "UNSUPPORTED_DEFINER" => Some(Self::UnsupportedDefiner),
2697                "SQLSERVER_SERVERNAME_MISMATCH" => {
2698                    Some(Self::SqlserverServernameMismatch)
2699                }
2700                "PRIMARY_ALREADY_SETUP" => Some(Self::PrimaryAlreadySetup),
2701                "UNSUPPORTED_BINLOG_FORMAT" => Some(Self::UnsupportedBinlogFormat),
2702                "BINLOG_RETENTION_SETTING" => Some(Self::BinlogRetentionSetting),
2703                "UNSUPPORTED_STORAGE_ENGINE" => Some(Self::UnsupportedStorageEngine),
2704                "LIMITED_SUPPORT_TABLES" => Some(Self::LimitedSupportTables),
2705                "EXISTING_DATA_IN_REPLICA" => Some(Self::ExistingDataInReplica),
2706                "MISSING_OPTIONAL_PRIVILEGES" => Some(Self::MissingOptionalPrivileges),
2707                "RISKY_BACKUP_ADMIN_PRIVILEGE" => Some(Self::RiskyBackupAdminPrivilege),
2708                "INSUFFICIENT_GCS_PERMISSIONS" => Some(Self::InsufficientGcsPermissions),
2709                "INVALID_FILE_INFO" => Some(Self::InvalidFileInfo),
2710                "UNSUPPORTED_DATABASE_SETTINGS" => {
2711                    Some(Self::UnsupportedDatabaseSettings)
2712                }
2713                "MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE" => {
2714                    Some(Self::MysqlParallelImportInsufficientPrivilege)
2715                }
2716                "LOCAL_INFILE_OFF" => Some(Self::LocalInfileOff),
2717                "TURN_ON_PITR_AFTER_PROMOTE" => Some(Self::TurnOnPitrAfterPromote),
2718                "INCOMPATIBLE_DATABASE_MINOR_VERSION" => {
2719                    Some(Self::IncompatibleDatabaseMinorVersion)
2720                }
2721                "SOURCE_MAX_SUBSCRIPTIONS" => Some(Self::SourceMaxSubscriptions),
2722                "UNABLE_TO_VERIFY_DEFINERS" => Some(Self::UnableToVerifyDefiners),
2723                "SUBSCRIPTION_CALCULATION_STATUS" => {
2724                    Some(Self::SubscriptionCalculationStatus)
2725                }
2726                "PG_SUBSCRIPTION_COUNT" => Some(Self::PgSubscriptionCount),
2727                "PG_SYNC_PARALLEL_LEVEL" => Some(Self::PgSyncParallelLevel),
2728                "INSUFFICIENT_DISK_SIZE" => Some(Self::InsufficientDiskSize),
2729                "INSUFFICIENT_MACHINE_TIER" => Some(Self::InsufficientMachineTier),
2730                "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED" => {
2731                    Some(Self::UnsupportedExtensionsNotMigrated)
2732                }
2733                "EXTENSIONS_NOT_MIGRATED" => Some(Self::ExtensionsNotMigrated),
2734                "PG_CRON_FLAG_ENABLED_IN_REPLICA" => {
2735                    Some(Self::PgCronFlagEnabledInReplica)
2736                }
2737                "EXTENSIONS_NOT_ENABLED_IN_REPLICA" => {
2738                    Some(Self::ExtensionsNotEnabledInReplica)
2739                }
2740                "UNSUPPORTED_COLUMNS" => Some(Self::UnsupportedColumns),
2741                "USERS_NOT_CREATED_IN_REPLICA" => Some(Self::UsersNotCreatedInReplica),
2742                "UNSUPPORTED_SYSTEM_OBJECTS" => Some(Self::UnsupportedSystemObjects),
2743                "UNSUPPORTED_TABLES_WITH_REPLICA_IDENTITY" => {
2744                    Some(Self::UnsupportedTablesWithReplicaIdentity)
2745                }
2746                "SELECTED_OBJECTS_NOT_EXIST_ON_SOURCE" => {
2747                    Some(Self::SelectedObjectsNotExistOnSource)
2748                }
2749                "PSC_ONLY_INSTANCE_WITH_NO_NETWORK_ATTACHMENT_URI" => {
2750                    Some(Self::PscOnlyInstanceWithNoNetworkAttachmentUri)
2751                }
2752                "SELECTED_OBJECTS_REFERENCE_UNSELECTED_OBJECTS" => {
2753                    Some(Self::SelectedObjectsReferenceUnselectedObjects)
2754                }
2755                "PROMPT_DELETE_EXISTING" => Some(Self::PromptDeleteExisting),
2756                "WILL_DELETE_EXISTING" => Some(Self::WillDeleteExisting),
2757                "PG_DDL_REPLICATION_INSUFFICIENT_PRIVILEGE" => {
2758                    Some(Self::PgDdlReplicationInsufficientPrivilege)
2759                }
2760                _ => None,
2761            }
2762        }
2763    }
2764}
2765/// IP Management configuration.
2766#[derive(Clone, PartialEq, ::prost::Message)]
2767pub struct IpConfiguration {
2768    /// Whether the instance is assigned a public IP address or not.
2769    #[prost(message, optional, tag = "1")]
2770    pub ipv4_enabled: ::core::option::Option<bool>,
2771    /// The resource link for the VPC network from which the Cloud SQL instance is
2772    /// accessible for private IP. For example,
2773    /// `/projects/myProject/global/networks/default`. This setting can
2774    /// be updated, but it cannot be removed after it is set.
2775    #[prost(string, tag = "2")]
2776    pub private_network: ::prost::alloc::string::String,
2777    /// Use `ssl_mode` instead.
2778    ///
2779    /// Whether SSL/TLS connections over IP are enforced.
2780    /// If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
2781    /// For SSL/TLS connections, the client certificate won't be verified. If
2782    /// set to true, then only allow connections encrypted with SSL/TLS and with
2783    /// valid client certificates. If you want to enforce SSL/TLS without enforcing
2784    /// the requirement for valid client certificates, then use the `ssl_mode` flag
2785    /// instead of the legacy `require_ssl` flag.
2786    #[prost(message, optional, tag = "3")]
2787    pub require_ssl: ::core::option::Option<bool>,
2788    /// The list of external networks that are allowed to connect to the instance
2789    /// using the IP. In 'CIDR' notation, also known as 'slash' notation (for
2790    /// example: `157.197.200.0/24`).
2791    #[prost(message, repeated, tag = "4")]
2792    pub authorized_networks: ::prost::alloc::vec::Vec<AclEntry>,
2793    /// The name of the allocated ip range for the private ip Cloud SQL instance.
2794    /// For example: "google-managed-services-default". If set, the instance ip
2795    /// will be created in the allocated range. The range name must comply with
2796    /// [RFC 1035](<https://tools.ietf.org/html/rfc1035>). Specifically, the name
2797    /// must be 1-63 characters long and match the regular expression
2798    /// `[a-z](\[-a-z0-9\]*[a-z0-9])?.`
2799    #[prost(string, tag = "6")]
2800    pub allocated_ip_range: ::prost::alloc::string::String,
2801    /// Controls connectivity to private IP instances from Google services,
2802    /// such as BigQuery.
2803    #[prost(message, optional, tag = "7")]
2804    pub enable_private_path_for_google_cloud_services: ::core::option::Option<bool>,
2805    /// Specify how SSL/TLS is enforced in database connections. If you must use
2806    /// the `require_ssl` flag for backward compatibility, then only the following
2807    /// value pairs are valid:
2808    ///
2809    /// For PostgreSQL and MySQL:
2810    ///
2811    /// * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
2812    /// * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
2813    /// * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
2814    ///
2815    /// For SQL Server:
2816    ///
2817    /// * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
2818    /// * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
2819    ///
2820    /// The value of `ssl_mode` has priority over the value of `require_ssl`.
2821    ///
2822    /// For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and
2823    /// `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL
2824    /// connections, while `require_ssl=false` means accept both non-SSL
2825    /// and SSL connections. In this case, MySQL and PostgreSQL databases respect
2826    /// `ssl_mode` and accepts only SSL connections.
2827    #[prost(enumeration = "ip_configuration::SslMode", tag = "8")]
2828    pub ssl_mode: i32,
2829    /// PSC settings for this instance.
2830    #[prost(message, optional, tag = "9")]
2831    pub psc_config: ::core::option::Option<PscConfig>,
2832    /// Specify what type of CA is used for the server certificate.
2833    #[prost(enumeration = "ip_configuration::CaMode", optional, tag = "10")]
2834    pub server_ca_mode: ::core::option::Option<i32>,
2835    /// Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.
2836    #[prost(string, repeated, tag = "11")]
2837    pub custom_subject_alternative_names: ::prost::alloc::vec::Vec<
2838        ::prost::alloc::string::String,
2839    >,
2840    /// Optional. The resource name of the server CA pool for an instance with
2841    /// `CUSTOMER_MANAGED_CAS_CA` as the `server_ca_mode`.
2842    /// Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}
2843    #[prost(string, optional, tag = "12")]
2844    pub server_ca_pool: ::core::option::Option<::prost::alloc::string::String>,
2845    /// Optional. Controls the automatic server certificate rotation feature. This
2846    /// feature is disabled by default. When enabled, the server certificate will
2847    /// be automatically rotated during Cloud SQL scheduled maintenance or
2848    /// self-service maintenance updates up to six months before it expires. This
2849    /// setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA
2850    /// or CUSTOMER_MANAGED_CAS_CA.
2851    #[prost(
2852        enumeration = "ip_configuration::ServerCertificateRotationMode",
2853        optional,
2854        tag = "16"
2855    )]
2856    pub server_certificate_rotation_mode: ::core::option::Option<i32>,
2857}
2858/// Nested message and enum types in `IpConfiguration`.
2859pub mod ip_configuration {
2860    /// The SSL options for database connections.
2861    #[derive(
2862        Clone,
2863        Copy,
2864        Debug,
2865        PartialEq,
2866        Eq,
2867        Hash,
2868        PartialOrd,
2869        Ord,
2870        ::prost::Enumeration
2871    )]
2872    #[repr(i32)]
2873    pub enum SslMode {
2874        /// The SSL mode is unknown.
2875        Unspecified = 0,
2876        /// Allow non-SSL/non-TLS and SSL/TLS connections.
2877        /// For SSL connections to MySQL and PostgreSQL, the client certificate
2878        /// isn't verified.
2879        ///
2880        /// When this value is used, the legacy `require_ssl` flag must be false or
2881        /// cleared to avoid a conflict between the values of the two flags.
2882        AllowUnencryptedAndEncrypted = 1,
2883        /// Only allow connections encrypted with SSL/TLS.
2884        /// For SSL connections to MySQL and PostgreSQL, the client certificate
2885        /// isn't verified.
2886        ///
2887        /// When this value is used, the legacy `require_ssl` flag must be false or
2888        /// cleared to avoid a conflict between the values of the two flags.
2889        EncryptedOnly = 2,
2890        /// Only allow connections encrypted with SSL/TLS and with valid
2891        /// client certificates.
2892        ///
2893        /// When this value is used, the legacy `require_ssl` flag must be true or
2894        /// cleared to avoid the conflict between values of two flags.
2895        /// PostgreSQL clients or users that connect using IAM database
2896        /// authentication must use either the
2897        /// [Cloud SQL Auth
2898        /// Proxy](<https://cloud.google.com/sql/docs/postgres/connect-auth-proxy>) or
2899        /// [Cloud SQL
2900        /// Connectors](<https://cloud.google.com/sql/docs/postgres/connect-connectors>)
2901        /// to enforce client identity verification.
2902        ///
2903        /// Only applicable to MySQL and PostgreSQL. Not applicable to SQL Server.
2904        TrustedClientCertificateRequired = 3,
2905    }
2906    impl SslMode {
2907        /// String value of the enum field names used in the ProtoBuf definition.
2908        ///
2909        /// The values are not transformed in any way and thus are considered stable
2910        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2911        pub fn as_str_name(&self) -> &'static str {
2912            match self {
2913                Self::Unspecified => "SSL_MODE_UNSPECIFIED",
2914                Self::AllowUnencryptedAndEncrypted => "ALLOW_UNENCRYPTED_AND_ENCRYPTED",
2915                Self::EncryptedOnly => "ENCRYPTED_ONLY",
2916                Self::TrustedClientCertificateRequired => {
2917                    "TRUSTED_CLIENT_CERTIFICATE_REQUIRED"
2918                }
2919            }
2920        }
2921        /// Creates an enum from field names used in the ProtoBuf definition.
2922        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2923            match value {
2924                "SSL_MODE_UNSPECIFIED" => Some(Self::Unspecified),
2925                "ALLOW_UNENCRYPTED_AND_ENCRYPTED" => {
2926                    Some(Self::AllowUnencryptedAndEncrypted)
2927                }
2928                "ENCRYPTED_ONLY" => Some(Self::EncryptedOnly),
2929                "TRUSTED_CLIENT_CERTIFICATE_REQUIRED" => {
2930                    Some(Self::TrustedClientCertificateRequired)
2931                }
2932                _ => None,
2933            }
2934        }
2935    }
2936    /// Various Certificate Authority (CA) modes for certificate signing.
2937    #[derive(
2938        Clone,
2939        Copy,
2940        Debug,
2941        PartialEq,
2942        Eq,
2943        Hash,
2944        PartialOrd,
2945        Ord,
2946        ::prost::Enumeration
2947    )]
2948    #[repr(i32)]
2949    pub enum CaMode {
2950        /// CA mode is unspecified. It is effectively the same as
2951        /// `GOOGLE_MANAGED_INTERNAL_CA`.
2952        Unspecified = 0,
2953        /// Google-managed self-signed internal CA.
2954        GoogleManagedInternalCa = 1,
2955        /// Google-managed regional CA part of root CA hierarchy hosted on Google
2956        /// Cloud's Certificate Authority Service (CAS).
2957        GoogleManagedCasCa = 2,
2958        /// Customer-managed CA hosted on Google Cloud's Certificate Authority
2959        /// Service (CAS).
2960        CustomerManagedCasCa = 3,
2961    }
2962    impl CaMode {
2963        /// String value of the enum field names used in the ProtoBuf definition.
2964        ///
2965        /// The values are not transformed in any way and thus are considered stable
2966        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2967        pub fn as_str_name(&self) -> &'static str {
2968            match self {
2969                Self::Unspecified => "CA_MODE_UNSPECIFIED",
2970                Self::GoogleManagedInternalCa => "GOOGLE_MANAGED_INTERNAL_CA",
2971                Self::GoogleManagedCasCa => "GOOGLE_MANAGED_CAS_CA",
2972                Self::CustomerManagedCasCa => "CUSTOMER_MANAGED_CAS_CA",
2973            }
2974        }
2975        /// Creates an enum from field names used in the ProtoBuf definition.
2976        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2977            match value {
2978                "CA_MODE_UNSPECIFIED" => Some(Self::Unspecified),
2979                "GOOGLE_MANAGED_INTERNAL_CA" => Some(Self::GoogleManagedInternalCa),
2980                "GOOGLE_MANAGED_CAS_CA" => Some(Self::GoogleManagedCasCa),
2981                "CUSTOMER_MANAGED_CAS_CA" => Some(Self::CustomerManagedCasCa),
2982                _ => None,
2983            }
2984        }
2985    }
2986    /// Settings for automatic server certificate rotation.
2987    #[derive(
2988        Clone,
2989        Copy,
2990        Debug,
2991        PartialEq,
2992        Eq,
2993        Hash,
2994        PartialOrd,
2995        Ord,
2996        ::prost::Enumeration
2997    )]
2998    #[repr(i32)]
2999    pub enum ServerCertificateRotationMode {
3000        /// Unspecified: no automatic server certificate rotation.
3001        Unspecified = 0,
3002        /// No automatic server certificate rotation. The user must [manage server
3003        /// certificate
3004        /// rotation](/sql/docs/mysql/manage-ssl-instance#rotate-server-certificate-cas)
3005        /// on their side.
3006        NoAutomaticRotation = 1,
3007        /// Automatic server certificate rotation during Cloud SQL scheduled
3008        /// maintenance or self-service maintenance updates. Requires
3009        /// `server_ca_mode` to be `GOOGLE_MANAGED_CAS_CA` or
3010        /// `CUSTOMER_MANAGED_CAS_CA`.
3011        AutomaticRotationDuringMaintenance = 2,
3012    }
3013    impl ServerCertificateRotationMode {
3014        /// String value of the enum field names used in the ProtoBuf definition.
3015        ///
3016        /// The values are not transformed in any way and thus are considered stable
3017        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3018        pub fn as_str_name(&self) -> &'static str {
3019            match self {
3020                Self::Unspecified => "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED",
3021                Self::NoAutomaticRotation => "NO_AUTOMATIC_ROTATION",
3022                Self::AutomaticRotationDuringMaintenance => {
3023                    "AUTOMATIC_ROTATION_DURING_MAINTENANCE"
3024                }
3025            }
3026        }
3027        /// Creates an enum from field names used in the ProtoBuf definition.
3028        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3029            match value {
3030                "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
3031                "NO_AUTOMATIC_ROTATION" => Some(Self::NoAutomaticRotation),
3032                "AUTOMATIC_ROTATION_DURING_MAINTENANCE" => {
3033                    Some(Self::AutomaticRotationDuringMaintenance)
3034                }
3035                _ => None,
3036            }
3037        }
3038    }
3039}
3040/// PSC settings for a Cloud SQL instance.
3041#[derive(Clone, PartialEq, ::prost::Message)]
3042pub struct PscConfig {
3043    /// Whether PSC connectivity is enabled for this instance.
3044    #[prost(bool, optional, tag = "1")]
3045    pub psc_enabled: ::core::option::Option<bool>,
3046    /// Optional. The list of consumer projects that are allow-listed for PSC
3047    /// connections to this instance. This instance can be connected to with PSC
3048    /// from any network in these projects.
3049    ///
3050    /// Each consumer project in this list may be represented by a project number
3051    /// (numeric) or by a project id (alphanumeric).
3052    #[prost(string, repeated, tag = "2")]
3053    pub allowed_consumer_projects: ::prost::alloc::vec::Vec<
3054        ::prost::alloc::string::String,
3055    >,
3056    /// Optional. The list of settings for requested Private Service Connect
3057    /// consumer endpoints that can be used to connect to this Cloud SQL instance.
3058    #[prost(message, repeated, tag = "3")]
3059    pub psc_auto_connections: ::prost::alloc::vec::Vec<PscAutoConnectionConfig>,
3060    /// Optional. The network attachment of the consumer network that the
3061    /// Private Service Connect enabled Cloud SQL instance is
3062    /// authorized to connect via PSC interface.
3063    /// format: projects/PROJECT/regions/REGION/networkAttachments/ID
3064    #[prost(string, tag = "4")]
3065    pub network_attachment_uri: ::prost::alloc::string::String,
3066}
3067/// Settings for an automatically-setup Private Service Connect consumer endpoint
3068/// that is used to connect to a Cloud SQL instance.
3069#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3070pub struct PscAutoConnectionConfig {
3071    /// Optional. This is the project ID of consumer service project of this
3072    /// consumer endpoint.
3073    ///
3074    /// Optional. This is only applicable if consumer_network is a shared vpc
3075    /// network.
3076    #[prost(string, tag = "1")]
3077    pub consumer_project: ::prost::alloc::string::String,
3078    /// Optional. The consumer network of this consumer endpoint. This must be a
3079    /// resource path that includes both the host project and the network name.
3080    ///
3081    /// For example, `projects/project1/global/networks/network1`.
3082    ///
3083    /// The consumer host project of this network might be different from the
3084    /// consumer service project.
3085    #[prost(string, tag = "2")]
3086    pub consumer_network: ::prost::alloc::string::String,
3087    /// The IP address of the consumer endpoint.
3088    #[prost(string, optional, tag = "3")]
3089    pub ip_address: ::core::option::Option<::prost::alloc::string::String>,
3090    /// The connection status of the consumer endpoint.
3091    #[prost(string, optional, tag = "4")]
3092    pub status: ::core::option::Option<::prost::alloc::string::String>,
3093    /// The connection policy status of the consumer network.
3094    #[prost(string, optional, tag = "5")]
3095    pub consumer_network_status: ::core::option::Option<::prost::alloc::string::String>,
3096}
3097/// Database instance IP mapping
3098#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3099pub struct IpMapping {
3100    /// The type of this IP address. A `PRIMARY` address is a public address that
3101    /// can accept incoming connections. A `PRIVATE` address is a private address
3102    /// that can accept incoming connections. An `OUTGOING` address is the source
3103    /// address of connections originating from the instance, if supported.
3104    #[prost(enumeration = "SqlIpAddressType", tag = "1")]
3105    pub r#type: i32,
3106    /// The IP address assigned.
3107    #[prost(string, tag = "2")]
3108    pub ip_address: ::prost::alloc::string::String,
3109    /// The due time for this IP to be retired in
3110    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
3111    /// `2012-11-15T16:19:00.094Z`. This field is only available when
3112    /// the IP is scheduled to be retired.
3113    #[prost(message, optional, tag = "3")]
3114    pub time_to_retire: ::core::option::Option<::prost_types::Timestamp>,
3115}
3116/// Preferred location. This specifies where a Cloud SQL instance is located.
3117/// Note that if the preferred location is not available, the instance will be
3118/// located as close as possible within the region. Only one location may be
3119/// specified.
3120#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3121pub struct LocationPreference {
3122    /// The App Engine application to follow, it must be in the same region as the
3123    /// Cloud SQL instance. WARNING: Changing this might restart the instance.
3124    #[deprecated]
3125    #[prost(string, tag = "1")]
3126    pub follow_gae_application: ::prost::alloc::string::String,
3127    /// The preferred Compute Engine zone (for example: us-central1-a,
3128    /// us-central1-b, etc.). WARNING: Changing this might restart the instance.
3129    #[prost(string, tag = "2")]
3130    pub zone: ::prost::alloc::string::String,
3131    /// The preferred Compute Engine zone for the secondary/failover
3132    /// (for example: us-central1-a, us-central1-b, etc.).
3133    /// To disable this field, set it to 'no_secondary_zone'.
3134    #[prost(string, tag = "4")]
3135    pub secondary_zone: ::prost::alloc::string::String,
3136    /// This is always `sql#locationPreference`.
3137    #[prost(string, tag = "3")]
3138    pub kind: ::prost::alloc::string::String,
3139}
3140/// Maintenance window. This specifies when a Cloud SQL instance
3141/// is restarted for system maintenance purposes.
3142#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3143pub struct MaintenanceWindow {
3144    /// Hour of day - 0 to 23. Specify in the UTC time zone.
3145    #[prost(message, optional, tag = "1")]
3146    pub hour: ::core::option::Option<i32>,
3147    /// Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`,
3148    /// `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone.
3149    /// Returned in output as an integer, 1 to 7, where `1` equals Monday.
3150    #[prost(message, optional, tag = "2")]
3151    pub day: ::core::option::Option<i32>,
3152    /// Maintenance timing settings: `canary`, `stable`, or `week5`.
3153    /// For more information, see [About maintenance on Cloud SQL
3154    /// instances](<https://cloud.google.com/sql/docs/mysql/maintenance>).
3155    #[prost(enumeration = "SqlUpdateTrack", tag = "3")]
3156    pub update_track: i32,
3157    /// This is always `sql#maintenanceWindow`.
3158    #[prost(string, tag = "4")]
3159    pub kind: ::prost::alloc::string::String,
3160}
3161/// Deny Maintenance Periods. This specifies a date range during when all CSA
3162/// rollout will be denied.
3163#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3164pub struct DenyMaintenancePeriod {
3165    /// "deny maintenance period" start date. If the year of the start date is
3166    /// empty, the year of the end date also must be empty. In this case, it means
3167    /// the deny maintenance period recurs every year. The date is in format
3168    /// yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
3169    #[prost(string, tag = "1")]
3170    pub start_date: ::prost::alloc::string::String,
3171    /// "deny maintenance period" end date. If the year of the end date is empty,
3172    /// the year of the start date also must be empty. In this case, it means the
3173    /// deny maintenance period recurs every year. The date is in format yyyy-mm-dd
3174    /// i.e., 2020-11-01, or mm-dd, i.e., 11-01
3175    #[prost(string, tag = "2")]
3176    pub end_date: ::prost::alloc::string::String,
3177    /// Time in UTC when the "deny maintenance period" starts on start_date and
3178    /// ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
3179    #[prost(string, tag = "3")]
3180    pub time: ::prost::alloc::string::String,
3181}
3182/// Insights configuration. This specifies when Cloud SQL Insights feature is
3183/// enabled and optional configuration.
3184#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3185pub struct InsightsConfig {
3186    /// Whether Query Insights feature is enabled.
3187    #[prost(bool, tag = "1")]
3188    pub query_insights_enabled: bool,
3189    /// Whether Query Insights will record client address when enabled.
3190    #[prost(bool, tag = "2")]
3191    pub record_client_address: bool,
3192    /// Whether Query Insights will record application tags from query when
3193    /// enabled.
3194    #[prost(bool, tag = "3")]
3195    pub record_application_tags: bool,
3196    /// Maximum query length stored in bytes. Default value: 1024 bytes.
3197    /// Range: 256-4500 bytes. Query lengths greater than this field value will be
3198    /// truncated to this value. When unset, query length will be the default
3199    /// value. Changing query length will restart the database.
3200    #[prost(message, optional, tag = "4")]
3201    pub query_string_length: ::core::option::Option<i32>,
3202    /// Number of query execution plans captured by Insights per minute
3203    /// for all queries combined. Default is 5.
3204    #[prost(message, optional, tag = "5")]
3205    pub query_plans_per_minute: ::core::option::Option<i32>,
3206    /// Optional. Whether enhanced query insights feature is enabled.
3207    #[prost(message, optional, tag = "8")]
3208    pub enhanced_query_insights_enabled: ::core::option::Option<bool>,
3209}
3210/// Read-replica configuration specific to MySQL databases.
3211#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3212pub struct MySqlReplicaConfiguration {
3213    /// Path to a SQL dump file in Google Cloud Storage from which the replica
3214    /// instance is to be created. The URI is in the form gs://bucketName/fileName.
3215    /// Compressed gzip files (.gz) are also supported.
3216    /// Dumps have the binlog co-ordinates from which replication
3217    /// begins. This can be accomplished by setting --master-data to 1 when using
3218    /// mysqldump.
3219    #[prost(string, tag = "1")]
3220    pub dump_file_path: ::prost::alloc::string::String,
3221    /// The username for the replication connection.
3222    #[prost(string, tag = "2")]
3223    pub username: ::prost::alloc::string::String,
3224    /// The password for the replication connection.
3225    #[prost(string, tag = "3")]
3226    pub password: ::prost::alloc::string::String,
3227    /// Seconds to wait between connect retries. MySQL's default is 60 seconds.
3228    #[prost(message, optional, tag = "4")]
3229    pub connect_retry_interval: ::core::option::Option<i32>,
3230    /// Interval in milliseconds between replication heartbeats.
3231    #[prost(message, optional, tag = "5")]
3232    pub master_heartbeat_period: ::core::option::Option<i64>,
3233    /// PEM representation of the trusted CA's x509 certificate.
3234    #[prost(string, tag = "6")]
3235    pub ca_certificate: ::prost::alloc::string::String,
3236    /// PEM representation of the replica's x509 certificate.
3237    #[prost(string, tag = "7")]
3238    pub client_certificate: ::prost::alloc::string::String,
3239    /// PEM representation of the replica's private key. The corresponding public
3240    /// key is encoded in the client's certificate.
3241    #[prost(string, tag = "8")]
3242    pub client_key: ::prost::alloc::string::String,
3243    /// A list of permissible ciphers to use for SSL encryption.
3244    #[prost(string, tag = "9")]
3245    pub ssl_cipher: ::prost::alloc::string::String,
3246    /// Whether or not to check the primary instance's Common Name value in the
3247    /// certificate that it sends during the SSL handshake.
3248    #[prost(message, optional, tag = "10")]
3249    pub verify_server_certificate: ::core::option::Option<bool>,
3250    /// This is always `sql#mysqlReplicaConfiguration`.
3251    #[prost(string, tag = "11")]
3252    pub kind: ::prost::alloc::string::String,
3253}
3254/// A list of objects that the user selects for replication from an external
3255/// source instance.
3256#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3257pub struct SelectedObjects {
3258    /// Required. The name of the database to migrate.
3259    #[prost(string, tag = "1")]
3260    pub database: ::prost::alloc::string::String,
3261}
3262/// On-premises instance configuration.
3263#[derive(Clone, PartialEq, ::prost::Message)]
3264pub struct OnPremisesConfiguration {
3265    /// The host and port of the on-premises instance in host:port format
3266    #[prost(string, tag = "1")]
3267    pub host_port: ::prost::alloc::string::String,
3268    /// This is always `sql#onPremisesConfiguration`.
3269    #[prost(string, tag = "2")]
3270    pub kind: ::prost::alloc::string::String,
3271    /// The username for connecting to on-premises instance.
3272    #[prost(string, tag = "3")]
3273    pub username: ::prost::alloc::string::String,
3274    /// The password for connecting to on-premises instance.
3275    #[prost(string, tag = "4")]
3276    pub password: ::prost::alloc::string::String,
3277    /// PEM representation of the trusted CA's x509 certificate.
3278    #[prost(string, tag = "5")]
3279    pub ca_certificate: ::prost::alloc::string::String,
3280    /// PEM representation of the replica's x509 certificate.
3281    #[prost(string, tag = "6")]
3282    pub client_certificate: ::prost::alloc::string::String,
3283    /// PEM representation of the replica's private key. The corresponding public
3284    /// key is encoded in the client's certificate.
3285    #[prost(string, tag = "7")]
3286    pub client_key: ::prost::alloc::string::String,
3287    /// The dump file to create the Cloud SQL replica.
3288    #[prost(string, tag = "8")]
3289    pub dump_file_path: ::prost::alloc::string::String,
3290    /// The reference to Cloud SQL instance if the source is Cloud SQL.
3291    #[prost(message, optional, tag = "15")]
3292    pub source_instance: ::core::option::Option<InstanceReference>,
3293    /// Optional. A list of objects that the user selects for replication from an
3294    /// external source instance.
3295    #[prost(message, repeated, tag = "16")]
3296    pub selected_objects: ::prost::alloc::vec::Vec<SelectedObjects>,
3297    /// Optional. SslOption for replica connection to the on-premises source.
3298    #[prost(enumeration = "on_premises_configuration::SslOption", tag = "18")]
3299    pub ssl_option: i32,
3300}
3301/// Nested message and enum types in `OnPremisesConfiguration`.
3302pub mod on_premises_configuration {
3303    /// SslOption defines the SSL mode to be used for replica connection to the
3304    /// on-premises source.
3305    #[derive(
3306        Clone,
3307        Copy,
3308        Debug,
3309        PartialEq,
3310        Eq,
3311        Hash,
3312        PartialOrd,
3313        Ord,
3314        ::prost::Enumeration
3315    )]
3316    #[repr(i32)]
3317    pub enum SslOption {
3318        /// Unknown SSL option i.e. SSL option not specified by user.
3319        Unspecified = 0,
3320        /// SSL is disabled for replica connection to the on-premises source.
3321        Disable = 1,
3322        /// SSL is required for replica connection to the on-premises source.
3323        Require = 2,
3324        /// Verify CA is required for replica connection to the on-premises source.
3325        VerifyCa = 3,
3326    }
3327    impl SslOption {
3328        /// String value of the enum field names used in the ProtoBuf definition.
3329        ///
3330        /// The values are not transformed in any way and thus are considered stable
3331        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3332        pub fn as_str_name(&self) -> &'static str {
3333            match self {
3334                Self::Unspecified => "SSL_OPTION_UNSPECIFIED",
3335                Self::Disable => "DISABLE",
3336                Self::Require => "REQUIRE",
3337                Self::VerifyCa => "VERIFY_CA",
3338            }
3339        }
3340        /// Creates an enum from field names used in the ProtoBuf definition.
3341        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3342            match value {
3343                "SSL_OPTION_UNSPECIFIED" => Some(Self::Unspecified),
3344                "DISABLE" => Some(Self::Disable),
3345                "REQUIRE" => Some(Self::Require),
3346                "VERIFY_CA" => Some(Self::VerifyCa),
3347                _ => None,
3348            }
3349        }
3350    }
3351}
3352/// Disk encryption configuration for an instance.
3353#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3354pub struct DiskEncryptionConfiguration {
3355    /// Resource name of KMS key for disk encryption
3356    #[prost(string, tag = "1")]
3357    pub kms_key_name: ::prost::alloc::string::String,
3358    /// This is always `sql#diskEncryptionConfiguration`.
3359    #[prost(string, tag = "2")]
3360    pub kind: ::prost::alloc::string::String,
3361}
3362/// Disk encryption status for an instance.
3363#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3364pub struct DiskEncryptionStatus {
3365    /// KMS key version used to encrypt the Cloud SQL instance resource
3366    #[prost(string, tag = "1")]
3367    pub kms_key_version_name: ::prost::alloc::string::String,
3368    /// This is always `sql#diskEncryptionStatus`.
3369    #[prost(string, tag = "2")]
3370    pub kind: ::prost::alloc::string::String,
3371}
3372/// The sub operation type based on the operation type.
3373#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3374pub struct SqlSubOperationType {
3375    /// Sub operation details corresponding to the operation type.
3376    #[prost(oneof = "sql_sub_operation_type::SubOperationDetails", tags = "1")]
3377    pub sub_operation_details: ::core::option::Option<
3378        sql_sub_operation_type::SubOperationDetails,
3379    >,
3380}
3381/// Nested message and enum types in `SqlSubOperationType`.
3382pub mod sql_sub_operation_type {
3383    /// Sub operation details corresponding to the operation type.
3384    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
3385    pub enum SubOperationDetails {
3386        /// The type of maintenance to be performed on the instance.
3387        #[prost(enumeration = "super::SqlMaintenanceType", tag = "1")]
3388        MaintenanceType(i32),
3389    }
3390}
3391/// An Operation resource. For successful operations that return an
3392/// Operation resource, only the fields relevant to the operation are populated
3393/// in the resource.
3394#[derive(Clone, PartialEq, ::prost::Message)]
3395pub struct Operation {
3396    /// This is always `sql#operation`.
3397    #[prost(string, tag = "1")]
3398    pub kind: ::prost::alloc::string::String,
3399    #[prost(string, tag = "2")]
3400    pub target_link: ::prost::alloc::string::String,
3401    /// The status of an operation.
3402    #[prost(enumeration = "operation::SqlOperationStatus", tag = "3")]
3403    pub status: i32,
3404    /// The email address of the user who initiated this operation.
3405    #[prost(string, tag = "4")]
3406    pub user: ::prost::alloc::string::String,
3407    /// The time this operation was enqueued in UTC timezone in
3408    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
3409    /// `2012-11-15T16:19:00.094Z`.
3410    #[prost(message, optional, tag = "5")]
3411    pub insert_time: ::core::option::Option<::prost_types::Timestamp>,
3412    /// The time this operation actually started in UTC timezone in
3413    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
3414    /// `2012-11-15T16:19:00.094Z`.
3415    #[prost(message, optional, tag = "6")]
3416    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
3417    /// The time this operation finished in UTC timezone in
3418    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
3419    /// `2012-11-15T16:19:00.094Z`.
3420    #[prost(message, optional, tag = "7")]
3421    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
3422    /// If errors occurred during processing of this operation, this field will be
3423    /// populated.
3424    #[prost(message, optional, tag = "8")]
3425    pub error: ::core::option::Option<OperationErrors>,
3426    /// An Admin API warning message.
3427    #[prost(message, optional, tag = "19")]
3428    pub api_warning: ::core::option::Option<ApiWarning>,
3429    /// The type of the operation. Valid values are:
3430    ///
3431    /// * `CREATE`
3432    /// * `DELETE`
3433    /// * `UPDATE`
3434    /// * `RESTART`
3435    /// * `IMPORT`
3436    /// * `EXPORT`
3437    /// * `BACKUP_VOLUME`
3438    /// * `RESTORE_VOLUME`
3439    /// * `CREATE_USER`
3440    /// * `DELETE_USER`
3441    /// * `CREATE_DATABASE`
3442    /// * `DELETE_DATABASE`
3443    #[prost(enumeration = "operation::SqlOperationType", tag = "9")]
3444    pub operation_type: i32,
3445    /// The context for import operation, if applicable.
3446    #[prost(message, optional, tag = "10")]
3447    pub import_context: ::core::option::Option<ImportContext>,
3448    /// The context for export operation, if applicable.
3449    #[prost(message, optional, tag = "11")]
3450    pub export_context: ::core::option::Option<ExportContext>,
3451    /// The context for backup operation, if applicable.
3452    #[prost(message, optional, tag = "17")]
3453    pub backup_context: ::core::option::Option<BackupContext>,
3454    /// The context for pre-check major version upgrade operation, if applicable.
3455    /// This field is only populated when the operation_type is
3456    /// PRE_CHECK_MAJOR_VERSION_UPGRADE.
3457    /// The PreCheckMajorVersionUpgradeContext message itself contains the details
3458    /// for that pre-check, such as the target database version for the upgrade
3459    /// and the results of the check (including any warnings or errors found).
3460    #[prost(message, optional, tag = "50")]
3461    pub pre_check_major_version_upgrade_context: ::core::option::Option<
3462        PreCheckMajorVersionUpgradeContext,
3463    >,
3464    /// An identifier that uniquely identifies the operation. You can use this
3465    /// identifier to retrieve the Operations resource that has information about
3466    /// the operation.
3467    #[prost(string, tag = "12")]
3468    pub name: ::prost::alloc::string::String,
3469    /// Name of the resource on which this operation runs.
3470    #[prost(string, tag = "13")]
3471    pub target_id: ::prost::alloc::string::String,
3472    /// The URI of this resource.
3473    #[prost(string, tag = "14")]
3474    pub self_link: ::prost::alloc::string::String,
3475    /// The project ID of the target instance related to this operation.
3476    #[prost(string, tag = "15")]
3477    pub target_project: ::prost::alloc::string::String,
3478    /// The context for acquire SSRS lease operation, if applicable.
3479    #[prost(message, optional, tag = "20")]
3480    pub acquire_ssrs_lease_context: ::core::option::Option<AcquireSsrsLeaseContext>,
3481    /// Optional. The sub operation based on the operation type.
3482    #[prost(message, optional, tag = "48")]
3483    pub sub_operation_type: ::core::option::Option<SqlSubOperationType>,
3484}
3485/// Nested message and enum types in `Operation`.
3486pub mod operation {
3487    /// The type of Cloud SQL operation.
3488    #[derive(
3489        Clone,
3490        Copy,
3491        Debug,
3492        PartialEq,
3493        Eq,
3494        Hash,
3495        PartialOrd,
3496        Ord,
3497        ::prost::Enumeration
3498    )]
3499    #[repr(i32)]
3500    pub enum SqlOperationType {
3501        /// Unknown operation type.
3502        Unspecified = 0,
3503        /// Imports data into a Cloud SQL instance.
3504        Import = 1,
3505        /// Exports data from a Cloud SQL instance to a Cloud Storage
3506        /// bucket.
3507        Export = 2,
3508        /// Creates a new Cloud SQL instance.
3509        Create = 3,
3510        /// Updates the settings of a Cloud SQL instance.
3511        Update = 4,
3512        /// Deletes a Cloud SQL instance.
3513        Delete = 5,
3514        /// Restarts the Cloud SQL instance.
3515        Restart = 6,
3516        #[deprecated]
3517        Backup = 7,
3518        #[deprecated]
3519        Snapshot = 8,
3520        /// Performs instance backup.
3521        BackupVolume = 9,
3522        /// Deletes an instance backup.
3523        DeleteVolume = 10,
3524        /// Restores an instance backup.
3525        RestoreVolume = 11,
3526        /// Injects a privileged user in mysql for MOB instances.
3527        InjectUser = 12,
3528        /// Clones a Cloud SQL instance.
3529        Clone = 14,
3530        /// Stops replication on a Cloud SQL read replica instance.
3531        StopReplica = 15,
3532        /// Starts replication on a Cloud SQL read replica instance.
3533        StartReplica = 16,
3534        /// Promotes a Cloud SQL replica instance.
3535        PromoteReplica = 17,
3536        /// Creates a Cloud SQL replica instance.
3537        CreateReplica = 18,
3538        /// Creates a new user in a Cloud SQL instance.
3539        CreateUser = 19,
3540        /// Deletes a user from a Cloud SQL instance.
3541        DeleteUser = 20,
3542        /// Updates an existing user in a Cloud SQL instance. If a user with the
3543        /// specified username doesn't exist, a new user is created.
3544        UpdateUser = 21,
3545        /// Creates a database in the Cloud SQL instance.
3546        CreateDatabase = 22,
3547        /// Deletes a database in the Cloud SQL instance.
3548        DeleteDatabase = 23,
3549        /// Updates a database in the Cloud SQL instance.
3550        UpdateDatabase = 24,
3551        /// Performs failover of an HA-enabled Cloud SQL
3552        /// failover replica.
3553        Failover = 25,
3554        /// Deletes the backup taken by a backup run.
3555        DeleteBackup = 26,
3556        RecreateReplica = 27,
3557        /// Truncates a general or slow log table in MySQL.
3558        TruncateLog = 28,
3559        /// Demotes the stand-alone instance to be a Cloud SQL
3560        /// read replica for an external database server.
3561        DemoteMaster = 29,
3562        /// Indicates that the instance is currently in maintenance. Maintenance
3563        /// typically causes the instance to be unavailable for 1-3 minutes.
3564        Maintenance = 30,
3565        /// This field is deprecated, and will be removed in future version of API.
3566        #[deprecated]
3567        EnablePrivateIp = 31,
3568        #[deprecated]
3569        DeferMaintenance = 32,
3570        /// Creates clone instance.
3571        #[deprecated]
3572        CreateClone = 33,
3573        /// Reschedule maintenance to another time.
3574        RescheduleMaintenance = 34,
3575        /// Starts external sync of a Cloud SQL EM replica to an external primary
3576        /// instance.
3577        StartExternalSync = 35,
3578        /// Recovers logs from an instance's old data disk.
3579        LogCleanup = 36,
3580        /// Performs auto-restart of an HA-enabled Cloud SQL database for auto
3581        /// recovery.
3582        AutoRestart = 37,
3583        /// Re-encrypts CMEK instances with latest key version.
3584        Reencrypt = 38,
3585        /// Switches the roles of the primary and replica pair. The target instance
3586        /// should be the replica.
3587        Switchover = 39,
3588        /// Update a backup.
3589        UpdateBackup = 40,
3590        /// Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
3591        AcquireSsrsLease = 42,
3592        /// Release a lease for the setup of SQL Server Reporting Services (SSRS).
3593        ReleaseSsrsLease = 43,
3594        /// Reconfigures old primary after a promote replica operation. Effect of a
3595        /// promote operation to the old primary is executed in this operation,
3596        /// asynchronously from the promote replica operation executed to the
3597        /// replica.
3598        ReconfigureOldPrimary = 44,
3599        /// Indicates that the instance, its read replicas, and its cascading
3600        /// replicas are in maintenance. Maintenance typically gets initiated on
3601        /// groups of replicas first, followed by the primary instance. For each
3602        /// instance, maintenance typically causes the instance to be unavailable for
3603        /// 1-3 minutes.
3604        #[deprecated]
3605        ClusterMaintenance = 45,
3606        /// Indicates that the instance (and any of its replicas) are currently in
3607        /// maintenance. This is initiated as a self-service request by using SSM.
3608        /// Maintenance typically causes the instance to be unavailable for 1-3
3609        /// minutes.
3610        #[deprecated]
3611        SelfServiceMaintenance = 46,
3612        /// Switches a primary instance to a replica. This operation runs as part of
3613        /// a switchover operation to the original primary instance.
3614        SwitchoverToReplica = 47,
3615        /// Updates the major version of a Cloud SQL instance.
3616        MajorVersionUpgrade = 48,
3617        /// Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.
3618        #[deprecated]
3619        AdvancedBackup = 49,
3620        /// Changes the BackupTier of a Cloud SQL instance.
3621        ManageBackup = 50,
3622        /// Creates a backup for an Enhanced BackupTier Cloud SQL instance.
3623        EnhancedBackup = 51,
3624        /// Repairs entire read pool or specified read pool nodes in the read pool.
3625        RepairReadPool = 52,
3626        /// Creates a Cloud SQL read pool instance.
3627        CreateReadPool = 53,
3628    }
3629    impl SqlOperationType {
3630        /// String value of the enum field names used in the ProtoBuf definition.
3631        ///
3632        /// The values are not transformed in any way and thus are considered stable
3633        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3634        pub fn as_str_name(&self) -> &'static str {
3635            match self {
3636                Self::Unspecified => "SQL_OPERATION_TYPE_UNSPECIFIED",
3637                Self::Import => "IMPORT",
3638                Self::Export => "EXPORT",
3639                Self::Create => "CREATE",
3640                Self::Update => "UPDATE",
3641                Self::Delete => "DELETE",
3642                Self::Restart => "RESTART",
3643                #[allow(deprecated)]
3644                Self::Backup => "BACKUP",
3645                #[allow(deprecated)]
3646                Self::Snapshot => "SNAPSHOT",
3647                Self::BackupVolume => "BACKUP_VOLUME",
3648                Self::DeleteVolume => "DELETE_VOLUME",
3649                Self::RestoreVolume => "RESTORE_VOLUME",
3650                Self::InjectUser => "INJECT_USER",
3651                Self::Clone => "CLONE",
3652                Self::StopReplica => "STOP_REPLICA",
3653                Self::StartReplica => "START_REPLICA",
3654                Self::PromoteReplica => "PROMOTE_REPLICA",
3655                Self::CreateReplica => "CREATE_REPLICA",
3656                Self::CreateUser => "CREATE_USER",
3657                Self::DeleteUser => "DELETE_USER",
3658                Self::UpdateUser => "UPDATE_USER",
3659                Self::CreateDatabase => "CREATE_DATABASE",
3660                Self::DeleteDatabase => "DELETE_DATABASE",
3661                Self::UpdateDatabase => "UPDATE_DATABASE",
3662                Self::Failover => "FAILOVER",
3663                Self::DeleteBackup => "DELETE_BACKUP",
3664                Self::RecreateReplica => "RECREATE_REPLICA",
3665                Self::TruncateLog => "TRUNCATE_LOG",
3666                Self::DemoteMaster => "DEMOTE_MASTER",
3667                Self::Maintenance => "MAINTENANCE",
3668                #[allow(deprecated)]
3669                Self::EnablePrivateIp => "ENABLE_PRIVATE_IP",
3670                #[allow(deprecated)]
3671                Self::DeferMaintenance => "DEFER_MAINTENANCE",
3672                #[allow(deprecated)]
3673                Self::CreateClone => "CREATE_CLONE",
3674                Self::RescheduleMaintenance => "RESCHEDULE_MAINTENANCE",
3675                Self::StartExternalSync => "START_EXTERNAL_SYNC",
3676                Self::LogCleanup => "LOG_CLEANUP",
3677                Self::AutoRestart => "AUTO_RESTART",
3678                Self::Reencrypt => "REENCRYPT",
3679                Self::Switchover => "SWITCHOVER",
3680                Self::UpdateBackup => "UPDATE_BACKUP",
3681                Self::AcquireSsrsLease => "ACQUIRE_SSRS_LEASE",
3682                Self::ReleaseSsrsLease => "RELEASE_SSRS_LEASE",
3683                Self::ReconfigureOldPrimary => "RECONFIGURE_OLD_PRIMARY",
3684                #[allow(deprecated)]
3685                Self::ClusterMaintenance => "CLUSTER_MAINTENANCE",
3686                #[allow(deprecated)]
3687                Self::SelfServiceMaintenance => "SELF_SERVICE_MAINTENANCE",
3688                Self::SwitchoverToReplica => "SWITCHOVER_TO_REPLICA",
3689                Self::MajorVersionUpgrade => "MAJOR_VERSION_UPGRADE",
3690                #[allow(deprecated)]
3691                Self::AdvancedBackup => "ADVANCED_BACKUP",
3692                Self::ManageBackup => "MANAGE_BACKUP",
3693                Self::EnhancedBackup => "ENHANCED_BACKUP",
3694                Self::RepairReadPool => "REPAIR_READ_POOL",
3695                Self::CreateReadPool => "CREATE_READ_POOL",
3696            }
3697        }
3698        /// Creates an enum from field names used in the ProtoBuf definition.
3699        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3700            match value {
3701                "SQL_OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
3702                "IMPORT" => Some(Self::Import),
3703                "EXPORT" => Some(Self::Export),
3704                "CREATE" => Some(Self::Create),
3705                "UPDATE" => Some(Self::Update),
3706                "DELETE" => Some(Self::Delete),
3707                "RESTART" => Some(Self::Restart),
3708                "BACKUP" => Some(#[allow(deprecated)] Self::Backup),
3709                "SNAPSHOT" => Some(#[allow(deprecated)] Self::Snapshot),
3710                "BACKUP_VOLUME" => Some(Self::BackupVolume),
3711                "DELETE_VOLUME" => Some(Self::DeleteVolume),
3712                "RESTORE_VOLUME" => Some(Self::RestoreVolume),
3713                "INJECT_USER" => Some(Self::InjectUser),
3714                "CLONE" => Some(Self::Clone),
3715                "STOP_REPLICA" => Some(Self::StopReplica),
3716                "START_REPLICA" => Some(Self::StartReplica),
3717                "PROMOTE_REPLICA" => Some(Self::PromoteReplica),
3718                "CREATE_REPLICA" => Some(Self::CreateReplica),
3719                "CREATE_USER" => Some(Self::CreateUser),
3720                "DELETE_USER" => Some(Self::DeleteUser),
3721                "UPDATE_USER" => Some(Self::UpdateUser),
3722                "CREATE_DATABASE" => Some(Self::CreateDatabase),
3723                "DELETE_DATABASE" => Some(Self::DeleteDatabase),
3724                "UPDATE_DATABASE" => Some(Self::UpdateDatabase),
3725                "FAILOVER" => Some(Self::Failover),
3726                "DELETE_BACKUP" => Some(Self::DeleteBackup),
3727                "RECREATE_REPLICA" => Some(Self::RecreateReplica),
3728                "TRUNCATE_LOG" => Some(Self::TruncateLog),
3729                "DEMOTE_MASTER" => Some(Self::DemoteMaster),
3730                "MAINTENANCE" => Some(Self::Maintenance),
3731                "ENABLE_PRIVATE_IP" => Some(#[allow(deprecated)] Self::EnablePrivateIp),
3732                "DEFER_MAINTENANCE" => Some(#[allow(deprecated)] Self::DeferMaintenance),
3733                "CREATE_CLONE" => Some(#[allow(deprecated)] Self::CreateClone),
3734                "RESCHEDULE_MAINTENANCE" => Some(Self::RescheduleMaintenance),
3735                "START_EXTERNAL_SYNC" => Some(Self::StartExternalSync),
3736                "LOG_CLEANUP" => Some(Self::LogCleanup),
3737                "AUTO_RESTART" => Some(Self::AutoRestart),
3738                "REENCRYPT" => Some(Self::Reencrypt),
3739                "SWITCHOVER" => Some(Self::Switchover),
3740                "UPDATE_BACKUP" => Some(Self::UpdateBackup),
3741                "ACQUIRE_SSRS_LEASE" => Some(Self::AcquireSsrsLease),
3742                "RELEASE_SSRS_LEASE" => Some(Self::ReleaseSsrsLease),
3743                "RECONFIGURE_OLD_PRIMARY" => Some(Self::ReconfigureOldPrimary),
3744                "CLUSTER_MAINTENANCE" => {
3745                    Some(#[allow(deprecated)] Self::ClusterMaintenance)
3746                }
3747                "SELF_SERVICE_MAINTENANCE" => {
3748                    Some(#[allow(deprecated)] Self::SelfServiceMaintenance)
3749                }
3750                "SWITCHOVER_TO_REPLICA" => Some(Self::SwitchoverToReplica),
3751                "MAJOR_VERSION_UPGRADE" => Some(Self::MajorVersionUpgrade),
3752                "ADVANCED_BACKUP" => Some(#[allow(deprecated)] Self::AdvancedBackup),
3753                "MANAGE_BACKUP" => Some(Self::ManageBackup),
3754                "ENHANCED_BACKUP" => Some(Self::EnhancedBackup),
3755                "REPAIR_READ_POOL" => Some(Self::RepairReadPool),
3756                "CREATE_READ_POOL" => Some(Self::CreateReadPool),
3757                _ => None,
3758            }
3759        }
3760    }
3761    /// The status of an operation.
3762    #[derive(
3763        Clone,
3764        Copy,
3765        Debug,
3766        PartialEq,
3767        Eq,
3768        Hash,
3769        PartialOrd,
3770        Ord,
3771        ::prost::Enumeration
3772    )]
3773    #[repr(i32)]
3774    pub enum SqlOperationStatus {
3775        /// The state of the operation is unknown.
3776        Unspecified = 0,
3777        /// The operation has been queued, but has not started yet.
3778        Pending = 1,
3779        /// The operation is running.
3780        Running = 2,
3781        /// The operation completed.
3782        Done = 3,
3783    }
3784    impl SqlOperationStatus {
3785        /// String value of the enum field names used in the ProtoBuf definition.
3786        ///
3787        /// The values are not transformed in any way and thus are considered stable
3788        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3789        pub fn as_str_name(&self) -> &'static str {
3790            match self {
3791                Self::Unspecified => "SQL_OPERATION_STATUS_UNSPECIFIED",
3792                Self::Pending => "PENDING",
3793                Self::Running => "RUNNING",
3794                Self::Done => "DONE",
3795            }
3796        }
3797        /// Creates an enum from field names used in the ProtoBuf definition.
3798        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3799            match value {
3800                "SQL_OPERATION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
3801                "PENDING" => Some(Self::Pending),
3802                "RUNNING" => Some(Self::Running),
3803                "DONE" => Some(Self::Done),
3804                _ => None,
3805            }
3806        }
3807    }
3808}
3809/// Database instance operation error.
3810#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3811pub struct OperationError {
3812    /// This is always `sql#operationError`.
3813    #[prost(string, tag = "1")]
3814    pub kind: ::prost::alloc::string::String,
3815    /// Identifies the specific error that occurred.
3816    #[prost(string, tag = "2")]
3817    pub code: ::prost::alloc::string::String,
3818    /// Additional information about the error encountered.
3819    #[prost(string, tag = "3")]
3820    pub message: ::prost::alloc::string::String,
3821}
3822/// Database instance operation errors list wrapper.
3823#[derive(Clone, PartialEq, ::prost::Message)]
3824pub struct OperationErrors {
3825    /// This is always `sql#operationErrors`.
3826    #[prost(string, tag = "1")]
3827    pub kind: ::prost::alloc::string::String,
3828    /// The list of errors encountered while processing this operation.
3829    #[prost(message, repeated, tag = "2")]
3830    pub errors: ::prost::alloc::vec::Vec<OperationError>,
3831}
3832/// Database instance local user password validation policy.
3833/// This message defines the password policy for local database users.
3834/// When enabled, it enforces constraints on password complexity, length,
3835/// and reuse. Keep this policy enabled to help prevent unauthorized access.
3836#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3837pub struct PasswordValidationPolicy {
3838    /// Minimum number of characters allowed.
3839    #[prost(message, optional, tag = "1")]
3840    pub min_length: ::core::option::Option<i32>,
3841    /// The complexity of the password.
3842    #[prost(enumeration = "password_validation_policy::Complexity", tag = "2")]
3843    pub complexity: i32,
3844    /// Number of previous passwords that cannot be reused.
3845    #[prost(message, optional, tag = "3")]
3846    pub reuse_interval: ::core::option::Option<i32>,
3847    /// Disallow username as a part of the password.
3848    #[prost(message, optional, tag = "4")]
3849    pub disallow_username_substring: ::core::option::Option<bool>,
3850    /// Minimum interval after which the password can be changed. This flag is only
3851    /// supported for PostgreSQL.
3852    #[prost(message, optional, tag = "5")]
3853    pub password_change_interval: ::core::option::Option<::prost_types::Duration>,
3854    /// Whether to enable the password policy or not. When enabled, passwords must
3855    /// meet complexity requirements. Keep this policy enabled to help prevent
3856    /// unauthorized access. Disabling this policy allows weak passwords.
3857    #[prost(message, optional, tag = "6")]
3858    pub enable_password_policy: ::core::option::Option<bool>,
3859    /// This field is deprecated and will be removed in a future version of the
3860    /// API.
3861    #[deprecated]
3862    #[prost(message, optional, tag = "7")]
3863    pub disallow_compromised_credentials: ::core::option::Option<bool>,
3864}
3865/// Nested message and enum types in `PasswordValidationPolicy`.
3866pub mod password_validation_policy {
3867    /// The complexity choices of the password.
3868    #[derive(
3869        Clone,
3870        Copy,
3871        Debug,
3872        PartialEq,
3873        Eq,
3874        Hash,
3875        PartialOrd,
3876        Ord,
3877        ::prost::Enumeration
3878    )]
3879    #[repr(i32)]
3880    pub enum Complexity {
3881        /// Complexity check is not specified.
3882        Unspecified = 0,
3883        /// A combination of lowercase, uppercase, numeric, and non-alphanumeric
3884        /// characters.
3885        Default = 1,
3886    }
3887    impl Complexity {
3888        /// String value of the enum field names used in the ProtoBuf definition.
3889        ///
3890        /// The values are not transformed in any way and thus are considered stable
3891        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3892        pub fn as_str_name(&self) -> &'static str {
3893            match self {
3894                Self::Unspecified => "COMPLEXITY_UNSPECIFIED",
3895                Self::Default => "COMPLEXITY_DEFAULT",
3896            }
3897        }
3898        /// Creates an enum from field names used in the ProtoBuf definition.
3899        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3900            match value {
3901                "COMPLEXITY_UNSPECIFIED" => Some(Self::Unspecified),
3902                "COMPLEXITY_DEFAULT" => Some(Self::Default),
3903                _ => None,
3904            }
3905        }
3906    }
3907}
3908/// Operations list response.
3909#[derive(Clone, PartialEq, ::prost::Message)]
3910pub struct OperationsListResponse {
3911    /// This is always `sql#operationsList`.
3912    #[prost(string, tag = "1")]
3913    pub kind: ::prost::alloc::string::String,
3914    /// List of operation resources.
3915    #[prost(message, repeated, tag = "2")]
3916    pub items: ::prost::alloc::vec::Vec<Operation>,
3917    /// The continuation token, used to page through large result sets. Provide
3918    /// this value in a subsequent request to return the next page of results.
3919    #[prost(string, tag = "3")]
3920    pub next_page_token: ::prost::alloc::string::String,
3921}
3922/// Read-replica configuration for connecting to the primary instance.
3923#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3924pub struct ReplicaConfiguration {
3925    /// This is always `sql#replicaConfiguration`.
3926    #[prost(string, tag = "1")]
3927    pub kind: ::prost::alloc::string::String,
3928    /// MySQL specific configuration when replicating from a MySQL on-premises
3929    /// primary instance. Replication configuration information such as the
3930    /// username, password, certificates, and keys are not stored in the instance
3931    /// metadata. The configuration information is used only to set up the
3932    /// replication connection and is stored by MySQL in a file named
3933    /// `master.info` in the data directory.
3934    #[prost(message, optional, tag = "2")]
3935    pub mysql_replica_configuration: ::core::option::Option<MySqlReplicaConfiguration>,
3936    /// Specifies if the replica is the failover target. If the field is set to
3937    /// `true` the replica will be designated as a failover replica. In case the
3938    /// primary instance fails, the replica instance will be promoted as the new
3939    /// primary instance. Only one replica can be specified as failover target, and
3940    /// the replica has to be in different zone with the primary instance.
3941    #[prost(message, optional, tag = "3")]
3942    pub failover_target: ::core::option::Option<bool>,
3943    /// Optional. Specifies if a SQL Server replica is a cascadable replica. A
3944    /// cascadable replica is a SQL Server cross region replica that supports
3945    /// replica(s) under it.
3946    #[prost(message, optional, tag = "5")]
3947    pub cascadable_replica: ::core::option::Option<bool>,
3948}
3949/// Database instance restore from backup context.
3950/// Backup context contains source instance id and project id.
3951#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3952pub struct RestoreBackupContext {
3953    /// This is always `sql#restoreBackupContext`.
3954    #[prost(string, tag = "1")]
3955    pub kind: ::prost::alloc::string::String,
3956    /// The ID of the backup run to restore from.
3957    #[prost(int64, tag = "2")]
3958    pub backup_run_id: i64,
3959    /// The ID of the instance that the backup was taken from.
3960    #[prost(string, tag = "3")]
3961    pub instance_id: ::prost::alloc::string::String,
3962    /// The full project ID of the source instance.
3963    #[prost(string, tag = "4")]
3964    pub project: ::prost::alloc::string::String,
3965}
3966/// Instance rotate server CA context.
3967#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3968pub struct RotateServerCaContext {
3969    /// This is always `sql#rotateServerCaContext`.
3970    #[prost(string, tag = "1")]
3971    pub kind: ::prost::alloc::string::String,
3972    /// The fingerprint of the next version to be rotated to. If left unspecified,
3973    /// will be rotated to the most recently added server CA version.
3974    #[prost(string, tag = "2")]
3975    pub next_version: ::prost::alloc::string::String,
3976}
3977/// Instance rotate server certificate context.
3978#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3979pub struct RotateServerCertificateContext {
3980    /// Optional. This is always `sql#rotateServerCertificateContext`.
3981    #[prost(string, tag = "1")]
3982    pub kind: ::prost::alloc::string::String,
3983    /// Optional. The fingerprint of the next version to be rotated to. If left
3984    /// unspecified, will be rotated to the most recently added server certificate
3985    /// version.
3986    #[prost(string, tag = "2")]
3987    pub next_version: ::prost::alloc::string::String,
3988}
3989/// Instance rotate Entra ID certificate context.
3990#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3991pub struct RotateEntraIdCertificateContext {
3992    /// Optional. This is always `sql#rotateEntraIdCertificateContext`.
3993    #[prost(string, tag = "1")]
3994    pub kind: ::prost::alloc::string::String,
3995    /// Optional. The fingerprint of the next version to be rotated to. If left
3996    /// unspecified, will be rotated to the most recently added Entra ID
3997    /// certificate version.
3998    #[prost(string, tag = "2")]
3999    pub next_version: ::prost::alloc::string::String,
4000}
4001/// Data cache configurations.
4002#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4003pub struct DataCacheConfig {
4004    /// Whether data cache is enabled for the instance.
4005    #[prost(bool, tag = "1")]
4006    pub data_cache_enabled: bool,
4007}
4008/// Config used to determine the final backup settings for the instance.
4009#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4010pub struct FinalBackupConfig {
4011    /// Whether the final backup is enabled for the instance.
4012    #[prost(bool, optional, tag = "1")]
4013    pub enabled: ::core::option::Option<bool>,
4014    /// The number of days to retain the final backup after the instance deletion.
4015    /// The final backup will be purged at (time_of_instance_deletion +
4016    /// retention_days).
4017    #[prost(int32, optional, tag = "3")]
4018    pub retention_days: ::core::option::Option<i32>,
4019}
4020/// Database instance settings.
4021#[derive(Clone, PartialEq, ::prost::Message)]
4022pub struct Settings {
4023    /// The version of instance settings. This is a required field for update
4024    /// method to make sure concurrent updates are handled properly. During update,
4025    /// use the most recent settingsVersion value for this instance and do not try
4026    /// to update this value.
4027    #[prost(message, optional, tag = "1")]
4028    pub settings_version: ::core::option::Option<i64>,
4029    /// The App Engine app IDs that can access this instance.
4030    /// (Deprecated) Applied to First Generation instances only.
4031    #[deprecated]
4032    #[prost(string, repeated, tag = "2")]
4033    pub authorized_gae_applications: ::prost::alloc::vec::Vec<
4034        ::prost::alloc::string::String,
4035    >,
4036    /// The tier (or machine type) for this instance, for example
4037    /// `db-custom-1-3840`. WARNING: Changing this restarts the instance.
4038    #[prost(string, tag = "3")]
4039    pub tier: ::prost::alloc::string::String,
4040    /// This is always `sql#settings`.
4041    #[prost(string, tag = "4")]
4042    pub kind: ::prost::alloc::string::String,
4043    /// User-provided labels, represented as a dictionary where each label is a
4044    /// single key value pair.
4045    #[prost(map = "string, string", tag = "5")]
4046    pub user_labels: ::std::collections::HashMap<
4047        ::prost::alloc::string::String,
4048        ::prost::alloc::string::String,
4049    >,
4050    /// Availability type. Potential values:
4051    ///
4052    /// * `ZONAL`: The instance serves data from only one zone. Outages in that
4053    ///   zone affect data accessibility.
4054    /// * `REGIONAL`: The instance can serve data from more than one zone in a
4055    ///   region (it is highly available)./
4056    ///
4057    /// For more information, see [Overview of the High Availability
4058    /// Configuration](<https://cloud.google.com/sql/docs/mysql/high-availability>).
4059    #[prost(enumeration = "SqlAvailabilityType", tag = "6")]
4060    pub availability_type: i32,
4061    /// The pricing plan for this instance. This can be either `PER_USE` or
4062    /// `PACKAGE`. Only `PER_USE` is supported for Second Generation instances.
4063    #[prost(enumeration = "SqlPricingPlan", tag = "7")]
4064    pub pricing_plan: i32,
4065    /// The type of replication this instance uses. This can be either
4066    /// `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only
4067    /// applicable to First Generation instances.
4068    #[deprecated]
4069    #[prost(enumeration = "SqlReplicationType", tag = "8")]
4070    pub replication_type: i32,
4071    /// The maximum size to which storage capacity can be automatically increased.
4072    /// The default value is 0, which specifies that there is no limit.
4073    #[prost(message, optional, tag = "9")]
4074    pub storage_auto_resize_limit: ::core::option::Option<i64>,
4075    /// The activation policy specifies when the instance is activated; it is
4076    /// applicable only when the instance state is RUNNABLE. Valid values:
4077    ///
4078    /// * `ALWAYS`: The instance is on, and remains so even in the absence of
4079    ///   connection requests.
4080    /// * `NEVER`: The instance is off; it is not activated, even if a
4081    ///   connection request arrives.
4082    #[prost(enumeration = "settings::SqlActivationPolicy", tag = "10")]
4083    pub activation_policy: i32,
4084    /// The settings for IP Management. This allows to enable or disable the
4085    /// instance IP and manage which external networks can connect to the instance.
4086    /// The IPv4 address cannot be disabled for Second Generation instances.
4087    #[prost(message, optional, tag = "11")]
4088    pub ip_configuration: ::core::option::Option<IpConfiguration>,
4089    /// Configuration to increase storage size automatically. The default value is
4090    /// true.
4091    #[prost(message, optional, tag = "12")]
4092    pub storage_auto_resize: ::core::option::Option<bool>,
4093    /// The location preference settings. This allows the instance to be located as
4094    /// near as possible to either an App Engine app or Compute Engine zone for
4095    /// better performance. App Engine co-location was only applicable to First
4096    /// Generation instances.
4097    #[prost(message, optional, tag = "13")]
4098    pub location_preference: ::core::option::Option<LocationPreference>,
4099    /// The database flags passed to the instance at startup.
4100    #[prost(message, repeated, tag = "14")]
4101    pub database_flags: ::prost::alloc::vec::Vec<DatabaseFlags>,
4102    /// The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for
4103    /// First Generation instances.
4104    #[prost(enumeration = "SqlDataDiskType", tag = "15")]
4105    pub data_disk_type: i32,
4106    /// The maintenance window for this instance. This specifies when the instance
4107    /// can be restarted for maintenance purposes.
4108    #[prost(message, optional, tag = "16")]
4109    pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
4110    /// The daily backup configuration for the instance.
4111    #[prost(message, optional, tag = "17")]
4112    pub backup_configuration: ::core::option::Option<BackupConfiguration>,
4113    /// Configuration specific to read replica instances. Indicates whether
4114    /// replication is enabled or not. WARNING: Changing this restarts the
4115    /// instance.
4116    #[prost(message, optional, tag = "18")]
4117    pub database_replication_enabled: ::core::option::Option<bool>,
4118    /// Configuration specific to read replica instances. Indicates whether
4119    /// database flags for crash-safe replication are enabled. This property was
4120    /// only applicable to First Generation instances.
4121    #[deprecated]
4122    #[prost(message, optional, tag = "19")]
4123    pub crash_safe_replication_enabled: ::core::option::Option<bool>,
4124    /// The size of data disk, in GB. The data disk size minimum is 10GB.
4125    #[prost(message, optional, tag = "20")]
4126    pub data_disk_size_gb: ::core::option::Option<i64>,
4127    /// Active Directory configuration, relevant only for Cloud SQL for SQL Server.
4128    #[prost(message, optional, tag = "22")]
4129    pub active_directory_config: ::core::option::Option<SqlActiveDirectoryConfig>,
4130    /// The name of server Instance collation.
4131    #[prost(string, tag = "23")]
4132    pub collation: ::prost::alloc::string::String,
4133    /// Deny maintenance periods
4134    #[prost(message, repeated, tag = "24")]
4135    pub deny_maintenance_periods: ::prost::alloc::vec::Vec<DenyMaintenancePeriod>,
4136    /// Insights configuration, for now relevant only for Postgres.
4137    #[prost(message, optional, tag = "25")]
4138    pub insights_config: ::core::option::Option<InsightsConfig>,
4139    /// The local user password validation policy of the instance.
4140    #[prost(message, optional, tag = "27")]
4141    pub password_validation_policy: ::core::option::Option<PasswordValidationPolicy>,
4142    /// SQL Server specific audit configuration.
4143    #[prost(message, optional, tag = "29")]
4144    pub sql_server_audit_config: ::core::option::Option<SqlServerAuditConfig>,
4145    /// Optional. The edition of the instance.
4146    #[prost(enumeration = "settings::Edition", tag = "38")]
4147    pub edition: i32,
4148    /// Specifies if connections must use Cloud SQL connectors.
4149    /// Option values include the following: `NOT_REQUIRED` (Cloud SQL instances
4150    /// can be connected without Cloud SQL
4151    /// Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL
4152    /// Connectors)
4153    ///
4154    /// Note that using REQUIRED disables all existing authorized networks. If
4155    /// this field is not specified when creating a new instance, NOT_REQUIRED is
4156    /// used. If this field is not specified when patching or updating an existing
4157    /// instance, it is left unchanged in the instance.
4158    #[prost(enumeration = "settings::ConnectorEnforcement", tag = "32")]
4159    pub connector_enforcement: i32,
4160    /// Configuration to protect against accidental instance deletion.
4161    #[prost(message, optional, tag = "33")]
4162    pub deletion_protection_enabled: ::core::option::Option<bool>,
4163    /// Server timezone, relevant only for Cloud SQL for SQL Server.
4164    #[prost(string, tag = "34")]
4165    pub time_zone: ::prost::alloc::string::String,
4166    /// Specifies advanced machine configuration for the instances relevant only
4167    /// for SQL Server.
4168    #[prost(message, optional, tag = "35")]
4169    pub advanced_machine_features: ::core::option::Option<AdvancedMachineFeatures>,
4170    /// Configuration for data cache.
4171    #[prost(message, optional, tag = "37")]
4172    pub data_cache_config: ::core::option::Option<DataCacheConfig>,
4173    /// Optional. Configuration value for recreation of replica after certain
4174    /// replication lag.
4175    #[prost(message, optional, tag = "39")]
4176    pub replication_lag_max_seconds: ::core::option::Option<i32>,
4177    /// Optional. When this parameter is set to true, Cloud SQL instances can
4178    /// connect to Vertex AI to pass requests for real-time predictions and
4179    /// insights to the AI. The default value is false. This applies only to Cloud
4180    /// SQL for MySQL and Cloud SQL for PostgreSQL instances.
4181    #[prost(message, optional, tag = "40")]
4182    pub enable_google_ml_integration: ::core::option::Option<bool>,
4183    /// Optional. By default, Cloud SQL instances have schema extraction disabled
4184    /// for Dataplex. When this parameter is set to true, schema extraction for
4185    /// Dataplex on Cloud SQL instances is activated.
4186    #[prost(message, optional, tag = "41")]
4187    pub enable_dataplex_integration: ::core::option::Option<bool>,
4188    /// Optional. When this parameter is set to true, Cloud SQL retains backups of
4189    /// the instance even after the instance is deleted. The ON_DEMAND backup will
4190    /// be retained until customer deletes the backup or the project. The AUTOMATED
4191    /// backup will be retained based on the backups retention setting.
4192    #[prost(message, optional, tag = "42")]
4193    pub retain_backups_on_delete: ::core::option::Option<bool>,
4194    /// Optional. Provisioned number of I/O operations per second for the data
4195    /// disk. This field is only used for hyperdisk-balanced disk types.
4196    #[prost(int64, optional, tag = "43")]
4197    pub data_disk_provisioned_iops: ::core::option::Option<i64>,
4198    /// Optional. Provisioned throughput measured in MiB per second for the data
4199    /// disk. This field is only used for hyperdisk-balanced disk types.
4200    #[prost(int64, optional, tag = "44")]
4201    pub data_disk_provisioned_throughput: ::core::option::Option<i64>,
4202    /// Optional. The managed connection pooling configuration for the instance.
4203    #[prost(message, optional, tag = "45")]
4204    pub connection_pool_config: ::core::option::Option<ConnectionPoolConfig>,
4205    /// Optional. The final backup configuration for the instance.
4206    #[prost(message, optional, tag = "47")]
4207    pub final_backup_config: ::core::option::Option<FinalBackupConfig>,
4208    /// Optional. The read pool auto-scale configuration for the instance.
4209    #[prost(message, optional, tag = "48")]
4210    pub read_pool_auto_scale_config: ::core::option::Option<ReadPoolAutoScaleConfig>,
4211    /// Optional. Cloud SQL for MySQL auto-upgrade configuration. When this
4212    /// parameter is set to true, auto-upgrade is enabled for MySQL 8.0 minor
4213    /// versions. The MySQL version must be 8.0.35 or higher.
4214    #[prost(bool, optional, tag = "50")]
4215    pub auto_upgrade_enabled: ::core::option::Option<bool>,
4216    /// Optional. The Microsoft Entra ID configuration for the SQL Server instance.
4217    #[prost(message, optional, tag = "52")]
4218    pub entraid_config: ::core::option::Option<SqlServerEntraIdConfig>,
4219    /// This parameter controls whether to allow using ExecuteSql API to connect to
4220    /// the instance. Not allowed by default.
4221    #[prost(enumeration = "settings::DataApiAccess", optional, tag = "53")]
4222    pub data_api_access: ::core::option::Option<i32>,
4223    /// Optional. Configuration for Performance Capture, provides diagnostic
4224    /// metrics during high load situations.
4225    #[prost(message, optional, tag = "54")]
4226    pub performance_capture_config: ::core::option::Option<PerformanceCaptureConfig>,
4227}
4228/// Nested message and enum types in `Settings`.
4229pub mod settings {
4230    /// Specifies when the instance is activated.
4231    #[derive(
4232        Clone,
4233        Copy,
4234        Debug,
4235        PartialEq,
4236        Eq,
4237        Hash,
4238        PartialOrd,
4239        Ord,
4240        ::prost::Enumeration
4241    )]
4242    #[repr(i32)]
4243    pub enum SqlActivationPolicy {
4244        /// Unknown activation plan.
4245        Unspecified = 0,
4246        /// The instance is always up and running.
4247        Always = 1,
4248        /// The instance never starts.
4249        Never = 2,
4250        /// The instance starts upon receiving requests.
4251        #[deprecated]
4252        OnDemand = 3,
4253    }
4254    impl SqlActivationPolicy {
4255        /// String value of the enum field names used in the ProtoBuf definition.
4256        ///
4257        /// The values are not transformed in any way and thus are considered stable
4258        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4259        pub fn as_str_name(&self) -> &'static str {
4260            match self {
4261                Self::Unspecified => "SQL_ACTIVATION_POLICY_UNSPECIFIED",
4262                Self::Always => "ALWAYS",
4263                Self::Never => "NEVER",
4264                #[allow(deprecated)]
4265                Self::OnDemand => "ON_DEMAND",
4266            }
4267        }
4268        /// Creates an enum from field names used in the ProtoBuf definition.
4269        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4270            match value {
4271                "SQL_ACTIVATION_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
4272                "ALWAYS" => Some(Self::Always),
4273                "NEVER" => Some(Self::Never),
4274                "ON_DEMAND" => Some(#[allow(deprecated)] Self::OnDemand),
4275                _ => None,
4276            }
4277        }
4278    }
4279    /// The edition of the instance.
4280    #[derive(
4281        Clone,
4282        Copy,
4283        Debug,
4284        PartialEq,
4285        Eq,
4286        Hash,
4287        PartialOrd,
4288        Ord,
4289        ::prost::Enumeration
4290    )]
4291    #[repr(i32)]
4292    pub enum Edition {
4293        /// The instance did not specify the edition.
4294        Unspecified = 0,
4295        /// The instance is an enterprise edition.
4296        Enterprise = 2,
4297        /// The instance is an Enterprise Plus edition.
4298        EnterprisePlus = 3,
4299    }
4300    impl Edition {
4301        /// String value of the enum field names used in the ProtoBuf definition.
4302        ///
4303        /// The values are not transformed in any way and thus are considered stable
4304        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4305        pub fn as_str_name(&self) -> &'static str {
4306            match self {
4307                Self::Unspecified => "EDITION_UNSPECIFIED",
4308                Self::Enterprise => "ENTERPRISE",
4309                Self::EnterprisePlus => "ENTERPRISE_PLUS",
4310            }
4311        }
4312        /// Creates an enum from field names used in the ProtoBuf definition.
4313        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4314            match value {
4315                "EDITION_UNSPECIFIED" => Some(Self::Unspecified),
4316                "ENTERPRISE" => Some(Self::Enterprise),
4317                "ENTERPRISE_PLUS" => Some(Self::EnterprisePlus),
4318                _ => None,
4319            }
4320        }
4321    }
4322    /// The options for enforcing Cloud SQL connectors in the instance.
4323    #[derive(
4324        Clone,
4325        Copy,
4326        Debug,
4327        PartialEq,
4328        Eq,
4329        Hash,
4330        PartialOrd,
4331        Ord,
4332        ::prost::Enumeration
4333    )]
4334    #[repr(i32)]
4335    pub enum ConnectorEnforcement {
4336        /// The requirement for Cloud SQL connectors is unknown.
4337        Unspecified = 0,
4338        /// Do not require Cloud SQL connectors.
4339        NotRequired = 1,
4340        /// Require all connections to use Cloud SQL connectors, including the
4341        /// Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors.
4342        /// Note: This disables all existing authorized networks.
4343        Required = 2,
4344    }
4345    impl ConnectorEnforcement {
4346        /// String value of the enum field names used in the ProtoBuf definition.
4347        ///
4348        /// The values are not transformed in any way and thus are considered stable
4349        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4350        pub fn as_str_name(&self) -> &'static str {
4351            match self {
4352                Self::Unspecified => "CONNECTOR_ENFORCEMENT_UNSPECIFIED",
4353                Self::NotRequired => "NOT_REQUIRED",
4354                Self::Required => "REQUIRED",
4355            }
4356        }
4357        /// Creates an enum from field names used in the ProtoBuf definition.
4358        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4359            match value {
4360                "CONNECTOR_ENFORCEMENT_UNSPECIFIED" => Some(Self::Unspecified),
4361                "NOT_REQUIRED" => Some(Self::NotRequired),
4362                "REQUIRED" => Some(Self::Required),
4363                _ => None,
4364            }
4365        }
4366    }
4367    /// ExecuteSql API's access to the instance.
4368    #[derive(
4369        Clone,
4370        Copy,
4371        Debug,
4372        PartialEq,
4373        Eq,
4374        Hash,
4375        PartialOrd,
4376        Ord,
4377        ::prost::Enumeration
4378    )]
4379    #[repr(i32)]
4380    pub enum DataApiAccess {
4381        /// Unspecified, effectively the same as `DISALLOW_DATA_API`.
4382        Unspecified = 0,
4383        /// Disallow using ExecuteSql API to connect to the instance.
4384        DisallowDataApi = 1,
4385        /// Allow using ExecuteSql API to connect to the instance. For private IP
4386        /// instances, this allows authorized users to access the instance from
4387        /// the public internet using ExecuteSql API.
4388        AllowDataApi = 2,
4389    }
4390    impl DataApiAccess {
4391        /// String value of the enum field names used in the ProtoBuf definition.
4392        ///
4393        /// The values are not transformed in any way and thus are considered stable
4394        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4395        pub fn as_str_name(&self) -> &'static str {
4396            match self {
4397                Self::Unspecified => "DATA_API_ACCESS_UNSPECIFIED",
4398                Self::DisallowDataApi => "DISALLOW_DATA_API",
4399                Self::AllowDataApi => "ALLOW_DATA_API",
4400            }
4401        }
4402        /// Creates an enum from field names used in the ProtoBuf definition.
4403        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4404            match value {
4405                "DATA_API_ACCESS_UNSPECIFIED" => Some(Self::Unspecified),
4406                "DISALLOW_DATA_API" => Some(Self::DisallowDataApi),
4407                "ALLOW_DATA_API" => Some(Self::AllowDataApi),
4408                _ => None,
4409            }
4410        }
4411    }
4412}
4413/// Performance Capture configuration.
4414#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4415pub struct PerformanceCaptureConfig {
4416    /// Optional. Enable or disable the Performance Capture.
4417    #[prost(bool, optional, tag = "1")]
4418    pub enabled: ::core::option::Option<bool>,
4419    /// Optional. The time interval in seconds between any two probes.
4420    #[prost(int32, optional, tag = "2")]
4421    pub probing_interval_seconds: ::core::option::Option<i32>,
4422    /// Optional. The minimum number of consecutive readings above threshold that
4423    /// triggers instance state capture.
4424    #[prost(int32, optional, tag = "3")]
4425    pub probe_threshold: ::core::option::Option<i32>,
4426    /// Optional. The minimum number of server threads running to trigger the
4427    /// capture on primary.
4428    #[prost(int32, optional, tag = "4")]
4429    pub running_threads_threshold: ::core::option::Option<i32>,
4430    /// Optional. The minimum number of seconds replica must be lagging behind
4431    /// primary to trigger capture on replica.
4432    #[prost(int32, optional, tag = "5")]
4433    pub seconds_behind_source_threshold: ::core::option::Option<i32>,
4434    /// Optional. The amount of time in seconds that a transaction needs to have
4435    /// been open before the watcher starts recording it.
4436    #[prost(int32, optional, tag = "8")]
4437    pub transaction_duration_threshold: ::core::option::Option<i32>,
4438}
4439/// Specifies options for controlling advanced machine features.
4440#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4441pub struct AdvancedMachineFeatures {
4442    /// The number of threads per physical core.
4443    #[prost(int32, tag = "1")]
4444    pub threads_per_core: i32,
4445}
4446/// SslCerts Resource
4447#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4448pub struct SslCert {
4449    /// This is always `sql#sslCert`.
4450    #[prost(string, tag = "1")]
4451    pub kind: ::prost::alloc::string::String,
4452    /// Serial number, as extracted from the certificate.
4453    #[prost(string, tag = "2")]
4454    pub cert_serial_number: ::prost::alloc::string::String,
4455    /// PEM representation.
4456    #[prost(string, tag = "3")]
4457    pub cert: ::prost::alloc::string::String,
4458    /// The time when the certificate was created in
4459    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
4460    /// `2012-11-15T16:19:00.094Z`.
4461    #[prost(message, optional, tag = "4")]
4462    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
4463    /// User supplied name.  Constrained to \[a-zA-Z.-\_ \]+.
4464    #[prost(string, tag = "5")]
4465    pub common_name: ::prost::alloc::string::String,
4466    /// The time when the certificate expires in
4467    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
4468    /// `2012-11-15T16:19:00.094Z`.
4469    #[prost(message, optional, tag = "6")]
4470    pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
4471    /// Sha1 Fingerprint.
4472    #[prost(string, tag = "7")]
4473    pub sha1_fingerprint: ::prost::alloc::string::String,
4474    /// Name of the database instance.
4475    #[prost(string, tag = "8")]
4476    pub instance: ::prost::alloc::string::String,
4477    /// The URI of this resource.
4478    #[prost(string, tag = "9")]
4479    pub self_link: ::prost::alloc::string::String,
4480}
4481/// SslCertDetail.
4482#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4483pub struct SslCertDetail {
4484    /// The public information about the cert.
4485    #[prost(message, optional, tag = "1")]
4486    pub cert_info: ::core::option::Option<SslCert>,
4487    /// The private key for the client cert, in pem format.  Keep private in order
4488    /// to protect your security.
4489    #[prost(string, tag = "2")]
4490    pub cert_private_key: ::prost::alloc::string::String,
4491}
4492/// SslCerts create ephemeral certificate request.
4493#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4494pub struct SslCertsCreateEphemeralRequest {
4495    /// PEM encoded public key to include in the signed certificate.
4496    #[prost(string, tag = "1")]
4497    pub public_key: ::prost::alloc::string::String,
4498    /// Access token to include in the signed certificate.
4499    #[prost(string, tag = "2")]
4500    pub access_token: ::prost::alloc::string::String,
4501}
4502/// SslCerts insert request.
4503#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4504pub struct SslCertsInsertRequest {
4505    /// User supplied name.  Must be a distinct name from the other certificates
4506    /// for this instance.
4507    #[prost(string, tag = "1")]
4508    pub common_name: ::prost::alloc::string::String,
4509}
4510/// Reschedule options for maintenance windows.
4511#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4512pub struct SqlInstancesRescheduleMaintenanceRequestBody {
4513    /// Required. The type of the reschedule the user wants.
4514    #[prost(message, optional, tag = "3")]
4515    pub reschedule: ::core::option::Option<
4516        sql_instances_reschedule_maintenance_request_body::Reschedule,
4517    >,
4518}
4519/// Nested message and enum types in `SqlInstancesRescheduleMaintenanceRequestBody`.
4520pub mod sql_instances_reschedule_maintenance_request_body {
4521    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4522    pub struct Reschedule {
4523        /// Required. The type of the reschedule.
4524        #[prost(enumeration = "RescheduleType", tag = "1")]
4525        pub reschedule_type: i32,
4526        /// Optional. Timestamp when the maintenance shall be rescheduled to if
4527        /// reschedule_type=SPECIFIC_TIME, in
4528        /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
4529        /// `2012-11-15T16:19:00.094Z`.
4530        #[prost(message, optional, tag = "2")]
4531        pub schedule_time: ::core::option::Option<::prost_types::Timestamp>,
4532    }
4533    #[derive(
4534        Clone,
4535        Copy,
4536        Debug,
4537        PartialEq,
4538        Eq,
4539        Hash,
4540        PartialOrd,
4541        Ord,
4542        ::prost::Enumeration
4543    )]
4544    #[repr(i32)]
4545    pub enum RescheduleType {
4546        Unspecified = 0,
4547        /// Reschedules maintenance to happen now (within 5 minutes).
4548        Immediate = 1,
4549        /// Reschedules maintenance to occur within one week from the originally
4550        /// scheduled day and time.
4551        NextAvailableWindow = 2,
4552        /// Reschedules maintenance to a specific time and day.
4553        SpecificTime = 3,
4554    }
4555    impl RescheduleType {
4556        /// String value of the enum field names used in the ProtoBuf definition.
4557        ///
4558        /// The values are not transformed in any way and thus are considered stable
4559        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4560        pub fn as_str_name(&self) -> &'static str {
4561            match self {
4562                Self::Unspecified => "RESCHEDULE_TYPE_UNSPECIFIED",
4563                Self::Immediate => "IMMEDIATE",
4564                Self::NextAvailableWindow => "NEXT_AVAILABLE_WINDOW",
4565                Self::SpecificTime => "SPECIFIC_TIME",
4566            }
4567        }
4568        /// Creates an enum from field names used in the ProtoBuf definition.
4569        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4570            match value {
4571                "RESCHEDULE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
4572                "IMMEDIATE" => Some(Self::Immediate),
4573                "NEXT_AVAILABLE_WINDOW" => Some(Self::NextAvailableWindow),
4574                "SPECIFIC_TIME" => Some(Self::SpecificTime),
4575                _ => None,
4576            }
4577        }
4578    }
4579}
4580/// SslCert insert response.
4581#[derive(Clone, PartialEq, ::prost::Message)]
4582pub struct SslCertsInsertResponse {
4583    /// This is always `sql#sslCertsInsert`.
4584    #[prost(string, tag = "1")]
4585    pub kind: ::prost::alloc::string::String,
4586    /// The operation to track the ssl certs insert request.
4587    #[prost(message, optional, tag = "2")]
4588    pub operation: ::core::option::Option<Operation>,
4589    /// The server Certificate Authority's certificate.  If this is missing you can
4590    /// force a new one to be generated by calling resetSslConfig method on
4591    /// instances resource.
4592    #[prost(message, optional, tag = "3")]
4593    pub server_ca_cert: ::core::option::Option<SslCert>,
4594    /// The new client certificate and private key.
4595    #[prost(message, optional, tag = "4")]
4596    pub client_cert: ::core::option::Option<SslCertDetail>,
4597}
4598/// SslCerts list response.
4599#[derive(Clone, PartialEq, ::prost::Message)]
4600pub struct SslCertsListResponse {
4601    /// This is always `sql#sslCertsList`.
4602    #[prost(string, tag = "1")]
4603    pub kind: ::prost::alloc::string::String,
4604    /// List of client certificates for the instance.
4605    #[prost(message, repeated, tag = "2")]
4606    pub items: ::prost::alloc::vec::Vec<SslCert>,
4607}
4608/// Database Instance truncate log context.
4609#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4610pub struct TruncateLogContext {
4611    /// This is always `sql#truncateLogContext`.
4612    #[prost(string, tag = "1")]
4613    pub kind: ::prost::alloc::string::String,
4614    /// The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and
4615    /// `MYSQL_SLOW_TABLE`.
4616    #[prost(string, tag = "2")]
4617    pub log_type: ::prost::alloc::string::String,
4618}
4619/// Active Directory configuration, relevant only for Cloud SQL for SQL Server.
4620#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4621pub struct SqlActiveDirectoryConfig {
4622    /// This is always sql#activeDirectoryConfig.
4623    #[prost(string, tag = "1")]
4624    pub kind: ::prost::alloc::string::String,
4625    /// The name of the domain (e.g., mydomain.com).
4626    #[prost(string, tag = "2")]
4627    pub domain: ::prost::alloc::string::String,
4628    /// Optional. The mode of the Active Directory configuration.
4629    #[prost(enumeration = "sql_active_directory_config::ActiveDirectoryMode", tag = "3")]
4630    pub mode: i32,
4631    /// Optional. Domain controller IPv4 addresses used to bootstrap Active
4632    /// Directory.
4633    #[prost(string, repeated, tag = "4")]
4634    pub dns_servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4635    /// Optional. The secret manager key storing the administrator credential.
4636    /// (e.g., projects/{project}/secrets/{secret}).
4637    #[prost(string, tag = "5")]
4638    pub admin_credential_secret_name: ::prost::alloc::string::String,
4639    /// Optional. The organizational unit distinguished name. This is the full
4640    /// hierarchical path to the organizational unit.
4641    #[prost(string, tag = "6")]
4642    pub organizational_unit: ::prost::alloc::string::String,
4643}
4644/// Nested message and enum types in `SqlActiveDirectoryConfig`.
4645pub mod sql_active_directory_config {
4646    /// The modes of Active Directory configuration.
4647    #[derive(
4648        Clone,
4649        Copy,
4650        Debug,
4651        PartialEq,
4652        Eq,
4653        Hash,
4654        PartialOrd,
4655        Ord,
4656        ::prost::Enumeration
4657    )]
4658    #[repr(i32)]
4659    pub enum ActiveDirectoryMode {
4660        /// Unspecified mode.
4661        Unspecified = 0,
4662        /// Managed Active Directory mode. This is the fallback option to maintain
4663        /// backward compatibility.
4664        ManagedActiveDirectory = 1,
4665        /// Deprecated: Use CUSTOMER_MANAGED_ACTIVE_DIRECTORY instead.
4666        #[deprecated]
4667        SelfManagedActiveDirectory = 2,
4668        /// Customer-managed Active Directory mode.
4669        CustomerManagedActiveDirectory = 3,
4670    }
4671    impl ActiveDirectoryMode {
4672        /// String value of the enum field names used in the ProtoBuf definition.
4673        ///
4674        /// The values are not transformed in any way and thus are considered stable
4675        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4676        pub fn as_str_name(&self) -> &'static str {
4677            match self {
4678                Self::Unspecified => "ACTIVE_DIRECTORY_MODE_UNSPECIFIED",
4679                Self::ManagedActiveDirectory => "MANAGED_ACTIVE_DIRECTORY",
4680                #[allow(deprecated)]
4681                Self::SelfManagedActiveDirectory => "SELF_MANAGED_ACTIVE_DIRECTORY",
4682                Self::CustomerManagedActiveDirectory => {
4683                    "CUSTOMER_MANAGED_ACTIVE_DIRECTORY"
4684                }
4685            }
4686        }
4687        /// Creates an enum from field names used in the ProtoBuf definition.
4688        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4689            match value {
4690                "ACTIVE_DIRECTORY_MODE_UNSPECIFIED" => Some(Self::Unspecified),
4691                "MANAGED_ACTIVE_DIRECTORY" => Some(Self::ManagedActiveDirectory),
4692                "SELF_MANAGED_ACTIVE_DIRECTORY" => {
4693                    Some(#[allow(deprecated)] Self::SelfManagedActiveDirectory)
4694                }
4695                "CUSTOMER_MANAGED_ACTIVE_DIRECTORY" => {
4696                    Some(Self::CustomerManagedActiveDirectory)
4697                }
4698                _ => None,
4699            }
4700        }
4701    }
4702}
4703/// SQL Server specific audit configuration.
4704#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4705pub struct SqlServerAuditConfig {
4706    /// This is always sql#sqlServerAuditConfig
4707    #[prost(string, tag = "1")]
4708    pub kind: ::prost::alloc::string::String,
4709    /// The name of the destination bucket (e.g., gs://mybucket).
4710    #[prost(string, tag = "2")]
4711    pub bucket: ::prost::alloc::string::String,
4712    /// How long to keep generated audit files.
4713    #[prost(message, optional, tag = "3")]
4714    pub retention_interval: ::core::option::Option<::prost_types::Duration>,
4715    /// How often to upload generated audit files.
4716    #[prost(message, optional, tag = "4")]
4717    pub upload_interval: ::core::option::Option<::prost_types::Duration>,
4718}
4719/// SQL Server Entra ID configuration.
4720#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4721pub struct SqlServerEntraIdConfig {
4722    /// Output only. This is always sql#sqlServerEntraIdConfig
4723    #[prost(string, tag = "1")]
4724    pub kind: ::prost::alloc::string::String,
4725    /// Optional. The tenant ID for the Entra ID configuration.
4726    #[prost(string, tag = "2")]
4727    pub tenant_id: ::prost::alloc::string::String,
4728    /// Optional. The application ID for the Entra ID configuration.
4729    #[prost(string, tag = "3")]
4730    pub application_id: ::prost::alloc::string::String,
4731}
4732/// Connection pool flags for Cloud SQL instances managed connection pool
4733/// configuration.
4734#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4735pub struct ConnectionPoolFlags {
4736    /// Required. The name of the flag.
4737    #[prost(string, tag = "1")]
4738    pub name: ::prost::alloc::string::String,
4739    /// Required. The value of the flag. Boolean flags are set to `on` for true
4740    /// and `off` for false. This field must be omitted if the flag
4741    /// doesn't take a value.
4742    #[prost(string, tag = "2")]
4743    pub value: ::prost::alloc::string::String,
4744}
4745/// The read pool auto-scale configuration.
4746#[derive(Clone, PartialEq, ::prost::Message)]
4747pub struct ReadPoolAutoScaleConfig {
4748    /// Indicates whether read pool auto scaling is enabled.
4749    #[prost(bool, optional, tag = "1")]
4750    pub enabled: ::core::option::Option<bool>,
4751    /// Minimum number of read pool nodes to be maintained.
4752    #[prost(int32, optional, tag = "2")]
4753    pub min_node_count: ::core::option::Option<i32>,
4754    /// Maximum number of read pool nodes to be maintained.
4755    #[prost(int32, optional, tag = "3")]
4756    pub max_node_count: ::core::option::Option<i32>,
4757    /// Optional. Target metrics for read pool auto scaling.
4758    #[prost(message, repeated, tag = "4")]
4759    pub target_metrics: ::prost::alloc::vec::Vec<
4760        read_pool_auto_scale_config::TargetMetric,
4761    >,
4762    /// Indicates whether read pool auto scaling supports scale in operations
4763    /// (removing nodes).
4764    #[prost(bool, optional, tag = "5")]
4765    pub disable_scale_in: ::core::option::Option<bool>,
4766    /// The cooldown period for scale in operations.
4767    #[prost(int32, optional, tag = "6")]
4768    pub scale_in_cooldown_seconds: ::core::option::Option<i32>,
4769    /// The cooldown period for scale out operations.
4770    #[prost(int32, optional, tag = "7")]
4771    pub scale_out_cooldown_seconds: ::core::option::Option<i32>,
4772}
4773/// Nested message and enum types in `ReadPoolAutoScaleConfig`.
4774pub mod read_pool_auto_scale_config {
4775    /// Target metric for read pool auto scaling.
4776    #[derive(Clone, PartialEq, ::prost::Message)]
4777    pub struct TargetMetric {
4778        /// The metric name to be used for auto scaling.
4779        #[prost(string, optional, tag = "1")]
4780        pub metric: ::core::option::Option<::prost::alloc::string::String>,
4781        /// The target value for the metric.
4782        #[prost(float, optional, tag = "2")]
4783        pub target_value: ::core::option::Option<f32>,
4784    }
4785}
4786/// The managed connection pooling configuration.
4787#[derive(Clone, PartialEq, ::prost::Message)]
4788pub struct ConnectionPoolConfig {
4789    /// Whether managed connection pooling is enabled.
4790    #[prost(bool, optional, tag = "1")]
4791    pub connection_pooling_enabled: ::core::option::Option<bool>,
4792    /// Optional. List of connection pool configuration flags.
4793    #[prost(message, repeated, tag = "8")]
4794    pub flags: ::prost::alloc::vec::Vec<ConnectionPoolFlags>,
4795    /// Output only. Number of connection poolers.
4796    #[prost(int32, optional, tag = "9")]
4797    pub pooler_count: ::core::option::Option<i32>,
4798}
4799/// Acquire SSRS lease context.
4800#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4801pub struct AcquireSsrsLeaseContext {
4802    /// The username to be used as the setup login to connect to the database
4803    /// server for SSRS setup.
4804    #[prost(string, optional, tag = "1")]
4805    pub setup_login: ::core::option::Option<::prost::alloc::string::String>,
4806    /// The username to be used as the service login to connect to the report
4807    /// database for SSRS setup.
4808    #[prost(string, optional, tag = "2")]
4809    pub service_login: ::core::option::Option<::prost::alloc::string::String>,
4810    /// The report database to be used for the SSRS setup.
4811    #[prost(string, optional, tag = "3")]
4812    pub report_database: ::core::option::Option<::prost::alloc::string::String>,
4813    /// Lease duration needed for the SSRS setup.
4814    #[prost(message, optional, tag = "4")]
4815    pub duration: ::core::option::Option<::prost_types::Duration>,
4816}
4817#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4818#[repr(i32)]
4819pub enum SqlFileType {
4820    /// Unknown file type.
4821    Unspecified = 0,
4822    /// File containing SQL statements.
4823    Sql = 1,
4824    /// File in CSV format.
4825    Csv = 2,
4826    Bak = 4,
4827    /// TDE certificate.
4828    Tde = 8,
4829}
4830impl SqlFileType {
4831    /// String value of the enum field names used in the ProtoBuf definition.
4832    ///
4833    /// The values are not transformed in any way and thus are considered stable
4834    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4835    pub fn as_str_name(&self) -> &'static str {
4836        match self {
4837            Self::Unspecified => "SQL_FILE_TYPE_UNSPECIFIED",
4838            Self::Sql => "SQL",
4839            Self::Csv => "CSV",
4840            Self::Bak => "BAK",
4841            Self::Tde => "TDE",
4842        }
4843    }
4844    /// Creates an enum from field names used in the ProtoBuf definition.
4845    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4846        match value {
4847            "SQL_FILE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
4848            "SQL" => Some(Self::Sql),
4849            "CSV" => Some(Self::Csv),
4850            "BAK" => Some(Self::Bak),
4851            "TDE" => Some(Self::Tde),
4852            _ => None,
4853        }
4854    }
4855}
4856#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4857#[repr(i32)]
4858pub enum BakType {
4859    /// Default type.
4860    Unspecified = 0,
4861    /// Full backup.
4862    Full = 1,
4863    /// Differential backup.
4864    Diff = 2,
4865    /// SQL Server Transaction Log
4866    Tlog = 3,
4867}
4868impl BakType {
4869    /// String value of the enum field names used in the ProtoBuf definition.
4870    ///
4871    /// The values are not transformed in any way and thus are considered stable
4872    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4873    pub fn as_str_name(&self) -> &'static str {
4874        match self {
4875            Self::Unspecified => "BAK_TYPE_UNSPECIFIED",
4876            Self::Full => "FULL",
4877            Self::Diff => "DIFF",
4878            Self::Tlog => "TLOG",
4879        }
4880    }
4881    /// Creates an enum from field names used in the ProtoBuf definition.
4882    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4883        match value {
4884            "BAK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
4885            "FULL" => Some(Self::Full),
4886            "DIFF" => Some(Self::Diff),
4887            "TLOG" => Some(Self::Tlog),
4888            _ => None,
4889        }
4890    }
4891}
4892/// The type of maintenance to be performed on the instance.
4893#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4894#[repr(i32)]
4895pub enum SqlMaintenanceType {
4896    /// Maintenance type is unspecified.
4897    Unspecified = 0,
4898    /// Indicates that a standalone instance is undergoing maintenance. The
4899    /// instance can be either a primary instance or a replica.
4900    InstanceMaintenance = 1,
4901    /// Indicates that the primary instance and all of its replicas, including
4902    /// cascading replicas, are undergoing maintenance. Maintenance is performed on
4903    /// groups of replicas first, followed by the primary instance.
4904    ReplicaIncludedMaintenance = 2,
4905    /// Indicates that the standalone instance is undergoing maintenance, initiated
4906    /// by self-service. The instance can be either a primary instance or a
4907    /// replica.
4908    InstanceSelfServiceMaintenance = 3,
4909    /// Indicates that the primary instance and all of its replicas are undergoing
4910    /// maintenance, initiated by self-service. Maintenance is performed on groups
4911    /// of replicas first, followed by the primary instance.
4912    ReplicaIncludedSelfServiceMaintenance = 4,
4913}
4914impl SqlMaintenanceType {
4915    /// String value of the enum field names used in the ProtoBuf definition.
4916    ///
4917    /// The values are not transformed in any way and thus are considered stable
4918    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4919    pub fn as_str_name(&self) -> &'static str {
4920        match self {
4921            Self::Unspecified => "SQL_MAINTENANCE_TYPE_UNSPECIFIED",
4922            Self::InstanceMaintenance => "INSTANCE_MAINTENANCE",
4923            Self::ReplicaIncludedMaintenance => "REPLICA_INCLUDED_MAINTENANCE",
4924            Self::InstanceSelfServiceMaintenance => "INSTANCE_SELF_SERVICE_MAINTENANCE",
4925            Self::ReplicaIncludedSelfServiceMaintenance => {
4926                "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE"
4927            }
4928        }
4929    }
4930    /// Creates an enum from field names used in the ProtoBuf definition.
4931    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4932        match value {
4933            "SQL_MAINTENANCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
4934            "INSTANCE_MAINTENANCE" => Some(Self::InstanceMaintenance),
4935            "REPLICA_INCLUDED_MAINTENANCE" => Some(Self::ReplicaIncludedMaintenance),
4936            "INSTANCE_SELF_SERVICE_MAINTENANCE" => {
4937                Some(Self::InstanceSelfServiceMaintenance)
4938            }
4939            "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" => {
4940                Some(Self::ReplicaIncludedSelfServiceMaintenance)
4941            }
4942            _ => None,
4943        }
4944    }
4945}
4946/// The status of a backup run.
4947#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4948#[repr(i32)]
4949pub enum SqlBackupRunStatus {
4950    /// The status of the run is unknown.
4951    Unspecified = 0,
4952    /// The backup operation was enqueued.
4953    Enqueued = 1,
4954    /// The backup is overdue across a given backup window. Indicates a
4955    /// problem. Example: Long-running operation in progress during
4956    /// the whole window.
4957    Overdue = 2,
4958    /// The backup is in progress.
4959    Running = 3,
4960    /// The backup failed.
4961    Failed = 4,
4962    /// The backup was successful.
4963    Successful = 5,
4964    /// The backup was skipped (without problems) for a given backup
4965    /// window. Example: Instance was idle.
4966    Skipped = 6,
4967    /// The backup is about to be deleted.
4968    DeletionPending = 7,
4969    /// The backup deletion failed.
4970    DeletionFailed = 8,
4971    /// The backup has been deleted.
4972    Deleted = 9,
4973}
4974impl SqlBackupRunStatus {
4975    /// String value of the enum field names used in the ProtoBuf definition.
4976    ///
4977    /// The values are not transformed in any way and thus are considered stable
4978    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4979    pub fn as_str_name(&self) -> &'static str {
4980        match self {
4981            Self::Unspecified => "SQL_BACKUP_RUN_STATUS_UNSPECIFIED",
4982            Self::Enqueued => "ENQUEUED",
4983            Self::Overdue => "OVERDUE",
4984            Self::Running => "RUNNING",
4985            Self::Failed => "FAILED",
4986            Self::Successful => "SUCCESSFUL",
4987            Self::Skipped => "SKIPPED",
4988            Self::DeletionPending => "DELETION_PENDING",
4989            Self::DeletionFailed => "DELETION_FAILED",
4990            Self::Deleted => "DELETED",
4991        }
4992    }
4993    /// Creates an enum from field names used in the ProtoBuf definition.
4994    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4995        match value {
4996            "SQL_BACKUP_RUN_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
4997            "ENQUEUED" => Some(Self::Enqueued),
4998            "OVERDUE" => Some(Self::Overdue),
4999            "RUNNING" => Some(Self::Running),
5000            "FAILED" => Some(Self::Failed),
5001            "SUCCESSFUL" => Some(Self::Successful),
5002            "SKIPPED" => Some(Self::Skipped),
5003            "DELETION_PENDING" => Some(Self::DeletionPending),
5004            "DELETION_FAILED" => Some(Self::DeletionFailed),
5005            "DELETED" => Some(Self::Deleted),
5006            _ => None,
5007        }
5008    }
5009}
5010#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5011#[repr(i32)]
5012pub enum SqlBackupRunType {
5013    /// This is an unknown BackupRun type.
5014    Unspecified = 0,
5015    /// The backup schedule automatically triggers a backup.
5016    Automated = 1,
5017    /// The user manually triggers a backup.
5018    OnDemand = 2,
5019}
5020impl SqlBackupRunType {
5021    /// String value of the enum field names used in the ProtoBuf definition.
5022    ///
5023    /// The values are not transformed in any way and thus are considered stable
5024    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5025    pub fn as_str_name(&self) -> &'static str {
5026        match self {
5027            Self::Unspecified => "SQL_BACKUP_RUN_TYPE_UNSPECIFIED",
5028            Self::Automated => "AUTOMATED",
5029            Self::OnDemand => "ON_DEMAND",
5030        }
5031    }
5032    /// Creates an enum from field names used in the ProtoBuf definition.
5033    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5034        match value {
5035            "SQL_BACKUP_RUN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
5036            "AUTOMATED" => Some(Self::Automated),
5037            "ON_DEMAND" => Some(Self::OnDemand),
5038            _ => None,
5039        }
5040    }
5041}
5042/// Defines the supported backup kinds
5043#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5044#[repr(i32)]
5045pub enum SqlBackupKind {
5046    /// This is an unknown BackupKind.
5047    Unspecified = 0,
5048    /// Snapshot-based backups.
5049    Snapshot = 1,
5050    /// Physical backups.
5051    Physical = 2,
5052}
5053impl SqlBackupKind {
5054    /// String value of the enum field names used in the ProtoBuf definition.
5055    ///
5056    /// The values are not transformed in any way and thus are considered stable
5057    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5058    pub fn as_str_name(&self) -> &'static str {
5059        match self {
5060            Self::Unspecified => "SQL_BACKUP_KIND_UNSPECIFIED",
5061            Self::Snapshot => "SNAPSHOT",
5062            Self::Physical => "PHYSICAL",
5063        }
5064    }
5065    /// Creates an enum from field names used in the ProtoBuf definition.
5066    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5067        match value {
5068            "SQL_BACKUP_KIND_UNSPECIFIED" => Some(Self::Unspecified),
5069            "SNAPSHOT" => Some(Self::Snapshot),
5070            "PHYSICAL" => Some(Self::Physical),
5071            _ => None,
5072        }
5073    }
5074}
5075#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5076#[repr(i32)]
5077pub enum SqlBackendType {
5078    /// This is an unknown backend type for instance.
5079    Unspecified = 0,
5080    /// V1 speckle instance.
5081    #[deprecated]
5082    FirstGen = 1,
5083    /// V2 speckle instance.
5084    SecondGen = 2,
5085    /// On premises instance.
5086    External = 3,
5087}
5088impl SqlBackendType {
5089    /// String value of the enum field names used in the ProtoBuf definition.
5090    ///
5091    /// The values are not transformed in any way and thus are considered stable
5092    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5093    pub fn as_str_name(&self) -> &'static str {
5094        match self {
5095            Self::Unspecified => "SQL_BACKEND_TYPE_UNSPECIFIED",
5096            #[allow(deprecated)]
5097            Self::FirstGen => "FIRST_GEN",
5098            Self::SecondGen => "SECOND_GEN",
5099            Self::External => "EXTERNAL",
5100        }
5101    }
5102    /// Creates an enum from field names used in the ProtoBuf definition.
5103    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5104        match value {
5105            "SQL_BACKEND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
5106            "FIRST_GEN" => Some(#[allow(deprecated)] Self::FirstGen),
5107            "SECOND_GEN" => Some(Self::SecondGen),
5108            "EXTERNAL" => Some(Self::External),
5109            _ => None,
5110        }
5111    }
5112}
5113#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5114#[repr(i32)]
5115pub enum SqlIpAddressType {
5116    /// This is an unknown IP address type.
5117    Unspecified = 0,
5118    /// IP address the customer is supposed to connect to. Usually this is the
5119    /// load balancer's IP address
5120    Primary = 1,
5121    /// Source IP address of the connection a read replica establishes to its
5122    /// external primary instance. This IP address can be allowlisted by the
5123    /// customer in case it has a firewall that filters incoming connection to its
5124    /// on premises primary instance.
5125    Outgoing = 2,
5126    /// Private IP used when using private IPs and network peering.
5127    Private = 3,
5128    /// V1 IP of a migrated instance. We want the user to
5129    /// decommission this IP as soon as the migration is complete.
5130    /// Note: V1 instances with V1 ip addresses will be counted as PRIMARY.
5131    Migrated1stGen = 4,
5132}
5133impl SqlIpAddressType {
5134    /// String value of the enum field names used in the ProtoBuf definition.
5135    ///
5136    /// The values are not transformed in any way and thus are considered stable
5137    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5138    pub fn as_str_name(&self) -> &'static str {
5139        match self {
5140            Self::Unspecified => "SQL_IP_ADDRESS_TYPE_UNSPECIFIED",
5141            Self::Primary => "PRIMARY",
5142            Self::Outgoing => "OUTGOING",
5143            Self::Private => "PRIVATE",
5144            Self::Migrated1stGen => "MIGRATED_1ST_GEN",
5145        }
5146    }
5147    /// Creates an enum from field names used in the ProtoBuf definition.
5148    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5149        match value {
5150            "SQL_IP_ADDRESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
5151            "PRIMARY" => Some(Self::Primary),
5152            "OUTGOING" => Some(Self::Outgoing),
5153            "PRIVATE" => Some(Self::Private),
5154            "MIGRATED_1ST_GEN" => Some(Self::Migrated1stGen),
5155            _ => None,
5156        }
5157    }
5158}
5159#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5160#[repr(i32)]
5161pub enum SqlInstanceType {
5162    /// This is an unknown Cloud SQL instance type.
5163    Unspecified = 0,
5164    /// A regular Cloud SQL instance that is not replicating from a primary
5165    /// instance.
5166    CloudSqlInstance = 1,
5167    /// An instance running on the customer's premises that is not managed by
5168    /// Cloud SQL.
5169    OnPremisesInstance = 2,
5170    /// A Cloud SQL instance acting as a read-replica.
5171    ReadReplicaInstance = 3,
5172    /// A Cloud SQL read pool.
5173    ReadPoolInstance = 5,
5174}
5175impl SqlInstanceType {
5176    /// String value of the enum field names used in the ProtoBuf definition.
5177    ///
5178    /// The values are not transformed in any way and thus are considered stable
5179    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5180    pub fn as_str_name(&self) -> &'static str {
5181        match self {
5182            Self::Unspecified => "SQL_INSTANCE_TYPE_UNSPECIFIED",
5183            Self::CloudSqlInstance => "CLOUD_SQL_INSTANCE",
5184            Self::OnPremisesInstance => "ON_PREMISES_INSTANCE",
5185            Self::ReadReplicaInstance => "READ_REPLICA_INSTANCE",
5186            Self::ReadPoolInstance => "READ_POOL_INSTANCE",
5187        }
5188    }
5189    /// Creates an enum from field names used in the ProtoBuf definition.
5190    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5191        match value {
5192            "SQL_INSTANCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
5193            "CLOUD_SQL_INSTANCE" => Some(Self::CloudSqlInstance),
5194            "ON_PREMISES_INSTANCE" => Some(Self::OnPremisesInstance),
5195            "READ_REPLICA_INSTANCE" => Some(Self::ReadReplicaInstance),
5196            "READ_POOL_INSTANCE" => Some(Self::ReadPoolInstance),
5197            _ => None,
5198        }
5199    }
5200}
5201/// The database engine type and version.
5202#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5203#[repr(i32)]
5204pub enum SqlDatabaseVersion {
5205    /// This is an unknown database version.
5206    Unspecified = 0,
5207    /// The database version is MySQL 5.1.
5208    #[deprecated]
5209    Mysql51 = 2,
5210    /// The database version is MySQL 5.5.
5211    #[deprecated]
5212    Mysql55 = 3,
5213    /// The database version is MySQL 5.6.
5214    Mysql56 = 5,
5215    /// The database version is MySQL 5.7.
5216    Mysql57 = 6,
5217    /// The database version is MySQL 8.
5218    Mysql80 = 20,
5219    /// The database major version is MySQL 8.0 and the minor version is 18.
5220    Mysql8018 = 41,
5221    /// The database major version is MySQL 8.0 and the minor version is 26.
5222    Mysql8026 = 85,
5223    /// The database major version is MySQL 8.0 and the minor version is 27.
5224    Mysql8027 = 111,
5225    /// The database major version is MySQL 8.0 and the minor version is 28.
5226    Mysql8028 = 132,
5227    /// The database major version is MySQL 8.0 and the minor version is 29.
5228    #[deprecated]
5229    Mysql8029 = 148,
5230    /// The database major version is MySQL 8.0 and the minor version is 30.
5231    Mysql8030 = 174,
5232    /// The database major version is MySQL 8.0 and the minor version is 31.
5233    Mysql8031 = 197,
5234    /// The database major version is MySQL 8.0 and the minor version is 32.
5235    Mysql8032 = 213,
5236    /// The database major version is MySQL 8.0 and the minor version is 33.
5237    Mysql8033 = 238,
5238    /// The database major version is MySQL 8.0 and the minor version is 34.
5239    Mysql8034 = 239,
5240    /// The database major version is MySQL 8.0 and the minor version is 35.
5241    Mysql8035 = 240,
5242    /// The database major version is MySQL 8.0 and the minor version is 36.
5243    Mysql8036 = 241,
5244    /// The database major version is MySQL 8.0 and the minor version is 37.
5245    Mysql8037 = 355,
5246    /// The database major version is MySQL 8.0 and the minor version is 39.
5247    Mysql8039 = 357,
5248    /// The database major version is MySQL 8.0 and the minor version is 40.
5249    Mysql8040 = 358,
5250    /// The database major version is MySQL 8.0 and the minor version is 41.
5251    Mysql8041 = 488,
5252    /// The database major version is MySQL 8.0 and the minor version is 42.
5253    Mysql8042 = 489,
5254    /// The database major version is MySQL 8.0 and the minor version is 43.
5255    Mysql8043 = 553,
5256    /// The database major version is MySQL 8.0 and the minor version is 44.
5257    Mysql8044 = 554,
5258    /// The database major version is MySQL 8.0 and the minor version is 45.
5259    Mysql8045 = 555,
5260    /// The database major version is MySQL 8.0 and the minor version is 46.
5261    Mysql8046 = 556,
5262    /// The database version is MySQL 8.4.
5263    Mysql84 = 398,
5264    /// The database version is MySQL 9.7.
5265    Mysql97 = 654,
5266    /// The database version is SQL Server 2017 Standard.
5267    Sqlserver2017Standard = 11,
5268    /// The database version is SQL Server 2017 Enterprise.
5269    Sqlserver2017Enterprise = 14,
5270    /// The database version is SQL Server 2017 Express.
5271    Sqlserver2017Express = 15,
5272    /// The database version is SQL Server 2017 Web.
5273    Sqlserver2017Web = 16,
5274    /// The database version is PostgreSQL 9.6.
5275    Postgres96 = 9,
5276    /// The database version is PostgreSQL 10.
5277    Postgres10 = 18,
5278    /// The database version is PostgreSQL 11.
5279    Postgres11 = 10,
5280    /// The database version is PostgreSQL 12.
5281    Postgres12 = 19,
5282    /// The database version is PostgreSQL 13.
5283    Postgres13 = 23,
5284    /// The database version is PostgreSQL 14.
5285    Postgres14 = 110,
5286    /// The database version is PostgreSQL 15.
5287    Postgres15 = 172,
5288    /// The database version is PostgreSQL 16.
5289    Postgres16 = 272,
5290    /// The database version is PostgreSQL 17.
5291    Postgres17 = 408,
5292    /// The database version is PostgreSQL 18.
5293    Postgres18 = 557,
5294    /// The database version is SQL Server 2019 Standard.
5295    Sqlserver2019Standard = 26,
5296    /// The database version is SQL Server 2019 Enterprise.
5297    Sqlserver2019Enterprise = 27,
5298    /// The database version is SQL Server 2019 Express.
5299    Sqlserver2019Express = 28,
5300    /// The database version is SQL Server 2019 Web.
5301    Sqlserver2019Web = 29,
5302    /// The database version is SQL Server 2022 Standard.
5303    Sqlserver2022Standard = 199,
5304    /// The database version is SQL Server 2022 Enterprise.
5305    Sqlserver2022Enterprise = 200,
5306    /// The database version is SQL Server 2022 Express.
5307    Sqlserver2022Express = 201,
5308    /// The database version is SQL Server 2022 Web.
5309    Sqlserver2022Web = 202,
5310}
5311impl SqlDatabaseVersion {
5312    /// String value of the enum field names used in the ProtoBuf definition.
5313    ///
5314    /// The values are not transformed in any way and thus are considered stable
5315    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5316    pub fn as_str_name(&self) -> &'static str {
5317        match self {
5318            Self::Unspecified => "SQL_DATABASE_VERSION_UNSPECIFIED",
5319            #[allow(deprecated)]
5320            Self::Mysql51 => "MYSQL_5_1",
5321            #[allow(deprecated)]
5322            Self::Mysql55 => "MYSQL_5_5",
5323            Self::Mysql56 => "MYSQL_5_6",
5324            Self::Mysql57 => "MYSQL_5_7",
5325            Self::Mysql80 => "MYSQL_8_0",
5326            Self::Mysql8018 => "MYSQL_8_0_18",
5327            Self::Mysql8026 => "MYSQL_8_0_26",
5328            Self::Mysql8027 => "MYSQL_8_0_27",
5329            Self::Mysql8028 => "MYSQL_8_0_28",
5330            #[allow(deprecated)]
5331            Self::Mysql8029 => "MYSQL_8_0_29",
5332            Self::Mysql8030 => "MYSQL_8_0_30",
5333            Self::Mysql8031 => "MYSQL_8_0_31",
5334            Self::Mysql8032 => "MYSQL_8_0_32",
5335            Self::Mysql8033 => "MYSQL_8_0_33",
5336            Self::Mysql8034 => "MYSQL_8_0_34",
5337            Self::Mysql8035 => "MYSQL_8_0_35",
5338            Self::Mysql8036 => "MYSQL_8_0_36",
5339            Self::Mysql8037 => "MYSQL_8_0_37",
5340            Self::Mysql8039 => "MYSQL_8_0_39",
5341            Self::Mysql8040 => "MYSQL_8_0_40",
5342            Self::Mysql8041 => "MYSQL_8_0_41",
5343            Self::Mysql8042 => "MYSQL_8_0_42",
5344            Self::Mysql8043 => "MYSQL_8_0_43",
5345            Self::Mysql8044 => "MYSQL_8_0_44",
5346            Self::Mysql8045 => "MYSQL_8_0_45",
5347            Self::Mysql8046 => "MYSQL_8_0_46",
5348            Self::Mysql84 => "MYSQL_8_4",
5349            Self::Mysql97 => "MYSQL_9_7",
5350            Self::Sqlserver2017Standard => "SQLSERVER_2017_STANDARD",
5351            Self::Sqlserver2017Enterprise => "SQLSERVER_2017_ENTERPRISE",
5352            Self::Sqlserver2017Express => "SQLSERVER_2017_EXPRESS",
5353            Self::Sqlserver2017Web => "SQLSERVER_2017_WEB",
5354            Self::Postgres96 => "POSTGRES_9_6",
5355            Self::Postgres10 => "POSTGRES_10",
5356            Self::Postgres11 => "POSTGRES_11",
5357            Self::Postgres12 => "POSTGRES_12",
5358            Self::Postgres13 => "POSTGRES_13",
5359            Self::Postgres14 => "POSTGRES_14",
5360            Self::Postgres15 => "POSTGRES_15",
5361            Self::Postgres16 => "POSTGRES_16",
5362            Self::Postgres17 => "POSTGRES_17",
5363            Self::Postgres18 => "POSTGRES_18",
5364            Self::Sqlserver2019Standard => "SQLSERVER_2019_STANDARD",
5365            Self::Sqlserver2019Enterprise => "SQLSERVER_2019_ENTERPRISE",
5366            Self::Sqlserver2019Express => "SQLSERVER_2019_EXPRESS",
5367            Self::Sqlserver2019Web => "SQLSERVER_2019_WEB",
5368            Self::Sqlserver2022Standard => "SQLSERVER_2022_STANDARD",
5369            Self::Sqlserver2022Enterprise => "SQLSERVER_2022_ENTERPRISE",
5370            Self::Sqlserver2022Express => "SQLSERVER_2022_EXPRESS",
5371            Self::Sqlserver2022Web => "SQLSERVER_2022_WEB",
5372        }
5373    }
5374    /// Creates an enum from field names used in the ProtoBuf definition.
5375    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5376        match value {
5377            "SQL_DATABASE_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
5378            "MYSQL_5_1" => Some(#[allow(deprecated)] Self::Mysql51),
5379            "MYSQL_5_5" => Some(#[allow(deprecated)] Self::Mysql55),
5380            "MYSQL_5_6" => Some(Self::Mysql56),
5381            "MYSQL_5_7" => Some(Self::Mysql57),
5382            "MYSQL_8_0" => Some(Self::Mysql80),
5383            "MYSQL_8_0_18" => Some(Self::Mysql8018),
5384            "MYSQL_8_0_26" => Some(Self::Mysql8026),
5385            "MYSQL_8_0_27" => Some(Self::Mysql8027),
5386            "MYSQL_8_0_28" => Some(Self::Mysql8028),
5387            "MYSQL_8_0_29" => Some(#[allow(deprecated)] Self::Mysql8029),
5388            "MYSQL_8_0_30" => Some(Self::Mysql8030),
5389            "MYSQL_8_0_31" => Some(Self::Mysql8031),
5390            "MYSQL_8_0_32" => Some(Self::Mysql8032),
5391            "MYSQL_8_0_33" => Some(Self::Mysql8033),
5392            "MYSQL_8_0_34" => Some(Self::Mysql8034),
5393            "MYSQL_8_0_35" => Some(Self::Mysql8035),
5394            "MYSQL_8_0_36" => Some(Self::Mysql8036),
5395            "MYSQL_8_0_37" => Some(Self::Mysql8037),
5396            "MYSQL_8_0_39" => Some(Self::Mysql8039),
5397            "MYSQL_8_0_40" => Some(Self::Mysql8040),
5398            "MYSQL_8_0_41" => Some(Self::Mysql8041),
5399            "MYSQL_8_0_42" => Some(Self::Mysql8042),
5400            "MYSQL_8_0_43" => Some(Self::Mysql8043),
5401            "MYSQL_8_0_44" => Some(Self::Mysql8044),
5402            "MYSQL_8_0_45" => Some(Self::Mysql8045),
5403            "MYSQL_8_0_46" => Some(Self::Mysql8046),
5404            "MYSQL_8_4" => Some(Self::Mysql84),
5405            "MYSQL_9_7" => Some(Self::Mysql97),
5406            "SQLSERVER_2017_STANDARD" => Some(Self::Sqlserver2017Standard),
5407            "SQLSERVER_2017_ENTERPRISE" => Some(Self::Sqlserver2017Enterprise),
5408            "SQLSERVER_2017_EXPRESS" => Some(Self::Sqlserver2017Express),
5409            "SQLSERVER_2017_WEB" => Some(Self::Sqlserver2017Web),
5410            "POSTGRES_9_6" => Some(Self::Postgres96),
5411            "POSTGRES_10" => Some(Self::Postgres10),
5412            "POSTGRES_11" => Some(Self::Postgres11),
5413            "POSTGRES_12" => Some(Self::Postgres12),
5414            "POSTGRES_13" => Some(Self::Postgres13),
5415            "POSTGRES_14" => Some(Self::Postgres14),
5416            "POSTGRES_15" => Some(Self::Postgres15),
5417            "POSTGRES_16" => Some(Self::Postgres16),
5418            "POSTGRES_17" => Some(Self::Postgres17),
5419            "POSTGRES_18" => Some(Self::Postgres18),
5420            "SQLSERVER_2019_STANDARD" => Some(Self::Sqlserver2019Standard),
5421            "SQLSERVER_2019_ENTERPRISE" => Some(Self::Sqlserver2019Enterprise),
5422            "SQLSERVER_2019_EXPRESS" => Some(Self::Sqlserver2019Express),
5423            "SQLSERVER_2019_WEB" => Some(Self::Sqlserver2019Web),
5424            "SQLSERVER_2022_STANDARD" => Some(Self::Sqlserver2022Standard),
5425            "SQLSERVER_2022_ENTERPRISE" => Some(Self::Sqlserver2022Enterprise),
5426            "SQLSERVER_2022_EXPRESS" => Some(Self::Sqlserver2022Express),
5427            "SQLSERVER_2022_WEB" => Some(Self::Sqlserver2022Web),
5428            _ => None,
5429        }
5430    }
5431}
5432/// The suspension reason of the database instance if the state is SUSPENDED.
5433#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5434#[repr(i32)]
5435pub enum SqlSuspensionReason {
5436    /// This is an unknown suspension reason.
5437    Unspecified = 0,
5438    /// The instance is suspended due to billing issues (for example:, account
5439    /// issue)
5440    BillingIssue = 2,
5441    /// The instance is suspended due to illegal content (for example:, child
5442    /// pornography, copyrighted material, etc.).
5443    LegalIssue = 3,
5444    /// The instance is causing operational issues (for example:, causing the
5445    /// database to crash).
5446    OperationalIssue = 4,
5447    /// The KMS key used by the instance is either revoked or denied access to
5448    KmsKeyIssue = 5,
5449}
5450impl SqlSuspensionReason {
5451    /// String value of the enum field names used in the ProtoBuf definition.
5452    ///
5453    /// The values are not transformed in any way and thus are considered stable
5454    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5455    pub fn as_str_name(&self) -> &'static str {
5456        match self {
5457            Self::Unspecified => "SQL_SUSPENSION_REASON_UNSPECIFIED",
5458            Self::BillingIssue => "BILLING_ISSUE",
5459            Self::LegalIssue => "LEGAL_ISSUE",
5460            Self::OperationalIssue => "OPERATIONAL_ISSUE",
5461            Self::KmsKeyIssue => "KMS_KEY_ISSUE",
5462        }
5463    }
5464    /// Creates an enum from field names used in the ProtoBuf definition.
5465    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5466        match value {
5467            "SQL_SUSPENSION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
5468            "BILLING_ISSUE" => Some(Self::BillingIssue),
5469            "LEGAL_ISSUE" => Some(Self::LegalIssue),
5470            "OPERATIONAL_ISSUE" => Some(Self::OperationalIssue),
5471            "KMS_KEY_ISSUE" => Some(Self::KmsKeyIssue),
5472            _ => None,
5473        }
5474    }
5475}
5476/// The pricing plan for this instance.
5477#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5478#[repr(i32)]
5479pub enum SqlPricingPlan {
5480    /// This is an unknown pricing plan for this instance.
5481    Unspecified = 0,
5482    /// The instance is billed at a monthly flat rate.
5483    Package = 1,
5484    /// The instance is billed per usage.
5485    PerUse = 2,
5486}
5487impl SqlPricingPlan {
5488    /// String value of the enum field names used in the ProtoBuf definition.
5489    ///
5490    /// The values are not transformed in any way and thus are considered stable
5491    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5492    pub fn as_str_name(&self) -> &'static str {
5493        match self {
5494            Self::Unspecified => "SQL_PRICING_PLAN_UNSPECIFIED",
5495            Self::Package => "PACKAGE",
5496            Self::PerUse => "PER_USE",
5497        }
5498    }
5499    /// Creates an enum from field names used in the ProtoBuf definition.
5500    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5501        match value {
5502            "SQL_PRICING_PLAN_UNSPECIFIED" => Some(Self::Unspecified),
5503            "PACKAGE" => Some(Self::Package),
5504            "PER_USE" => Some(Self::PerUse),
5505            _ => None,
5506        }
5507    }
5508}
5509#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5510#[repr(i32)]
5511pub enum SqlReplicationType {
5512    /// This is an unknown replication type for a Cloud SQL instance.
5513    Unspecified = 0,
5514    /// The synchronous replication mode for First Generation instances. It is the
5515    /// default value.
5516    Synchronous = 1,
5517    /// The asynchronous replication mode for First Generation instances. It
5518    /// provides a slight performance gain, but if an outage occurs while this
5519    /// option is set to asynchronous, you can lose up to a few seconds of updates
5520    /// to your data.
5521    Asynchronous = 2,
5522}
5523impl SqlReplicationType {
5524    /// String value of the enum field names used in the ProtoBuf definition.
5525    ///
5526    /// The values are not transformed in any way and thus are considered stable
5527    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5528    pub fn as_str_name(&self) -> &'static str {
5529        match self {
5530            Self::Unspecified => "SQL_REPLICATION_TYPE_UNSPECIFIED",
5531            Self::Synchronous => "SYNCHRONOUS",
5532            Self::Asynchronous => "ASYNCHRONOUS",
5533        }
5534    }
5535    /// Creates an enum from field names used in the ProtoBuf definition.
5536    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5537        match value {
5538            "SQL_REPLICATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
5539            "SYNCHRONOUS" => Some(Self::Synchronous),
5540            "ASYNCHRONOUS" => Some(Self::Asynchronous),
5541            _ => None,
5542        }
5543    }
5544}
5545/// The type of disk that is used for a v2 instance to use.
5546#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5547#[repr(i32)]
5548pub enum SqlDataDiskType {
5549    /// This is an unknown data disk type.
5550    Unspecified = 0,
5551    /// An SSD data disk.
5552    PdSsd = 1,
5553    /// An HDD data disk.
5554    PdHdd = 2,
5555    /// This field is deprecated and will be removed from a future version of the
5556    /// API.
5557    #[deprecated]
5558    ObsoleteLocalSsd = 3,
5559    /// A Hyperdisk Balanced data disk.
5560    HyperdiskBalanced = 4,
5561}
5562impl SqlDataDiskType {
5563    /// String value of the enum field names used in the ProtoBuf definition.
5564    ///
5565    /// The values are not transformed in any way and thus are considered stable
5566    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5567    pub fn as_str_name(&self) -> &'static str {
5568        match self {
5569            Self::Unspecified => "SQL_DATA_DISK_TYPE_UNSPECIFIED",
5570            Self::PdSsd => "PD_SSD",
5571            Self::PdHdd => "PD_HDD",
5572            #[allow(deprecated)]
5573            Self::ObsoleteLocalSsd => "OBSOLETE_LOCAL_SSD",
5574            Self::HyperdiskBalanced => "HYPERDISK_BALANCED",
5575        }
5576    }
5577    /// Creates an enum from field names used in the ProtoBuf definition.
5578    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5579        match value {
5580            "SQL_DATA_DISK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
5581            "PD_SSD" => Some(Self::PdSsd),
5582            "PD_HDD" => Some(Self::PdHdd),
5583            "OBSOLETE_LOCAL_SSD" => Some(#[allow(deprecated)] Self::ObsoleteLocalSsd),
5584            "HYPERDISK_BALANCED" => Some(Self::HyperdiskBalanced),
5585            _ => None,
5586        }
5587    }
5588}
5589/// The availability type of the given Cloud SQL instance.
5590#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5591#[repr(i32)]
5592pub enum SqlAvailabilityType {
5593    /// This is an unknown Availability type.
5594    Unspecified = 0,
5595    /// Zonal available instance.
5596    Zonal = 1,
5597    /// Regional available instance.
5598    Regional = 2,
5599}
5600impl SqlAvailabilityType {
5601    /// String value of the enum field names used in the ProtoBuf definition.
5602    ///
5603    /// The values are not transformed in any way and thus are considered stable
5604    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5605    pub fn as_str_name(&self) -> &'static str {
5606        match self {
5607            Self::Unspecified => "SQL_AVAILABILITY_TYPE_UNSPECIFIED",
5608            Self::Zonal => "ZONAL",
5609            Self::Regional => "REGIONAL",
5610        }
5611    }
5612    /// Creates an enum from field names used in the ProtoBuf definition.
5613    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5614        match value {
5615            "SQL_AVAILABILITY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
5616            "ZONAL" => Some(Self::Zonal),
5617            "REGIONAL" => Some(Self::Regional),
5618            _ => None,
5619        }
5620    }
5621}
5622#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5623#[repr(i32)]
5624pub enum SqlUpdateTrack {
5625    /// This is an unknown maintenance timing preference.
5626    Unspecified = 0,
5627    /// For an instance with a scheduled maintenance window, this maintenance
5628    /// timing indicates that the maintenance update is scheduled 7 to 14 days
5629    /// after the notification is sent out. Also referred to as `Week 1` (Console)
5630    /// and `preview` (gcloud CLI).
5631    Canary = 1,
5632    /// For an instance with a scheduled maintenance window, this maintenance
5633    /// timing indicates that the maintenance update is scheduled 15 to 21 days
5634    /// after the notification is sent out. Also referred to as `Week 2` (Console)
5635    /// and `production` (gcloud CLI).
5636    Stable = 2,
5637    /// For instance with a scheduled maintenance window, this maintenance
5638    /// timing indicates that the maintenance update is scheduled 35 to 42 days
5639    /// after the notification is sent out.
5640    Week5 = 3,
5641}
5642impl SqlUpdateTrack {
5643    /// String value of the enum field names used in the ProtoBuf definition.
5644    ///
5645    /// The values are not transformed in any way and thus are considered stable
5646    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5647    pub fn as_str_name(&self) -> &'static str {
5648        match self {
5649            Self::Unspecified => "SQL_UPDATE_TRACK_UNSPECIFIED",
5650            Self::Canary => "canary",
5651            Self::Stable => "stable",
5652            Self::Week5 => "week5",
5653        }
5654    }
5655    /// Creates an enum from field names used in the ProtoBuf definition.
5656    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5657        match value {
5658            "SQL_UPDATE_TRACK_UNSPECIFIED" => Some(Self::Unspecified),
5659            "canary" => Some(Self::Canary),
5660            "stable" => Some(Self::Stable),
5661            "week5" => Some(Self::Week5),
5662            _ => None,
5663        }
5664    }
5665}
5666#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5667#[repr(i32)]
5668pub enum SqlFlagType {
5669    /// This is an unknown flag type.
5670    Unspecified = 0,
5671    /// Boolean type flag.
5672    Boolean = 1,
5673    /// String type flag.
5674    String = 2,
5675    /// Integer type flag.
5676    Integer = 3,
5677    /// Flag type used for a server startup option.
5678    None = 4,
5679    /// Type introduced specially for MySQL TimeZone offset. Accept a string value
5680    /// with the format \[-12:59, 13:00\].
5681    MysqlTimezoneOffset = 5,
5682    /// Float type flag.
5683    Float = 6,
5684    /// Comma-separated list of the strings in a SqlFlagType enum.
5685    RepeatedString = 7,
5686}
5687impl SqlFlagType {
5688    /// String value of the enum field names used in the ProtoBuf definition.
5689    ///
5690    /// The values are not transformed in any way and thus are considered stable
5691    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5692    pub fn as_str_name(&self) -> &'static str {
5693        match self {
5694            Self::Unspecified => "SQL_FLAG_TYPE_UNSPECIFIED",
5695            Self::Boolean => "BOOLEAN",
5696            Self::String => "STRING",
5697            Self::Integer => "INTEGER",
5698            Self::None => "NONE",
5699            Self::MysqlTimezoneOffset => "MYSQL_TIMEZONE_OFFSET",
5700            Self::Float => "FLOAT",
5701            Self::RepeatedString => "REPEATED_STRING",
5702        }
5703    }
5704    /// Creates an enum from field names used in the ProtoBuf definition.
5705    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5706        match value {
5707            "SQL_FLAG_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
5708            "BOOLEAN" => Some(Self::Boolean),
5709            "STRING" => Some(Self::String),
5710            "INTEGER" => Some(Self::Integer),
5711            "NONE" => Some(Self::None),
5712            "MYSQL_TIMEZONE_OFFSET" => Some(Self::MysqlTimezoneOffset),
5713            "FLOAT" => Some(Self::Float),
5714            "REPEATED_STRING" => Some(Self::RepeatedString),
5715            _ => None,
5716        }
5717    }
5718}
5719/// Scopes of a flag describe where the flag is used.
5720#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5721#[repr(i32)]
5722pub enum SqlFlagScope {
5723    /// Assume database flags if unspecified
5724    Unspecified = 0,
5725    /// database flags
5726    Database = 1,
5727    /// connection pool configuration flags
5728    ConnectionPool = 2,
5729}
5730impl SqlFlagScope {
5731    /// String value of the enum field names used in the ProtoBuf definition.
5732    ///
5733    /// The values are not transformed in any way and thus are considered stable
5734    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5735    pub fn as_str_name(&self) -> &'static str {
5736        match self {
5737            Self::Unspecified => "SQL_FLAG_SCOPE_UNSPECIFIED",
5738            Self::Database => "SQL_FLAG_SCOPE_DATABASE",
5739            Self::ConnectionPool => "SQL_FLAG_SCOPE_CONNECTION_POOL",
5740        }
5741    }
5742    /// Creates an enum from field names used in the ProtoBuf definition.
5743    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5744        match value {
5745            "SQL_FLAG_SCOPE_UNSPECIFIED" => Some(Self::Unspecified),
5746            "SQL_FLAG_SCOPE_DATABASE" => Some(Self::Database),
5747            "SQL_FLAG_SCOPE_CONNECTION_POOL" => Some(Self::ConnectionPool),
5748            _ => None,
5749        }
5750    }
5751}
5752/// The request payload to create the backup
5753#[derive(Clone, PartialEq, ::prost::Message)]
5754pub struct CreateBackupRequest {
5755    /// Required. The parent resource where this backup is created.
5756    /// Format: projects/{project}
5757    #[prost(string, tag = "1")]
5758    pub parent: ::prost::alloc::string::String,
5759    /// Required. The Backup to create.
5760    #[prost(message, optional, tag = "2")]
5761    pub backup: ::core::option::Option<Backup>,
5762}
5763/// The request payload to get the backup.
5764#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5765pub struct GetBackupRequest {
5766    /// Required. The name of the backup to retrieve.
5767    /// Format: projects/{project}/backups/{backup}
5768    #[prost(string, tag = "1")]
5769    pub name: ::prost::alloc::string::String,
5770}
5771/// The request payload to list the backups.
5772#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5773pub struct ListBackupsRequest {
5774    /// Required. The parent that owns this collection of backups.
5775    /// Format: projects/{project}
5776    #[prost(string, tag = "1")]
5777    pub parent: ::prost::alloc::string::String,
5778    /// The maximum number of backups to return per response. The service might
5779    /// return fewer backups than this value. If a value for this parameter isn't
5780    /// specified, then, at most, 500 backups are returned. The maximum value is
5781    /// 2,000. Any values that you set, which are greater than 2,000, are changed
5782    /// to 2,000.
5783    #[prost(int32, tag = "2")]
5784    pub page_size: i32,
5785    /// A page token, received from a previous `ListBackups` call.
5786    /// Provide this to retrieve the subsequent page.
5787    ///
5788    /// When paginating, all other parameters provided to `ListBackups` must match
5789    /// the call that provided the page token.
5790    #[prost(string, tag = "3")]
5791    pub page_token: ::prost::alloc::string::String,
5792    /// Multiple filter queries are separated by spaces. For example,
5793    /// 'instance:abc AND type:FINAL, 'location:us',
5794    /// 'backupInterval.startTime>=1950-01-01T01:01:25.771Z'. You can filter by
5795    /// type, instance, backupInterval.startTime (creation time), or location.
5796    #[prost(string, tag = "4")]
5797    pub filter: ::prost::alloc::string::String,
5798}
5799/// The response payload containing a list of the backups.
5800#[derive(Clone, PartialEq, ::prost::Message)]
5801pub struct ListBackupsResponse {
5802    /// A list of backups.
5803    #[prost(message, repeated, tag = "1")]
5804    pub backups: ::prost::alloc::vec::Vec<Backup>,
5805    /// A token, which can be sent as `page_token` to retrieve the next page.
5806    /// If this field is omitted, then there aren't subsequent pages.
5807    #[prost(string, tag = "2")]
5808    pub next_page_token: ::prost::alloc::string::String,
5809    /// If a region isn't unavailable or if an unknown error occurs, then a warning
5810    /// message is returned.
5811    #[prost(message, repeated, tag = "3")]
5812    pub warnings: ::prost::alloc::vec::Vec<ApiWarning>,
5813}
5814/// The request payload to update the backup.
5815#[derive(Clone, PartialEq, ::prost::Message)]
5816pub struct UpdateBackupRequest {
5817    /// Required. The backup to update.
5818    /// The backup’s `name` field is used to identify the backup to update.
5819    /// Format: projects/{project}/backups/{backup}
5820    #[prost(message, optional, tag = "1")]
5821    pub backup: ::core::option::Option<Backup>,
5822    /// The list of fields that you can update. You can update only the description
5823    /// and retention period of the final backup.
5824    #[prost(message, optional, tag = "2")]
5825    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
5826}
5827/// The request payload to delete the backup.
5828#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5829pub struct DeleteBackupRequest {
5830    /// Required. The name of the backup to delete.
5831    /// Format: projects/{project}/backups/{backup}
5832    #[prost(string, tag = "1")]
5833    pub name: ::prost::alloc::string::String,
5834}
5835#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5836pub struct SqlBackupRunsDeleteRequest {
5837    /// The ID of the backup run to delete. To find a backup run ID, use the
5838    /// [list](<https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/list>)
5839    /// method.
5840    #[prost(int64, tag = "1")]
5841    pub id: i64,
5842    /// Cloud SQL instance ID. This does not include the project ID.
5843    #[prost(string, tag = "2")]
5844    pub instance: ::prost::alloc::string::String,
5845    /// Project ID of the project that contains the instance.
5846    #[prost(string, tag = "3")]
5847    pub project: ::prost::alloc::string::String,
5848}
5849#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5850pub struct SqlBackupRunsGetRequest {
5851    /// The ID of this backup run.
5852    #[prost(int64, tag = "1")]
5853    pub id: i64,
5854    /// Cloud SQL instance ID. This does not include the project ID.
5855    #[prost(string, tag = "2")]
5856    pub instance: ::prost::alloc::string::String,
5857    /// Project ID of the project that contains the instance.
5858    #[prost(string, tag = "3")]
5859    pub project: ::prost::alloc::string::String,
5860}
5861#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5862pub struct SqlBackupRunsInsertRequest {
5863    /// Cloud SQL instance ID. This does not include the project ID.
5864    #[prost(string, tag = "1")]
5865    pub instance: ::prost::alloc::string::String,
5866    /// Project ID of the project that contains the instance.
5867    #[prost(string, tag = "2")]
5868    pub project: ::prost::alloc::string::String,
5869    #[prost(message, optional, tag = "100")]
5870    pub body: ::core::option::Option<BackupRun>,
5871}
5872#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5873pub struct SqlBackupRunsListRequest {
5874    /// Cloud SQL instance ID, or "-" for all instances. This does not include
5875    /// the project ID.
5876    #[prost(string, tag = "1")]
5877    pub instance: ::prost::alloc::string::String,
5878    /// Maximum number of backup runs per response.
5879    #[prost(int32, tag = "2")]
5880    pub max_results: i32,
5881    /// A previously-returned page token representing part of the larger set of
5882    /// results to view.
5883    #[prost(string, tag = "3")]
5884    pub page_token: ::prost::alloc::string::String,
5885    /// Project ID of the project that contains the instance.
5886    #[prost(string, tag = "4")]
5887    pub project: ::prost::alloc::string::String,
5888}
5889#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5890pub struct SqlDatabasesDeleteRequest {
5891    /// Name of the database to be deleted in the instance.
5892    #[prost(string, tag = "1")]
5893    pub database: ::prost::alloc::string::String,
5894    /// Database instance ID. This does not include the project ID.
5895    #[prost(string, tag = "2")]
5896    pub instance: ::prost::alloc::string::String,
5897    /// Project ID of the project that contains the instance.
5898    #[prost(string, tag = "3")]
5899    pub project: ::prost::alloc::string::String,
5900}
5901#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5902pub struct SqlDatabasesGetRequest {
5903    /// Name of the database in the instance.
5904    #[prost(string, tag = "1")]
5905    pub database: ::prost::alloc::string::String,
5906    /// Database instance ID. This does not include the project ID.
5907    #[prost(string, tag = "2")]
5908    pub instance: ::prost::alloc::string::String,
5909    /// Project ID of the project that contains the instance.
5910    #[prost(string, tag = "3")]
5911    pub project: ::prost::alloc::string::String,
5912}
5913#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5914pub struct SqlDatabasesInsertRequest {
5915    /// Database instance ID. This does not include the project ID.
5916    #[prost(string, tag = "1")]
5917    pub instance: ::prost::alloc::string::String,
5918    /// Project ID of the project that contains the instance.
5919    #[prost(string, tag = "2")]
5920    pub project: ::prost::alloc::string::String,
5921    #[prost(message, optional, tag = "100")]
5922    pub body: ::core::option::Option<Database>,
5923}
5924#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5925pub struct SqlDatabasesListRequest {
5926    /// Cloud SQL instance ID. This does not include the project ID.
5927    #[prost(string, tag = "1")]
5928    pub instance: ::prost::alloc::string::String,
5929    /// Project ID of the project that contains the instance.
5930    #[prost(string, tag = "2")]
5931    pub project: ::prost::alloc::string::String,
5932}
5933#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5934pub struct SqlDatabasesUpdateRequest {
5935    /// Name of the database to be updated in the instance.
5936    #[prost(string, tag = "1")]
5937    pub database: ::prost::alloc::string::String,
5938    /// Database instance ID. This does not include the project ID.
5939    #[prost(string, tag = "2")]
5940    pub instance: ::prost::alloc::string::String,
5941    /// Project ID of the project that contains the instance.
5942    #[prost(string, tag = "3")]
5943    pub project: ::prost::alloc::string::String,
5944    #[prost(message, optional, tag = "100")]
5945    pub body: ::core::option::Option<Database>,
5946}
5947#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5948pub struct SqlFlagsListRequest {
5949    /// Database type and version you want to retrieve flags for. By default, this
5950    /// method returns flags for all database types and versions.
5951    #[prost(string, tag = "1")]
5952    pub database_version: ::prost::alloc::string::String,
5953    /// Optional. Specify the scope of flags to be returned by SqlFlagsListService.
5954    /// Return list of database flags if unspecified.
5955    #[prost(enumeration = "SqlFlagScope", optional, tag = "3")]
5956    pub flag_scope: ::core::option::Option<i32>,
5957}
5958#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5959pub struct SqlInstancesAddServerCaRequest {
5960    /// Cloud SQL instance ID. This does not include the project ID.
5961    #[prost(string, tag = "1")]
5962    pub instance: ::prost::alloc::string::String,
5963    /// Project ID of the project that contains the instance.
5964    #[prost(string, tag = "2")]
5965    pub project: ::prost::alloc::string::String,
5966}
5967/// Request for AddServerCertificate RPC.
5968#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5969pub struct SqlInstancesAddServerCertificateRequest {
5970    /// Required. Cloud SQL instance ID. This does not include the project ID.
5971    #[prost(string, tag = "1")]
5972    pub instance: ::prost::alloc::string::String,
5973    /// Required. Project ID of the project that contains the instance.
5974    #[prost(string, tag = "2")]
5975    pub project: ::prost::alloc::string::String,
5976}
5977/// Request for AddEntraIdCertificate RPC.
5978#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5979pub struct SqlInstancesAddEntraIdCertificateRequest {
5980    /// Required. Cloud SQL instance ID. This does not include the project ID.
5981    #[prost(string, tag = "1")]
5982    pub instance: ::prost::alloc::string::String,
5983    /// Required. Project ID of the project that contains the instance.
5984    #[prost(string, tag = "2")]
5985    pub project: ::prost::alloc::string::String,
5986}
5987#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5988pub struct SqlInstancesCloneRequest {
5989    /// The ID of the Cloud SQL instance to be cloned (source). This does not
5990    /// include the project ID.
5991    #[prost(string, tag = "1")]
5992    pub instance: ::prost::alloc::string::String,
5993    /// Project ID of the source as well as the clone Cloud SQL instance.
5994    #[prost(string, tag = "2")]
5995    pub project: ::prost::alloc::string::String,
5996    #[prost(message, optional, tag = "100")]
5997    pub body: ::core::option::Option<InstancesCloneRequest>,
5998}
5999#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6000pub struct SqlInstancesDeleteRequest {
6001    /// Cloud SQL instance ID. This does not include the project ID.
6002    #[prost(string, tag = "1")]
6003    pub instance: ::prost::alloc::string::String,
6004    /// Project ID of the project that contains the instance to be deleted.
6005    #[prost(string, tag = "2")]
6006    pub project: ::prost::alloc::string::String,
6007    /// Flag to opt-in for final backup. By default, it is turned off.
6008    #[prost(bool, optional, tag = "7")]
6009    pub enable_final_backup: ::core::option::Option<bool>,
6010    /// Optional. The description of the final backup.
6011    #[prost(string, tag = "5")]
6012    pub final_backup_description: ::prost::alloc::string::String,
6013    #[prost(oneof = "sql_instances_delete_request::Expiration", tags = "4, 6")]
6014    pub expiration: ::core::option::Option<sql_instances_delete_request::Expiration>,
6015}
6016/// Nested message and enum types in `SqlInstancesDeleteRequest`.
6017pub mod sql_instances_delete_request {
6018    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
6019    pub enum Expiration {
6020        /// Optional. Retention period of the final backup.
6021        #[prost(int64, tag = "4")]
6022        FinalBackupTtlDays(i64),
6023        /// Optional. Final Backup expiration time.
6024        /// Timestamp in UTC of when this resource is considered expired.
6025        #[prost(message, tag = "6")]
6026        FinalBackupExpiryTime(::prost_types::Timestamp),
6027    }
6028}
6029#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6030pub struct SqlInstancesDemoteMasterRequest {
6031    /// Cloud SQL instance name.
6032    #[prost(string, tag = "1")]
6033    pub instance: ::prost::alloc::string::String,
6034    /// ID of the project that contains the instance.
6035    #[prost(string, tag = "2")]
6036    pub project: ::prost::alloc::string::String,
6037    #[prost(message, optional, tag = "100")]
6038    pub body: ::core::option::Option<InstancesDemoteMasterRequest>,
6039}
6040/// Instance demote request.
6041#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6042pub struct SqlInstancesDemoteRequest {
6043    /// Required. The name of the Cloud SQL instance.
6044    #[prost(string, tag = "1")]
6045    pub instance: ::prost::alloc::string::String,
6046    /// Required. The project ID of the project that contains the instance.
6047    #[prost(string, tag = "2")]
6048    pub project: ::prost::alloc::string::String,
6049    /// The request body.
6050    #[prost(message, optional, tag = "100")]
6051    pub body: ::core::option::Option<InstancesDemoteRequest>,
6052}
6053#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6054pub struct SqlInstancesExportRequest {
6055    /// The Cloud SQL instance ID. This doesn't include the project ID.
6056    #[prost(string, tag = "1")]
6057    pub instance: ::prost::alloc::string::String,
6058    /// Project ID of the project that contains the instance to be exported.
6059    #[prost(string, tag = "2")]
6060    pub project: ::prost::alloc::string::String,
6061    #[prost(message, optional, tag = "100")]
6062    pub body: ::core::option::Option<InstancesExportRequest>,
6063}
6064#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6065pub struct SqlInstancesFailoverRequest {
6066    /// Cloud SQL instance ID. This does not include the project ID.
6067    #[prost(string, tag = "1")]
6068    pub instance: ::prost::alloc::string::String,
6069    /// ID of the project that contains the read replica.
6070    #[prost(string, tag = "2")]
6071    pub project: ::prost::alloc::string::String,
6072    #[prost(message, optional, tag = "100")]
6073    pub body: ::core::option::Option<InstancesFailoverRequest>,
6074}
6075#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6076pub struct SqlInstancesGetRequest {
6077    /// Database instance ID. This does not include the project ID.
6078    #[prost(string, tag = "1")]
6079    pub instance: ::prost::alloc::string::String,
6080    /// Project ID of the project that contains the instance.
6081    #[prost(string, tag = "2")]
6082    pub project: ::prost::alloc::string::String,
6083}
6084#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6085pub struct SqlInstancesImportRequest {
6086    /// Cloud SQL instance ID. This does not include the project ID.
6087    #[prost(string, tag = "1")]
6088    pub instance: ::prost::alloc::string::String,
6089    /// Project ID of the project that contains the instance.
6090    #[prost(string, tag = "2")]
6091    pub project: ::prost::alloc::string::String,
6092    #[prost(message, optional, tag = "100")]
6093    pub body: ::core::option::Option<InstancesImportRequest>,
6094}
6095#[derive(Clone, PartialEq, ::prost::Message)]
6096pub struct SqlInstancesInsertRequest {
6097    /// Project ID of the project to which the newly created Cloud SQL instances
6098    /// should belong.
6099    #[prost(string, tag = "1")]
6100    pub project: ::prost::alloc::string::String,
6101    #[prost(message, optional, tag = "100")]
6102    pub body: ::core::option::Option<DatabaseInstance>,
6103}
6104#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6105pub struct SqlInstancesListRequest {
6106    /// A filter expression that filters resources listed in the response.
6107    /// The expression is in the form of field:value. For example,
6108    /// 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per
6109    /// their JSON representation, such as 'settings.userLabels.auto_start:true'.
6110    ///
6111    /// Multiple filter queries are space-separated. For example.
6112    /// 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each
6113    /// expression is an AND expression. However, you can include AND and OR
6114    /// expressions explicitly.
6115    #[prost(string, tag = "1")]
6116    pub filter: ::prost::alloc::string::String,
6117    /// The maximum number of instances to return. The service may return fewer
6118    /// than this value.
6119    /// If unspecified, at most 500 instances are returned.
6120    /// The maximum value is 1000; values above 1000 are coerced to 1000.
6121    #[prost(uint32, tag = "2")]
6122    pub max_results: u32,
6123    /// A previously-returned page token representing part of the larger set of
6124    /// results to view.
6125    #[prost(string, tag = "3")]
6126    pub page_token: ::prost::alloc::string::String,
6127    /// Project ID of the project for which to list Cloud SQL instances.
6128    #[prost(string, tag = "4")]
6129    pub project: ::prost::alloc::string::String,
6130}
6131#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6132pub struct SqlInstancesListServerCasRequest {
6133    /// Cloud SQL instance ID. This does not include the project ID.
6134    #[prost(string, tag = "1")]
6135    pub instance: ::prost::alloc::string::String,
6136    /// Project ID of the project that contains the instance.
6137    #[prost(string, tag = "2")]
6138    pub project: ::prost::alloc::string::String,
6139}
6140#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6141pub struct SqlInstancesListServerCertificatesRequest {
6142    /// Required. Cloud SQL instance ID. This does not include the project ID.
6143    #[prost(string, tag = "1")]
6144    pub instance: ::prost::alloc::string::String,
6145    /// Required. Project ID of the project that contains the instance.
6146    #[prost(string, tag = "2")]
6147    pub project: ::prost::alloc::string::String,
6148}
6149/// Request message for SqlInstancesService.ListEntraIdCertificates.
6150#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6151pub struct SqlInstancesListEntraIdCertificatesRequest {
6152    /// Required. Cloud SQL instance ID. This does not include the project ID.
6153    #[prost(string, tag = "1")]
6154    pub instance: ::prost::alloc::string::String,
6155    /// Required. Project ID of the project that contains the instance.
6156    #[prost(string, tag = "2")]
6157    pub project: ::prost::alloc::string::String,
6158}
6159#[derive(Clone, PartialEq, ::prost::Message)]
6160pub struct SqlInstancesPatchRequest {
6161    /// Cloud SQL instance ID. This does not include the project ID.
6162    #[prost(string, tag = "1")]
6163    pub instance: ::prost::alloc::string::String,
6164    /// Project ID of the project that contains the instance.
6165    #[prost(string, tag = "2")]
6166    pub project: ::prost::alloc::string::String,
6167    #[prost(message, optional, tag = "100")]
6168    pub body: ::core::option::Option<DatabaseInstance>,
6169}
6170#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6171pub struct SqlInstancesPromoteReplicaRequest {
6172    /// Cloud SQL read replica instance name.
6173    #[prost(string, tag = "1")]
6174    pub instance: ::prost::alloc::string::String,
6175    /// ID of the project that contains the read replica.
6176    #[prost(string, tag = "2")]
6177    pub project: ::prost::alloc::string::String,
6178    /// Set to true to invoke a replica failover to the DR replica.
6179    /// As part of replica failover, the promote operation attempts
6180    /// to add the original primary instance as a replica of the promoted
6181    /// DR replica when the original primary instance comes back online.
6182    /// If set to false or not specified, then the original primary
6183    /// instance becomes an independent Cloud SQL primary instance.
6184    #[prost(bool, tag = "3")]
6185    pub failover: bool,
6186}
6187/// Instance switchover request.
6188#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6189pub struct SqlInstancesSwitchoverRequest {
6190    /// Cloud SQL read replica instance name.
6191    #[prost(string, tag = "1")]
6192    pub instance: ::prost::alloc::string::String,
6193    /// ID of the project that contains the replica.
6194    #[prost(string, tag = "2")]
6195    pub project: ::prost::alloc::string::String,
6196    /// Optional. (MySQL and PostgreSQL only) Cloud SQL instance operations
6197    /// timeout, which is a sum of all database operations. Default value is 10
6198    /// minutes and can be modified to a maximum value of 24 hours.
6199    #[prost(message, optional, tag = "3")]
6200    pub db_timeout: ::core::option::Option<::prost_types::Duration>,
6201}
6202#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6203pub struct SqlInstancesResetSslConfigRequest {
6204    /// Cloud SQL instance ID. This does not include the project ID.
6205    #[prost(string, tag = "1")]
6206    pub instance: ::prost::alloc::string::String,
6207    /// Project ID of the project that contains the instance.
6208    #[prost(string, tag = "2")]
6209    pub project: ::prost::alloc::string::String,
6210    /// Optional. Reset SSL mode to use.
6211    #[prost(
6212        enumeration = "sql_instances_reset_ssl_config_request::ResetSslMode",
6213        tag = "3"
6214    )]
6215    pub mode: i32,
6216}
6217/// Nested message and enum types in `SqlInstancesResetSslConfigRequest`.
6218pub mod sql_instances_reset_ssl_config_request {
6219    /// Reset SSL mode to selectively refresh the SSL materials.
6220    #[derive(
6221        Clone,
6222        Copy,
6223        Debug,
6224        PartialEq,
6225        Eq,
6226        Hash,
6227        PartialOrd,
6228        Ord,
6229        ::prost::Enumeration
6230    )]
6231    #[repr(i32)]
6232    pub enum ResetSslMode {
6233        /// Reset SSL mode is not specified.
6234        Unspecified = 0,
6235        /// Refresh all TLS configs. This is the default behaviour.
6236        All = 1,
6237        /// Refreshes the replication-related TLS configuration settings provided by
6238        /// the primary instance.
6239        /// Not applicable to on-premises replication instances.
6240        SyncFromPrimary = 2,
6241    }
6242    impl ResetSslMode {
6243        /// String value of the enum field names used in the ProtoBuf definition.
6244        ///
6245        /// The values are not transformed in any way and thus are considered stable
6246        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6247        pub fn as_str_name(&self) -> &'static str {
6248            match self {
6249                Self::Unspecified => "RESET_SSL_MODE_UNSPECIFIED",
6250                Self::All => "ALL",
6251                Self::SyncFromPrimary => "SYNC_FROM_PRIMARY",
6252            }
6253        }
6254        /// Creates an enum from field names used in the ProtoBuf definition.
6255        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6256            match value {
6257                "RESET_SSL_MODE_UNSPECIFIED" => Some(Self::Unspecified),
6258                "ALL" => Some(Self::All),
6259                "SYNC_FROM_PRIMARY" => Some(Self::SyncFromPrimary),
6260                _ => None,
6261            }
6262        }
6263    }
6264}
6265#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6266pub struct SqlInstancesRestartRequest {
6267    /// Cloud SQL instance ID. This does not include the project ID.
6268    #[prost(string, tag = "1")]
6269    pub instance: ::prost::alloc::string::String,
6270    /// Project ID of the project that contains the instance to be restarted.
6271    #[prost(string, tag = "2")]
6272    pub project: ::prost::alloc::string::String,
6273}
6274#[derive(Clone, PartialEq, ::prost::Message)]
6275pub struct SqlInstancesRestoreBackupRequest {
6276    /// Cloud SQL instance ID. This does not include the project ID.
6277    #[prost(string, tag = "1")]
6278    pub instance: ::prost::alloc::string::String,
6279    /// Project ID of the project that contains the instance.
6280    #[prost(string, tag = "2")]
6281    pub project: ::prost::alloc::string::String,
6282    #[prost(message, optional, tag = "100")]
6283    pub body: ::core::option::Option<InstancesRestoreBackupRequest>,
6284}
6285#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6286pub struct SqlInstancesRotateServerCaRequest {
6287    /// Cloud SQL instance ID. This does not include the project ID.
6288    #[prost(string, tag = "1")]
6289    pub instance: ::prost::alloc::string::String,
6290    /// Project ID of the project that contains the instance.
6291    #[prost(string, tag = "2")]
6292    pub project: ::prost::alloc::string::String,
6293    #[prost(message, optional, tag = "100")]
6294    pub body: ::core::option::Option<InstancesRotateServerCaRequest>,
6295}
6296#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6297pub struct SqlInstancesRotateServerCertificateRequest {
6298    /// Required. Cloud SQL instance ID. This does not include the project ID.
6299    #[prost(string, tag = "1")]
6300    pub instance: ::prost::alloc::string::String,
6301    /// Required. Project ID of the project that contains the instance.
6302    #[prost(string, tag = "2")]
6303    pub project: ::prost::alloc::string::String,
6304    /// Required. Rotate server certificate request body.
6305    #[prost(message, optional, tag = "100")]
6306    pub body: ::core::option::Option<InstancesRotateServerCertificateRequest>,
6307}
6308/// Request message for SqlInstancesService.RotateEntraIdCertificate.
6309#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6310pub struct SqlInstancesRotateEntraIdCertificateRequest {
6311    /// Required. Cloud SQL instance ID. This does not include the project ID.
6312    #[prost(string, tag = "1")]
6313    pub instance: ::prost::alloc::string::String,
6314    /// Required. Project ID of the project that contains the instance.
6315    #[prost(string, tag = "2")]
6316    pub project: ::prost::alloc::string::String,
6317    /// Required. Rotate Entra ID certificate request body.
6318    #[prost(message, optional, tag = "100")]
6319    pub body: ::core::option::Option<InstancesRotateEntraIdCertificateRequest>,
6320}
6321#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6322pub struct SqlInstancesStartReplicaRequest {
6323    /// Cloud SQL read replica instance name.
6324    #[prost(string, tag = "1")]
6325    pub instance: ::prost::alloc::string::String,
6326    /// ID of the project that contains the read replica.
6327    #[prost(string, tag = "2")]
6328    pub project: ::prost::alloc::string::String,
6329}
6330#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6331pub struct SqlInstancesStopReplicaRequest {
6332    /// Cloud SQL read replica instance name.
6333    #[prost(string, tag = "1")]
6334    pub instance: ::prost::alloc::string::String,
6335    /// ID of the project that contains the read replica.
6336    #[prost(string, tag = "2")]
6337    pub project: ::prost::alloc::string::String,
6338}
6339#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6340pub struct SqlInstancesTruncateLogRequest {
6341    /// Cloud SQL instance ID. This does not include the project ID.
6342    #[prost(string, tag = "1")]
6343    pub instance: ::prost::alloc::string::String,
6344    /// Project ID of the Cloud SQL project.
6345    #[prost(string, tag = "2")]
6346    pub project: ::prost::alloc::string::String,
6347    #[prost(message, optional, tag = "100")]
6348    pub body: ::core::option::Option<InstancesTruncateLogRequest>,
6349}
6350#[derive(Clone, PartialEq, ::prost::Message)]
6351pub struct SqlInstancesUpdateRequest {
6352    /// Cloud SQL instance ID. This does not include the project ID.
6353    #[prost(string, tag = "1")]
6354    pub instance: ::prost::alloc::string::String,
6355    /// Project ID of the project that contains the instance.
6356    #[prost(string, tag = "2")]
6357    pub project: ::prost::alloc::string::String,
6358    #[prost(message, optional, tag = "100")]
6359    pub body: ::core::option::Option<DatabaseInstance>,
6360}
6361/// Instance reencrypt request.
6362#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6363pub struct SqlInstancesReencryptRequest {
6364    /// Cloud SQL instance ID. This does not include the project ID.
6365    #[prost(string, tag = "1")]
6366    pub instance: ::prost::alloc::string::String,
6367    /// ID of the project that contains the instance.
6368    #[prost(string, tag = "2")]
6369    pub project: ::prost::alloc::string::String,
6370    /// Reencrypt body that users request
6371    #[prost(message, optional, tag = "3")]
6372    pub body: ::core::option::Option<InstancesReencryptRequest>,
6373}
6374/// Database Instance reencrypt request.
6375#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6376pub struct InstancesReencryptRequest {
6377    /// Configuration specific to backup re-encryption
6378    #[prost(message, optional, tag = "1")]
6379    pub backup_reencryption_config: ::core::option::Option<BackupReencryptionConfig>,
6380}
6381/// Backup Reencryption Config
6382#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6383pub struct BackupReencryptionConfig {
6384    /// Backup re-encryption limit
6385    #[prost(int32, optional, tag = "1")]
6386    pub backup_limit: ::core::option::Option<i32>,
6387    /// Type of backups users want to re-encrypt.
6388    #[prost(enumeration = "backup_reencryption_config::BackupType", optional, tag = "2")]
6389    pub backup_type: ::core::option::Option<i32>,
6390}
6391/// Nested message and enum types in `BackupReencryptionConfig`.
6392pub mod backup_reencryption_config {
6393    /// Backup type for re-encryption
6394    #[derive(
6395        Clone,
6396        Copy,
6397        Debug,
6398        PartialEq,
6399        Eq,
6400        Hash,
6401        PartialOrd,
6402        Ord,
6403        ::prost::Enumeration
6404    )]
6405    #[repr(i32)]
6406    pub enum BackupType {
6407        /// Unknown backup type, will be defaulted to AUTOMATIC backup type
6408        Unspecified = 0,
6409        /// Reencrypt automatic backups
6410        Automated = 1,
6411        /// Reencrypt on-demand backups
6412        OnDemand = 2,
6413    }
6414    impl BackupType {
6415        /// String value of the enum field names used in the ProtoBuf definition.
6416        ///
6417        /// The values are not transformed in any way and thus are considered stable
6418        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6419        pub fn as_str_name(&self) -> &'static str {
6420            match self {
6421                Self::Unspecified => "BACKUP_TYPE_UNSPECIFIED",
6422                Self::Automated => "AUTOMATED",
6423                Self::OnDemand => "ON_DEMAND",
6424            }
6425        }
6426        /// Creates an enum from field names used in the ProtoBuf definition.
6427        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6428            match value {
6429                "BACKUP_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
6430                "AUTOMATED" => Some(Self::Automated),
6431                "ON_DEMAND" => Some(Self::OnDemand),
6432                _ => None,
6433            }
6434        }
6435    }
6436}
6437#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6438pub struct SqlInstancesRescheduleMaintenanceRequest {
6439    /// Cloud SQL instance ID. This does not include the project ID.
6440    #[prost(string, tag = "1")]
6441    pub instance: ::prost::alloc::string::String,
6442    /// ID of the project that contains the instance.
6443    #[prost(string, tag = "2")]
6444    pub project: ::prost::alloc::string::String,
6445    #[prost(message, optional, tag = "100")]
6446    pub body: ::core::option::Option<SqlInstancesRescheduleMaintenanceRequestBody>,
6447}
6448/// Instance perform disk shrink request.
6449#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6450pub struct SqlInstancesPerformDiskShrinkRequest {
6451    /// Cloud SQL instance ID. This does not include the project ID.
6452    #[prost(string, tag = "1")]
6453    pub instance: ::prost::alloc::string::String,
6454    /// Project ID of the project that contains the instance.
6455    #[prost(string, tag = "2")]
6456    pub project: ::prost::alloc::string::String,
6457    /// Perform disk shrink context.
6458    #[prost(message, optional, tag = "100")]
6459    pub body: ::core::option::Option<PerformDiskShrinkContext>,
6460}
6461/// The selected object that Cloud SQL migrates.
6462#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6463pub struct ExternalSyncSelectedObject {
6464    /// The name of the database that Cloud SQL migrates.
6465    #[prost(string, tag = "1")]
6466    pub database: ::prost::alloc::string::String,
6467}
6468#[derive(Clone, PartialEq, ::prost::Message)]
6469pub struct SqlInstancesVerifyExternalSyncSettingsRequest {
6470    /// Cloud SQL instance ID. This does not include the project ID.
6471    #[prost(string, tag = "1")]
6472    pub instance: ::prost::alloc::string::String,
6473    /// Project ID of the project that contains the instance.
6474    #[prost(string, tag = "2")]
6475    pub project: ::prost::alloc::string::String,
6476    /// Flag to enable verifying connection only
6477    #[prost(bool, tag = "3")]
6478    pub verify_connection_only: bool,
6479    /// External sync mode
6480    #[prost(
6481        enumeration = "sql_instances_verify_external_sync_settings_request::ExternalSyncMode",
6482        tag = "4"
6483    )]
6484    pub sync_mode: i32,
6485    /// Optional. Flag to verify settings required by replication setup only
6486    #[prost(bool, tag = "5")]
6487    pub verify_replication_only: bool,
6488    /// Optional. MigrationType configures the migration to use physical files or
6489    /// logical dump files. If not set, then the logical dump file configuration is
6490    /// used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL.
6491    #[prost(
6492        enumeration = "sql_instances_verify_external_sync_settings_request::MigrationType",
6493        tag = "7"
6494    )]
6495    pub migration_type: i32,
6496    /// Optional. Parallel level for initial data sync. Only applicable for
6497    /// PostgreSQL.
6498    #[prost(enumeration = "ExternalSyncParallelLevel", tag = "8")]
6499    pub sync_parallel_level: i32,
6500    /// Optional. Migrate only the specified objects from the source instance. If
6501    /// this field is empty, then migrate all objects.
6502    #[prost(message, repeated, tag = "9")]
6503    pub selected_objects: ::prost::alloc::vec::Vec<ExternalSyncSelectedObject>,
6504    #[prost(
6505        oneof = "sql_instances_verify_external_sync_settings_request::SyncConfig",
6506        tags = "6"
6507    )]
6508    pub sync_config: ::core::option::Option<
6509        sql_instances_verify_external_sync_settings_request::SyncConfig,
6510    >,
6511}
6512/// Nested message and enum types in `SqlInstancesVerifyExternalSyncSettingsRequest`.
6513pub mod sql_instances_verify_external_sync_settings_request {
6514    #[derive(
6515        Clone,
6516        Copy,
6517        Debug,
6518        PartialEq,
6519        Eq,
6520        Hash,
6521        PartialOrd,
6522        Ord,
6523        ::prost::Enumeration
6524    )]
6525    #[repr(i32)]
6526    pub enum ExternalSyncMode {
6527        /// Unknown external sync mode, will be defaulted to ONLINE mode
6528        Unspecified = 0,
6529        /// Online external sync will set up replication after initial data external
6530        /// sync
6531        Online = 1,
6532        /// Offline external sync only dumps and loads a one-time snapshot of
6533        /// the primary instance's data
6534        Offline = 2,
6535    }
6536    impl ExternalSyncMode {
6537        /// String value of the enum field names used in the ProtoBuf definition.
6538        ///
6539        /// The values are not transformed in any way and thus are considered stable
6540        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6541        pub fn as_str_name(&self) -> &'static str {
6542            match self {
6543                Self::Unspecified => "EXTERNAL_SYNC_MODE_UNSPECIFIED",
6544                Self::Online => "ONLINE",
6545                Self::Offline => "OFFLINE",
6546            }
6547        }
6548        /// Creates an enum from field names used in the ProtoBuf definition.
6549        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6550            match value {
6551                "EXTERNAL_SYNC_MODE_UNSPECIFIED" => Some(Self::Unspecified),
6552                "ONLINE" => Some(Self::Online),
6553                "OFFLINE" => Some(Self::Offline),
6554                _ => None,
6555            }
6556        }
6557    }
6558    /// MigrationType determines whether the migration is a physical file-based
6559    /// migration or a logical dump file-based migration.
6560    #[derive(
6561        Clone,
6562        Copy,
6563        Debug,
6564        PartialEq,
6565        Eq,
6566        Hash,
6567        PartialOrd,
6568        Ord,
6569        ::prost::Enumeration
6570    )]
6571    #[repr(i32)]
6572    pub enum MigrationType {
6573        /// Default value is a logical dump file-based migration
6574        Unspecified = 0,
6575        /// Logical dump file-based migration
6576        Logical = 1,
6577        /// Physical file-based migration
6578        Physical = 2,
6579    }
6580    impl MigrationType {
6581        /// String value of the enum field names used in the ProtoBuf definition.
6582        ///
6583        /// The values are not transformed in any way and thus are considered stable
6584        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6585        pub fn as_str_name(&self) -> &'static str {
6586            match self {
6587                Self::Unspecified => "MIGRATION_TYPE_UNSPECIFIED",
6588                Self::Logical => "LOGICAL",
6589                Self::Physical => "PHYSICAL",
6590            }
6591        }
6592        /// Creates an enum from field names used in the ProtoBuf definition.
6593        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6594            match value {
6595                "MIGRATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
6596                "LOGICAL" => Some(Self::Logical),
6597                "PHYSICAL" => Some(Self::Physical),
6598                _ => None,
6599            }
6600        }
6601    }
6602    #[derive(Clone, PartialEq, ::prost::Oneof)]
6603    pub enum SyncConfig {
6604        /// Optional. MySQL-specific settings for start external sync.
6605        #[prost(message, tag = "6")]
6606        MysqlSyncConfig(super::MySqlSyncConfig),
6607    }
6608}
6609#[derive(Clone, PartialEq, ::prost::Message)]
6610pub struct SqlInstancesStartExternalSyncRequest {
6611    /// Cloud SQL instance ID. This does not include the project ID.
6612    #[prost(string, tag = "1")]
6613    pub instance: ::prost::alloc::string::String,
6614    /// ID of the project that contains the instance.
6615    #[prost(string, tag = "2")]
6616    pub project: ::prost::alloc::string::String,
6617    /// External sync mode.
6618    #[prost(
6619        enumeration = "sql_instances_verify_external_sync_settings_request::ExternalSyncMode",
6620        tag = "3"
6621    )]
6622    pub sync_mode: i32,
6623    /// Whether to skip the verification step (VESS).
6624    #[prost(bool, tag = "4")]
6625    pub skip_verification: bool,
6626    /// Optional. Parallel level for initial data sync. Currently only applicable
6627    /// for MySQL.
6628    #[prost(enumeration = "ExternalSyncParallelLevel", tag = "7")]
6629    pub sync_parallel_level: i32,
6630    /// Optional. MigrationType configures the migration to use physical files or
6631    /// logical dump files. If not set, then the logical dump file configuration is
6632    /// used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL.
6633    #[prost(
6634        enumeration = "sql_instances_verify_external_sync_settings_request::MigrationType",
6635        tag = "8"
6636    )]
6637    pub migration_type: i32,
6638    /// Optional. MySQL only. True if end-user has confirmed that this SES call
6639    /// will wipe replica databases overlapping with the proposed selected_objects.
6640    /// If this field is not set and there are both overlapping and additional
6641    /// databases proposed, an error will be returned.
6642    #[prost(bool, tag = "9")]
6643    pub replica_overwrite_enabled: bool,
6644    #[prost(oneof = "sql_instances_start_external_sync_request::SyncConfig", tags = "6")]
6645    pub sync_config: ::core::option::Option<
6646        sql_instances_start_external_sync_request::SyncConfig,
6647    >,
6648}
6649/// Nested message and enum types in `SqlInstancesStartExternalSyncRequest`.
6650pub mod sql_instances_start_external_sync_request {
6651    #[derive(Clone, PartialEq, ::prost::Oneof)]
6652    pub enum SyncConfig {
6653        /// MySQL-specific settings for start external sync.
6654        #[prost(message, tag = "6")]
6655        MysqlSyncConfig(super::MySqlSyncConfig),
6656    }
6657}
6658/// Instance reset replica size request.
6659#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6660pub struct SqlInstancesResetReplicaSizeRequest {
6661    /// Cloud SQL read replica instance name.
6662    #[prost(string, tag = "1")]
6663    pub instance: ::prost::alloc::string::String,
6664    /// ID of the project that contains the read replica.
6665    #[prost(string, tag = "2")]
6666    pub project: ::prost::alloc::string::String,
6667}
6668#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6669pub struct SqlOperationsGetRequest {
6670    /// Instance operation ID.
6671    #[prost(string, tag = "1")]
6672    pub operation: ::prost::alloc::string::String,
6673    /// Project ID of the project that contains the instance.
6674    #[prost(string, tag = "2")]
6675    pub project: ::prost::alloc::string::String,
6676}
6677#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6678pub struct SqlOperationsListRequest {
6679    /// Cloud SQL instance ID. This does not include the project ID.
6680    #[prost(string, tag = "1")]
6681    pub instance: ::prost::alloc::string::String,
6682    /// Maximum number of operations per response.
6683    #[prost(uint32, tag = "2")]
6684    pub max_results: u32,
6685    /// A previously-returned page token representing part of the larger set of
6686    /// results to view.
6687    #[prost(string, tag = "3")]
6688    pub page_token: ::prost::alloc::string::String,
6689    /// Project ID of the project that contains the instance.
6690    #[prost(string, tag = "4")]
6691    pub project: ::prost::alloc::string::String,
6692}
6693/// The request payload to cancel an operation.
6694#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6695pub struct SqlOperationsCancelRequest {
6696    /// Instance operation ID.
6697    #[prost(string, tag = "1")]
6698    pub operation: ::prost::alloc::string::String,
6699    /// Project ID of the project that contains the instance.
6700    #[prost(string, tag = "2")]
6701    pub project: ::prost::alloc::string::String,
6702}
6703#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6704pub struct SqlInstancesCreateEphemeralCertRequest {
6705    /// Cloud SQL instance ID. This does not include the project ID.
6706    #[prost(string, tag = "1")]
6707    pub instance: ::prost::alloc::string::String,
6708    /// Project ID of the Cloud SQL project.
6709    #[prost(string, tag = "2")]
6710    pub project: ::prost::alloc::string::String,
6711    #[prost(message, optional, tag = "100")]
6712    pub body: ::core::option::Option<SslCertsCreateEphemeralRequest>,
6713}
6714#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6715pub struct SqlSslCertsDeleteRequest {
6716    /// Cloud SQL instance ID. This does not include the project ID.
6717    #[prost(string, tag = "1")]
6718    pub instance: ::prost::alloc::string::String,
6719    /// Project ID of the project that contains the instance.
6720    #[prost(string, tag = "2")]
6721    pub project: ::prost::alloc::string::String,
6722    /// Sha1 FingerPrint.
6723    #[prost(string, tag = "3")]
6724    pub sha1_fingerprint: ::prost::alloc::string::String,
6725}
6726#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6727pub struct SqlSslCertsGetRequest {
6728    /// Cloud SQL instance ID. This does not include the project ID.
6729    #[prost(string, tag = "1")]
6730    pub instance: ::prost::alloc::string::String,
6731    /// Project ID of the project that contains the instance.
6732    #[prost(string, tag = "2")]
6733    pub project: ::prost::alloc::string::String,
6734    /// Sha1 FingerPrint.
6735    #[prost(string, tag = "3")]
6736    pub sha1_fingerprint: ::prost::alloc::string::String,
6737}
6738#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6739pub struct SqlSslCertsInsertRequest {
6740    /// Cloud SQL instance ID. This does not include the project ID.
6741    #[prost(string, tag = "1")]
6742    pub instance: ::prost::alloc::string::String,
6743    /// Project ID of the project that contains the instance.
6744    #[prost(string, tag = "2")]
6745    pub project: ::prost::alloc::string::String,
6746    #[prost(message, optional, tag = "100")]
6747    pub body: ::core::option::Option<SslCertsInsertRequest>,
6748}
6749#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6750pub struct SqlSslCertsListRequest {
6751    /// Cloud SQL instance ID. This does not include the project ID.
6752    #[prost(string, tag = "1")]
6753    pub instance: ::prost::alloc::string::String,
6754    /// Project ID of the project that contains the instance.
6755    #[prost(string, tag = "2")]
6756    pub project: ::prost::alloc::string::String,
6757}
6758/// Instance get disk shrink config request.
6759#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6760pub struct SqlInstancesGetDiskShrinkConfigRequest {
6761    /// Cloud SQL instance ID. This does not include the project ID.
6762    #[prost(string, tag = "1")]
6763    pub instance: ::prost::alloc::string::String,
6764    /// Project ID of the project that contains the instance.
6765    #[prost(string, tag = "2")]
6766    pub project: ::prost::alloc::string::String,
6767}
6768/// Instance get latest recovery time request.
6769#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6770pub struct SqlInstancesGetLatestRecoveryTimeRequest {
6771    /// Cloud SQL instance ID. This does not include the project ID.
6772    #[prost(string, tag = "1")]
6773    pub instance: ::prost::alloc::string::String,
6774    /// Project ID of the project that contains the instance.
6775    #[prost(string, tag = "2")]
6776    pub project: ::prost::alloc::string::String,
6777    /// The timestamp used to identify the time when the source instance is
6778    /// deleted. If this instance is deleted, then you must set the timestamp.
6779    #[prost(message, optional, tag = "3")]
6780    pub source_instance_deletion_time: ::core::option::Option<::prost_types::Timestamp>,
6781}
6782/// Instance get latest recovery time response.
6783#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6784pub struct SqlInstancesGetLatestRecoveryTimeResponse {
6785    /// This is always `sql#getLatestRecoveryTime`.
6786    #[prost(string, tag = "1")]
6787    pub kind: ::prost::alloc::string::String,
6788    /// Timestamp, identifies the latest recovery time of the source instance.
6789    #[prost(message, optional, tag = "2")]
6790    pub latest_recovery_time: ::core::option::Option<::prost_types::Timestamp>,
6791    /// Timestamp, identifies the earliest recovery time of the source instance.
6792    #[prost(message, optional, tag = "3")]
6793    pub earliest_recovery_time: ::core::option::Option<::prost_types::Timestamp>,
6794}
6795/// Execute SQL statements request.
6796#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6797pub struct SqlInstancesExecuteSqlRequest {
6798    /// Required. Database instance ID. This does not include the project ID.
6799    #[prost(string, tag = "1")]
6800    pub instance: ::prost::alloc::string::String,
6801    /// Required. Project ID of the project that contains the instance.
6802    #[prost(string, tag = "2")]
6803    pub project: ::prost::alloc::string::String,
6804    /// The request body.
6805    #[prost(message, optional, tag = "100")]
6806    pub body: ::core::option::Option<ExecuteSqlPayload>,
6807}
6808/// Request to release a lease for SSRS.
6809#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6810pub struct SqlInstancesReleaseSsrsLeaseRequest {
6811    /// Required. The Cloud SQL instance ID. This doesn't include the project ID.
6812    /// It's composed of lowercase letters, numbers, and hyphens, and it must start
6813    /// with a letter. The total length must be 98 characters or less (Example:
6814    /// instance-id).
6815    #[prost(string, tag = "1")]
6816    pub instance: ::prost::alloc::string::String,
6817    /// Required. The ID of the project that contains the instance (Example:
6818    /// project-id).
6819    #[prost(string, tag = "2")]
6820    pub project: ::prost::alloc::string::String,
6821}
6822/// The response for the release of the SSRS lease.
6823#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6824pub struct SqlInstancesReleaseSsrsLeaseResponse {
6825    /// The operation ID.
6826    #[prost(string, tag = "1")]
6827    pub operation_id: ::prost::alloc::string::String,
6828}
6829/// The request payload used to execute SQL statements.
6830#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6831pub struct ExecuteSqlPayload {
6832    /// Optional. The name of an existing database user to connect to the database.
6833    /// When `auto_iam_authn` is set to true, this field is ignored and the API
6834    /// caller's IAM user is used.
6835    #[prost(string, tag = "1")]
6836    pub user: ::prost::alloc::string::String,
6837    /// Required. SQL statements to run on the database. It can be a single
6838    /// statement or a sequence of statements separated by semicolons.
6839    #[prost(string, tag = "2")]
6840    pub sql_statement: ::prost::alloc::string::String,
6841    /// Optional. Name of the database on which the statement will be executed.
6842    #[prost(string, tag = "3")]
6843    pub database: ::prost::alloc::string::String,
6844    /// Optional. The maximum number of rows returned per SQL statement.
6845    #[prost(int64, tag = "10")]
6846    pub row_limit: i64,
6847    /// Optional. Controls how the API should respond when the SQL execution result
6848    /// is incomplete due to the size limit or another error. The default mode is
6849    /// to throw an error.
6850    #[prost(enumeration = "execute_sql_payload::PartialResultMode", tag = "13")]
6851    pub partial_result_mode: i32,
6852    /// Optional. Specifies the name of the application that is making the request.
6853    /// This field is used for telemetry. Only alphanumeric characters, dashes, and
6854    /// underscores are allowed. The maximum length is 32 characters.
6855    #[prost(string, tag = "16")]
6856    pub application: ::prost::alloc::string::String,
6857    /// Credentials for the database connection.
6858    #[prost(oneof = "execute_sql_payload::UserPassword", tags = "11")]
6859    pub user_password: ::core::option::Option<execute_sql_payload::UserPassword>,
6860}
6861/// Nested message and enum types in `ExecuteSqlPayload`.
6862pub mod execute_sql_payload {
6863    /// Controls how the API should respond when the SQL execution result exceeds
6864    /// 10 MB.
6865    #[derive(
6866        Clone,
6867        Copy,
6868        Debug,
6869        PartialEq,
6870        Eq,
6871        Hash,
6872        PartialOrd,
6873        Ord,
6874        ::prost::Enumeration
6875    )]
6876    #[repr(i32)]
6877    pub enum PartialResultMode {
6878        /// Unspecified mode, effectively the same as `FAIL_PARTIAL_RESULT`.
6879        Unspecified = 0,
6880        /// Throw an error if the result exceeds 10 MB or if only a partial result
6881        /// can be retrieved. Don't return the result.
6882        FailPartialResult = 1,
6883        /// Return a truncated result and set `partial_result` to true if the result
6884        /// exceeds 10 MB or if only a partial result can be retrieved due to error.
6885        /// Don't throw an error.
6886        AllowPartialResult = 2,
6887    }
6888    impl PartialResultMode {
6889        /// String value of the enum field names used in the ProtoBuf definition.
6890        ///
6891        /// The values are not transformed in any way and thus are considered stable
6892        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6893        pub fn as_str_name(&self) -> &'static str {
6894            match self {
6895                Self::Unspecified => "PARTIAL_RESULT_MODE_UNSPECIFIED",
6896                Self::FailPartialResult => "FAIL_PARTIAL_RESULT",
6897                Self::AllowPartialResult => "ALLOW_PARTIAL_RESULT",
6898            }
6899        }
6900        /// Creates an enum from field names used in the ProtoBuf definition.
6901        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6902            match value {
6903                "PARTIAL_RESULT_MODE_UNSPECIFIED" => Some(Self::Unspecified),
6904                "FAIL_PARTIAL_RESULT" => Some(Self::FailPartialResult),
6905                "ALLOW_PARTIAL_RESULT" => Some(Self::AllowPartialResult),
6906                _ => None,
6907            }
6908        }
6909    }
6910    /// Credentials for the database connection.
6911    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
6912    pub enum UserPassword {
6913        /// Optional. When set to true, the API caller identity associated with the
6914        /// request is used for database authentication. The API caller must be an
6915        /// IAM user in the database.
6916        #[prost(bool, tag = "11")]
6917        AutoIamAuthn(bool),
6918    }
6919}
6920/// Execute SQL statements response.
6921#[derive(Clone, PartialEq, ::prost::Message)]
6922pub struct SqlInstancesExecuteSqlResponse {
6923    /// A list of notices and warnings generated during query execution.
6924    /// For PostgreSQL, this includes all notices and warnings.
6925    /// For MySQL, this includes warnings generated by the last executed statement.
6926    /// To retrieve all warnings for a multi-statement query, `SHOW WARNINGS` must
6927    /// be executed after each statement.
6928    #[prost(message, repeated, tag = "9")]
6929    pub messages: ::prost::alloc::vec::Vec<sql_instances_execute_sql_response::Message>,
6930    /// The additional metadata information regarding the execution of the SQL
6931    /// statements.
6932    #[prost(message, optional, tag = "6")]
6933    pub metadata: ::core::option::Option<Metadata>,
6934    /// The list of results after executing all the SQL statements.
6935    #[prost(message, repeated, tag = "7")]
6936    pub results: ::prost::alloc::vec::Vec<QueryResult>,
6937    /// Contains the error from the database if the SQL execution failed.
6938    #[prost(message, optional, tag = "8")]
6939    pub status: ::core::option::Option<super::super::super::rpc::Status>,
6940}
6941/// Nested message and enum types in `SqlInstancesExecuteSqlResponse`.
6942pub mod sql_instances_execute_sql_response {
6943    /// Represents a notice or warning message from the database.
6944    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6945    pub struct Message {
6946        /// The full message string.
6947        /// For PostgreSQL, this is a formatted string that may include severity,
6948        /// code, and the notice/warning message.
6949        /// For MySQL, this contains the warning message.
6950        #[prost(string, optional, tag = "1")]
6951        pub message: ::core::option::Option<::prost::alloc::string::String>,
6952        /// The severity of the message (e.g., "NOTICE" for PostgreSQL, "WARNING" for
6953        /// MySQL).
6954        #[prost(string, optional, tag = "2")]
6955        pub severity: ::core::option::Option<::prost::alloc::string::String>,
6956    }
6957}
6958/// QueryResult contains the result of executing a single SQL statement.
6959#[derive(Clone, PartialEq, ::prost::Message)]
6960pub struct QueryResult {
6961    /// List of columns included in the result. This also includes the data type
6962    /// of the column.
6963    #[prost(message, repeated, tag = "1")]
6964    pub columns: ::prost::alloc::vec::Vec<Column>,
6965    /// Rows returned by the SQL statement.
6966    #[prost(message, repeated, tag = "2")]
6967    pub rows: ::prost::alloc::vec::Vec<Row>,
6968    /// Message related to the SQL execution result.
6969    #[prost(string, tag = "3")]
6970    pub message: ::prost::alloc::string::String,
6971    /// Set to true if the SQL execution's result is truncated due to size limits
6972    /// or an error retrieving results.
6973    #[prost(bool, tag = "4")]
6974    pub partial_result: bool,
6975    /// If results were truncated due to an error, details of that error.
6976    #[prost(message, optional, tag = "8")]
6977    pub status: ::core::option::Option<super::super::super::rpc::Status>,
6978}
6979/// Contains the name and datatype of a column.
6980#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6981pub struct Column {
6982    /// Name of the column.
6983    #[prost(string, tag = "1")]
6984    pub name: ::prost::alloc::string::String,
6985    /// Datatype of the column.
6986    #[prost(string, tag = "2")]
6987    pub r#type: ::prost::alloc::string::String,
6988}
6989/// Contains the values for a row.
6990#[derive(Clone, PartialEq, ::prost::Message)]
6991pub struct Row {
6992    /// The values for the row.
6993    #[prost(message, repeated, tag = "1")]
6994    pub values: ::prost::alloc::vec::Vec<Value>,
6995}
6996/// The cell value of the table.
6997#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6998pub struct Value {
6999    /// The cell value represented in string format.
7000    #[prost(string, tag = "1")]
7001    pub value: ::prost::alloc::string::String,
7002    /// If cell value is null, then this flag will be set to true.
7003    #[prost(bool, tag = "2")]
7004    pub null_value: bool,
7005}
7006/// The additional metadata information regarding the execution of the SQL
7007/// statements.
7008#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
7009pub struct Metadata {
7010    /// The time taken to execute the SQL statements.
7011    #[prost(message, optional, tag = "1")]
7012    pub sql_statement_execution_time: ::core::option::Option<::prost_types::Duration>,
7013}
7014/// Request to acquire a lease for SSRS.
7015#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
7016pub struct SqlInstancesAcquireSsrsLeaseRequest {
7017    /// Required. Cloud SQL instance ID. This doesn't include the project ID. It's
7018    /// composed of lowercase letters, numbers, and hyphens, and it must start with
7019    /// a letter. The total length must be 98 characters or less (Example:
7020    /// instance-id).
7021    #[prost(string, tag = "1")]
7022    pub instance: ::prost::alloc::string::String,
7023    /// Required. ID of the project that contains the instance (Example:
7024    /// project-id).
7025    #[prost(string, tag = "2")]
7026    pub project: ::prost::alloc::string::String,
7027    /// The body for request to acquire an SSRS lease.
7028    #[prost(message, optional, tag = "100")]
7029    pub body: ::core::option::Option<InstancesAcquireSsrsLeaseRequest>,
7030}
7031/// Request for Pre-checks for MVU
7032#[derive(Clone, PartialEq, ::prost::Message)]
7033pub struct SqlInstancesPreCheckMajorVersionUpgradeRequest {
7034    /// Required. Cloud SQL instance ID. This does not include the project ID.
7035    #[prost(string, tag = "1")]
7036    pub instance: ::prost::alloc::string::String,
7037    /// Required. Project ID of the project that contains the instance.
7038    #[prost(string, tag = "2")]
7039    pub project: ::prost::alloc::string::String,
7040    /// Required. The context for request to perform the pre-check major version
7041    /// upgrade operation.
7042    #[prost(message, optional, tag = "3")]
7043    pub body: ::core::option::Option<InstancesPreCheckMajorVersionUpgradeRequest>,
7044}
7045/// Acquire SSRS lease response.
7046#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
7047pub struct SqlInstancesAcquireSsrsLeaseResponse {
7048    /// The unique identifier for this operation.
7049    #[prost(string, optional, tag = "1")]
7050    pub operation_id: ::core::option::Option<::prost::alloc::string::String>,
7051}
7052/// Request to perform a point in time restore on a Google Cloud Backup and
7053/// Disaster Recovery managed instance.
7054#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
7055pub struct SqlInstancesPointInTimeRestoreRequest {
7056    /// Required. The parent resource where you created this instance.
7057    /// Format: projects/{project}
7058    #[prost(string, tag = "1")]
7059    pub parent: ::prost::alloc::string::String,
7060    /// Required. The context for request to perform a PITR on a Google Cloud
7061    /// Backup and Disaster Recovery managed instance.
7062    #[prost(message, optional, tag = "100")]
7063    pub context: ::core::option::Option<PointInTimeRestoreContext>,
7064}
7065/// External Sync parallel level.
7066#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
7067#[repr(i32)]
7068pub enum ExternalSyncParallelLevel {
7069    /// Unknown sync parallel level. Will be defaulted to OPTIMAL.
7070    Unspecified = 0,
7071    /// Minimal parallel level.
7072    Min = 1,
7073    /// Optimal parallel level.
7074    Optimal = 2,
7075    /// Maximum parallel level.
7076    Max = 3,
7077}
7078impl ExternalSyncParallelLevel {
7079    /// String value of the enum field names used in the ProtoBuf definition.
7080    ///
7081    /// The values are not transformed in any way and thus are considered stable
7082    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
7083    pub fn as_str_name(&self) -> &'static str {
7084        match self {
7085            Self::Unspecified => "EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED",
7086            Self::Min => "MIN",
7087            Self::Optimal => "OPTIMAL",
7088            Self::Max => "MAX",
7089        }
7090    }
7091    /// Creates an enum from field names used in the ProtoBuf definition.
7092    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7093        match value {
7094            "EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
7095            "MIN" => Some(Self::Min),
7096            "OPTIMAL" => Some(Self::Optimal),
7097            "MAX" => Some(Self::Max),
7098            _ => None,
7099        }
7100    }
7101}
7102/// Generated client implementations.
7103pub mod sql_backup_runs_service_client {
7104    #![allow(
7105        unused_variables,
7106        dead_code,
7107        missing_docs,
7108        clippy::wildcard_imports,
7109        clippy::let_unit_value,
7110    )]
7111    use tonic::codegen::*;
7112    use tonic::codegen::http::Uri;
7113    #[derive(Debug, Clone)]
7114    pub struct SqlBackupRunsServiceClient<T> {
7115        inner: tonic::client::Grpc<T>,
7116    }
7117    impl<T> SqlBackupRunsServiceClient<T>
7118    where
7119        T: tonic::client::GrpcService<tonic::body::Body>,
7120        T::Error: Into<StdError>,
7121        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
7122        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
7123    {
7124        pub fn new(inner: T) -> Self {
7125            let inner = tonic::client::Grpc::new(inner);
7126            Self { inner }
7127        }
7128        pub fn with_origin(inner: T, origin: Uri) -> Self {
7129            let inner = tonic::client::Grpc::with_origin(inner, origin);
7130            Self { inner }
7131        }
7132        pub fn with_interceptor<F>(
7133            inner: T,
7134            interceptor: F,
7135        ) -> SqlBackupRunsServiceClient<InterceptedService<T, F>>
7136        where
7137            F: tonic::service::Interceptor,
7138            T::ResponseBody: Default,
7139            T: tonic::codegen::Service<
7140                http::Request<tonic::body::Body>,
7141                Response = http::Response<
7142                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
7143                >,
7144            >,
7145            <T as tonic::codegen::Service<
7146                http::Request<tonic::body::Body>,
7147            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
7148        {
7149            SqlBackupRunsServiceClient::new(InterceptedService::new(inner, interceptor))
7150        }
7151        /// Compress requests with the given encoding.
7152        ///
7153        /// This requires the server to support it otherwise it might respond with an
7154        /// error.
7155        #[must_use]
7156        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7157            self.inner = self.inner.send_compressed(encoding);
7158            self
7159        }
7160        /// Enable decompressing responses.
7161        #[must_use]
7162        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7163            self.inner = self.inner.accept_compressed(encoding);
7164            self
7165        }
7166        /// Limits the maximum size of a decoded message.
7167        ///
7168        /// Default: `4MB`
7169        #[must_use]
7170        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7171            self.inner = self.inner.max_decoding_message_size(limit);
7172            self
7173        }
7174        /// Limits the maximum size of an encoded message.
7175        ///
7176        /// Default: `usize::MAX`
7177        #[must_use]
7178        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7179            self.inner = self.inner.max_encoding_message_size(limit);
7180            self
7181        }
7182        /// Deletes the backup taken by a backup run.
7183        pub async fn delete(
7184            &mut self,
7185            request: impl tonic::IntoRequest<super::SqlBackupRunsDeleteRequest>,
7186        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7187            self.inner
7188                .ready()
7189                .await
7190                .map_err(|e| {
7191                    tonic::Status::unknown(
7192                        format!("Service was not ready: {}", e.into()),
7193                    )
7194                })?;
7195            let codec = tonic_prost::ProstCodec::default();
7196            let path = http::uri::PathAndQuery::from_static(
7197                "/google.cloud.sql.v1beta4.SqlBackupRunsService/Delete",
7198            );
7199            let mut req = request.into_request();
7200            req.extensions_mut()
7201                .insert(
7202                    GrpcMethod::new(
7203                        "google.cloud.sql.v1beta4.SqlBackupRunsService",
7204                        "Delete",
7205                    ),
7206                );
7207            self.inner.unary(req, path, codec).await
7208        }
7209        /// Retrieves a resource containing information about a backup run.
7210        pub async fn get(
7211            &mut self,
7212            request: impl tonic::IntoRequest<super::SqlBackupRunsGetRequest>,
7213        ) -> std::result::Result<tonic::Response<super::BackupRun>, tonic::Status> {
7214            self.inner
7215                .ready()
7216                .await
7217                .map_err(|e| {
7218                    tonic::Status::unknown(
7219                        format!("Service was not ready: {}", e.into()),
7220                    )
7221                })?;
7222            let codec = tonic_prost::ProstCodec::default();
7223            let path = http::uri::PathAndQuery::from_static(
7224                "/google.cloud.sql.v1beta4.SqlBackupRunsService/Get",
7225            );
7226            let mut req = request.into_request();
7227            req.extensions_mut()
7228                .insert(
7229                    GrpcMethod::new(
7230                        "google.cloud.sql.v1beta4.SqlBackupRunsService",
7231                        "Get",
7232                    ),
7233                );
7234            self.inner.unary(req, path, codec).await
7235        }
7236        /// Creates a new backup run on demand.
7237        pub async fn insert(
7238            &mut self,
7239            request: impl tonic::IntoRequest<super::SqlBackupRunsInsertRequest>,
7240        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7241            self.inner
7242                .ready()
7243                .await
7244                .map_err(|e| {
7245                    tonic::Status::unknown(
7246                        format!("Service was not ready: {}", e.into()),
7247                    )
7248                })?;
7249            let codec = tonic_prost::ProstCodec::default();
7250            let path = http::uri::PathAndQuery::from_static(
7251                "/google.cloud.sql.v1beta4.SqlBackupRunsService/Insert",
7252            );
7253            let mut req = request.into_request();
7254            req.extensions_mut()
7255                .insert(
7256                    GrpcMethod::new(
7257                        "google.cloud.sql.v1beta4.SqlBackupRunsService",
7258                        "Insert",
7259                    ),
7260                );
7261            self.inner.unary(req, path, codec).await
7262        }
7263        /// Lists all backup runs associated with the project or a given instance and
7264        /// configuration in the reverse chronological order of the backup initiation
7265        /// time.
7266        pub async fn list(
7267            &mut self,
7268            request: impl tonic::IntoRequest<super::SqlBackupRunsListRequest>,
7269        ) -> std::result::Result<
7270            tonic::Response<super::BackupRunsListResponse>,
7271            tonic::Status,
7272        > {
7273            self.inner
7274                .ready()
7275                .await
7276                .map_err(|e| {
7277                    tonic::Status::unknown(
7278                        format!("Service was not ready: {}", e.into()),
7279                    )
7280                })?;
7281            let codec = tonic_prost::ProstCodec::default();
7282            let path = http::uri::PathAndQuery::from_static(
7283                "/google.cloud.sql.v1beta4.SqlBackupRunsService/List",
7284            );
7285            let mut req = request.into_request();
7286            req.extensions_mut()
7287                .insert(
7288                    GrpcMethod::new(
7289                        "google.cloud.sql.v1beta4.SqlBackupRunsService",
7290                        "List",
7291                    ),
7292                );
7293            self.inner.unary(req, path, codec).await
7294        }
7295    }
7296}
7297/// Generated client implementations.
7298pub mod sql_databases_service_client {
7299    #![allow(
7300        unused_variables,
7301        dead_code,
7302        missing_docs,
7303        clippy::wildcard_imports,
7304        clippy::let_unit_value,
7305    )]
7306    use tonic::codegen::*;
7307    use tonic::codegen::http::Uri;
7308    #[derive(Debug, Clone)]
7309    pub struct SqlDatabasesServiceClient<T> {
7310        inner: tonic::client::Grpc<T>,
7311    }
7312    impl<T> SqlDatabasesServiceClient<T>
7313    where
7314        T: tonic::client::GrpcService<tonic::body::Body>,
7315        T::Error: Into<StdError>,
7316        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
7317        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
7318    {
7319        pub fn new(inner: T) -> Self {
7320            let inner = tonic::client::Grpc::new(inner);
7321            Self { inner }
7322        }
7323        pub fn with_origin(inner: T, origin: Uri) -> Self {
7324            let inner = tonic::client::Grpc::with_origin(inner, origin);
7325            Self { inner }
7326        }
7327        pub fn with_interceptor<F>(
7328            inner: T,
7329            interceptor: F,
7330        ) -> SqlDatabasesServiceClient<InterceptedService<T, F>>
7331        where
7332            F: tonic::service::Interceptor,
7333            T::ResponseBody: Default,
7334            T: tonic::codegen::Service<
7335                http::Request<tonic::body::Body>,
7336                Response = http::Response<
7337                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
7338                >,
7339            >,
7340            <T as tonic::codegen::Service<
7341                http::Request<tonic::body::Body>,
7342            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
7343        {
7344            SqlDatabasesServiceClient::new(InterceptedService::new(inner, interceptor))
7345        }
7346        /// Compress requests with the given encoding.
7347        ///
7348        /// This requires the server to support it otherwise it might respond with an
7349        /// error.
7350        #[must_use]
7351        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7352            self.inner = self.inner.send_compressed(encoding);
7353            self
7354        }
7355        /// Enable decompressing responses.
7356        #[must_use]
7357        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7358            self.inner = self.inner.accept_compressed(encoding);
7359            self
7360        }
7361        /// Limits the maximum size of a decoded message.
7362        ///
7363        /// Default: `4MB`
7364        #[must_use]
7365        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7366            self.inner = self.inner.max_decoding_message_size(limit);
7367            self
7368        }
7369        /// Limits the maximum size of an encoded message.
7370        ///
7371        /// Default: `usize::MAX`
7372        #[must_use]
7373        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7374            self.inner = self.inner.max_encoding_message_size(limit);
7375            self
7376        }
7377        /// Deletes a database from a Cloud SQL instance.
7378        pub async fn delete(
7379            &mut self,
7380            request: impl tonic::IntoRequest<super::SqlDatabasesDeleteRequest>,
7381        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7382            self.inner
7383                .ready()
7384                .await
7385                .map_err(|e| {
7386                    tonic::Status::unknown(
7387                        format!("Service was not ready: {}", e.into()),
7388                    )
7389                })?;
7390            let codec = tonic_prost::ProstCodec::default();
7391            let path = http::uri::PathAndQuery::from_static(
7392                "/google.cloud.sql.v1beta4.SqlDatabasesService/Delete",
7393            );
7394            let mut req = request.into_request();
7395            req.extensions_mut()
7396                .insert(
7397                    GrpcMethod::new(
7398                        "google.cloud.sql.v1beta4.SqlDatabasesService",
7399                        "Delete",
7400                    ),
7401                );
7402            self.inner.unary(req, path, codec).await
7403        }
7404        /// Retrieves a resource containing information about a database inside a Cloud
7405        /// SQL instance.
7406        pub async fn get(
7407            &mut self,
7408            request: impl tonic::IntoRequest<super::SqlDatabasesGetRequest>,
7409        ) -> std::result::Result<tonic::Response<super::Database>, tonic::Status> {
7410            self.inner
7411                .ready()
7412                .await
7413                .map_err(|e| {
7414                    tonic::Status::unknown(
7415                        format!("Service was not ready: {}", e.into()),
7416                    )
7417                })?;
7418            let codec = tonic_prost::ProstCodec::default();
7419            let path = http::uri::PathAndQuery::from_static(
7420                "/google.cloud.sql.v1beta4.SqlDatabasesService/Get",
7421            );
7422            let mut req = request.into_request();
7423            req.extensions_mut()
7424                .insert(
7425                    GrpcMethod::new(
7426                        "google.cloud.sql.v1beta4.SqlDatabasesService",
7427                        "Get",
7428                    ),
7429                );
7430            self.inner.unary(req, path, codec).await
7431        }
7432        /// Inserts a resource containing information about a database inside a Cloud
7433        /// SQL instance.
7434        ///
7435        /// **Note:** You can't modify the default character set and collation.
7436        pub async fn insert(
7437            &mut self,
7438            request: impl tonic::IntoRequest<super::SqlDatabasesInsertRequest>,
7439        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7440            self.inner
7441                .ready()
7442                .await
7443                .map_err(|e| {
7444                    tonic::Status::unknown(
7445                        format!("Service was not ready: {}", e.into()),
7446                    )
7447                })?;
7448            let codec = tonic_prost::ProstCodec::default();
7449            let path = http::uri::PathAndQuery::from_static(
7450                "/google.cloud.sql.v1beta4.SqlDatabasesService/Insert",
7451            );
7452            let mut req = request.into_request();
7453            req.extensions_mut()
7454                .insert(
7455                    GrpcMethod::new(
7456                        "google.cloud.sql.v1beta4.SqlDatabasesService",
7457                        "Insert",
7458                    ),
7459                );
7460            self.inner.unary(req, path, codec).await
7461        }
7462        /// Lists databases in the specified Cloud SQL instance.
7463        pub async fn list(
7464            &mut self,
7465            request: impl tonic::IntoRequest<super::SqlDatabasesListRequest>,
7466        ) -> std::result::Result<
7467            tonic::Response<super::DatabasesListResponse>,
7468            tonic::Status,
7469        > {
7470            self.inner
7471                .ready()
7472                .await
7473                .map_err(|e| {
7474                    tonic::Status::unknown(
7475                        format!("Service was not ready: {}", e.into()),
7476                    )
7477                })?;
7478            let codec = tonic_prost::ProstCodec::default();
7479            let path = http::uri::PathAndQuery::from_static(
7480                "/google.cloud.sql.v1beta4.SqlDatabasesService/List",
7481            );
7482            let mut req = request.into_request();
7483            req.extensions_mut()
7484                .insert(
7485                    GrpcMethod::new(
7486                        "google.cloud.sql.v1beta4.SqlDatabasesService",
7487                        "List",
7488                    ),
7489                );
7490            self.inner.unary(req, path, codec).await
7491        }
7492        /// Partially updates a resource containing information about a database inside
7493        /// a Cloud SQL instance. This method supports patch semantics.
7494        pub async fn patch(
7495            &mut self,
7496            request: impl tonic::IntoRequest<super::SqlDatabasesUpdateRequest>,
7497        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7498            self.inner
7499                .ready()
7500                .await
7501                .map_err(|e| {
7502                    tonic::Status::unknown(
7503                        format!("Service was not ready: {}", e.into()),
7504                    )
7505                })?;
7506            let codec = tonic_prost::ProstCodec::default();
7507            let path = http::uri::PathAndQuery::from_static(
7508                "/google.cloud.sql.v1beta4.SqlDatabasesService/Patch",
7509            );
7510            let mut req = request.into_request();
7511            req.extensions_mut()
7512                .insert(
7513                    GrpcMethod::new(
7514                        "google.cloud.sql.v1beta4.SqlDatabasesService",
7515                        "Patch",
7516                    ),
7517                );
7518            self.inner.unary(req, path, codec).await
7519        }
7520        /// Updates a resource containing information about a database inside a Cloud
7521        /// SQL instance.
7522        pub async fn update(
7523            &mut self,
7524            request: impl tonic::IntoRequest<super::SqlDatabasesUpdateRequest>,
7525        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7526            self.inner
7527                .ready()
7528                .await
7529                .map_err(|e| {
7530                    tonic::Status::unknown(
7531                        format!("Service was not ready: {}", e.into()),
7532                    )
7533                })?;
7534            let codec = tonic_prost::ProstCodec::default();
7535            let path = http::uri::PathAndQuery::from_static(
7536                "/google.cloud.sql.v1beta4.SqlDatabasesService/Update",
7537            );
7538            let mut req = request.into_request();
7539            req.extensions_mut()
7540                .insert(
7541                    GrpcMethod::new(
7542                        "google.cloud.sql.v1beta4.SqlDatabasesService",
7543                        "Update",
7544                    ),
7545                );
7546            self.inner.unary(req, path, codec).await
7547        }
7548    }
7549}
7550/// Generated client implementations.
7551pub mod sql_flags_service_client {
7552    #![allow(
7553        unused_variables,
7554        dead_code,
7555        missing_docs,
7556        clippy::wildcard_imports,
7557        clippy::let_unit_value,
7558    )]
7559    use tonic::codegen::*;
7560    use tonic::codegen::http::Uri;
7561    #[derive(Debug, Clone)]
7562    pub struct SqlFlagsServiceClient<T> {
7563        inner: tonic::client::Grpc<T>,
7564    }
7565    impl<T> SqlFlagsServiceClient<T>
7566    where
7567        T: tonic::client::GrpcService<tonic::body::Body>,
7568        T::Error: Into<StdError>,
7569        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
7570        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
7571    {
7572        pub fn new(inner: T) -> Self {
7573            let inner = tonic::client::Grpc::new(inner);
7574            Self { inner }
7575        }
7576        pub fn with_origin(inner: T, origin: Uri) -> Self {
7577            let inner = tonic::client::Grpc::with_origin(inner, origin);
7578            Self { inner }
7579        }
7580        pub fn with_interceptor<F>(
7581            inner: T,
7582            interceptor: F,
7583        ) -> SqlFlagsServiceClient<InterceptedService<T, F>>
7584        where
7585            F: tonic::service::Interceptor,
7586            T::ResponseBody: Default,
7587            T: tonic::codegen::Service<
7588                http::Request<tonic::body::Body>,
7589                Response = http::Response<
7590                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
7591                >,
7592            >,
7593            <T as tonic::codegen::Service<
7594                http::Request<tonic::body::Body>,
7595            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
7596        {
7597            SqlFlagsServiceClient::new(InterceptedService::new(inner, interceptor))
7598        }
7599        /// Compress requests with the given encoding.
7600        ///
7601        /// This requires the server to support it otherwise it might respond with an
7602        /// error.
7603        #[must_use]
7604        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7605            self.inner = self.inner.send_compressed(encoding);
7606            self
7607        }
7608        /// Enable decompressing responses.
7609        #[must_use]
7610        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7611            self.inner = self.inner.accept_compressed(encoding);
7612            self
7613        }
7614        /// Limits the maximum size of a decoded message.
7615        ///
7616        /// Default: `4MB`
7617        #[must_use]
7618        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7619            self.inner = self.inner.max_decoding_message_size(limit);
7620            self
7621        }
7622        /// Limits the maximum size of an encoded message.
7623        ///
7624        /// Default: `usize::MAX`
7625        #[must_use]
7626        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7627            self.inner = self.inner.max_encoding_message_size(limit);
7628            self
7629        }
7630        /// Lists all available database flags for Cloud SQL instances.
7631        pub async fn list(
7632            &mut self,
7633            request: impl tonic::IntoRequest<super::SqlFlagsListRequest>,
7634        ) -> std::result::Result<
7635            tonic::Response<super::FlagsListResponse>,
7636            tonic::Status,
7637        > {
7638            self.inner
7639                .ready()
7640                .await
7641                .map_err(|e| {
7642                    tonic::Status::unknown(
7643                        format!("Service was not ready: {}", e.into()),
7644                    )
7645                })?;
7646            let codec = tonic_prost::ProstCodec::default();
7647            let path = http::uri::PathAndQuery::from_static(
7648                "/google.cloud.sql.v1beta4.SqlFlagsService/List",
7649            );
7650            let mut req = request.into_request();
7651            req.extensions_mut()
7652                .insert(
7653                    GrpcMethod::new("google.cloud.sql.v1beta4.SqlFlagsService", "List"),
7654                );
7655            self.inner.unary(req, path, codec).await
7656        }
7657    }
7658}
7659/// Generated client implementations.
7660pub mod sql_instances_service_client {
7661    #![allow(
7662        unused_variables,
7663        dead_code,
7664        missing_docs,
7665        clippy::wildcard_imports,
7666        clippy::let_unit_value,
7667    )]
7668    use tonic::codegen::*;
7669    use tonic::codegen::http::Uri;
7670    #[derive(Debug, Clone)]
7671    pub struct SqlInstancesServiceClient<T> {
7672        inner: tonic::client::Grpc<T>,
7673    }
7674    impl<T> SqlInstancesServiceClient<T>
7675    where
7676        T: tonic::client::GrpcService<tonic::body::Body>,
7677        T::Error: Into<StdError>,
7678        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
7679        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
7680    {
7681        pub fn new(inner: T) -> Self {
7682            let inner = tonic::client::Grpc::new(inner);
7683            Self { inner }
7684        }
7685        pub fn with_origin(inner: T, origin: Uri) -> Self {
7686            let inner = tonic::client::Grpc::with_origin(inner, origin);
7687            Self { inner }
7688        }
7689        pub fn with_interceptor<F>(
7690            inner: T,
7691            interceptor: F,
7692        ) -> SqlInstancesServiceClient<InterceptedService<T, F>>
7693        where
7694            F: tonic::service::Interceptor,
7695            T::ResponseBody: Default,
7696            T: tonic::codegen::Service<
7697                http::Request<tonic::body::Body>,
7698                Response = http::Response<
7699                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
7700                >,
7701            >,
7702            <T as tonic::codegen::Service<
7703                http::Request<tonic::body::Body>,
7704            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
7705        {
7706            SqlInstancesServiceClient::new(InterceptedService::new(inner, interceptor))
7707        }
7708        /// Compress requests with the given encoding.
7709        ///
7710        /// This requires the server to support it otherwise it might respond with an
7711        /// error.
7712        #[must_use]
7713        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7714            self.inner = self.inner.send_compressed(encoding);
7715            self
7716        }
7717        /// Enable decompressing responses.
7718        #[must_use]
7719        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7720            self.inner = self.inner.accept_compressed(encoding);
7721            self
7722        }
7723        /// Limits the maximum size of a decoded message.
7724        ///
7725        /// Default: `4MB`
7726        #[must_use]
7727        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7728            self.inner = self.inner.max_decoding_message_size(limit);
7729            self
7730        }
7731        /// Limits the maximum size of an encoded message.
7732        ///
7733        /// Default: `usize::MAX`
7734        #[must_use]
7735        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7736            self.inner = self.inner.max_encoding_message_size(limit);
7737            self
7738        }
7739        /// Add a new trusted Certificate Authority (CA) version for the specified
7740        /// instance. Required to prepare for a certificate rotation. If a CA version
7741        /// was previously added but never used in a certificate rotation, this
7742        /// operation replaces that version. There cannot be more than one CA version
7743        /// waiting to be rotated in. For instances that have enabled Certificate
7744        /// Authority Service (CAS) based server CA, use AddServerCertificate to add a
7745        /// new server certificate.
7746        pub async fn add_server_ca(
7747            &mut self,
7748            request: impl tonic::IntoRequest<super::SqlInstancesAddServerCaRequest>,
7749        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7750            self.inner
7751                .ready()
7752                .await
7753                .map_err(|e| {
7754                    tonic::Status::unknown(
7755                        format!("Service was not ready: {}", e.into()),
7756                    )
7757                })?;
7758            let codec = tonic_prost::ProstCodec::default();
7759            let path = http::uri::PathAndQuery::from_static(
7760                "/google.cloud.sql.v1beta4.SqlInstancesService/AddServerCa",
7761            );
7762            let mut req = request.into_request();
7763            req.extensions_mut()
7764                .insert(
7765                    GrpcMethod::new(
7766                        "google.cloud.sql.v1beta4.SqlInstancesService",
7767                        "AddServerCa",
7768                    ),
7769                );
7770            self.inner.unary(req, path, codec).await
7771        }
7772        /// Add a new trusted server certificate version for the specified instance
7773        /// using Certificate Authority Service (CAS) server CA. Required to prepare
7774        /// for a certificate rotation. If a server certificate version was previously
7775        /// added but never used in a certificate rotation, this operation replaces
7776        /// that version. There cannot be more than one certificate version waiting to
7777        /// be rotated in. For instances not using CAS server CA, use AddServerCa
7778        /// instead.
7779        pub async fn add_server_certificate(
7780            &mut self,
7781            request: impl tonic::IntoRequest<
7782                super::SqlInstancesAddServerCertificateRequest,
7783            >,
7784        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7785            self.inner
7786                .ready()
7787                .await
7788                .map_err(|e| {
7789                    tonic::Status::unknown(
7790                        format!("Service was not ready: {}", e.into()),
7791                    )
7792                })?;
7793            let codec = tonic_prost::ProstCodec::default();
7794            let path = http::uri::PathAndQuery::from_static(
7795                "/google.cloud.sql.v1beta4.SqlInstancesService/AddServerCertificate",
7796            );
7797            let mut req = request.into_request();
7798            req.extensions_mut()
7799                .insert(
7800                    GrpcMethod::new(
7801                        "google.cloud.sql.v1beta4.SqlInstancesService",
7802                        "AddServerCertificate",
7803                    ),
7804                );
7805            self.inner.unary(req, path, codec).await
7806        }
7807        /// Adds a new Entra ID certificate for the specified instance. If an Entra ID
7808        /// certificate was previously added but never used in a certificate rotation,
7809        /// this operation replaces that version.
7810        pub async fn add_entra_id_certificate(
7811            &mut self,
7812            request: impl tonic::IntoRequest<
7813                super::SqlInstancesAddEntraIdCertificateRequest,
7814            >,
7815        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7816            self.inner
7817                .ready()
7818                .await
7819                .map_err(|e| {
7820                    tonic::Status::unknown(
7821                        format!("Service was not ready: {}", e.into()),
7822                    )
7823                })?;
7824            let codec = tonic_prost::ProstCodec::default();
7825            let path = http::uri::PathAndQuery::from_static(
7826                "/google.cloud.sql.v1beta4.SqlInstancesService/AddEntraIdCertificate",
7827            );
7828            let mut req = request.into_request();
7829            req.extensions_mut()
7830                .insert(
7831                    GrpcMethod::new(
7832                        "google.cloud.sql.v1beta4.SqlInstancesService",
7833                        "AddEntraIdCertificate",
7834                    ),
7835                );
7836            self.inner.unary(req, path, codec).await
7837        }
7838        /// Creates a Cloud SQL instance as a clone of the source instance. Using this
7839        /// operation might cause your instance to restart.
7840        pub async fn clone(
7841            &mut self,
7842            request: impl tonic::IntoRequest<super::SqlInstancesCloneRequest>,
7843        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7844            self.inner
7845                .ready()
7846                .await
7847                .map_err(|e| {
7848                    tonic::Status::unknown(
7849                        format!("Service was not ready: {}", e.into()),
7850                    )
7851                })?;
7852            let codec = tonic_prost::ProstCodec::default();
7853            let path = http::uri::PathAndQuery::from_static(
7854                "/google.cloud.sql.v1beta4.SqlInstancesService/Clone",
7855            );
7856            let mut req = request.into_request();
7857            req.extensions_mut()
7858                .insert(
7859                    GrpcMethod::new(
7860                        "google.cloud.sql.v1beta4.SqlInstancesService",
7861                        "Clone",
7862                    ),
7863                );
7864            self.inner.unary(req, path, codec).await
7865        }
7866        /// Deletes a Cloud SQL instance.
7867        pub async fn delete(
7868            &mut self,
7869            request: impl tonic::IntoRequest<super::SqlInstancesDeleteRequest>,
7870        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7871            self.inner
7872                .ready()
7873                .await
7874                .map_err(|e| {
7875                    tonic::Status::unknown(
7876                        format!("Service was not ready: {}", e.into()),
7877                    )
7878                })?;
7879            let codec = tonic_prost::ProstCodec::default();
7880            let path = http::uri::PathAndQuery::from_static(
7881                "/google.cloud.sql.v1beta4.SqlInstancesService/Delete",
7882            );
7883            let mut req = request.into_request();
7884            req.extensions_mut()
7885                .insert(
7886                    GrpcMethod::new(
7887                        "google.cloud.sql.v1beta4.SqlInstancesService",
7888                        "Delete",
7889                    ),
7890                );
7891            self.inner.unary(req, path, codec).await
7892        }
7893        /// Demotes the stand-alone instance to be a Cloud SQL read replica for an
7894        /// external database server.
7895        pub async fn demote_master(
7896            &mut self,
7897            request: impl tonic::IntoRequest<super::SqlInstancesDemoteMasterRequest>,
7898        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7899            self.inner
7900                .ready()
7901                .await
7902                .map_err(|e| {
7903                    tonic::Status::unknown(
7904                        format!("Service was not ready: {}", e.into()),
7905                    )
7906                })?;
7907            let codec = tonic_prost::ProstCodec::default();
7908            let path = http::uri::PathAndQuery::from_static(
7909                "/google.cloud.sql.v1beta4.SqlInstancesService/DemoteMaster",
7910            );
7911            let mut req = request.into_request();
7912            req.extensions_mut()
7913                .insert(
7914                    GrpcMethod::new(
7915                        "google.cloud.sql.v1beta4.SqlInstancesService",
7916                        "DemoteMaster",
7917                    ),
7918                );
7919            self.inner.unary(req, path, codec).await
7920        }
7921        /// Demotes an existing standalone instance to be a Cloud SQL read replica
7922        /// for an external database server.
7923        pub async fn demote(
7924            &mut self,
7925            request: impl tonic::IntoRequest<super::SqlInstancesDemoteRequest>,
7926        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7927            self.inner
7928                .ready()
7929                .await
7930                .map_err(|e| {
7931                    tonic::Status::unknown(
7932                        format!("Service was not ready: {}", e.into()),
7933                    )
7934                })?;
7935            let codec = tonic_prost::ProstCodec::default();
7936            let path = http::uri::PathAndQuery::from_static(
7937                "/google.cloud.sql.v1beta4.SqlInstancesService/Demote",
7938            );
7939            let mut req = request.into_request();
7940            req.extensions_mut()
7941                .insert(
7942                    GrpcMethod::new(
7943                        "google.cloud.sql.v1beta4.SqlInstancesService",
7944                        "Demote",
7945                    ),
7946                );
7947            self.inner.unary(req, path, codec).await
7948        }
7949        /// Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL
7950        /// dump or CSV file.
7951        pub async fn export(
7952            &mut self,
7953            request: impl tonic::IntoRequest<super::SqlInstancesExportRequest>,
7954        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7955            self.inner
7956                .ready()
7957                .await
7958                .map_err(|e| {
7959                    tonic::Status::unknown(
7960                        format!("Service was not ready: {}", e.into()),
7961                    )
7962                })?;
7963            let codec = tonic_prost::ProstCodec::default();
7964            let path = http::uri::PathAndQuery::from_static(
7965                "/google.cloud.sql.v1beta4.SqlInstancesService/Export",
7966            );
7967            let mut req = request.into_request();
7968            req.extensions_mut()
7969                .insert(
7970                    GrpcMethod::new(
7971                        "google.cloud.sql.v1beta4.SqlInstancesService",
7972                        "Export",
7973                    ),
7974                );
7975            self.inner.unary(req, path, codec).await
7976        }
7977        /// Initiates a manual failover of a high availability (HA) primary instance
7978        /// to a standby instance, which becomes the primary instance. Users are
7979        /// then rerouted to the new primary. For more information, see the
7980        /// [Overview of high
7981        /// availability](https://cloud.google.com/sql/docs/mysql/high-availability)
7982        /// page in the Cloud SQL documentation.
7983        /// If using Legacy HA (MySQL only), this causes the instance to failover to
7984        /// its failover replica instance.
7985        pub async fn failover(
7986            &mut self,
7987            request: impl tonic::IntoRequest<super::SqlInstancesFailoverRequest>,
7988        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7989            self.inner
7990                .ready()
7991                .await
7992                .map_err(|e| {
7993                    tonic::Status::unknown(
7994                        format!("Service was not ready: {}", e.into()),
7995                    )
7996                })?;
7997            let codec = tonic_prost::ProstCodec::default();
7998            let path = http::uri::PathAndQuery::from_static(
7999                "/google.cloud.sql.v1beta4.SqlInstancesService/Failover",
8000            );
8001            let mut req = request.into_request();
8002            req.extensions_mut()
8003                .insert(
8004                    GrpcMethod::new(
8005                        "google.cloud.sql.v1beta4.SqlInstancesService",
8006                        "Failover",
8007                    ),
8008                );
8009            self.inner.unary(req, path, codec).await
8010        }
8011        /// Reencrypt CMEK instance with latest key version.
8012        pub async fn reencrypt(
8013            &mut self,
8014            request: impl tonic::IntoRequest<super::SqlInstancesReencryptRequest>,
8015        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8016            self.inner
8017                .ready()
8018                .await
8019                .map_err(|e| {
8020                    tonic::Status::unknown(
8021                        format!("Service was not ready: {}", e.into()),
8022                    )
8023                })?;
8024            let codec = tonic_prost::ProstCodec::default();
8025            let path = http::uri::PathAndQuery::from_static(
8026                "/google.cloud.sql.v1beta4.SqlInstancesService/Reencrypt",
8027            );
8028            let mut req = request.into_request();
8029            req.extensions_mut()
8030                .insert(
8031                    GrpcMethod::new(
8032                        "google.cloud.sql.v1beta4.SqlInstancesService",
8033                        "Reencrypt",
8034                    ),
8035                );
8036            self.inner.unary(req, path, codec).await
8037        }
8038        /// Retrieves a resource containing information about a Cloud SQL instance.
8039        pub async fn get(
8040            &mut self,
8041            request: impl tonic::IntoRequest<super::SqlInstancesGetRequest>,
8042        ) -> std::result::Result<
8043            tonic::Response<super::DatabaseInstance>,
8044            tonic::Status,
8045        > {
8046            self.inner
8047                .ready()
8048                .await
8049                .map_err(|e| {
8050                    tonic::Status::unknown(
8051                        format!("Service was not ready: {}", e.into()),
8052                    )
8053                })?;
8054            let codec = tonic_prost::ProstCodec::default();
8055            let path = http::uri::PathAndQuery::from_static(
8056                "/google.cloud.sql.v1beta4.SqlInstancesService/Get",
8057            );
8058            let mut req = request.into_request();
8059            req.extensions_mut()
8060                .insert(
8061                    GrpcMethod::new(
8062                        "google.cloud.sql.v1beta4.SqlInstancesService",
8063                        "Get",
8064                    ),
8065                );
8066            self.inner.unary(req, path, codec).await
8067        }
8068        /// Imports data into a Cloud SQL instance from a SQL dump  or CSV file in
8069        /// Cloud Storage.
8070        pub async fn import(
8071            &mut self,
8072            request: impl tonic::IntoRequest<super::SqlInstancesImportRequest>,
8073        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8074            self.inner
8075                .ready()
8076                .await
8077                .map_err(|e| {
8078                    tonic::Status::unknown(
8079                        format!("Service was not ready: {}", e.into()),
8080                    )
8081                })?;
8082            let codec = tonic_prost::ProstCodec::default();
8083            let path = http::uri::PathAndQuery::from_static(
8084                "/google.cloud.sql.v1beta4.SqlInstancesService/Import",
8085            );
8086            let mut req = request.into_request();
8087            req.extensions_mut()
8088                .insert(
8089                    GrpcMethod::new(
8090                        "google.cloud.sql.v1beta4.SqlInstancesService",
8091                        "Import",
8092                    ),
8093                );
8094            self.inner.unary(req, path, codec).await
8095        }
8096        /// Creates a new Cloud SQL instance.
8097        pub async fn insert(
8098            &mut self,
8099            request: impl tonic::IntoRequest<super::SqlInstancesInsertRequest>,
8100        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8101            self.inner
8102                .ready()
8103                .await
8104                .map_err(|e| {
8105                    tonic::Status::unknown(
8106                        format!("Service was not ready: {}", e.into()),
8107                    )
8108                })?;
8109            let codec = tonic_prost::ProstCodec::default();
8110            let path = http::uri::PathAndQuery::from_static(
8111                "/google.cloud.sql.v1beta4.SqlInstancesService/Insert",
8112            );
8113            let mut req = request.into_request();
8114            req.extensions_mut()
8115                .insert(
8116                    GrpcMethod::new(
8117                        "google.cloud.sql.v1beta4.SqlInstancesService",
8118                        "Insert",
8119                    ),
8120                );
8121            self.inner.unary(req, path, codec).await
8122        }
8123        /// Lists instances under a given project.
8124        pub async fn list(
8125            &mut self,
8126            request: impl tonic::IntoRequest<super::SqlInstancesListRequest>,
8127        ) -> std::result::Result<
8128            tonic::Response<super::InstancesListResponse>,
8129            tonic::Status,
8130        > {
8131            self.inner
8132                .ready()
8133                .await
8134                .map_err(|e| {
8135                    tonic::Status::unknown(
8136                        format!("Service was not ready: {}", e.into()),
8137                    )
8138                })?;
8139            let codec = tonic_prost::ProstCodec::default();
8140            let path = http::uri::PathAndQuery::from_static(
8141                "/google.cloud.sql.v1beta4.SqlInstancesService/List",
8142            );
8143            let mut req = request.into_request();
8144            req.extensions_mut()
8145                .insert(
8146                    GrpcMethod::new(
8147                        "google.cloud.sql.v1beta4.SqlInstancesService",
8148                        "List",
8149                    ),
8150                );
8151            self.inner.unary(req, path, codec).await
8152        }
8153        /// Lists all of the trusted Certificate Authorities (CAs) for the specified
8154        /// instance. There can be up to three CAs listed: the CA that was used to sign
8155        /// the certificate that is currently in use, a CA that has been added but not
8156        /// yet used to sign a certificate, and a CA used to sign a certificate that
8157        /// has previously rotated out.
8158        pub async fn list_server_cas(
8159            &mut self,
8160            request: impl tonic::IntoRequest<super::SqlInstancesListServerCasRequest>,
8161        ) -> std::result::Result<
8162            tonic::Response<super::InstancesListServerCasResponse>,
8163            tonic::Status,
8164        > {
8165            self.inner
8166                .ready()
8167                .await
8168                .map_err(|e| {
8169                    tonic::Status::unknown(
8170                        format!("Service was not ready: {}", e.into()),
8171                    )
8172                })?;
8173            let codec = tonic_prost::ProstCodec::default();
8174            let path = http::uri::PathAndQuery::from_static(
8175                "/google.cloud.sql.v1beta4.SqlInstancesService/ListServerCas",
8176            );
8177            let mut req = request.into_request();
8178            req.extensions_mut()
8179                .insert(
8180                    GrpcMethod::new(
8181                        "google.cloud.sql.v1beta4.SqlInstancesService",
8182                        "ListServerCas",
8183                    ),
8184                );
8185            self.inner.unary(req, path, codec).await
8186        }
8187        /// Lists all versions of server certificates and certificate authorities (CAs)
8188        /// for the specified instance. There can be up to three sets of certs listed:
8189        /// the certificate that is currently in use, a future that has been added but
8190        /// not yet used to sign a certificate, and a certificate that has been rotated
8191        /// out. For instances not using Certificate Authority Service (CAS) server CA,
8192        /// use ListServerCas instead.
8193        pub async fn list_server_certificates(
8194            &mut self,
8195            request: impl tonic::IntoRequest<
8196                super::SqlInstancesListServerCertificatesRequest,
8197            >,
8198        ) -> std::result::Result<
8199            tonic::Response<super::InstancesListServerCertificatesResponse>,
8200            tonic::Status,
8201        > {
8202            self.inner
8203                .ready()
8204                .await
8205                .map_err(|e| {
8206                    tonic::Status::unknown(
8207                        format!("Service was not ready: {}", e.into()),
8208                    )
8209                })?;
8210            let codec = tonic_prost::ProstCodec::default();
8211            let path = http::uri::PathAndQuery::from_static(
8212                "/google.cloud.sql.v1beta4.SqlInstancesService/ListServerCertificates",
8213            );
8214            let mut req = request.into_request();
8215            req.extensions_mut()
8216                .insert(
8217                    GrpcMethod::new(
8218                        "google.cloud.sql.v1beta4.SqlInstancesService",
8219                        "ListServerCertificates",
8220                    ),
8221                );
8222            self.inner.unary(req, path, codec).await
8223        }
8224        /// Lists all versions of EntraID certificates for the specified instance.
8225        /// There can be up to three sets of certificates listed: the certificate that
8226        /// is currently in use, a future that has been added but not yet used to sign
8227        /// a certificate, and a certificate that has been rotated out.
8228        pub async fn list_entra_id_certificates(
8229            &mut self,
8230            request: impl tonic::IntoRequest<
8231                super::SqlInstancesListEntraIdCertificatesRequest,
8232            >,
8233        ) -> std::result::Result<
8234            tonic::Response<super::InstancesListEntraIdCertificatesResponse>,
8235            tonic::Status,
8236        > {
8237            self.inner
8238                .ready()
8239                .await
8240                .map_err(|e| {
8241                    tonic::Status::unknown(
8242                        format!("Service was not ready: {}", e.into()),
8243                    )
8244                })?;
8245            let codec = tonic_prost::ProstCodec::default();
8246            let path = http::uri::PathAndQuery::from_static(
8247                "/google.cloud.sql.v1beta4.SqlInstancesService/ListEntraIdCertificates",
8248            );
8249            let mut req = request.into_request();
8250            req.extensions_mut()
8251                .insert(
8252                    GrpcMethod::new(
8253                        "google.cloud.sql.v1beta4.SqlInstancesService",
8254                        "ListEntraIdCertificates",
8255                    ),
8256                );
8257            self.inner.unary(req, path, codec).await
8258        }
8259        /// Partially updates settings of a Cloud SQL instance by merging the request
8260        /// with the current configuration. This method supports patch semantics.
8261        pub async fn patch(
8262            &mut self,
8263            request: impl tonic::IntoRequest<super::SqlInstancesPatchRequest>,
8264        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8265            self.inner
8266                .ready()
8267                .await
8268                .map_err(|e| {
8269                    tonic::Status::unknown(
8270                        format!("Service was not ready: {}", e.into()),
8271                    )
8272                })?;
8273            let codec = tonic_prost::ProstCodec::default();
8274            let path = http::uri::PathAndQuery::from_static(
8275                "/google.cloud.sql.v1beta4.SqlInstancesService/Patch",
8276            );
8277            let mut req = request.into_request();
8278            req.extensions_mut()
8279                .insert(
8280                    GrpcMethod::new(
8281                        "google.cloud.sql.v1beta4.SqlInstancesService",
8282                        "Patch",
8283                    ),
8284                );
8285            self.inner.unary(req, path, codec).await
8286        }
8287        /// Promotes the read replica instance to be an independent Cloud SQL
8288        /// primary instance.
8289        /// Using this operation might cause your instance to restart.
8290        pub async fn promote_replica(
8291            &mut self,
8292            request: impl tonic::IntoRequest<super::SqlInstancesPromoteReplicaRequest>,
8293        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8294            self.inner
8295                .ready()
8296                .await
8297                .map_err(|e| {
8298                    tonic::Status::unknown(
8299                        format!("Service was not ready: {}", e.into()),
8300                    )
8301                })?;
8302            let codec = tonic_prost::ProstCodec::default();
8303            let path = http::uri::PathAndQuery::from_static(
8304                "/google.cloud.sql.v1beta4.SqlInstancesService/PromoteReplica",
8305            );
8306            let mut req = request.into_request();
8307            req.extensions_mut()
8308                .insert(
8309                    GrpcMethod::new(
8310                        "google.cloud.sql.v1beta4.SqlInstancesService",
8311                        "PromoteReplica",
8312                    ),
8313                );
8314            self.inner.unary(req, path, codec).await
8315        }
8316        /// Switches over from the primary instance to the DR replica
8317        /// instance.
8318        pub async fn switchover(
8319            &mut self,
8320            request: impl tonic::IntoRequest<super::SqlInstancesSwitchoverRequest>,
8321        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8322            self.inner
8323                .ready()
8324                .await
8325                .map_err(|e| {
8326                    tonic::Status::unknown(
8327                        format!("Service was not ready: {}", e.into()),
8328                    )
8329                })?;
8330            let codec = tonic_prost::ProstCodec::default();
8331            let path = http::uri::PathAndQuery::from_static(
8332                "/google.cloud.sql.v1beta4.SqlInstancesService/Switchover",
8333            );
8334            let mut req = request.into_request();
8335            req.extensions_mut()
8336                .insert(
8337                    GrpcMethod::new(
8338                        "google.cloud.sql.v1beta4.SqlInstancesService",
8339                        "Switchover",
8340                    ),
8341                );
8342            self.inner.unary(req, path, codec).await
8343        }
8344        /// Deletes all client certificates and generates a new server SSL certificate
8345        /// for the instance.
8346        pub async fn reset_ssl_config(
8347            &mut self,
8348            request: impl tonic::IntoRequest<super::SqlInstancesResetSslConfigRequest>,
8349        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8350            self.inner
8351                .ready()
8352                .await
8353                .map_err(|e| {
8354                    tonic::Status::unknown(
8355                        format!("Service was not ready: {}", e.into()),
8356                    )
8357                })?;
8358            let codec = tonic_prost::ProstCodec::default();
8359            let path = http::uri::PathAndQuery::from_static(
8360                "/google.cloud.sql.v1beta4.SqlInstancesService/ResetSslConfig",
8361            );
8362            let mut req = request.into_request();
8363            req.extensions_mut()
8364                .insert(
8365                    GrpcMethod::new(
8366                        "google.cloud.sql.v1beta4.SqlInstancesService",
8367                        "ResetSslConfig",
8368                    ),
8369                );
8370            self.inner.unary(req, path, codec).await
8371        }
8372        /// Restarts a Cloud SQL instance.
8373        pub async fn restart(
8374            &mut self,
8375            request: impl tonic::IntoRequest<super::SqlInstancesRestartRequest>,
8376        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8377            self.inner
8378                .ready()
8379                .await
8380                .map_err(|e| {
8381                    tonic::Status::unknown(
8382                        format!("Service was not ready: {}", e.into()),
8383                    )
8384                })?;
8385            let codec = tonic_prost::ProstCodec::default();
8386            let path = http::uri::PathAndQuery::from_static(
8387                "/google.cloud.sql.v1beta4.SqlInstancesService/Restart",
8388            );
8389            let mut req = request.into_request();
8390            req.extensions_mut()
8391                .insert(
8392                    GrpcMethod::new(
8393                        "google.cloud.sql.v1beta4.SqlInstancesService",
8394                        "Restart",
8395                    ),
8396                );
8397            self.inner.unary(req, path, codec).await
8398        }
8399        /// Restores a backup of a Cloud SQL instance. Using this operation might cause
8400        /// your instance to restart.
8401        pub async fn restore_backup(
8402            &mut self,
8403            request: impl tonic::IntoRequest<super::SqlInstancesRestoreBackupRequest>,
8404        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8405            self.inner
8406                .ready()
8407                .await
8408                .map_err(|e| {
8409                    tonic::Status::unknown(
8410                        format!("Service was not ready: {}", e.into()),
8411                    )
8412                })?;
8413            let codec = tonic_prost::ProstCodec::default();
8414            let path = http::uri::PathAndQuery::from_static(
8415                "/google.cloud.sql.v1beta4.SqlInstancesService/RestoreBackup",
8416            );
8417            let mut req = request.into_request();
8418            req.extensions_mut()
8419                .insert(
8420                    GrpcMethod::new(
8421                        "google.cloud.sql.v1beta4.SqlInstancesService",
8422                        "RestoreBackup",
8423                    ),
8424                );
8425            self.inner.unary(req, path, codec).await
8426        }
8427        /// Rotates the server certificate to one signed by the Certificate Authority
8428        /// (CA) version previously added with the addServerCA method. For instances
8429        /// that have enabled Certificate Authority Service (CAS) based server CA,
8430        /// use RotateServerCertificate to rotate the server certificate.
8431        pub async fn rotate_server_ca(
8432            &mut self,
8433            request: impl tonic::IntoRequest<super::SqlInstancesRotateServerCaRequest>,
8434        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8435            self.inner
8436                .ready()
8437                .await
8438                .map_err(|e| {
8439                    tonic::Status::unknown(
8440                        format!("Service was not ready: {}", e.into()),
8441                    )
8442                })?;
8443            let codec = tonic_prost::ProstCodec::default();
8444            let path = http::uri::PathAndQuery::from_static(
8445                "/google.cloud.sql.v1beta4.SqlInstancesService/RotateServerCa",
8446            );
8447            let mut req = request.into_request();
8448            req.extensions_mut()
8449                .insert(
8450                    GrpcMethod::new(
8451                        "google.cloud.sql.v1beta4.SqlInstancesService",
8452                        "RotateServerCa",
8453                    ),
8454                );
8455            self.inner.unary(req, path, codec).await
8456        }
8457        /// Rotates the server certificate version to one previously added with the
8458        /// addServerCertificate method. For instances not using Certificate Authority
8459        /// Service (CAS) server CA, use RotateServerCa instead.
8460        pub async fn rotate_server_certificate(
8461            &mut self,
8462            request: impl tonic::IntoRequest<
8463                super::SqlInstancesRotateServerCertificateRequest,
8464            >,
8465        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8466            self.inner
8467                .ready()
8468                .await
8469                .map_err(|e| {
8470                    tonic::Status::unknown(
8471                        format!("Service was not ready: {}", e.into()),
8472                    )
8473                })?;
8474            let codec = tonic_prost::ProstCodec::default();
8475            let path = http::uri::PathAndQuery::from_static(
8476                "/google.cloud.sql.v1beta4.SqlInstancesService/RotateServerCertificate",
8477            );
8478            let mut req = request.into_request();
8479            req.extensions_mut()
8480                .insert(
8481                    GrpcMethod::new(
8482                        "google.cloud.sql.v1beta4.SqlInstancesService",
8483                        "RotateServerCertificate",
8484                    ),
8485                );
8486            self.inner.unary(req, path, codec).await
8487        }
8488        /// Rotates the Entra Id certificate version to one previously added with the
8489        /// addEntraIdCertificate method.
8490        pub async fn rotate_entra_id_certificate(
8491            &mut self,
8492            request: impl tonic::IntoRequest<
8493                super::SqlInstancesRotateEntraIdCertificateRequest,
8494            >,
8495        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8496            self.inner
8497                .ready()
8498                .await
8499                .map_err(|e| {
8500                    tonic::Status::unknown(
8501                        format!("Service was not ready: {}", e.into()),
8502                    )
8503                })?;
8504            let codec = tonic_prost::ProstCodec::default();
8505            let path = http::uri::PathAndQuery::from_static(
8506                "/google.cloud.sql.v1beta4.SqlInstancesService/RotateEntraIdCertificate",
8507            );
8508            let mut req = request.into_request();
8509            req.extensions_mut()
8510                .insert(
8511                    GrpcMethod::new(
8512                        "google.cloud.sql.v1beta4.SqlInstancesService",
8513                        "RotateEntraIdCertificate",
8514                    ),
8515                );
8516            self.inner.unary(req, path, codec).await
8517        }
8518        /// Starts the replication in the read replica instance.
8519        pub async fn start_replica(
8520            &mut self,
8521            request: impl tonic::IntoRequest<super::SqlInstancesStartReplicaRequest>,
8522        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8523            self.inner
8524                .ready()
8525                .await
8526                .map_err(|e| {
8527                    tonic::Status::unknown(
8528                        format!("Service was not ready: {}", e.into()),
8529                    )
8530                })?;
8531            let codec = tonic_prost::ProstCodec::default();
8532            let path = http::uri::PathAndQuery::from_static(
8533                "/google.cloud.sql.v1beta4.SqlInstancesService/StartReplica",
8534            );
8535            let mut req = request.into_request();
8536            req.extensions_mut()
8537                .insert(
8538                    GrpcMethod::new(
8539                        "google.cloud.sql.v1beta4.SqlInstancesService",
8540                        "StartReplica",
8541                    ),
8542                );
8543            self.inner.unary(req, path, codec).await
8544        }
8545        /// Stops the replication in the read replica instance.
8546        pub async fn stop_replica(
8547            &mut self,
8548            request: impl tonic::IntoRequest<super::SqlInstancesStopReplicaRequest>,
8549        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8550            self.inner
8551                .ready()
8552                .await
8553                .map_err(|e| {
8554                    tonic::Status::unknown(
8555                        format!("Service was not ready: {}", e.into()),
8556                    )
8557                })?;
8558            let codec = tonic_prost::ProstCodec::default();
8559            let path = http::uri::PathAndQuery::from_static(
8560                "/google.cloud.sql.v1beta4.SqlInstancesService/StopReplica",
8561            );
8562            let mut req = request.into_request();
8563            req.extensions_mut()
8564                .insert(
8565                    GrpcMethod::new(
8566                        "google.cloud.sql.v1beta4.SqlInstancesService",
8567                        "StopReplica",
8568                    ),
8569                );
8570            self.inner.unary(req, path, codec).await
8571        }
8572        /// Truncate MySQL general and slow query log tables
8573        /// MySQL only.
8574        pub async fn truncate_log(
8575            &mut self,
8576            request: impl tonic::IntoRequest<super::SqlInstancesTruncateLogRequest>,
8577        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8578            self.inner
8579                .ready()
8580                .await
8581                .map_err(|e| {
8582                    tonic::Status::unknown(
8583                        format!("Service was not ready: {}", e.into()),
8584                    )
8585                })?;
8586            let codec = tonic_prost::ProstCodec::default();
8587            let path = http::uri::PathAndQuery::from_static(
8588                "/google.cloud.sql.v1beta4.SqlInstancesService/TruncateLog",
8589            );
8590            let mut req = request.into_request();
8591            req.extensions_mut()
8592                .insert(
8593                    GrpcMethod::new(
8594                        "google.cloud.sql.v1beta4.SqlInstancesService",
8595                        "TruncateLog",
8596                    ),
8597                );
8598            self.inner.unary(req, path, codec).await
8599        }
8600        /// Updates settings of a Cloud SQL instance. Using this operation might cause
8601        /// your instance to restart.
8602        pub async fn update(
8603            &mut self,
8604            request: impl tonic::IntoRequest<super::SqlInstancesUpdateRequest>,
8605        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8606            self.inner
8607                .ready()
8608                .await
8609                .map_err(|e| {
8610                    tonic::Status::unknown(
8611                        format!("Service was not ready: {}", e.into()),
8612                    )
8613                })?;
8614            let codec = tonic_prost::ProstCodec::default();
8615            let path = http::uri::PathAndQuery::from_static(
8616                "/google.cloud.sql.v1beta4.SqlInstancesService/Update",
8617            );
8618            let mut req = request.into_request();
8619            req.extensions_mut()
8620                .insert(
8621                    GrpcMethod::new(
8622                        "google.cloud.sql.v1beta4.SqlInstancesService",
8623                        "Update",
8624                    ),
8625                );
8626            self.inner.unary(req, path, codec).await
8627        }
8628        /// Generates a short-lived X509 certificate containing the provided public key
8629        /// and signed by a private key specific to the target instance. Users may use
8630        /// the certificate to authenticate as themselves when connecting to the
8631        /// database.
8632        pub async fn create_ephemeral(
8633            &mut self,
8634            request: impl tonic::IntoRequest<
8635                super::SqlInstancesCreateEphemeralCertRequest,
8636            >,
8637        ) -> std::result::Result<tonic::Response<super::SslCert>, tonic::Status> {
8638            self.inner
8639                .ready()
8640                .await
8641                .map_err(|e| {
8642                    tonic::Status::unknown(
8643                        format!("Service was not ready: {}", e.into()),
8644                    )
8645                })?;
8646            let codec = tonic_prost::ProstCodec::default();
8647            let path = http::uri::PathAndQuery::from_static(
8648                "/google.cloud.sql.v1beta4.SqlInstancesService/CreateEphemeral",
8649            );
8650            let mut req = request.into_request();
8651            req.extensions_mut()
8652                .insert(
8653                    GrpcMethod::new(
8654                        "google.cloud.sql.v1beta4.SqlInstancesService",
8655                        "CreateEphemeral",
8656                    ),
8657                );
8658            self.inner.unary(req, path, codec).await
8659        }
8660        /// Reschedules the maintenance on the given instance.
8661        pub async fn reschedule_maintenance(
8662            &mut self,
8663            request: impl tonic::IntoRequest<
8664                super::SqlInstancesRescheduleMaintenanceRequest,
8665            >,
8666        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8667            self.inner
8668                .ready()
8669                .await
8670                .map_err(|e| {
8671                    tonic::Status::unknown(
8672                        format!("Service was not ready: {}", e.into()),
8673                    )
8674                })?;
8675            let codec = tonic_prost::ProstCodec::default();
8676            let path = http::uri::PathAndQuery::from_static(
8677                "/google.cloud.sql.v1beta4.SqlInstancesService/RescheduleMaintenance",
8678            );
8679            let mut req = request.into_request();
8680            req.extensions_mut()
8681                .insert(
8682                    GrpcMethod::new(
8683                        "google.cloud.sql.v1beta4.SqlInstancesService",
8684                        "RescheduleMaintenance",
8685                    ),
8686                );
8687            self.inner.unary(req, path, codec).await
8688        }
8689        /// Verify External primary instance external sync settings.
8690        pub async fn verify_external_sync_settings(
8691            &mut self,
8692            request: impl tonic::IntoRequest<
8693                super::SqlInstancesVerifyExternalSyncSettingsRequest,
8694            >,
8695        ) -> std::result::Result<
8696            tonic::Response<super::SqlInstancesVerifyExternalSyncSettingsResponse>,
8697            tonic::Status,
8698        > {
8699            self.inner
8700                .ready()
8701                .await
8702                .map_err(|e| {
8703                    tonic::Status::unknown(
8704                        format!("Service was not ready: {}", e.into()),
8705                    )
8706                })?;
8707            let codec = tonic_prost::ProstCodec::default();
8708            let path = http::uri::PathAndQuery::from_static(
8709                "/google.cloud.sql.v1beta4.SqlInstancesService/VerifyExternalSyncSettings",
8710            );
8711            let mut req = request.into_request();
8712            req.extensions_mut()
8713                .insert(
8714                    GrpcMethod::new(
8715                        "google.cloud.sql.v1beta4.SqlInstancesService",
8716                        "VerifyExternalSyncSettings",
8717                    ),
8718                );
8719            self.inner.unary(req, path, codec).await
8720        }
8721        /// Start External primary instance migration.
8722        pub async fn start_external_sync(
8723            &mut self,
8724            request: impl tonic::IntoRequest<super::SqlInstancesStartExternalSyncRequest>,
8725        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8726            self.inner
8727                .ready()
8728                .await
8729                .map_err(|e| {
8730                    tonic::Status::unknown(
8731                        format!("Service was not ready: {}", e.into()),
8732                    )
8733                })?;
8734            let codec = tonic_prost::ProstCodec::default();
8735            let path = http::uri::PathAndQuery::from_static(
8736                "/google.cloud.sql.v1beta4.SqlInstancesService/StartExternalSync",
8737            );
8738            let mut req = request.into_request();
8739            req.extensions_mut()
8740                .insert(
8741                    GrpcMethod::new(
8742                        "google.cloud.sql.v1beta4.SqlInstancesService",
8743                        "StartExternalSync",
8744                    ),
8745                );
8746            self.inner.unary(req, path, codec).await
8747        }
8748        /// Perform Disk Shrink on primary instance.
8749        pub async fn perform_disk_shrink(
8750            &mut self,
8751            request: impl tonic::IntoRequest<super::SqlInstancesPerformDiskShrinkRequest>,
8752        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8753            self.inner
8754                .ready()
8755                .await
8756                .map_err(|e| {
8757                    tonic::Status::unknown(
8758                        format!("Service was not ready: {}", e.into()),
8759                    )
8760                })?;
8761            let codec = tonic_prost::ProstCodec::default();
8762            let path = http::uri::PathAndQuery::from_static(
8763                "/google.cloud.sql.v1beta4.SqlInstancesService/PerformDiskShrink",
8764            );
8765            let mut req = request.into_request();
8766            req.extensions_mut()
8767                .insert(
8768                    GrpcMethod::new(
8769                        "google.cloud.sql.v1beta4.SqlInstancesService",
8770                        "PerformDiskShrink",
8771                    ),
8772                );
8773            self.inner.unary(req, path, codec).await
8774        }
8775        /// Get Disk Shrink Config for a given instance.
8776        pub async fn get_disk_shrink_config(
8777            &mut self,
8778            request: impl tonic::IntoRequest<
8779                super::SqlInstancesGetDiskShrinkConfigRequest,
8780            >,
8781        ) -> std::result::Result<
8782            tonic::Response<super::SqlInstancesGetDiskShrinkConfigResponse>,
8783            tonic::Status,
8784        > {
8785            self.inner
8786                .ready()
8787                .await
8788                .map_err(|e| {
8789                    tonic::Status::unknown(
8790                        format!("Service was not ready: {}", e.into()),
8791                    )
8792                })?;
8793            let codec = tonic_prost::ProstCodec::default();
8794            let path = http::uri::PathAndQuery::from_static(
8795                "/google.cloud.sql.v1beta4.SqlInstancesService/GetDiskShrinkConfig",
8796            );
8797            let mut req = request.into_request();
8798            req.extensions_mut()
8799                .insert(
8800                    GrpcMethod::new(
8801                        "google.cloud.sql.v1beta4.SqlInstancesService",
8802                        "GetDiskShrinkConfig",
8803                    ),
8804                );
8805            self.inner.unary(req, path, codec).await
8806        }
8807        /// Reset Replica Size to primary instance disk size.
8808        pub async fn reset_replica_size(
8809            &mut self,
8810            request: impl tonic::IntoRequest<super::SqlInstancesResetReplicaSizeRequest>,
8811        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8812            self.inner
8813                .ready()
8814                .await
8815                .map_err(|e| {
8816                    tonic::Status::unknown(
8817                        format!("Service was not ready: {}", e.into()),
8818                    )
8819                })?;
8820            let codec = tonic_prost::ProstCodec::default();
8821            let path = http::uri::PathAndQuery::from_static(
8822                "/google.cloud.sql.v1beta4.SqlInstancesService/ResetReplicaSize",
8823            );
8824            let mut req = request.into_request();
8825            req.extensions_mut()
8826                .insert(
8827                    GrpcMethod::new(
8828                        "google.cloud.sql.v1beta4.SqlInstancesService",
8829                        "ResetReplicaSize",
8830                    ),
8831                );
8832            self.inner.unary(req, path, codec).await
8833        }
8834        /// Get Latest Recovery Time for a given instance.
8835        pub async fn get_latest_recovery_time(
8836            &mut self,
8837            request: impl tonic::IntoRequest<
8838                super::SqlInstancesGetLatestRecoveryTimeRequest,
8839            >,
8840        ) -> std::result::Result<
8841            tonic::Response<super::SqlInstancesGetLatestRecoveryTimeResponse>,
8842            tonic::Status,
8843        > {
8844            self.inner
8845                .ready()
8846                .await
8847                .map_err(|e| {
8848                    tonic::Status::unknown(
8849                        format!("Service was not ready: {}", e.into()),
8850                    )
8851                })?;
8852            let codec = tonic_prost::ProstCodec::default();
8853            let path = http::uri::PathAndQuery::from_static(
8854                "/google.cloud.sql.v1beta4.SqlInstancesService/GetLatestRecoveryTime",
8855            );
8856            let mut req = request.into_request();
8857            req.extensions_mut()
8858                .insert(
8859                    GrpcMethod::new(
8860                        "google.cloud.sql.v1beta4.SqlInstancesService",
8861                        "GetLatestRecoveryTime",
8862                    ),
8863                );
8864            self.inner.unary(req, path, codec).await
8865        }
8866        /// Execute SQL statements.
8867        pub async fn execute_sql(
8868            &mut self,
8869            request: impl tonic::IntoRequest<super::SqlInstancesExecuteSqlRequest>,
8870        ) -> std::result::Result<
8871            tonic::Response<super::SqlInstancesExecuteSqlResponse>,
8872            tonic::Status,
8873        > {
8874            self.inner
8875                .ready()
8876                .await
8877                .map_err(|e| {
8878                    tonic::Status::unknown(
8879                        format!("Service was not ready: {}", e.into()),
8880                    )
8881                })?;
8882            let codec = tonic_prost::ProstCodec::default();
8883            let path = http::uri::PathAndQuery::from_static(
8884                "/google.cloud.sql.v1beta4.SqlInstancesService/ExecuteSql",
8885            );
8886            let mut req = request.into_request();
8887            req.extensions_mut()
8888                .insert(
8889                    GrpcMethod::new(
8890                        "google.cloud.sql.v1beta4.SqlInstancesService",
8891                        "ExecuteSql",
8892                    ),
8893                );
8894            self.inner.unary(req, path, codec).await
8895        }
8896        /// Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
8897        pub async fn acquire_ssrs_lease(
8898            &mut self,
8899            request: impl tonic::IntoRequest<super::SqlInstancesAcquireSsrsLeaseRequest>,
8900        ) -> std::result::Result<
8901            tonic::Response<super::SqlInstancesAcquireSsrsLeaseResponse>,
8902            tonic::Status,
8903        > {
8904            self.inner
8905                .ready()
8906                .await
8907                .map_err(|e| {
8908                    tonic::Status::unknown(
8909                        format!("Service was not ready: {}", e.into()),
8910                    )
8911                })?;
8912            let codec = tonic_prost::ProstCodec::default();
8913            let path = http::uri::PathAndQuery::from_static(
8914                "/google.cloud.sql.v1beta4.SqlInstancesService/AcquireSsrsLease",
8915            );
8916            let mut req = request.into_request();
8917            req.extensions_mut()
8918                .insert(
8919                    GrpcMethod::new(
8920                        "google.cloud.sql.v1beta4.SqlInstancesService",
8921                        "AcquireSsrsLease",
8922                    ),
8923                );
8924            self.inner.unary(req, path, codec).await
8925        }
8926        /// Release a lease for the setup of SQL Server Reporting Services (SSRS).
8927        pub async fn release_ssrs_lease(
8928            &mut self,
8929            request: impl tonic::IntoRequest<super::SqlInstancesReleaseSsrsLeaseRequest>,
8930        ) -> std::result::Result<
8931            tonic::Response<super::SqlInstancesReleaseSsrsLeaseResponse>,
8932            tonic::Status,
8933        > {
8934            self.inner
8935                .ready()
8936                .await
8937                .map_err(|e| {
8938                    tonic::Status::unknown(
8939                        format!("Service was not ready: {}", e.into()),
8940                    )
8941                })?;
8942            let codec = tonic_prost::ProstCodec::default();
8943            let path = http::uri::PathAndQuery::from_static(
8944                "/google.cloud.sql.v1beta4.SqlInstancesService/ReleaseSsrsLease",
8945            );
8946            let mut req = request.into_request();
8947            req.extensions_mut()
8948                .insert(
8949                    GrpcMethod::new(
8950                        "google.cloud.sql.v1beta4.SqlInstancesService",
8951                        "ReleaseSsrsLease",
8952                    ),
8953                );
8954            self.inner.unary(req, path, codec).await
8955        }
8956        /// Execute MVU Pre-checks
8957        pub async fn pre_check_major_version_upgrade(
8958            &mut self,
8959            request: impl tonic::IntoRequest<
8960                super::SqlInstancesPreCheckMajorVersionUpgradeRequest,
8961            >,
8962        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8963            self.inner
8964                .ready()
8965                .await
8966                .map_err(|e| {
8967                    tonic::Status::unknown(
8968                        format!("Service was not ready: {}", e.into()),
8969                    )
8970                })?;
8971            let codec = tonic_prost::ProstCodec::default();
8972            let path = http::uri::PathAndQuery::from_static(
8973                "/google.cloud.sql.v1beta4.SqlInstancesService/PreCheckMajorVersionUpgrade",
8974            );
8975            let mut req = request.into_request();
8976            req.extensions_mut()
8977                .insert(
8978                    GrpcMethod::new(
8979                        "google.cloud.sql.v1beta4.SqlInstancesService",
8980                        "PreCheckMajorVersionUpgrade",
8981                    ),
8982                );
8983            self.inner.unary(req, path, codec).await
8984        }
8985        /// Point in time restore for an instance managed by Google Cloud Backup and
8986        /// Disaster Recovery.
8987        pub async fn point_in_time_restore(
8988            &mut self,
8989            request: impl tonic::IntoRequest<
8990                super::SqlInstancesPointInTimeRestoreRequest,
8991            >,
8992        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8993            self.inner
8994                .ready()
8995                .await
8996                .map_err(|e| {
8997                    tonic::Status::unknown(
8998                        format!("Service was not ready: {}", e.into()),
8999                    )
9000                })?;
9001            let codec = tonic_prost::ProstCodec::default();
9002            let path = http::uri::PathAndQuery::from_static(
9003                "/google.cloud.sql.v1beta4.SqlInstancesService/PointInTimeRestore",
9004            );
9005            let mut req = request.into_request();
9006            req.extensions_mut()
9007                .insert(
9008                    GrpcMethod::new(
9009                        "google.cloud.sql.v1beta4.SqlInstancesService",
9010                        "PointInTimeRestore",
9011                    ),
9012                );
9013            self.inner.unary(req, path, codec).await
9014        }
9015    }
9016}
9017/// Generated client implementations.
9018pub mod sql_operations_service_client {
9019    #![allow(
9020        unused_variables,
9021        dead_code,
9022        missing_docs,
9023        clippy::wildcard_imports,
9024        clippy::let_unit_value,
9025    )]
9026    use tonic::codegen::*;
9027    use tonic::codegen::http::Uri;
9028    #[derive(Debug, Clone)]
9029    pub struct SqlOperationsServiceClient<T> {
9030        inner: tonic::client::Grpc<T>,
9031    }
9032    impl<T> SqlOperationsServiceClient<T>
9033    where
9034        T: tonic::client::GrpcService<tonic::body::Body>,
9035        T::Error: Into<StdError>,
9036        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9037        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9038    {
9039        pub fn new(inner: T) -> Self {
9040            let inner = tonic::client::Grpc::new(inner);
9041            Self { inner }
9042        }
9043        pub fn with_origin(inner: T, origin: Uri) -> Self {
9044            let inner = tonic::client::Grpc::with_origin(inner, origin);
9045            Self { inner }
9046        }
9047        pub fn with_interceptor<F>(
9048            inner: T,
9049            interceptor: F,
9050        ) -> SqlOperationsServiceClient<InterceptedService<T, F>>
9051        where
9052            F: tonic::service::Interceptor,
9053            T::ResponseBody: Default,
9054            T: tonic::codegen::Service<
9055                http::Request<tonic::body::Body>,
9056                Response = http::Response<
9057                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9058                >,
9059            >,
9060            <T as tonic::codegen::Service<
9061                http::Request<tonic::body::Body>,
9062            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9063        {
9064            SqlOperationsServiceClient::new(InterceptedService::new(inner, interceptor))
9065        }
9066        /// Compress requests with the given encoding.
9067        ///
9068        /// This requires the server to support it otherwise it might respond with an
9069        /// error.
9070        #[must_use]
9071        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9072            self.inner = self.inner.send_compressed(encoding);
9073            self
9074        }
9075        /// Enable decompressing responses.
9076        #[must_use]
9077        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9078            self.inner = self.inner.accept_compressed(encoding);
9079            self
9080        }
9081        /// Limits the maximum size of a decoded message.
9082        ///
9083        /// Default: `4MB`
9084        #[must_use]
9085        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9086            self.inner = self.inner.max_decoding_message_size(limit);
9087            self
9088        }
9089        /// Limits the maximum size of an encoded message.
9090        ///
9091        /// Default: `usize::MAX`
9092        #[must_use]
9093        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9094            self.inner = self.inner.max_encoding_message_size(limit);
9095            self
9096        }
9097        /// Retrieves an instance operation that has been performed on an instance.
9098        pub async fn get(
9099            &mut self,
9100            request: impl tonic::IntoRequest<super::SqlOperationsGetRequest>,
9101        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
9102            self.inner
9103                .ready()
9104                .await
9105                .map_err(|e| {
9106                    tonic::Status::unknown(
9107                        format!("Service was not ready: {}", e.into()),
9108                    )
9109                })?;
9110            let codec = tonic_prost::ProstCodec::default();
9111            let path = http::uri::PathAndQuery::from_static(
9112                "/google.cloud.sql.v1beta4.SqlOperationsService/Get",
9113            );
9114            let mut req = request.into_request();
9115            req.extensions_mut()
9116                .insert(
9117                    GrpcMethod::new(
9118                        "google.cloud.sql.v1beta4.SqlOperationsService",
9119                        "Get",
9120                    ),
9121                );
9122            self.inner.unary(req, path, codec).await
9123        }
9124        /// Lists all instance operations that have been performed on the given Cloud
9125        /// SQL instance in the reverse chronological order of the start time.
9126        pub async fn list(
9127            &mut self,
9128            request: impl tonic::IntoRequest<super::SqlOperationsListRequest>,
9129        ) -> std::result::Result<
9130            tonic::Response<super::OperationsListResponse>,
9131            tonic::Status,
9132        > {
9133            self.inner
9134                .ready()
9135                .await
9136                .map_err(|e| {
9137                    tonic::Status::unknown(
9138                        format!("Service was not ready: {}", e.into()),
9139                    )
9140                })?;
9141            let codec = tonic_prost::ProstCodec::default();
9142            let path = http::uri::PathAndQuery::from_static(
9143                "/google.cloud.sql.v1beta4.SqlOperationsService/List",
9144            );
9145            let mut req = request.into_request();
9146            req.extensions_mut()
9147                .insert(
9148                    GrpcMethod::new(
9149                        "google.cloud.sql.v1beta4.SqlOperationsService",
9150                        "List",
9151                    ),
9152                );
9153            self.inner.unary(req, path, codec).await
9154        }
9155        /// Cancels an instance operation that has been performed on an instance.
9156        /// Ordinarily, this method name should be `CancelSqlOperation`.
9157        pub async fn cancel(
9158            &mut self,
9159            request: impl tonic::IntoRequest<super::SqlOperationsCancelRequest>,
9160        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
9161            self.inner
9162                .ready()
9163                .await
9164                .map_err(|e| {
9165                    tonic::Status::unknown(
9166                        format!("Service was not ready: {}", e.into()),
9167                    )
9168                })?;
9169            let codec = tonic_prost::ProstCodec::default();
9170            let path = http::uri::PathAndQuery::from_static(
9171                "/google.cloud.sql.v1beta4.SqlOperationsService/Cancel",
9172            );
9173            let mut req = request.into_request();
9174            req.extensions_mut()
9175                .insert(
9176                    GrpcMethod::new(
9177                        "google.cloud.sql.v1beta4.SqlOperationsService",
9178                        "Cancel",
9179                    ),
9180                );
9181            self.inner.unary(req, path, codec).await
9182        }
9183    }
9184}
9185/// Generated client implementations.
9186pub mod sql_ssl_certs_service_client {
9187    #![allow(
9188        unused_variables,
9189        dead_code,
9190        missing_docs,
9191        clippy::wildcard_imports,
9192        clippy::let_unit_value,
9193    )]
9194    use tonic::codegen::*;
9195    use tonic::codegen::http::Uri;
9196    #[derive(Debug, Clone)]
9197    pub struct SqlSslCertsServiceClient<T> {
9198        inner: tonic::client::Grpc<T>,
9199    }
9200    impl<T> SqlSslCertsServiceClient<T>
9201    where
9202        T: tonic::client::GrpcService<tonic::body::Body>,
9203        T::Error: Into<StdError>,
9204        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9205        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9206    {
9207        pub fn new(inner: T) -> Self {
9208            let inner = tonic::client::Grpc::new(inner);
9209            Self { inner }
9210        }
9211        pub fn with_origin(inner: T, origin: Uri) -> Self {
9212            let inner = tonic::client::Grpc::with_origin(inner, origin);
9213            Self { inner }
9214        }
9215        pub fn with_interceptor<F>(
9216            inner: T,
9217            interceptor: F,
9218        ) -> SqlSslCertsServiceClient<InterceptedService<T, F>>
9219        where
9220            F: tonic::service::Interceptor,
9221            T::ResponseBody: Default,
9222            T: tonic::codegen::Service<
9223                http::Request<tonic::body::Body>,
9224                Response = http::Response<
9225                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9226                >,
9227            >,
9228            <T as tonic::codegen::Service<
9229                http::Request<tonic::body::Body>,
9230            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9231        {
9232            SqlSslCertsServiceClient::new(InterceptedService::new(inner, interceptor))
9233        }
9234        /// Compress requests with the given encoding.
9235        ///
9236        /// This requires the server to support it otherwise it might respond with an
9237        /// error.
9238        #[must_use]
9239        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9240            self.inner = self.inner.send_compressed(encoding);
9241            self
9242        }
9243        /// Enable decompressing responses.
9244        #[must_use]
9245        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9246            self.inner = self.inner.accept_compressed(encoding);
9247            self
9248        }
9249        /// Limits the maximum size of a decoded message.
9250        ///
9251        /// Default: `4MB`
9252        #[must_use]
9253        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9254            self.inner = self.inner.max_decoding_message_size(limit);
9255            self
9256        }
9257        /// Limits the maximum size of an encoded message.
9258        ///
9259        /// Default: `usize::MAX`
9260        #[must_use]
9261        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9262            self.inner = self.inner.max_encoding_message_size(limit);
9263            self
9264        }
9265        /// Deletes the SSL certificate. For First Generation instances, the
9266        /// certificate remains valid until the instance is restarted.
9267        pub async fn delete(
9268            &mut self,
9269            request: impl tonic::IntoRequest<super::SqlSslCertsDeleteRequest>,
9270        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
9271            self.inner
9272                .ready()
9273                .await
9274                .map_err(|e| {
9275                    tonic::Status::unknown(
9276                        format!("Service was not ready: {}", e.into()),
9277                    )
9278                })?;
9279            let codec = tonic_prost::ProstCodec::default();
9280            let path = http::uri::PathAndQuery::from_static(
9281                "/google.cloud.sql.v1beta4.SqlSslCertsService/Delete",
9282            );
9283            let mut req = request.into_request();
9284            req.extensions_mut()
9285                .insert(
9286                    GrpcMethod::new(
9287                        "google.cloud.sql.v1beta4.SqlSslCertsService",
9288                        "Delete",
9289                    ),
9290                );
9291            self.inner.unary(req, path, codec).await
9292        }
9293        /// Retrieves a particular SSL certificate.  Does not include the private key
9294        /// (required for usage).  The private key must be saved from the response to
9295        /// initial creation.
9296        pub async fn get(
9297            &mut self,
9298            request: impl tonic::IntoRequest<super::SqlSslCertsGetRequest>,
9299        ) -> std::result::Result<tonic::Response<super::SslCert>, tonic::Status> {
9300            self.inner
9301                .ready()
9302                .await
9303                .map_err(|e| {
9304                    tonic::Status::unknown(
9305                        format!("Service was not ready: {}", e.into()),
9306                    )
9307                })?;
9308            let codec = tonic_prost::ProstCodec::default();
9309            let path = http::uri::PathAndQuery::from_static(
9310                "/google.cloud.sql.v1beta4.SqlSslCertsService/Get",
9311            );
9312            let mut req = request.into_request();
9313            req.extensions_mut()
9314                .insert(
9315                    GrpcMethod::new("google.cloud.sql.v1beta4.SqlSslCertsService", "Get"),
9316                );
9317            self.inner.unary(req, path, codec).await
9318        }
9319        /// Creates an SSL certificate and returns it along with the private key and
9320        /// server certificate authority.  The new certificate will not be usable until
9321        /// the instance is restarted.
9322        pub async fn insert(
9323            &mut self,
9324            request: impl tonic::IntoRequest<super::SqlSslCertsInsertRequest>,
9325        ) -> std::result::Result<
9326            tonic::Response<super::SslCertsInsertResponse>,
9327            tonic::Status,
9328        > {
9329            self.inner
9330                .ready()
9331                .await
9332                .map_err(|e| {
9333                    tonic::Status::unknown(
9334                        format!("Service was not ready: {}", e.into()),
9335                    )
9336                })?;
9337            let codec = tonic_prost::ProstCodec::default();
9338            let path = http::uri::PathAndQuery::from_static(
9339                "/google.cloud.sql.v1beta4.SqlSslCertsService/Insert",
9340            );
9341            let mut req = request.into_request();
9342            req.extensions_mut()
9343                .insert(
9344                    GrpcMethod::new(
9345                        "google.cloud.sql.v1beta4.SqlSslCertsService",
9346                        "Insert",
9347                    ),
9348                );
9349            self.inner.unary(req, path, codec).await
9350        }
9351        /// Lists all of the current SSL certificates for the instance.
9352        pub async fn list(
9353            &mut self,
9354            request: impl tonic::IntoRequest<super::SqlSslCertsListRequest>,
9355        ) -> std::result::Result<
9356            tonic::Response<super::SslCertsListResponse>,
9357            tonic::Status,
9358        > {
9359            self.inner
9360                .ready()
9361                .await
9362                .map_err(|e| {
9363                    tonic::Status::unknown(
9364                        format!("Service was not ready: {}", e.into()),
9365                    )
9366                })?;
9367            let codec = tonic_prost::ProstCodec::default();
9368            let path = http::uri::PathAndQuery::from_static(
9369                "/google.cloud.sql.v1beta4.SqlSslCertsService/List",
9370            );
9371            let mut req = request.into_request();
9372            req.extensions_mut()
9373                .insert(
9374                    GrpcMethod::new(
9375                        "google.cloud.sql.v1beta4.SqlSslCertsService",
9376                        "List",
9377                    ),
9378                );
9379            self.inner.unary(req, path, codec).await
9380        }
9381    }
9382}
9383/// Generated client implementations.
9384pub mod sql_backups_service_client {
9385    #![allow(
9386        unused_variables,
9387        dead_code,
9388        missing_docs,
9389        clippy::wildcard_imports,
9390        clippy::let_unit_value,
9391    )]
9392    use tonic::codegen::*;
9393    use tonic::codegen::http::Uri;
9394    #[derive(Debug, Clone)]
9395    pub struct SqlBackupsServiceClient<T> {
9396        inner: tonic::client::Grpc<T>,
9397    }
9398    impl<T> SqlBackupsServiceClient<T>
9399    where
9400        T: tonic::client::GrpcService<tonic::body::Body>,
9401        T::Error: Into<StdError>,
9402        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9403        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9404    {
9405        pub fn new(inner: T) -> Self {
9406            let inner = tonic::client::Grpc::new(inner);
9407            Self { inner }
9408        }
9409        pub fn with_origin(inner: T, origin: Uri) -> Self {
9410            let inner = tonic::client::Grpc::with_origin(inner, origin);
9411            Self { inner }
9412        }
9413        pub fn with_interceptor<F>(
9414            inner: T,
9415            interceptor: F,
9416        ) -> SqlBackupsServiceClient<InterceptedService<T, F>>
9417        where
9418            F: tonic::service::Interceptor,
9419            T::ResponseBody: Default,
9420            T: tonic::codegen::Service<
9421                http::Request<tonic::body::Body>,
9422                Response = http::Response<
9423                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9424                >,
9425            >,
9426            <T as tonic::codegen::Service<
9427                http::Request<tonic::body::Body>,
9428            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9429        {
9430            SqlBackupsServiceClient::new(InterceptedService::new(inner, interceptor))
9431        }
9432        /// Compress requests with the given encoding.
9433        ///
9434        /// This requires the server to support it otherwise it might respond with an
9435        /// error.
9436        #[must_use]
9437        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9438            self.inner = self.inner.send_compressed(encoding);
9439            self
9440        }
9441        /// Enable decompressing responses.
9442        #[must_use]
9443        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9444            self.inner = self.inner.accept_compressed(encoding);
9445            self
9446        }
9447        /// Limits the maximum size of a decoded message.
9448        ///
9449        /// Default: `4MB`
9450        #[must_use]
9451        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9452            self.inner = self.inner.max_decoding_message_size(limit);
9453            self
9454        }
9455        /// Limits the maximum size of an encoded message.
9456        ///
9457        /// Default: `usize::MAX`
9458        #[must_use]
9459        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9460            self.inner = self.inner.max_encoding_message_size(limit);
9461            self
9462        }
9463        /// Creates a backup for a Cloud SQL instance. This API can be used only to
9464        /// create on-demand backups.
9465        pub async fn create_backup(
9466            &mut self,
9467            request: impl tonic::IntoRequest<super::CreateBackupRequest>,
9468        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
9469            self.inner
9470                .ready()
9471                .await
9472                .map_err(|e| {
9473                    tonic::Status::unknown(
9474                        format!("Service was not ready: {}", e.into()),
9475                    )
9476                })?;
9477            let codec = tonic_prost::ProstCodec::default();
9478            let path = http::uri::PathAndQuery::from_static(
9479                "/google.cloud.sql.v1beta4.SqlBackupsService/CreateBackup",
9480            );
9481            let mut req = request.into_request();
9482            req.extensions_mut()
9483                .insert(
9484                    GrpcMethod::new(
9485                        "google.cloud.sql.v1beta4.SqlBackupsService",
9486                        "CreateBackup",
9487                    ),
9488                );
9489            self.inner.unary(req, path, codec).await
9490        }
9491        /// Retrieves a resource containing information about a backup.
9492        pub async fn get_backup(
9493            &mut self,
9494            request: impl tonic::IntoRequest<super::GetBackupRequest>,
9495        ) -> std::result::Result<tonic::Response<super::Backup>, tonic::Status> {
9496            self.inner
9497                .ready()
9498                .await
9499                .map_err(|e| {
9500                    tonic::Status::unknown(
9501                        format!("Service was not ready: {}", e.into()),
9502                    )
9503                })?;
9504            let codec = tonic_prost::ProstCodec::default();
9505            let path = http::uri::PathAndQuery::from_static(
9506                "/google.cloud.sql.v1beta4.SqlBackupsService/GetBackup",
9507            );
9508            let mut req = request.into_request();
9509            req.extensions_mut()
9510                .insert(
9511                    GrpcMethod::new(
9512                        "google.cloud.sql.v1beta4.SqlBackupsService",
9513                        "GetBackup",
9514                    ),
9515                );
9516            self.inner.unary(req, path, codec).await
9517        }
9518        /// Lists all backups associated with the project.
9519        pub async fn list_backups(
9520            &mut self,
9521            request: impl tonic::IntoRequest<super::ListBackupsRequest>,
9522        ) -> std::result::Result<
9523            tonic::Response<super::ListBackupsResponse>,
9524            tonic::Status,
9525        > {
9526            self.inner
9527                .ready()
9528                .await
9529                .map_err(|e| {
9530                    tonic::Status::unknown(
9531                        format!("Service was not ready: {}", e.into()),
9532                    )
9533                })?;
9534            let codec = tonic_prost::ProstCodec::default();
9535            let path = http::uri::PathAndQuery::from_static(
9536                "/google.cloud.sql.v1beta4.SqlBackupsService/ListBackups",
9537            );
9538            let mut req = request.into_request();
9539            req.extensions_mut()
9540                .insert(
9541                    GrpcMethod::new(
9542                        "google.cloud.sql.v1beta4.SqlBackupsService",
9543                        "ListBackups",
9544                    ),
9545                );
9546            self.inner.unary(req, path, codec).await
9547        }
9548        /// Updates the retention period and the description of the backup. You can use
9549        /// this API to update final backups only.
9550        pub async fn update_backup(
9551            &mut self,
9552            request: impl tonic::IntoRequest<super::UpdateBackupRequest>,
9553        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
9554            self.inner
9555                .ready()
9556                .await
9557                .map_err(|e| {
9558                    tonic::Status::unknown(
9559                        format!("Service was not ready: {}", e.into()),
9560                    )
9561                })?;
9562            let codec = tonic_prost::ProstCodec::default();
9563            let path = http::uri::PathAndQuery::from_static(
9564                "/google.cloud.sql.v1beta4.SqlBackupsService/UpdateBackup",
9565            );
9566            let mut req = request.into_request();
9567            req.extensions_mut()
9568                .insert(
9569                    GrpcMethod::new(
9570                        "google.cloud.sql.v1beta4.SqlBackupsService",
9571                        "UpdateBackup",
9572                    ),
9573                );
9574            self.inner.unary(req, path, codec).await
9575        }
9576        /// Deletes the backup.
9577        pub async fn delete_backup(
9578            &mut self,
9579            request: impl tonic::IntoRequest<super::DeleteBackupRequest>,
9580        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
9581            self.inner
9582                .ready()
9583                .await
9584                .map_err(|e| {
9585                    tonic::Status::unknown(
9586                        format!("Service was not ready: {}", e.into()),
9587                    )
9588                })?;
9589            let codec = tonic_prost::ProstCodec::default();
9590            let path = http::uri::PathAndQuery::from_static(
9591                "/google.cloud.sql.v1beta4.SqlBackupsService/DeleteBackup",
9592            );
9593            let mut req = request.into_request();
9594            req.extensions_mut()
9595                .insert(
9596                    GrpcMethod::new(
9597                        "google.cloud.sql.v1beta4.SqlBackupsService",
9598                        "DeleteBackup",
9599                    ),
9600                );
9601            self.inner.unary(req, path, codec).await
9602        }
9603    }
9604}
9605/// Connect settings retrieval request.
9606#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9607pub struct GetConnectSettingsRequest {
9608    /// Cloud SQL instance ID. This does not include the project ID.
9609    #[prost(string, tag = "1")]
9610    pub instance: ::prost::alloc::string::String,
9611    /// Project ID of the project that contains the instance.
9612    #[prost(string, tag = "2")]
9613    pub project: ::prost::alloc::string::String,
9614    /// Optional. Optional snapshot read timestamp to trade freshness for
9615    /// performance.
9616    #[prost(message, optional, tag = "7")]
9617    pub read_time: ::core::option::Option<::prost_types::Timestamp>,
9618}
9619/// Connect settings retrieval response.
9620#[derive(Clone, PartialEq, ::prost::Message)]
9621pub struct ConnectSettings {
9622    /// This is always `sql#connectSettings`.
9623    #[prost(string, tag = "1")]
9624    pub kind: ::prost::alloc::string::String,
9625    /// SSL configuration.
9626    #[prost(message, optional, tag = "2")]
9627    pub server_ca_cert: ::core::option::Option<SslCert>,
9628    /// The assigned IP addresses for the instance.
9629    #[prost(message, repeated, tag = "3")]
9630    pub ip_addresses: ::prost::alloc::vec::Vec<IpMapping>,
9631    /// The cloud region for the instance. e.g. `us-central1`, `europe-west1`.
9632    /// The region cannot be changed after instance creation.
9633    #[prost(string, tag = "4")]
9634    pub region: ::prost::alloc::string::String,
9635    /// The database engine type and version. The `databaseVersion`
9636    /// field cannot be changed after instance creation.
9637    /// MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default),
9638    /// or `MYSQL_5_6`.
9639    /// PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,
9640    /// `POSTGRES_11` or `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`.
9641    /// SQL Server instances: `SQLSERVER_2017_STANDARD` (default),
9642    /// `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`,
9643    /// `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,
9644    /// `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or
9645    /// `SQLSERVER_2019_WEB`.
9646    #[prost(enumeration = "SqlDatabaseVersion", tag = "31")]
9647    pub database_version: i32,
9648    /// `SECOND_GEN`: Cloud SQL database instance.
9649    /// `EXTERNAL`: A database server that is not managed by Google.
9650    /// This property is read-only; use the `tier` property in the `settings`
9651    /// object to determine the database type.
9652    #[prost(enumeration = "SqlBackendType", tag = "32")]
9653    pub backend_type: i32,
9654    /// Whether PSC connectivity is enabled for this instance.
9655    #[prost(bool, tag = "33")]
9656    pub psc_enabled: bool,
9657    /// The dns name of the instance.
9658    #[prost(string, tag = "34")]
9659    pub dns_name: ::prost::alloc::string::String,
9660    /// Specify what type of CA is used for the server certificate.
9661    #[prost(enumeration = "connect_settings::CaMode", tag = "35")]
9662    pub server_ca_mode: i32,
9663    /// Custom subject alternative names for the server certificate.
9664    #[prost(string, repeated, tag = "37")]
9665    pub custom_subject_alternative_names: ::prost::alloc::vec::Vec<
9666        ::prost::alloc::string::String,
9667    >,
9668    /// Output only. The list of DNS names used by this instance.
9669    #[prost(message, repeated, tag = "38")]
9670    pub dns_names: ::prost::alloc::vec::Vec<DnsNameMapping>,
9671    /// The number of read pool nodes in a read pool.
9672    #[prost(int32, optional, tag = "63")]
9673    pub node_count: ::core::option::Option<i32>,
9674    /// Output only. Entries containing information about each read pool node of
9675    /// the read pool.
9676    #[prost(message, repeated, tag = "64")]
9677    pub nodes: ::prost::alloc::vec::Vec<connect_settings::ConnectPoolNodeConfig>,
9678    /// Optional. Output only. mdx_protocol_support controls how the client uses
9679    /// metadata exchange when connecting to the instance. The values in the list
9680    /// representing parts of the MDX protocol that are supported by this instance.
9681    /// When the list is empty, the instance does not support MDX, so the client
9682    /// must not send an MDX request. The default is empty.
9683    #[prost(
9684        enumeration = "connect_settings::MdxProtocolSupport",
9685        repeated,
9686        packed = "false",
9687        tag = "39"
9688    )]
9689    pub mdx_protocol_support: ::prost::alloc::vec::Vec<i32>,
9690}
9691/// Nested message and enum types in `ConnectSettings`.
9692pub mod connect_settings {
9693    /// Details of a single read pool node of a read pool.
9694    #[derive(Clone, PartialEq, ::prost::Message)]
9695    pub struct ConnectPoolNodeConfig {
9696        /// Output only. The name of the read pool node. Doesn't include the project
9697        /// ID.
9698        #[prost(string, optional, tag = "1")]
9699        pub name: ::core::option::Option<::prost::alloc::string::String>,
9700        /// Output only. Mappings containing IP addresses that can be used to connect
9701        /// to the read pool node.
9702        #[prost(message, repeated, tag = "2")]
9703        pub ip_addresses: ::prost::alloc::vec::Vec<super::IpMapping>,
9704        /// Output only. The DNS name of the read pool node.
9705        #[prost(string, optional, tag = "3")]
9706        pub dns_name: ::core::option::Option<::prost::alloc::string::String>,
9707        /// Output only. The list of DNS names used by this read pool node.
9708        #[prost(message, repeated, tag = "4")]
9709        pub dns_names: ::prost::alloc::vec::Vec<super::DnsNameMapping>,
9710    }
9711    /// Various Certificate Authority (CA) modes for certificate signing.
9712    #[derive(
9713        Clone,
9714        Copy,
9715        Debug,
9716        PartialEq,
9717        Eq,
9718        Hash,
9719        PartialOrd,
9720        Ord,
9721        ::prost::Enumeration
9722    )]
9723    #[repr(i32)]
9724    pub enum CaMode {
9725        /// CA mode is unspecified. It is effectively the same as
9726        /// `GOOGLE_MANAGED_INTERNAL_CA`.
9727        Unspecified = 0,
9728        /// Google-managed self-signed internal CA.
9729        GoogleManagedInternalCa = 1,
9730        /// Google-managed regional CA part of root CA hierarchy hosted on Google
9731        /// Cloud's Certificate Authority Service (CAS).
9732        GoogleManagedCasCa = 2,
9733        /// Customer-managed CA hosted on Google Cloud's Certificate Authority
9734        /// Service (CAS).
9735        CustomerManagedCasCa = 3,
9736    }
9737    impl CaMode {
9738        /// String value of the enum field names used in the ProtoBuf definition.
9739        ///
9740        /// The values are not transformed in any way and thus are considered stable
9741        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
9742        pub fn as_str_name(&self) -> &'static str {
9743            match self {
9744                Self::Unspecified => "CA_MODE_UNSPECIFIED",
9745                Self::GoogleManagedInternalCa => "GOOGLE_MANAGED_INTERNAL_CA",
9746                Self::GoogleManagedCasCa => "GOOGLE_MANAGED_CAS_CA",
9747                Self::CustomerManagedCasCa => "CUSTOMER_MANAGED_CAS_CA",
9748            }
9749        }
9750        /// Creates an enum from field names used in the ProtoBuf definition.
9751        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
9752            match value {
9753                "CA_MODE_UNSPECIFIED" => Some(Self::Unspecified),
9754                "GOOGLE_MANAGED_INTERNAL_CA" => Some(Self::GoogleManagedInternalCa),
9755                "GOOGLE_MANAGED_CAS_CA" => Some(Self::GoogleManagedCasCa),
9756                "CUSTOMER_MANAGED_CAS_CA" => Some(Self::CustomerManagedCasCa),
9757                _ => None,
9758            }
9759        }
9760    }
9761    /// MdxProtocolSupport describes parts of the MDX protocol supported by this
9762    /// instance.
9763    #[derive(
9764        Clone,
9765        Copy,
9766        Debug,
9767        PartialEq,
9768        Eq,
9769        Hash,
9770        PartialOrd,
9771        Ord,
9772        ::prost::Enumeration
9773    )]
9774    #[repr(i32)]
9775    pub enum MdxProtocolSupport {
9776        /// Not specified.
9777        Unspecified = 0,
9778        /// Client should send the client protocol type in the MDX request.
9779        ClientProtocolType = 1,
9780    }
9781    impl MdxProtocolSupport {
9782        /// String value of the enum field names used in the ProtoBuf definition.
9783        ///
9784        /// The values are not transformed in any way and thus are considered stable
9785        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
9786        pub fn as_str_name(&self) -> &'static str {
9787            match self {
9788                Self::Unspecified => "MDX_PROTOCOL_SUPPORT_UNSPECIFIED",
9789                Self::ClientProtocolType => "CLIENT_PROTOCOL_TYPE",
9790            }
9791        }
9792        /// Creates an enum from field names used in the ProtoBuf definition.
9793        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
9794            match value {
9795                "MDX_PROTOCOL_SUPPORT_UNSPECIFIED" => Some(Self::Unspecified),
9796                "CLIENT_PROTOCOL_TYPE" => Some(Self::ClientProtocolType),
9797                _ => None,
9798            }
9799        }
9800    }
9801}
9802/// Ephemeral certificate creation request.
9803#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9804pub struct GenerateEphemeralCertRequest {
9805    /// Cloud SQL instance ID. This does not include the project ID.
9806    #[prost(string, tag = "1")]
9807    pub instance: ::prost::alloc::string::String,
9808    /// Project ID of the project that contains the instance.
9809    #[prost(string, tag = "2")]
9810    pub project: ::prost::alloc::string::String,
9811    /// PEM encoded public key to include in the signed certificate.
9812    #[prost(string, tag = "3")]
9813    pub public_key: ::prost::alloc::string::String,
9814    /// Optional. Access token to include in the signed certificate.
9815    #[prost(string, tag = "4")]
9816    pub access_token: ::prost::alloc::string::String,
9817    /// Optional. Optional snapshot read timestamp to trade freshness for
9818    /// performance.
9819    #[prost(message, optional, tag = "7")]
9820    pub read_time: ::core::option::Option<::prost_types::Timestamp>,
9821    /// Optional. If set, it will contain the cert valid duration.
9822    #[prost(message, optional, tag = "12")]
9823    pub valid_duration: ::core::option::Option<::prost_types::Duration>,
9824}
9825/// Ephemeral certificate creation request.
9826#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9827pub struct GenerateEphemeralCertResponse {
9828    /// Generated cert
9829    #[prost(message, optional, tag = "1")]
9830    pub ephemeral_cert: ::core::option::Option<SslCert>,
9831}
9832/// Generated client implementations.
9833pub mod sql_connect_service_client {
9834    #![allow(
9835        unused_variables,
9836        dead_code,
9837        missing_docs,
9838        clippy::wildcard_imports,
9839        clippy::let_unit_value,
9840    )]
9841    use tonic::codegen::*;
9842    use tonic::codegen::http::Uri;
9843    /// Cloud SQL connect service.
9844    #[derive(Debug, Clone)]
9845    pub struct SqlConnectServiceClient<T> {
9846        inner: tonic::client::Grpc<T>,
9847    }
9848    impl<T> SqlConnectServiceClient<T>
9849    where
9850        T: tonic::client::GrpcService<tonic::body::Body>,
9851        T::Error: Into<StdError>,
9852        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9853        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9854    {
9855        pub fn new(inner: T) -> Self {
9856            let inner = tonic::client::Grpc::new(inner);
9857            Self { inner }
9858        }
9859        pub fn with_origin(inner: T, origin: Uri) -> Self {
9860            let inner = tonic::client::Grpc::with_origin(inner, origin);
9861            Self { inner }
9862        }
9863        pub fn with_interceptor<F>(
9864            inner: T,
9865            interceptor: F,
9866        ) -> SqlConnectServiceClient<InterceptedService<T, F>>
9867        where
9868            F: tonic::service::Interceptor,
9869            T::ResponseBody: Default,
9870            T: tonic::codegen::Service<
9871                http::Request<tonic::body::Body>,
9872                Response = http::Response<
9873                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9874                >,
9875            >,
9876            <T as tonic::codegen::Service<
9877                http::Request<tonic::body::Body>,
9878            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9879        {
9880            SqlConnectServiceClient::new(InterceptedService::new(inner, interceptor))
9881        }
9882        /// Compress requests with the given encoding.
9883        ///
9884        /// This requires the server to support it otherwise it might respond with an
9885        /// error.
9886        #[must_use]
9887        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9888            self.inner = self.inner.send_compressed(encoding);
9889            self
9890        }
9891        /// Enable decompressing responses.
9892        #[must_use]
9893        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9894            self.inner = self.inner.accept_compressed(encoding);
9895            self
9896        }
9897        /// Limits the maximum size of a decoded message.
9898        ///
9899        /// Default: `4MB`
9900        #[must_use]
9901        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9902            self.inner = self.inner.max_decoding_message_size(limit);
9903            self
9904        }
9905        /// Limits the maximum size of an encoded message.
9906        ///
9907        /// Default: `usize::MAX`
9908        #[must_use]
9909        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9910            self.inner = self.inner.max_encoding_message_size(limit);
9911            self
9912        }
9913        /// Retrieves connect settings about a Cloud SQL instance.
9914        pub async fn get_connect_settings(
9915            &mut self,
9916            request: impl tonic::IntoRequest<super::GetConnectSettingsRequest>,
9917        ) -> std::result::Result<
9918            tonic::Response<super::ConnectSettings>,
9919            tonic::Status,
9920        > {
9921            self.inner
9922                .ready()
9923                .await
9924                .map_err(|e| {
9925                    tonic::Status::unknown(
9926                        format!("Service was not ready: {}", e.into()),
9927                    )
9928                })?;
9929            let codec = tonic_prost::ProstCodec::default();
9930            let path = http::uri::PathAndQuery::from_static(
9931                "/google.cloud.sql.v1beta4.SqlConnectService/GetConnectSettings",
9932            );
9933            let mut req = request.into_request();
9934            req.extensions_mut()
9935                .insert(
9936                    GrpcMethod::new(
9937                        "google.cloud.sql.v1beta4.SqlConnectService",
9938                        "GetConnectSettings",
9939                    ),
9940                );
9941            self.inner.unary(req, path, codec).await
9942        }
9943        /// Generates a short-lived X509 certificate containing the provided public key
9944        /// and signed by a private key specific to the target instance. Users may use
9945        /// the certificate to authenticate as themselves when connecting to the
9946        /// database.
9947        pub async fn generate_ephemeral_cert(
9948            &mut self,
9949            request: impl tonic::IntoRequest<super::GenerateEphemeralCertRequest>,
9950        ) -> std::result::Result<
9951            tonic::Response<super::GenerateEphemeralCertResponse>,
9952            tonic::Status,
9953        > {
9954            self.inner
9955                .ready()
9956                .await
9957                .map_err(|e| {
9958                    tonic::Status::unknown(
9959                        format!("Service was not ready: {}", e.into()),
9960                    )
9961                })?;
9962            let codec = tonic_prost::ProstCodec::default();
9963            let path = http::uri::PathAndQuery::from_static(
9964                "/google.cloud.sql.v1beta4.SqlConnectService/GenerateEphemeralCert",
9965            );
9966            let mut req = request.into_request();
9967            req.extensions_mut()
9968                .insert(
9969                    GrpcMethod::new(
9970                        "google.cloud.sql.v1beta4.SqlConnectService",
9971                        "GenerateEphemeralCert",
9972                    ),
9973                );
9974            self.inner.unary(req, path, codec).await
9975        }
9976    }
9977}
9978/// Generated client implementations.
9979pub mod sql_iam_policies_service_client {
9980    #![allow(
9981        unused_variables,
9982        dead_code,
9983        missing_docs,
9984        clippy::wildcard_imports,
9985        clippy::let_unit_value,
9986    )]
9987    use tonic::codegen::*;
9988    use tonic::codegen::http::Uri;
9989    /// Service for providing IAM Meta APIs for Cloud SQL.
9990    #[derive(Debug, Clone)]
9991    pub struct SqlIamPoliciesServiceClient<T> {
9992        inner: tonic::client::Grpc<T>,
9993    }
9994    impl<T> SqlIamPoliciesServiceClient<T>
9995    where
9996        T: tonic::client::GrpcService<tonic::body::Body>,
9997        T::Error: Into<StdError>,
9998        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9999        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
10000    {
10001        pub fn new(inner: T) -> Self {
10002            let inner = tonic::client::Grpc::new(inner);
10003            Self { inner }
10004        }
10005        pub fn with_origin(inner: T, origin: Uri) -> Self {
10006            let inner = tonic::client::Grpc::with_origin(inner, origin);
10007            Self { inner }
10008        }
10009        pub fn with_interceptor<F>(
10010            inner: T,
10011            interceptor: F,
10012        ) -> SqlIamPoliciesServiceClient<InterceptedService<T, F>>
10013        where
10014            F: tonic::service::Interceptor,
10015            T::ResponseBody: Default,
10016            T: tonic::codegen::Service<
10017                http::Request<tonic::body::Body>,
10018                Response = http::Response<
10019                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
10020                >,
10021            >,
10022            <T as tonic::codegen::Service<
10023                http::Request<tonic::body::Body>,
10024            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
10025        {
10026            SqlIamPoliciesServiceClient::new(InterceptedService::new(inner, interceptor))
10027        }
10028        /// Compress requests with the given encoding.
10029        ///
10030        /// This requires the server to support it otherwise it might respond with an
10031        /// error.
10032        #[must_use]
10033        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10034            self.inner = self.inner.send_compressed(encoding);
10035            self
10036        }
10037        /// Enable decompressing responses.
10038        #[must_use]
10039        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10040            self.inner = self.inner.accept_compressed(encoding);
10041            self
10042        }
10043        /// Limits the maximum size of a decoded message.
10044        ///
10045        /// Default: `4MB`
10046        #[must_use]
10047        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
10048            self.inner = self.inner.max_decoding_message_size(limit);
10049            self
10050        }
10051        /// Limits the maximum size of an encoded message.
10052        ///
10053        /// Default: `usize::MAX`
10054        #[must_use]
10055        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
10056            self.inner = self.inner.max_encoding_message_size(limit);
10057            self
10058        }
10059    }
10060}
10061#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10062pub struct SqlTiersListRequest {
10063    /// Project ID of the project for which to list tiers.
10064    #[prost(string, tag = "1")]
10065    pub project: ::prost::alloc::string::String,
10066}
10067/// Tiers list response.
10068#[derive(Clone, PartialEq, ::prost::Message)]
10069pub struct TiersListResponse {
10070    /// This is always `sql#tiersList`.
10071    #[prost(string, tag = "1")]
10072    pub kind: ::prost::alloc::string::String,
10073    /// List of tiers.
10074    #[prost(message, repeated, tag = "2")]
10075    pub items: ::prost::alloc::vec::Vec<Tier>,
10076}
10077/// A Google Cloud SQL service tier resource.
10078#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10079pub struct Tier {
10080    /// An identifier for the machine type, for example, `db-custom-1-3840`. For
10081    /// related information, see [Pricing](/sql/pricing).
10082    #[prost(string, tag = "1")]
10083    pub tier: ::prost::alloc::string::String,
10084    /// The maximum RAM usage of this tier in bytes.
10085    #[prost(int64, tag = "2")]
10086    pub ram: i64,
10087    /// This is always `sql#tier`.
10088    #[prost(string, tag = "3")]
10089    pub kind: ::prost::alloc::string::String,
10090    /// The maximum disk size of this tier in bytes.
10091    #[prost(int64, tag = "4")]
10092    pub disk_quota: i64,
10093    /// The applicable regions for this tier.
10094    #[prost(string, repeated, tag = "5")]
10095    pub region: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10096}
10097/// Generated client implementations.
10098pub mod sql_tiers_service_client {
10099    #![allow(
10100        unused_variables,
10101        dead_code,
10102        missing_docs,
10103        clippy::wildcard_imports,
10104        clippy::let_unit_value,
10105    )]
10106    use tonic::codegen::*;
10107    use tonic::codegen::http::Uri;
10108    /// Service for providing machine types (tiers) for Cloud SQL.
10109    #[derive(Debug, Clone)]
10110    pub struct SqlTiersServiceClient<T> {
10111        inner: tonic::client::Grpc<T>,
10112    }
10113    impl<T> SqlTiersServiceClient<T>
10114    where
10115        T: tonic::client::GrpcService<tonic::body::Body>,
10116        T::Error: Into<StdError>,
10117        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
10118        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
10119    {
10120        pub fn new(inner: T) -> Self {
10121            let inner = tonic::client::Grpc::new(inner);
10122            Self { inner }
10123        }
10124        pub fn with_origin(inner: T, origin: Uri) -> Self {
10125            let inner = tonic::client::Grpc::with_origin(inner, origin);
10126            Self { inner }
10127        }
10128        pub fn with_interceptor<F>(
10129            inner: T,
10130            interceptor: F,
10131        ) -> SqlTiersServiceClient<InterceptedService<T, F>>
10132        where
10133            F: tonic::service::Interceptor,
10134            T::ResponseBody: Default,
10135            T: tonic::codegen::Service<
10136                http::Request<tonic::body::Body>,
10137                Response = http::Response<
10138                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
10139                >,
10140            >,
10141            <T as tonic::codegen::Service<
10142                http::Request<tonic::body::Body>,
10143            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
10144        {
10145            SqlTiersServiceClient::new(InterceptedService::new(inner, interceptor))
10146        }
10147        /// Compress requests with the given encoding.
10148        ///
10149        /// This requires the server to support it otherwise it might respond with an
10150        /// error.
10151        #[must_use]
10152        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10153            self.inner = self.inner.send_compressed(encoding);
10154            self
10155        }
10156        /// Enable decompressing responses.
10157        #[must_use]
10158        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10159            self.inner = self.inner.accept_compressed(encoding);
10160            self
10161        }
10162        /// Limits the maximum size of a decoded message.
10163        ///
10164        /// Default: `4MB`
10165        #[must_use]
10166        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
10167            self.inner = self.inner.max_decoding_message_size(limit);
10168            self
10169        }
10170        /// Limits the maximum size of an encoded message.
10171        ///
10172        /// Default: `usize::MAX`
10173        #[must_use]
10174        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
10175            self.inner = self.inner.max_encoding_message_size(limit);
10176            self
10177        }
10178        /// Lists all available machine types (tiers) for Cloud SQL, for example,
10179        /// `db-custom-1-3840`. For related information, see [Pricing](/sql/pricing).
10180        pub async fn list(
10181            &mut self,
10182            request: impl tonic::IntoRequest<super::SqlTiersListRequest>,
10183        ) -> std::result::Result<
10184            tonic::Response<super::TiersListResponse>,
10185            tonic::Status,
10186        > {
10187            self.inner
10188                .ready()
10189                .await
10190                .map_err(|e| {
10191                    tonic::Status::unknown(
10192                        format!("Service was not ready: {}", e.into()),
10193                    )
10194                })?;
10195            let codec = tonic_prost::ProstCodec::default();
10196            let path = http::uri::PathAndQuery::from_static(
10197                "/google.cloud.sql.v1beta4.SqlTiersService/List",
10198            );
10199            let mut req = request.into_request();
10200            req.extensions_mut()
10201                .insert(
10202                    GrpcMethod::new("google.cloud.sql.v1beta4.SqlTiersService", "List"),
10203                );
10204            self.inner.unary(req, path, codec).await
10205        }
10206    }
10207}
10208#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10209pub struct SqlUsersDeleteRequest {
10210    /// Host of the user in the instance.
10211    #[prost(string, tag = "1")]
10212    pub host: ::prost::alloc::string::String,
10213    /// Database instance ID. This does not include the project ID.
10214    #[prost(string, tag = "2")]
10215    pub instance: ::prost::alloc::string::String,
10216    /// Name of the user in the instance.
10217    #[prost(string, tag = "3")]
10218    pub name: ::prost::alloc::string::String,
10219    /// Project ID of the project that contains the instance.
10220    #[prost(string, tag = "4")]
10221    pub project: ::prost::alloc::string::String,
10222}
10223/// Request message for Users Get RPC
10224#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10225pub struct SqlUsersGetRequest {
10226    /// Database instance ID. This does not include the project ID.
10227    #[prost(string, tag = "1")]
10228    pub instance: ::prost::alloc::string::String,
10229    /// User of the instance.
10230    #[prost(string, tag = "2")]
10231    pub name: ::prost::alloc::string::String,
10232    /// Project ID of the project that contains the instance.
10233    #[prost(string, tag = "3")]
10234    pub project: ::prost::alloc::string::String,
10235    /// Host of a user of the instance.
10236    #[prost(string, tag = "4")]
10237    pub host: ::prost::alloc::string::String,
10238}
10239#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10240pub struct SqlUsersInsertRequest {
10241    /// Database instance ID. This does not include the project ID.
10242    #[prost(string, tag = "1")]
10243    pub instance: ::prost::alloc::string::String,
10244    /// Project ID of the project that contains the instance.
10245    #[prost(string, tag = "2")]
10246    pub project: ::prost::alloc::string::String,
10247    #[prost(message, optional, tag = "100")]
10248    pub body: ::core::option::Option<User>,
10249}
10250#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10251pub struct SqlUsersListRequest {
10252    /// Database instance ID. This does not include the project ID.
10253    #[prost(string, tag = "1")]
10254    pub instance: ::prost::alloc::string::String,
10255    /// Project ID of the project that contains the instance.
10256    #[prost(string, tag = "2")]
10257    pub project: ::prost::alloc::string::String,
10258}
10259#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10260pub struct SqlUsersUpdateRequest {
10261    /// Optional. Host of the user in the instance.
10262    #[prost(string, tag = "1")]
10263    pub host: ::prost::alloc::string::String,
10264    /// Database instance ID. This does not include the project ID.
10265    #[prost(string, tag = "2")]
10266    pub instance: ::prost::alloc::string::String,
10267    /// Name of the user in the instance.
10268    #[prost(string, tag = "3")]
10269    pub name: ::prost::alloc::string::String,
10270    /// Project ID of the project that contains the instance.
10271    #[prost(string, tag = "4")]
10272    pub project: ::prost::alloc::string::String,
10273    /// Optional. List of database roles to grant to the user. body.database_roles
10274    /// will be ignored for update request.
10275    #[prost(string, repeated, tag = "5")]
10276    pub database_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10277    /// Optional. Specifies whether to revoke existing roles that are not present
10278    /// in the `database_roles` field. If `false` or unset, the database roles
10279    /// specified in `database_roles` are added to the user's existing roles.
10280    #[prost(bool, optional, tag = "6")]
10281    pub revoke_existing_roles: ::core::option::Option<bool>,
10282    #[prost(message, optional, tag = "100")]
10283    pub body: ::core::option::Option<User>,
10284}
10285/// User level password validation policy.
10286#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
10287pub struct UserPasswordValidationPolicy {
10288    /// Number of failed login attempts allowed before user get locked.
10289    #[prost(int32, tag = "1")]
10290    pub allowed_failed_attempts: i32,
10291    /// Expiration duration after password is updated.
10292    #[prost(message, optional, tag = "2")]
10293    pub password_expiration_duration: ::core::option::Option<::prost_types::Duration>,
10294    /// If true, failed login attempts check will be enabled.
10295    #[prost(bool, tag = "3")]
10296    pub enable_failed_attempts_check: bool,
10297    /// Output only. Read-only password status.
10298    #[prost(message, optional, tag = "4")]
10299    pub status: ::core::option::Option<PasswordStatus>,
10300    /// If true, the user must specify the current password before changing the
10301    /// password. This flag is supported only for MySQL.
10302    #[prost(bool, tag = "5")]
10303    pub enable_password_verification: bool,
10304}
10305/// Read-only password status.
10306#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
10307pub struct PasswordStatus {
10308    /// If true, user does not have login privileges.
10309    #[prost(bool, tag = "1")]
10310    pub locked: bool,
10311    /// The expiration time of the current password.
10312    #[prost(message, optional, tag = "2")]
10313    pub password_expiration_time: ::core::option::Option<::prost_types::Timestamp>,
10314}
10315/// A Cloud SQL user resource.
10316#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10317pub struct User {
10318    /// This is always `sql#user`.
10319    #[prost(string, tag = "1")]
10320    pub kind: ::prost::alloc::string::String,
10321    /// The password for the user.
10322    #[prost(string, tag = "2")]
10323    pub password: ::prost::alloc::string::String,
10324    /// This field is deprecated and will be removed from a future version of the
10325    /// API.
10326    #[prost(string, tag = "3")]
10327    pub etag: ::prost::alloc::string::String,
10328    /// The name of the user in the Cloud SQL instance. Can be omitted for
10329    /// `update` because it is already specified in the URL.
10330    #[prost(string, tag = "4")]
10331    pub name: ::prost::alloc::string::String,
10332    /// Optional. The host from which the user can connect. For `insert`
10333    /// operations, host defaults to an empty string. For `update`
10334    /// operations, host is specified as part of the request URL. The host name
10335    /// cannot be updated after insertion.  For a MySQL instance, it's required;
10336    /// for a PostgreSQL or SQL Server instance, it's optional.
10337    #[prost(string, tag = "5")]
10338    pub host: ::prost::alloc::string::String,
10339    /// The name of the Cloud SQL instance. This does not include the project ID.
10340    /// Can be omitted for <b>update</b> because it is already specified on the
10341    /// URL.
10342    #[prost(string, tag = "6")]
10343    pub instance: ::prost::alloc::string::String,
10344    /// The project ID of the project containing the Cloud SQL database. The Google
10345    /// apps domain is prefixed if applicable. Can be omitted for
10346    /// <b>update</b> because it is already specified on the URL.
10347    #[prost(string, tag = "7")]
10348    pub project: ::prost::alloc::string::String,
10349    /// The user type. It determines the method to authenticate the user during
10350    /// login. The default is the database's built-in user type.
10351    #[prost(enumeration = "user::SqlUserType", tag = "8")]
10352    pub r#type: i32,
10353    /// Optional. The full email for an IAM user. For normal database users, this
10354    /// will not be filled. Only applicable to MySQL database users.
10355    #[prost(string, tag = "11")]
10356    pub iam_email: ::prost::alloc::string::String,
10357    /// User level password validation policy.
10358    #[prost(message, optional, tag = "12")]
10359    pub password_policy: ::core::option::Option<UserPasswordValidationPolicy>,
10360    /// Dual password status for the user.
10361    #[prost(enumeration = "user::DualPasswordType", optional, tag = "13")]
10362    pub dual_password_type: ::core::option::Option<i32>,
10363    /// Indicates if a group is active or inactive for IAM database authentication.
10364    #[prost(enumeration = "user::IamStatus", optional, tag = "14")]
10365    pub iam_status: ::core::option::Option<i32>,
10366    /// Optional. Role memberships of the user
10367    #[prost(string, repeated, tag = "15")]
10368    pub database_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10369    /// User details for specific database type
10370    #[prost(oneof = "user::UserDetails", tags = "9")]
10371    pub user_details: ::core::option::Option<user::UserDetails>,
10372}
10373/// Nested message and enum types in `User`.
10374pub mod user {
10375    /// The user type.
10376    #[derive(
10377        Clone,
10378        Copy,
10379        Debug,
10380        PartialEq,
10381        Eq,
10382        Hash,
10383        PartialOrd,
10384        Ord,
10385        ::prost::Enumeration
10386    )]
10387    #[repr(i32)]
10388    pub enum SqlUserType {
10389        /// The database's built-in user type.
10390        BuiltIn = 0,
10391        /// Cloud IAM user.
10392        CloudIamUser = 1,
10393        /// Cloud IAM service account.
10394        CloudIamServiceAccount = 2,
10395        /// Cloud IAM group. Not used for login.
10396        CloudIamGroup = 3,
10397        /// Read-only. Login for a user that belongs to the Cloud IAM group.
10398        CloudIamGroupUser = 4,
10399        /// Read-only. Login for a service account that belongs to the
10400        /// Cloud IAM group.
10401        CloudIamGroupServiceAccount = 5,
10402        /// Microsoft Entra ID user.
10403        EntraidUser = 7,
10404    }
10405    impl SqlUserType {
10406        /// String value of the enum field names used in the ProtoBuf definition.
10407        ///
10408        /// The values are not transformed in any way and thus are considered stable
10409        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
10410        pub fn as_str_name(&self) -> &'static str {
10411            match self {
10412                Self::BuiltIn => "BUILT_IN",
10413                Self::CloudIamUser => "CLOUD_IAM_USER",
10414                Self::CloudIamServiceAccount => "CLOUD_IAM_SERVICE_ACCOUNT",
10415                Self::CloudIamGroup => "CLOUD_IAM_GROUP",
10416                Self::CloudIamGroupUser => "CLOUD_IAM_GROUP_USER",
10417                Self::CloudIamGroupServiceAccount => "CLOUD_IAM_GROUP_SERVICE_ACCOUNT",
10418                Self::EntraidUser => "ENTRAID_USER",
10419            }
10420        }
10421        /// Creates an enum from field names used in the ProtoBuf definition.
10422        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
10423            match value {
10424                "BUILT_IN" => Some(Self::BuiltIn),
10425                "CLOUD_IAM_USER" => Some(Self::CloudIamUser),
10426                "CLOUD_IAM_SERVICE_ACCOUNT" => Some(Self::CloudIamServiceAccount),
10427                "CLOUD_IAM_GROUP" => Some(Self::CloudIamGroup),
10428                "CLOUD_IAM_GROUP_USER" => Some(Self::CloudIamGroupUser),
10429                "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" => {
10430                    Some(Self::CloudIamGroupServiceAccount)
10431                }
10432                "ENTRAID_USER" => Some(Self::EntraidUser),
10433                _ => None,
10434            }
10435        }
10436    }
10437    /// The type of retained password.
10438    #[derive(
10439        Clone,
10440        Copy,
10441        Debug,
10442        PartialEq,
10443        Eq,
10444        Hash,
10445        PartialOrd,
10446        Ord,
10447        ::prost::Enumeration
10448    )]
10449    #[repr(i32)]
10450    pub enum DualPasswordType {
10451        /// The default value.
10452        Unspecified = 0,
10453        /// Do not update the user's dual password status.
10454        NoModifyDualPassword = 1,
10455        /// No dual password usable for connecting using this user.
10456        NoDualPassword = 2,
10457        /// Dual password usable for connecting using this user.
10458        DualPassword = 3,
10459    }
10460    impl DualPasswordType {
10461        /// String value of the enum field names used in the ProtoBuf definition.
10462        ///
10463        /// The values are not transformed in any way and thus are considered stable
10464        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
10465        pub fn as_str_name(&self) -> &'static str {
10466            match self {
10467                Self::Unspecified => "DUAL_PASSWORD_TYPE_UNSPECIFIED",
10468                Self::NoModifyDualPassword => "NO_MODIFY_DUAL_PASSWORD",
10469                Self::NoDualPassword => "NO_DUAL_PASSWORD",
10470                Self::DualPassword => "DUAL_PASSWORD",
10471            }
10472        }
10473        /// Creates an enum from field names used in the ProtoBuf definition.
10474        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
10475            match value {
10476                "DUAL_PASSWORD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
10477                "NO_MODIFY_DUAL_PASSWORD" => Some(Self::NoModifyDualPassword),
10478                "NO_DUAL_PASSWORD" => Some(Self::NoDualPassword),
10479                "DUAL_PASSWORD" => Some(Self::DualPassword),
10480                _ => None,
10481            }
10482        }
10483    }
10484    /// Indicates if a group is available for IAM database authentication.
10485    #[derive(
10486        Clone,
10487        Copy,
10488        Debug,
10489        PartialEq,
10490        Eq,
10491        Hash,
10492        PartialOrd,
10493        Ord,
10494        ::prost::Enumeration
10495    )]
10496    #[repr(i32)]
10497    pub enum IamStatus {
10498        /// The default value for users that are not of type CLOUD_IAM_GROUP.
10499        /// Only CLOUD_IAM_GROUP users will be inactive or active.
10500        /// Users with an IamStatus of IAM_STATUS_UNSPECIFIED will not
10501        /// display whether they are active or inactive as that is not applicable to
10502        /// them.
10503        Unspecified = 0,
10504        /// INACTIVE indicates a group is not available for IAM database
10505        /// authentication.
10506        Inactive = 1,
10507        /// ACTIVE indicates a group is available for IAM database authentication.
10508        Active = 2,
10509    }
10510    impl IamStatus {
10511        /// String value of the enum field names used in the ProtoBuf definition.
10512        ///
10513        /// The values are not transformed in any way and thus are considered stable
10514        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
10515        pub fn as_str_name(&self) -> &'static str {
10516            match self {
10517                Self::Unspecified => "IAM_STATUS_UNSPECIFIED",
10518                Self::Inactive => "INACTIVE",
10519                Self::Active => "ACTIVE",
10520            }
10521        }
10522        /// Creates an enum from field names used in the ProtoBuf definition.
10523        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
10524            match value {
10525                "IAM_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
10526                "INACTIVE" => Some(Self::Inactive),
10527                "ACTIVE" => Some(Self::Active),
10528                _ => None,
10529            }
10530        }
10531    }
10532    /// User details for specific database type
10533    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
10534    pub enum UserDetails {
10535        #[prost(message, tag = "9")]
10536        SqlserverUserDetails(super::SqlServerUserDetails),
10537    }
10538}
10539/// Represents a Sql Server user on the Cloud SQL instance.
10540#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10541pub struct SqlServerUserDetails {
10542    /// If the user has been disabled
10543    #[prost(bool, tag = "1")]
10544    pub disabled: bool,
10545    /// The server roles for this user
10546    #[prost(string, repeated, tag = "2")]
10547    pub server_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10548}
10549/// User list response.
10550#[derive(Clone, PartialEq, ::prost::Message)]
10551pub struct UsersListResponse {
10552    /// This is always <b>sql#usersList</b>.
10553    #[prost(string, tag = "1")]
10554    pub kind: ::prost::alloc::string::String,
10555    /// List of user resources in the instance.
10556    #[prost(message, repeated, tag = "2")]
10557    pub items: ::prost::alloc::vec::Vec<User>,
10558    /// Unused.
10559    #[deprecated]
10560    #[prost(string, tag = "3")]
10561    pub next_page_token: ::prost::alloc::string::String,
10562}
10563/// Generated client implementations.
10564pub mod sql_users_service_client {
10565    #![allow(
10566        unused_variables,
10567        dead_code,
10568        missing_docs,
10569        clippy::wildcard_imports,
10570        clippy::let_unit_value,
10571    )]
10572    use tonic::codegen::*;
10573    use tonic::codegen::http::Uri;
10574    #[derive(Debug, Clone)]
10575    pub struct SqlUsersServiceClient<T> {
10576        inner: tonic::client::Grpc<T>,
10577    }
10578    impl<T> SqlUsersServiceClient<T>
10579    where
10580        T: tonic::client::GrpcService<tonic::body::Body>,
10581        T::Error: Into<StdError>,
10582        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
10583        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
10584    {
10585        pub fn new(inner: T) -> Self {
10586            let inner = tonic::client::Grpc::new(inner);
10587            Self { inner }
10588        }
10589        pub fn with_origin(inner: T, origin: Uri) -> Self {
10590            let inner = tonic::client::Grpc::with_origin(inner, origin);
10591            Self { inner }
10592        }
10593        pub fn with_interceptor<F>(
10594            inner: T,
10595            interceptor: F,
10596        ) -> SqlUsersServiceClient<InterceptedService<T, F>>
10597        where
10598            F: tonic::service::Interceptor,
10599            T::ResponseBody: Default,
10600            T: tonic::codegen::Service<
10601                http::Request<tonic::body::Body>,
10602                Response = http::Response<
10603                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
10604                >,
10605            >,
10606            <T as tonic::codegen::Service<
10607                http::Request<tonic::body::Body>,
10608            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
10609        {
10610            SqlUsersServiceClient::new(InterceptedService::new(inner, interceptor))
10611        }
10612        /// Compress requests with the given encoding.
10613        ///
10614        /// This requires the server to support it otherwise it might respond with an
10615        /// error.
10616        #[must_use]
10617        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10618            self.inner = self.inner.send_compressed(encoding);
10619            self
10620        }
10621        /// Enable decompressing responses.
10622        #[must_use]
10623        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10624            self.inner = self.inner.accept_compressed(encoding);
10625            self
10626        }
10627        /// Limits the maximum size of a decoded message.
10628        ///
10629        /// Default: `4MB`
10630        #[must_use]
10631        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
10632            self.inner = self.inner.max_decoding_message_size(limit);
10633            self
10634        }
10635        /// Limits the maximum size of an encoded message.
10636        ///
10637        /// Default: `usize::MAX`
10638        #[must_use]
10639        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
10640            self.inner = self.inner.max_encoding_message_size(limit);
10641            self
10642        }
10643        /// Deletes a user from a Cloud SQL instance.
10644        pub async fn delete(
10645            &mut self,
10646            request: impl tonic::IntoRequest<super::SqlUsersDeleteRequest>,
10647        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
10648            self.inner
10649                .ready()
10650                .await
10651                .map_err(|e| {
10652                    tonic::Status::unknown(
10653                        format!("Service was not ready: {}", e.into()),
10654                    )
10655                })?;
10656            let codec = tonic_prost::ProstCodec::default();
10657            let path = http::uri::PathAndQuery::from_static(
10658                "/google.cloud.sql.v1beta4.SqlUsersService/Delete",
10659            );
10660            let mut req = request.into_request();
10661            req.extensions_mut()
10662                .insert(
10663                    GrpcMethod::new("google.cloud.sql.v1beta4.SqlUsersService", "Delete"),
10664                );
10665            self.inner.unary(req, path, codec).await
10666        }
10667        /// Retrieves a resource containing information about a user.
10668        pub async fn get(
10669            &mut self,
10670            request: impl tonic::IntoRequest<super::SqlUsersGetRequest>,
10671        ) -> std::result::Result<tonic::Response<super::User>, tonic::Status> {
10672            self.inner
10673                .ready()
10674                .await
10675                .map_err(|e| {
10676                    tonic::Status::unknown(
10677                        format!("Service was not ready: {}", e.into()),
10678                    )
10679                })?;
10680            let codec = tonic_prost::ProstCodec::default();
10681            let path = http::uri::PathAndQuery::from_static(
10682                "/google.cloud.sql.v1beta4.SqlUsersService/Get",
10683            );
10684            let mut req = request.into_request();
10685            req.extensions_mut()
10686                .insert(
10687                    GrpcMethod::new("google.cloud.sql.v1beta4.SqlUsersService", "Get"),
10688                );
10689            self.inner.unary(req, path, codec).await
10690        }
10691        /// Creates a new user in a Cloud SQL instance.
10692        pub async fn insert(
10693            &mut self,
10694            request: impl tonic::IntoRequest<super::SqlUsersInsertRequest>,
10695        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
10696            self.inner
10697                .ready()
10698                .await
10699                .map_err(|e| {
10700                    tonic::Status::unknown(
10701                        format!("Service was not ready: {}", e.into()),
10702                    )
10703                })?;
10704            let codec = tonic_prost::ProstCodec::default();
10705            let path = http::uri::PathAndQuery::from_static(
10706                "/google.cloud.sql.v1beta4.SqlUsersService/Insert",
10707            );
10708            let mut req = request.into_request();
10709            req.extensions_mut()
10710                .insert(
10711                    GrpcMethod::new("google.cloud.sql.v1beta4.SqlUsersService", "Insert"),
10712                );
10713            self.inner.unary(req, path, codec).await
10714        }
10715        /// Lists users in the specified Cloud SQL instance.
10716        pub async fn list(
10717            &mut self,
10718            request: impl tonic::IntoRequest<super::SqlUsersListRequest>,
10719        ) -> std::result::Result<
10720            tonic::Response<super::UsersListResponse>,
10721            tonic::Status,
10722        > {
10723            self.inner
10724                .ready()
10725                .await
10726                .map_err(|e| {
10727                    tonic::Status::unknown(
10728                        format!("Service was not ready: {}", e.into()),
10729                    )
10730                })?;
10731            let codec = tonic_prost::ProstCodec::default();
10732            let path = http::uri::PathAndQuery::from_static(
10733                "/google.cloud.sql.v1beta4.SqlUsersService/List",
10734            );
10735            let mut req = request.into_request();
10736            req.extensions_mut()
10737                .insert(
10738                    GrpcMethod::new("google.cloud.sql.v1beta4.SqlUsersService", "List"),
10739                );
10740            self.inner.unary(req, path, codec).await
10741        }
10742        /// Updates an existing user in a Cloud SQL instance.
10743        pub async fn update(
10744            &mut self,
10745            request: impl tonic::IntoRequest<super::SqlUsersUpdateRequest>,
10746        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
10747            self.inner
10748                .ready()
10749                .await
10750                .map_err(|e| {
10751                    tonic::Status::unknown(
10752                        format!("Service was not ready: {}", e.into()),
10753                    )
10754                })?;
10755            let codec = tonic_prost::ProstCodec::default();
10756            let path = http::uri::PathAndQuery::from_static(
10757                "/google.cloud.sql.v1beta4.SqlUsersService/Update",
10758            );
10759            let mut req = request.into_request();
10760            req.extensions_mut()
10761                .insert(
10762                    GrpcMethod::new("google.cloud.sql.v1beta4.SqlUsersService", "Update"),
10763                );
10764            self.inner.unary(req, path, codec).await
10765        }
10766    }
10767}