Skip to main content

googleapis_tonic_google_cloud_sql_v1/vec_u8_hash_map/
google.cloud.sql.v1.rs

1// This file is @generated by prost-build.
2/// Generated client implementations.
3pub mod sql_available_database_versions_service_client {
4    #![allow(
5        unused_variables,
6        dead_code,
7        missing_docs,
8        clippy::wildcard_imports,
9        clippy::let_unit_value,
10    )]
11    use tonic::codegen::*;
12    use tonic::codegen::http::Uri;
13    /// Service that exposes Cloud SQL database versions information. This
14    /// service is only used internally.
15    #[derive(Debug, Clone)]
16    pub struct SqlAvailableDatabaseVersionsServiceClient<T> {
17        inner: tonic::client::Grpc<T>,
18    }
19    impl<T> SqlAvailableDatabaseVersionsServiceClient<T>
20    where
21        T: tonic::client::GrpcService<tonic::body::Body>,
22        T::Error: Into<StdError>,
23        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
24        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
25    {
26        pub fn new(inner: T) -> Self {
27            let inner = tonic::client::Grpc::new(inner);
28            Self { inner }
29        }
30        pub fn with_origin(inner: T, origin: Uri) -> Self {
31            let inner = tonic::client::Grpc::with_origin(inner, origin);
32            Self { inner }
33        }
34        pub fn with_interceptor<F>(
35            inner: T,
36            interceptor: F,
37        ) -> SqlAvailableDatabaseVersionsServiceClient<InterceptedService<T, F>>
38        where
39            F: tonic::service::Interceptor,
40            T::ResponseBody: Default,
41            T: tonic::codegen::Service<
42                http::Request<tonic::body::Body>,
43                Response = http::Response<
44                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
45                >,
46            >,
47            <T as tonic::codegen::Service<
48                http::Request<tonic::body::Body>,
49            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
50        {
51            SqlAvailableDatabaseVersionsServiceClient::new(
52                InterceptedService::new(inner, interceptor),
53            )
54        }
55        /// Compress requests with the given encoding.
56        ///
57        /// This requires the server to support it otherwise it might respond with an
58        /// error.
59        #[must_use]
60        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
61            self.inner = self.inner.send_compressed(encoding);
62            self
63        }
64        /// Enable decompressing responses.
65        #[must_use]
66        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
67            self.inner = self.inner.accept_compressed(encoding);
68            self
69        }
70        /// Limits the maximum size of a decoded message.
71        ///
72        /// Default: `4MB`
73        #[must_use]
74        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
75            self.inner = self.inner.max_decoding_message_size(limit);
76            self
77        }
78        /// Limits the maximum size of an encoded message.
79        ///
80        /// Default: `usize::MAX`
81        #[must_use]
82        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
83            self.inner = self.inner.max_encoding_message_size(limit);
84            self
85        }
86    }
87}
88/// An entry for an Access Control list.
89#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
90pub struct AclEntry {
91    /// The allowlisted value for the access control list.
92    #[prost(string, tag = "1")]
93    pub value: ::prost::alloc::string::String,
94    /// The time when this access control entry expires in
95    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
96    /// `2012-11-15T16:19:00.094Z`.
97    #[prost(message, optional, tag = "2")]
98    pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
99    /// Optional. A label to identify this entry.
100    #[prost(string, tag = "3")]
101    pub name: ::prost::alloc::string::String,
102    /// This is always `sql#aclEntry`.
103    #[prost(string, tag = "4")]
104    pub kind: ::prost::alloc::string::String,
105}
106/// An Admin API warning message.
107#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
108pub struct ApiWarning {
109    /// Code to uniquely identify the warning type.
110    #[prost(enumeration = "api_warning::SqlApiWarningCode", tag = "1")]
111    pub code: i32,
112    /// The warning message.
113    #[prost(string, tag = "2")]
114    pub message: ::prost::alloc::string::String,
115    /// The region name for REGION_UNREACHABLE warning.
116    #[prost(string, tag = "3")]
117    pub region: ::prost::alloc::string::String,
118}
119/// Nested message and enum types in `ApiWarning`.
120pub mod api_warning {
121    #[derive(
122        Clone,
123        Copy,
124        Debug,
125        PartialEq,
126        Eq,
127        Hash,
128        PartialOrd,
129        Ord,
130        ::prost::Enumeration
131    )]
132    #[repr(i32)]
133    pub enum SqlApiWarningCode {
134        /// An unknown or unset warning type from Cloud SQL API.
135        Unspecified = 0,
136        /// Warning when one or more regions are not reachable.  The returned result
137        /// set may be incomplete.
138        RegionUnreachable = 1,
139        /// Warning when user provided maxResults parameter exceeds the limit.  The
140        /// returned result set may be incomplete.
141        MaxResultsExceedsLimit = 2,
142        /// Warning when user tries to create/update a user with credentials that
143        /// have previously been compromised by a public data breach.
144        CompromisedCredentials = 3,
145        /// Warning when the operation succeeds but some non-critical workflow state
146        /// failed.
147        InternalStateFailure = 4,
148    }
149    impl SqlApiWarningCode {
150        /// String value of the enum field names used in the ProtoBuf definition.
151        ///
152        /// The values are not transformed in any way and thus are considered stable
153        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
154        pub fn as_str_name(&self) -> &'static str {
155            match self {
156                Self::Unspecified => "SQL_API_WARNING_CODE_UNSPECIFIED",
157                Self::RegionUnreachable => "REGION_UNREACHABLE",
158                Self::MaxResultsExceedsLimit => "MAX_RESULTS_EXCEEDS_LIMIT",
159                Self::CompromisedCredentials => "COMPROMISED_CREDENTIALS",
160                Self::InternalStateFailure => "INTERNAL_STATE_FAILURE",
161            }
162        }
163        /// Creates an enum from field names used in the ProtoBuf definition.
164        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
165            match value {
166                "SQL_API_WARNING_CODE_UNSPECIFIED" => Some(Self::Unspecified),
167                "REGION_UNREACHABLE" => Some(Self::RegionUnreachable),
168                "MAX_RESULTS_EXCEEDS_LIMIT" => Some(Self::MaxResultsExceedsLimit),
169                "COMPROMISED_CREDENTIALS" => Some(Self::CompromisedCredentials),
170                "INTERNAL_STATE_FAILURE" => Some(Self::InternalStateFailure),
171                _ => None,
172            }
173        }
174    }
175}
176/// We currently only support backup retention by specifying the number
177/// of backups we will retain.
178#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
179pub struct BackupRetentionSettings {
180    /// The unit that 'retained_backups' represents.
181    #[prost(enumeration = "backup_retention_settings::RetentionUnit", tag = "1")]
182    pub retention_unit: i32,
183    /// Depending on the value of retention_unit, this is used to determine
184    /// if a backup needs to be deleted.  If retention_unit is 'COUNT', we will
185    /// retain this many backups.
186    #[prost(message, optional, tag = "2")]
187    pub retained_backups: ::core::option::Option<i32>,
188}
189/// Nested message and enum types in `BackupRetentionSettings`.
190pub mod backup_retention_settings {
191    /// The units that retained_backups specifies, we only support COUNT.
192    #[derive(
193        Clone,
194        Copy,
195        Debug,
196        PartialEq,
197        Eq,
198        Hash,
199        PartialOrd,
200        Ord,
201        ::prost::Enumeration
202    )]
203    #[repr(i32)]
204    pub enum RetentionUnit {
205        /// Backup retention unit is unspecified, will be treated as COUNT.
206        Unspecified = 0,
207        /// Retention will be by count, eg. "retain the most recent 7 backups".
208        Count = 1,
209    }
210    impl RetentionUnit {
211        /// String value of the enum field names used in the ProtoBuf definition.
212        ///
213        /// The values are not transformed in any way and thus are considered stable
214        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
215        pub fn as_str_name(&self) -> &'static str {
216            match self {
217                Self::Unspecified => "RETENTION_UNIT_UNSPECIFIED",
218                Self::Count => "COUNT",
219            }
220        }
221        /// Creates an enum from field names used in the ProtoBuf definition.
222        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
223            match value {
224                "RETENTION_UNIT_UNSPECIFIED" => Some(Self::Unspecified),
225                "COUNT" => Some(Self::Count),
226                _ => None,
227            }
228        }
229    }
230}
231/// Database instance backup configuration.
232#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
233pub struct BackupConfiguration {
234    /// Start time for the daily backup configuration in UTC timezone in the 24
235    /// hour format - `HH:MM`.
236    #[prost(string, tag = "1")]
237    pub start_time: ::prost::alloc::string::String,
238    /// Whether this configuration is enabled.
239    #[prost(message, optional, tag = "2")]
240    pub enabled: ::core::option::Option<bool>,
241    /// This is always `sql#backupConfiguration`.
242    #[prost(string, tag = "3")]
243    pub kind: ::prost::alloc::string::String,
244    /// (MySQL only) Whether binary log is enabled. If backup configuration is
245    /// disabled, binarylog must be disabled as well.
246    #[prost(message, optional, tag = "4")]
247    pub binary_log_enabled: ::core::option::Option<bool>,
248    /// Reserved for future use.
249    #[prost(message, optional, tag = "5")]
250    pub replication_log_archiving_enabled: ::core::option::Option<bool>,
251    /// Location of the backup
252    #[prost(string, tag = "6")]
253    pub location: ::prost::alloc::string::String,
254    /// Whether point in time recovery is enabled.
255    #[prost(message, optional, tag = "7")]
256    pub point_in_time_recovery_enabled: ::core::option::Option<bool>,
257    /// Backup retention settings.
258    #[prost(message, optional, tag = "8")]
259    pub backup_retention_settings: ::core::option::Option<BackupRetentionSettings>,
260    /// The number of days of transaction logs we retain for point in time
261    /// restore, from 1-7.
262    #[prost(message, optional, tag = "9")]
263    pub transaction_log_retention_days: ::core::option::Option<i32>,
264    /// Output only. This value contains the storage location of transactional logs
265    /// used to perform point-in-time recovery (PITR) for the database.
266    #[prost(
267        enumeration = "backup_configuration::TransactionalLogStorageState",
268        optional,
269        tag = "10"
270    )]
271    pub transactional_log_storage_state: ::core::option::Option<i32>,
272    /// Output only. Backup tier that manages the backups for the instance.
273    #[prost(enumeration = "backup_configuration::BackupTier", optional, tag = "11")]
274    pub backup_tier: ::core::option::Option<i32>,
275}
276/// Nested message and enum types in `BackupConfiguration`.
277pub mod backup_configuration {
278    /// This value contains the storage location of the transactional logs
279    /// used to perform point-in-time recovery (PITR) for the database.
280    #[derive(
281        Clone,
282        Copy,
283        Debug,
284        PartialEq,
285        Eq,
286        Hash,
287        PartialOrd,
288        Ord,
289        ::prost::Enumeration
290    )]
291    #[repr(i32)]
292    pub enum TransactionalLogStorageState {
293        /// Unspecified.
294        Unspecified = 0,
295        /// The transaction logs used for PITR for the instance are stored
296        /// on a data disk.
297        Disk = 1,
298        /// The transaction logs used for PITR for the instance are switching from
299        /// being stored on a data disk to being stored in Cloud Storage.
300        /// Only applicable to MySQL.
301        SwitchingToCloudStorage = 2,
302        /// The transaction logs used for PITR for the instance are now stored
303        /// in Cloud Storage. Previously, they were stored on a data disk.
304        /// Only applicable to MySQL.
305        SwitchedToCloudStorage = 3,
306        /// The transaction logs used for PITR for the instance are stored in
307        /// Cloud Storage. Only applicable to MySQL and PostgreSQL.
308        CloudStorage = 4,
309    }
310    impl TransactionalLogStorageState {
311        /// String value of the enum field names used in the ProtoBuf definition.
312        ///
313        /// The values are not transformed in any way and thus are considered stable
314        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
315        pub fn as_str_name(&self) -> &'static str {
316            match self {
317                Self::Unspecified => "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED",
318                Self::Disk => "DISK",
319                Self::SwitchingToCloudStorage => "SWITCHING_TO_CLOUD_STORAGE",
320                Self::SwitchedToCloudStorage => "SWITCHED_TO_CLOUD_STORAGE",
321                Self::CloudStorage => "CLOUD_STORAGE",
322            }
323        }
324        /// Creates an enum from field names used in the ProtoBuf definition.
325        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
326            match value {
327                "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
328                "DISK" => Some(Self::Disk),
329                "SWITCHING_TO_CLOUD_STORAGE" => Some(Self::SwitchingToCloudStorage),
330                "SWITCHED_TO_CLOUD_STORAGE" => Some(Self::SwitchedToCloudStorage),
331                "CLOUD_STORAGE" => Some(Self::CloudStorage),
332                _ => None,
333            }
334        }
335    }
336    /// Backup tier that manages the backups for the instance.
337    #[derive(
338        Clone,
339        Copy,
340        Debug,
341        PartialEq,
342        Eq,
343        Hash,
344        PartialOrd,
345        Ord,
346        ::prost::Enumeration
347    )]
348    #[repr(i32)]
349    pub enum BackupTier {
350        /// Unspecified.
351        Unspecified = 0,
352        /// Instance is managed by Cloud SQL.
353        Standard = 1,
354        /// Deprecated: ADVANCED is deprecated. Please use ENHANCED instead.
355        #[deprecated]
356        Advanced = 2,
357        /// Instance is managed by Google Cloud Backup and DR Service.
358        Enhanced = 3,
359    }
360    impl BackupTier {
361        /// String value of the enum field names used in the ProtoBuf definition.
362        ///
363        /// The values are not transformed in any way and thus are considered stable
364        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
365        pub fn as_str_name(&self) -> &'static str {
366            match self {
367                Self::Unspecified => "BACKUP_TIER_UNSPECIFIED",
368                Self::Standard => "STANDARD",
369                #[allow(deprecated)]
370                Self::Advanced => "ADVANCED",
371                Self::Enhanced => "ENHANCED",
372            }
373        }
374        /// Creates an enum from field names used in the ProtoBuf definition.
375        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
376            match value {
377                "BACKUP_TIER_UNSPECIFIED" => Some(Self::Unspecified),
378                "STANDARD" => Some(Self::Standard),
379                "ADVANCED" => Some(#[allow(deprecated)] Self::Advanced),
380                "ENHANCED" => Some(Self::Enhanced),
381                _ => None,
382            }
383        }
384    }
385}
386/// Perform disk shrink context.
387#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
388pub struct PerformDiskShrinkContext {
389    /// The target disk shrink size in GigaBytes.
390    #[prost(int64, tag = "1")]
391    pub target_size_gb: i64,
392}
393/// Structured PreCheckResponse containing message, type, and required
394/// actions.
395#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
396pub struct PreCheckResponse {
397    /// The message to be displayed to the user.
398    #[prost(string, optional, tag = "2")]
399    pub message: ::core::option::Option<::prost::alloc::string::String>,
400    /// The type of message whether it is an info, warning, or error.
401    #[prost(enumeration = "pre_check_response::MessageType", optional, tag = "3")]
402    pub message_type: ::core::option::Option<i32>,
403    /// The actions that the user needs to take. Use repeated for multiple
404    /// actions.
405    #[prost(string, repeated, tag = "4")]
406    pub actions_required: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
407}
408/// Nested message and enum types in `PreCheckResponse`.
409pub mod pre_check_response {
410    /// The type of message which can be an info, a warning, or an error that
411    /// requires user intervention.
412    #[derive(
413        Clone,
414        Copy,
415        Debug,
416        PartialEq,
417        Eq,
418        Hash,
419        PartialOrd,
420        Ord,
421        ::prost::Enumeration
422    )]
423    #[repr(i32)]
424    pub enum MessageType {
425        /// Default unspecified value to prevent unintended behavior changes.
426        Unspecified = 0,
427        /// General informational messages that don't require action.
428        Info = 1,
429        /// Warnings that might impact the upgrade but don't block it.
430        Warning = 2,
431        /// Errors that a user must resolve before proceeding with the upgrade.
432        Error = 3,
433    }
434    impl MessageType {
435        /// String value of the enum field names used in the ProtoBuf definition.
436        ///
437        /// The values are not transformed in any way and thus are considered stable
438        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
439        pub fn as_str_name(&self) -> &'static str {
440            match self {
441                Self::Unspecified => "MESSAGE_TYPE_UNSPECIFIED",
442                Self::Info => "INFO",
443                Self::Warning => "WARNING",
444                Self::Error => "ERROR",
445            }
446        }
447        /// Creates an enum from field names used in the ProtoBuf definition.
448        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
449            match value {
450                "MESSAGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
451                "INFO" => Some(Self::Info),
452                "WARNING" => Some(Self::Warning),
453                "ERROR" => Some(Self::Error),
454                _ => None,
455            }
456        }
457    }
458}
459/// Pre-check major version upgrade context.
460#[derive(Clone, PartialEq, ::prost::Message)]
461pub struct PreCheckMajorVersionUpgradeContext {
462    /// Required. The target database version to upgrade to.
463    #[prost(enumeration = "SqlDatabaseVersion", tag = "1")]
464    pub target_database_version: i32,
465    /// Output only. The responses from the precheck operation.
466    #[prost(message, repeated, tag = "2")]
467    pub pre_check_response: ::prost::alloc::vec::Vec<PreCheckResponse>,
468    /// Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.
469    #[prost(string, tag = "3")]
470    pub kind: ::prost::alloc::string::String,
471}
472/// Backup context.
473#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
474pub struct BackupContext {
475    /// The identifier of the backup.
476    #[prost(int64, tag = "1")]
477    pub backup_id: i64,
478    /// This is always `sql#backupContext`.
479    #[prost(string, tag = "2")]
480    pub kind: ::prost::alloc::string::String,
481    /// The name of the backup.
482    /// Format: projects/{project}/backups/{backup}
483    #[prost(string, tag = "3")]
484    pub name: ::prost::alloc::string::String,
485}
486/// Represents a SQL database on the Cloud SQL instance.
487#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
488pub struct Database {
489    /// This is always `sql#database`.
490    #[prost(string, tag = "1")]
491    pub kind: ::prost::alloc::string::String,
492    /// The Cloud SQL charset value.
493    #[prost(string, tag = "2")]
494    pub charset: ::prost::alloc::string::String,
495    /// The Cloud SQL collation value.
496    #[prost(string, tag = "3")]
497    pub collation: ::prost::alloc::string::String,
498    /// This field is deprecated and will be removed from a future version of the
499    /// API.
500    #[prost(string, tag = "4")]
501    pub etag: ::prost::alloc::string::String,
502    /// The name of the database in the Cloud SQL instance. This does not include
503    /// the project ID or instance name.
504    #[prost(string, tag = "5")]
505    pub name: ::prost::alloc::string::String,
506    /// The name of the Cloud SQL instance. This does not include the project ID.
507    #[prost(string, tag = "6")]
508    pub instance: ::prost::alloc::string::String,
509    /// The URI of this resource.
510    #[prost(string, tag = "7")]
511    pub self_link: ::prost::alloc::string::String,
512    /// The project ID of the project containing the Cloud SQL database. The Google
513    /// apps domain is prefixed if applicable.
514    #[prost(string, tag = "8")]
515    pub project: ::prost::alloc::string::String,
516    #[prost(oneof = "database::DatabaseDetails", tags = "9")]
517    pub database_details: ::core::option::Option<database::DatabaseDetails>,
518}
519/// Nested message and enum types in `Database`.
520pub mod database {
521    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
522    pub enum DatabaseDetails {
523        #[prost(message, tag = "9")]
524        SqlserverDatabaseDetails(super::SqlServerDatabaseDetails),
525    }
526}
527/// Represents a Sql Server database on the Cloud SQL instance.
528#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
529pub struct SqlServerDatabaseDetails {
530    /// The version of SQL Server with which the database is to be made compatible
531    #[prost(int32, tag = "1")]
532    pub compatibility_level: i32,
533    /// The recovery model of a SQL Server database
534    #[prost(string, tag = "2")]
535    pub recovery_model: ::prost::alloc::string::String,
536}
537/// Database flags for Cloud SQL instances.
538#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
539pub struct DatabaseFlags {
540    /// The name of the flag. These flags are passed at instance startup, so
541    /// include both server options and system variables. Flags are
542    /// specified with underscores, not hyphens. For more information, see
543    /// [Configuring Database Flags](<https://cloud.google.com/sql/docs/mysql/flags>)
544    /// in the Cloud SQL documentation.
545    #[prost(string, tag = "1")]
546    pub name: ::prost::alloc::string::String,
547    /// The value of the flag. Boolean flags are set to `on` for true
548    /// and `off` for false. This field must be omitted if the flag
549    /// doesn't take a value.
550    #[prost(string, tag = "2")]
551    pub value: ::prost::alloc::string::String,
552}
553/// MySQL-specific external server sync settings.
554#[derive(Clone, PartialEq, ::prost::Message)]
555pub struct MySqlSyncConfig {
556    /// Flags to use for the initial dump.
557    #[prost(message, repeated, tag = "1")]
558    pub initial_sync_flags: ::prost::alloc::vec::Vec<SyncFlags>,
559}
560/// Initial sync flags for certain Cloud SQL APIs.
561/// Currently used for the MySQL external server initial dump.
562#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
563pub struct SyncFlags {
564    /// The name of the flag.
565    #[prost(string, tag = "1")]
566    pub name: ::prost::alloc::string::String,
567    /// The value of the flag. This field must be omitted if the flag
568    /// doesn't take a value.
569    #[prost(string, tag = "2")]
570    pub value: ::prost::alloc::string::String,
571}
572/// Reference to another Cloud SQL instance.
573#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
574pub struct InstanceReference {
575    /// The name of the Cloud SQL instance being referenced.
576    /// This does not include the project ID.
577    #[prost(string, tag = "1")]
578    pub name: ::prost::alloc::string::String,
579    /// The region of the Cloud SQL instance being referenced.
580    #[prost(string, tag = "2")]
581    pub region: ::prost::alloc::string::String,
582    /// The project ID of the Cloud SQL instance being referenced.
583    /// The default is the same project ID as the instance references it.
584    #[prost(string, tag = "3")]
585    pub project: ::prost::alloc::string::String,
586}
587/// Read-replica configuration for connecting to the on-premises primary
588/// instance.
589#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
590pub struct DemoteMasterConfiguration {
591    /// This is always `sql#demoteMasterConfiguration`.
592    #[prost(string, tag = "1")]
593    pub kind: ::prost::alloc::string::String,
594    /// MySQL specific configuration when replicating from a MySQL on-premises
595    /// primary instance. Replication configuration information such as the
596    /// username, password, certificates, and keys are not stored in the instance
597    /// metadata. The configuration information is used only to set up the
598    /// replication connection and is stored by MySQL in a file named
599    /// `master.info` in the data directory.
600    #[prost(message, optional, tag = "2")]
601    pub mysql_replica_configuration: ::core::option::Option<
602        DemoteMasterMySqlReplicaConfiguration,
603    >,
604}
605/// Read-replica configuration specific to MySQL databases.
606#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
607pub struct DemoteMasterMySqlReplicaConfiguration {
608    /// This is always `sql#demoteMasterMysqlReplicaConfiguration`.
609    #[prost(string, tag = "1")]
610    pub kind: ::prost::alloc::string::String,
611    /// The username for the replication connection.
612    #[prost(string, tag = "2")]
613    pub username: ::prost::alloc::string::String,
614    /// The password for the replication connection.
615    #[prost(string, tag = "3")]
616    pub password: ::prost::alloc::string::String,
617    /// PEM representation of the replica's private key. The corresponding public
618    /// key is encoded in the client's certificate. The format of the replica's
619    /// private key can be either PKCS #1 or PKCS #8.
620    #[prost(string, tag = "4")]
621    pub client_key: ::prost::alloc::string::String,
622    /// PEM representation of the replica's x509 certificate.
623    #[prost(string, tag = "5")]
624    pub client_certificate: ::prost::alloc::string::String,
625    /// PEM representation of the trusted CA's x509 certificate.
626    #[prost(string, tag = "6")]
627    pub ca_certificate: ::prost::alloc::string::String,
628}
629/// Database instance export context.
630#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
631pub struct ExportContext {
632    /// The path to the file in Google Cloud Storage where the export will be
633    /// stored. The URI is in the form `gs://bucketName/fileName`. If the file
634    /// already exists, the request succeeds, but the operation fails. If
635    /// `fileType` is `SQL` and the filename ends with .gz,
636    /// the contents are compressed.
637    #[prost(string, tag = "1")]
638    pub uri: ::prost::alloc::string::String,
639    /// Databases to be exported. <br /> `MySQL instances:` If
640    /// `fileType` is `SQL` and no database is specified, all
641    /// databases are exported, except for the `mysql` system database.
642    /// If `fileType` is `CSV`, you can specify one database,
643    /// either by using this property or by using the
644    /// `csvExportOptions.selectQuery` property, which takes precedence
645    /// over this property. <br /> `PostgreSQL instances:` If you don't specify a
646    /// database by name, all user databases in the instance are exported.
647    /// This excludes system databases and Cloud SQL databases used to manage
648    /// internal operations. Exporting all user databases is only available for
649    /// directory-formatted parallel export. If `fileType` is `CSV`,
650    /// this database must match the one specified in the
651    /// `csvExportOptions.selectQuery` property. <br /> `SQL Server  instances:` You must specify one database to be exported, and the
652    /// `fileType` must be `BAK`.
653    #[prost(string, repeated, tag = "2")]
654    pub databases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
655    /// This is always `sql#exportContext`.
656    #[prost(string, tag = "3")]
657    pub kind: ::prost::alloc::string::String,
658    /// Options for exporting data as SQL statements.
659    #[prost(message, optional, tag = "4")]
660    pub sql_export_options: ::core::option::Option<export_context::SqlExportOptions>,
661    /// Options for exporting data as CSV. `MySQL` and `PostgreSQL`
662    /// instances only.
663    #[prost(message, optional, tag = "5")]
664    pub csv_export_options: ::core::option::Option<export_context::SqlCsvExportOptions>,
665    /// The file type for the specified uri.
666    #[prost(enumeration = "SqlFileType", tag = "6")]
667    pub file_type: i32,
668    /// Whether to perform a serverless export.
669    #[prost(message, optional, tag = "8")]
670    pub offload: ::core::option::Option<bool>,
671    /// Options for exporting data as BAK files.
672    #[prost(message, optional, tag = "9")]
673    pub bak_export_options: ::core::option::Option<export_context::SqlBakExportOptions>,
674    /// Optional. Export parameters specific to SQL Server TDE certificates
675    #[prost(message, optional, tag = "10")]
676    pub tde_export_options: ::core::option::Option<export_context::SqlTdeExportOptions>,
677}
678/// Nested message and enum types in `ExportContext`.
679pub mod export_context {
680    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
681    pub struct SqlCsvExportOptions {
682        /// The select query used to extract the data.
683        #[prost(string, tag = "1")]
684        pub select_query: ::prost::alloc::string::String,
685        /// Specifies the character that should appear before a data character that
686        /// needs to be escaped.
687        #[prost(string, tag = "2")]
688        pub escape_character: ::prost::alloc::string::String,
689        /// Specifies the quoting character to be used when a data value is quoted.
690        #[prost(string, tag = "3")]
691        pub quote_character: ::prost::alloc::string::String,
692        /// Specifies the character that separates columns within each row (line) of
693        /// the file.
694        #[prost(string, tag = "4")]
695        pub fields_terminated_by: ::prost::alloc::string::String,
696        /// This is used to separate lines. If a line does not contain all fields,
697        /// the rest of the columns are set to their default values.
698        #[prost(string, tag = "6")]
699        pub lines_terminated_by: ::prost::alloc::string::String,
700    }
701    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
702    pub struct SqlExportOptions {
703        /// Tables to export, or that were exported, from the specified database. If
704        /// you specify tables, specify one and only one database. For PostgreSQL
705        /// instances, you can specify only one table.
706        #[prost(string, repeated, tag = "1")]
707        pub tables: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
708        /// Export only schemas.
709        #[prost(message, optional, tag = "2")]
710        pub schema_only: ::core::option::Option<bool>,
711        #[prost(message, optional, tag = "3")]
712        pub mysql_export_options: ::core::option::Option<
713            sql_export_options::MysqlExportOptions,
714        >,
715        /// Optional. The number of threads to use for parallel export.
716        #[prost(message, optional, tag = "4")]
717        pub threads: ::core::option::Option<i32>,
718        /// Optional. Whether or not the export should be parallel.
719        #[prost(message, optional, tag = "5")]
720        pub parallel: ::core::option::Option<bool>,
721        /// Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.
722        #[prost(message, optional, tag = "6")]
723        pub postgres_export_options: ::core::option::Option<
724            sql_export_options::PostgresExportOptions,
725        >,
726    }
727    /// Nested message and enum types in `SqlExportOptions`.
728    pub mod sql_export_options {
729        /// Options for exporting from MySQL.
730        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
731        pub struct MysqlExportOptions {
732            /// Option to include SQL statement required to set up replication. If set
733            /// to `1`, the dump file includes a CHANGE MASTER TO statement with the
734            /// binary log coordinates, and --set-gtid-purged is set to ON. If set to
735            /// `2`, the CHANGE MASTER TO statement is written as a SQL comment and
736            /// has no effect. If set to any value other than `1`, --set-gtid-purged
737            /// is set to OFF.
738            #[prost(message, optional, tag = "1")]
739            pub master_data: ::core::option::Option<i32>,
740        }
741        /// Options for exporting from a Cloud SQL for PostgreSQL instance.
742        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
743        pub struct PostgresExportOptions {
744            /// Optional. Use this option to include DROP <code>\<object\></code>
745            /// SQL statements. Use these statements to delete database objects before
746            /// running the import operation.
747            #[prost(message, optional, tag = "1")]
748            pub clean: ::core::option::Option<bool>,
749            /// Optional. Option to include an IF EXISTS SQL statement with each DROP
750            /// statement produced by clean.
751            #[prost(message, optional, tag = "2")]
752            pub if_exists: ::core::option::Option<bool>,
753        }
754    }
755    /// Options for exporting BAK files (SQL Server-only)
756    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
757    pub struct SqlBakExportOptions {
758        /// Whether or not the export should be striped.
759        #[prost(message, optional, tag = "1")]
760        pub striped: ::core::option::Option<bool>,
761        /// Option for specifying how many stripes to use for the export.
762        /// If blank, and the value of the striped field is true,
763        /// the number of stripes is automatically chosen.
764        #[prost(message, optional, tag = "2")]
765        pub stripe_count: ::core::option::Option<i32>,
766        /// Type of this bak file will be export, FULL or DIFF, SQL Server only
767        #[prost(enumeration = "super::BakType", tag = "4")]
768        pub bak_type: i32,
769        /// Deprecated: copy_only is deprecated. Use differential_base instead
770        #[deprecated]
771        #[prost(message, optional, tag = "5")]
772        pub copy_only: ::core::option::Option<bool>,
773        /// Whether or not the backup can be used as a differential base
774        /// copy_only backup can not be served as differential base
775        #[prost(message, optional, tag = "6")]
776        pub differential_base: ::core::option::Option<bool>,
777        /// Optional. The begin timestamp when transaction log will be included in
778        /// the export operation. [RFC 3339](<https://tools.ietf.org/html/rfc3339>)
779        /// format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all
780        /// available logs from the beginning of retention period will be included.
781        /// Only applied to Cloud SQL for SQL Server.
782        #[prost(message, optional, tag = "7")]
783        pub export_log_start_time: ::core::option::Option<::prost_types::Timestamp>,
784        /// Optional. The end timestamp when transaction log will be included in the
785        /// export operation. [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format
786        /// (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all
787        /// available logs until current time will be included. Only applied to Cloud
788        /// SQL for SQL Server.
789        #[prost(message, optional, tag = "8")]
790        pub export_log_end_time: ::core::option::Option<::prost_types::Timestamp>,
791    }
792    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
793    pub struct SqlTdeExportOptions {
794        /// Required. Path to the TDE certificate public key
795        /// in the form gs://bucketName/fileName.
796        /// The instance must have write access to the bucket.
797        /// Applicable only for SQL Server instances.
798        #[prost(string, tag = "1")]
799        pub certificate_path: ::prost::alloc::string::String,
800        /// Required. Path to the TDE certificate private key
801        /// in the form gs://bucketName/fileName.
802        /// The instance must have write access to the location.
803        /// Applicable only for SQL Server instances.
804        #[prost(string, tag = "2")]
805        pub private_key_path: ::prost::alloc::string::String,
806        /// Required. Password that encrypts the private key.
807        #[prost(string, tag = "3")]
808        pub private_key_password: ::prost::alloc::string::String,
809        /// Required. Certificate name.
810        /// Applicable only for SQL Server instances.
811        #[prost(string, tag = "5")]
812        pub name: ::prost::alloc::string::String,
813    }
814}
815/// Database instance import context.
816#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
817pub struct ImportContext {
818    /// Path to the import file in Cloud Storage, in the form
819    /// `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported
820    /// when `fileType` is `SQL`. The instance must have
821    /// write permissions to the bucket and read access to the file.
822    #[prost(string, tag = "1")]
823    pub uri: ::prost::alloc::string::String,
824    /// The target database for the import. If `fileType` is `SQL`, this field
825    /// is required only if the import file does not specify a database, and is
826    /// overridden by any database specification in the import file. For entire
827    /// instance parallel import operations, the database is overridden by the
828    /// database name stored in subdirectory name. If
829    /// `fileType` is `CSV`, one database must be specified.
830    #[prost(string, tag = "2")]
831    pub database: ::prost::alloc::string::String,
832    /// This is always `sql#importContext`.
833    #[prost(string, tag = "3")]
834    pub kind: ::prost::alloc::string::String,
835    /// The file type for the specified uri.\`SQL`: The file  contains SQL statements. \`CSV\`: The file contains CSV data.
836    #[prost(enumeration = "SqlFileType", tag = "4")]
837    pub file_type: i32,
838    /// Options for importing data as CSV.
839    #[prost(message, optional, tag = "5")]
840    pub csv_import_options: ::core::option::Option<import_context::SqlCsvImportOptions>,
841    /// The PostgreSQL user for this import operation. PostgreSQL instances only.
842    #[prost(string, tag = "6")]
843    pub import_user: ::prost::alloc::string::String,
844    /// Import parameters specific to SQL Server .BAK files
845    #[prost(message, optional, tag = "7")]
846    pub bak_import_options: ::core::option::Option<import_context::SqlBakImportOptions>,
847    /// Optional. Options for importing data from SQL statements.
848    #[prost(message, optional, tag = "8")]
849    pub sql_import_options: ::core::option::Option<import_context::SqlImportOptions>,
850    /// Optional. Import parameters specific to SQL Server TDE certificates
851    #[prost(message, optional, tag = "9")]
852    pub tde_import_options: ::core::option::Option<import_context::SqlTdeImportOptions>,
853}
854/// Nested message and enum types in `ImportContext`.
855pub mod import_context {
856    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
857    pub struct SqlImportOptions {
858        /// Optional. The number of threads to use for parallel import.
859        #[prost(message, optional, tag = "1")]
860        pub threads: ::core::option::Option<i32>,
861        /// Optional. Whether or not the import should be parallel.
862        #[prost(message, optional, tag = "2")]
863        pub parallel: ::core::option::Option<bool>,
864        /// Optional. Options for importing from a Cloud SQL for PostgreSQL instance.
865        #[prost(message, optional, tag = "3")]
866        pub postgres_import_options: ::core::option::Option<
867            sql_import_options::PostgresImportOptions,
868        >,
869    }
870    /// Nested message and enum types in `SqlImportOptions`.
871    pub mod sql_import_options {
872        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
873        pub struct PostgresImportOptions {
874            /// Optional. The --clean flag for the pg_restore utility. This flag
875            /// applies only if you enabled Cloud SQL to import files in parallel.
876            #[prost(message, optional, tag = "1")]
877            pub clean: ::core::option::Option<bool>,
878            /// Optional. The --if-exists flag for the pg_restore utility. This flag
879            /// applies only if you enabled Cloud SQL to import files in parallel.
880            #[prost(message, optional, tag = "2")]
881            pub if_exists: ::core::option::Option<bool>,
882        }
883    }
884    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
885    pub struct SqlCsvImportOptions {
886        /// The table to which CSV data is imported.
887        #[prost(string, tag = "1")]
888        pub table: ::prost::alloc::string::String,
889        /// The columns to which CSV data is imported. If not specified, all columns
890        /// of the database table are loaded with CSV data.
891        #[prost(string, repeated, tag = "2")]
892        pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
893        /// Specifies the character that should appear before a data character that
894        /// needs to be escaped.
895        #[prost(string, tag = "4")]
896        pub escape_character: ::prost::alloc::string::String,
897        /// Specifies the quoting character to be used when a data value is quoted.
898        #[prost(string, tag = "5")]
899        pub quote_character: ::prost::alloc::string::String,
900        /// Specifies the character that separates columns within each row (line) of
901        /// the file.
902        #[prost(string, tag = "6")]
903        pub fields_terminated_by: ::prost::alloc::string::String,
904        /// This is used to separate lines. If a line does not contain all fields,
905        /// the rest of the columns are set to their default values.
906        #[prost(string, tag = "8")]
907        pub lines_terminated_by: ::prost::alloc::string::String,
908    }
909    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
910    pub struct SqlBakImportOptions {
911        #[prost(message, optional, tag = "1")]
912        pub encryption_options: ::core::option::Option<
913            sql_bak_import_options::EncryptionOptions,
914        >,
915        /// Whether or not the backup set being restored is striped.
916        /// Applies only to Cloud SQL for SQL Server.
917        #[prost(message, optional, tag = "2")]
918        pub striped: ::core::option::Option<bool>,
919        /// Whether or not the backup importing will restore database
920        /// with NORECOVERY option.
921        /// Applies only to Cloud SQL for SQL Server.
922        #[prost(message, optional, tag = "4")]
923        pub no_recovery: ::core::option::Option<bool>,
924        /// Whether or not the backup importing request will just bring database
925        /// online without downloading Bak content only one of "no_recovery" and
926        /// "recovery_only" can be true otherwise error will return. Applies only to
927        /// Cloud SQL for SQL Server.
928        #[prost(message, optional, tag = "5")]
929        pub recovery_only: ::core::option::Option<bool>,
930        /// Type of the bak content, FULL or DIFF
931        #[prost(enumeration = "super::BakType", tag = "6")]
932        pub bak_type: i32,
933        /// Optional. The timestamp when the import should stop. This timestamp is in
934        /// the [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format (for example,
935        /// `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT
936        /// keyword and applies to Cloud SQL for SQL Server only.
937        #[prost(message, optional, tag = "7")]
938        pub stop_at: ::core::option::Option<::prost_types::Timestamp>,
939        /// Optional. The marked transaction where the import should stop. This field
940        /// is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL
941        /// Server only.
942        #[prost(string, tag = "8")]
943        pub stop_at_mark: ::prost::alloc::string::String,
944    }
945    /// Nested message and enum types in `SqlBakImportOptions`.
946    pub mod sql_bak_import_options {
947        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
948        pub struct EncryptionOptions {
949            /// Path to the Certificate (.cer) in Cloud Storage, in the form
950            /// `gs://bucketName/fileName`. The instance must have
951            /// write permissions to the bucket and read access to the file.
952            #[prost(string, tag = "1")]
953            pub cert_path: ::prost::alloc::string::String,
954            /// Path to the Certificate Private Key (.pvk)  in Cloud Storage, in the
955            /// form `gs://bucketName/fileName`. The instance must have
956            /// write permissions to the bucket and read access to the file.
957            #[prost(string, tag = "2")]
958            pub pvk_path: ::prost::alloc::string::String,
959            /// Password that encrypts the private key
960            #[prost(string, tag = "3")]
961            pub pvk_password: ::prost::alloc::string::String,
962            /// Optional. Whether the imported file remains encrypted.
963            #[prost(message, optional, tag = "5")]
964            pub keep_encrypted: ::core::option::Option<bool>,
965        }
966    }
967    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
968    pub struct SqlTdeImportOptions {
969        /// Required. Path to the TDE certificate public key
970        /// in the form gs://bucketName/fileName.
971        /// The instance must have read access to the file.
972        /// Applicable only for SQL Server instances.
973        #[prost(string, tag = "1")]
974        pub certificate_path: ::prost::alloc::string::String,
975        /// Required. Path to the TDE certificate private key
976        /// in the form gs://bucketName/fileName.
977        /// The instance must have read access to the file.
978        /// Applicable only for SQL Server instances.
979        #[prost(string, tag = "2")]
980        pub private_key_path: ::prost::alloc::string::String,
981        /// Required. Password that encrypts the private key.
982        #[prost(string, tag = "3")]
983        pub private_key_password: ::prost::alloc::string::String,
984        /// Required. Certificate name.
985        /// Applicable only for SQL Server instances.
986        #[prost(string, tag = "5")]
987        pub name: ::prost::alloc::string::String,
988    }
989}
990/// IP Management configuration.
991#[derive(Clone, PartialEq, ::prost::Message)]
992pub struct IpConfiguration {
993    /// Whether the instance is assigned a public IP address or not.
994    #[prost(message, optional, tag = "1")]
995    pub ipv4_enabled: ::core::option::Option<bool>,
996    /// The resource link for the VPC network from which the Cloud SQL instance is
997    /// accessible for private IP. For example,
998    /// `/projects/myProject/global/networks/default`. This setting can
999    /// be updated, but it cannot be removed after it is set.
1000    #[prost(string, tag = "2")]
1001    pub private_network: ::prost::alloc::string::String,
1002    /// Use `ssl_mode` instead.
1003    ///
1004    /// Whether SSL/TLS connections over IP are enforced.
1005    /// If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
1006    /// For SSL/TLS connections, the client certificate won't be verified. If
1007    /// set to true, then only allow connections encrypted with SSL/TLS and with
1008    /// valid client certificates. If you want to enforce SSL/TLS without enforcing
1009    /// the requirement for valid client certificates, then use the `ssl_mode` flag
1010    /// instead of the `require_ssl` flag.
1011    #[prost(message, optional, tag = "3")]
1012    pub require_ssl: ::core::option::Option<bool>,
1013    /// The list of external networks that are allowed to connect to the instance
1014    /// using the IP. In 'CIDR' notation, also known as 'slash' notation (for
1015    /// example: `157.197.200.0/24`).
1016    #[prost(message, repeated, tag = "4")]
1017    pub authorized_networks: ::prost::alloc::vec::Vec<AclEntry>,
1018    /// The name of the allocated ip range for the private ip Cloud SQL instance.
1019    /// For example: "google-managed-services-default". If set, the instance ip
1020    /// will be created in the allocated range. The range name must comply with
1021    /// [RFC 1035](<https://tools.ietf.org/html/rfc1035>). Specifically, the name
1022    /// must be 1-63 characters long and match the regular expression
1023    /// `[a-z](\[-a-z0-9\]*[a-z0-9])?.`
1024    #[prost(string, tag = "6")]
1025    pub allocated_ip_range: ::prost::alloc::string::String,
1026    /// Controls connectivity to private IP instances from Google services,
1027    /// such as BigQuery.
1028    #[prost(message, optional, tag = "7")]
1029    pub enable_private_path_for_google_cloud_services: ::core::option::Option<bool>,
1030    /// Specify how SSL/TLS is enforced in database connections. If you must use
1031    /// the `require_ssl` flag for backward compatibility, then only the following
1032    /// value pairs are valid:
1033    ///
1034    /// For PostgreSQL and MySQL:
1035    ///
1036    /// * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
1037    /// * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
1038    /// * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
1039    ///
1040    /// For SQL Server:
1041    ///
1042    /// * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
1043    /// * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
1044    ///
1045    /// The value of `ssl_mode` has priority over the value of `require_ssl`.
1046    ///
1047    /// For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and
1048    /// `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL
1049    /// connections, while `require_ssl=false` means accept both non-SSL
1050    /// and SSL connections. In this case, MySQL and PostgreSQL databases respect
1051    /// `ssl_mode` and accepts only SSL connections.
1052    #[prost(enumeration = "ip_configuration::SslMode", tag = "8")]
1053    pub ssl_mode: i32,
1054    /// PSC settings for this instance.
1055    #[prost(message, optional, tag = "9")]
1056    pub psc_config: ::core::option::Option<PscConfig>,
1057    /// Specify what type of CA is used for the server certificate.
1058    #[prost(enumeration = "ip_configuration::CaMode", optional, tag = "10")]
1059    pub server_ca_mode: ::core::option::Option<i32>,
1060    /// Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.
1061    #[prost(string, repeated, tag = "11")]
1062    pub custom_subject_alternative_names: ::prost::alloc::vec::Vec<
1063        ::prost::alloc::string::String,
1064    >,
1065    /// Optional. The resource name of the server CA pool for an instance with
1066    /// `CUSTOMER_MANAGED_CAS_CA` as the `server_ca_mode`.
1067    /// Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}
1068    #[prost(string, optional, tag = "12")]
1069    pub server_ca_pool: ::core::option::Option<::prost::alloc::string::String>,
1070    /// Optional. Controls the automatic server certificate rotation feature. This
1071    /// feature is disabled by default. When enabled, the server certificate will
1072    /// be automatically rotated during Cloud SQL scheduled maintenance or
1073    /// self-service maintenance updates up to six months before it expires. This
1074    /// setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA
1075    /// or CUSTOMER_MANAGED_CAS_CA.
1076    #[prost(
1077        enumeration = "ip_configuration::ServerCertificateRotationMode",
1078        optional,
1079        tag = "16"
1080    )]
1081    pub server_certificate_rotation_mode: ::core::option::Option<i32>,
1082}
1083/// Nested message and enum types in `IpConfiguration`.
1084pub mod ip_configuration {
1085    /// The SSL options for database connections.
1086    #[derive(
1087        Clone,
1088        Copy,
1089        Debug,
1090        PartialEq,
1091        Eq,
1092        Hash,
1093        PartialOrd,
1094        Ord,
1095        ::prost::Enumeration
1096    )]
1097    #[repr(i32)]
1098    pub enum SslMode {
1099        /// The SSL mode is unknown.
1100        Unspecified = 0,
1101        /// Allow non-SSL/non-TLS and SSL/TLS connections.
1102        /// For SSL connections to MySQL and PostgreSQL, the client certificate
1103        /// isn't verified.
1104        ///
1105        /// When this value is used, the legacy `require_ssl` flag must be false or
1106        /// cleared to avoid a conflict between the values of the two flags.
1107        AllowUnencryptedAndEncrypted = 1,
1108        /// Only allow connections encrypted with SSL/TLS.
1109        /// For SSL connections to MySQL and PostgreSQL, the client certificate
1110        /// isn't verified.
1111        ///
1112        /// When this value is used, the legacy `require_ssl` flag must be false or
1113        /// cleared to avoid a conflict between the values of the two flags.
1114        EncryptedOnly = 2,
1115        /// Only allow connections encrypted with SSL/TLS and with valid
1116        /// client certificates.
1117        ///
1118        /// When this value is used, the legacy `require_ssl` flag must be true or
1119        /// cleared to avoid the conflict between values of two flags.
1120        /// PostgreSQL clients or users that connect using IAM database
1121        /// authentication must use either the
1122        /// [Cloud SQL Auth
1123        /// Proxy](<https://cloud.google.com/sql/docs/postgres/connect-auth-proxy>) or
1124        /// [Cloud SQL
1125        /// Connectors](<https://cloud.google.com/sql/docs/postgres/connect-connectors>)
1126        /// to enforce client identity verification.
1127        ///
1128        /// Only applicable to MySQL and PostgreSQL. Not applicable to SQL Server.
1129        TrustedClientCertificateRequired = 3,
1130    }
1131    impl SslMode {
1132        /// String value of the enum field names used in the ProtoBuf definition.
1133        ///
1134        /// The values are not transformed in any way and thus are considered stable
1135        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1136        pub fn as_str_name(&self) -> &'static str {
1137            match self {
1138                Self::Unspecified => "SSL_MODE_UNSPECIFIED",
1139                Self::AllowUnencryptedAndEncrypted => "ALLOW_UNENCRYPTED_AND_ENCRYPTED",
1140                Self::EncryptedOnly => "ENCRYPTED_ONLY",
1141                Self::TrustedClientCertificateRequired => {
1142                    "TRUSTED_CLIENT_CERTIFICATE_REQUIRED"
1143                }
1144            }
1145        }
1146        /// Creates an enum from field names used in the ProtoBuf definition.
1147        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1148            match value {
1149                "SSL_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1150                "ALLOW_UNENCRYPTED_AND_ENCRYPTED" => {
1151                    Some(Self::AllowUnencryptedAndEncrypted)
1152                }
1153                "ENCRYPTED_ONLY" => Some(Self::EncryptedOnly),
1154                "TRUSTED_CLIENT_CERTIFICATE_REQUIRED" => {
1155                    Some(Self::TrustedClientCertificateRequired)
1156                }
1157                _ => None,
1158            }
1159        }
1160    }
1161    /// Various Certificate Authority (CA) modes for certificate signing.
1162    #[derive(
1163        Clone,
1164        Copy,
1165        Debug,
1166        PartialEq,
1167        Eq,
1168        Hash,
1169        PartialOrd,
1170        Ord,
1171        ::prost::Enumeration
1172    )]
1173    #[repr(i32)]
1174    pub enum CaMode {
1175        /// CA mode is unspecified. It is effectively the same as
1176        /// `GOOGLE_MANAGED_INTERNAL_CA`.
1177        Unspecified = 0,
1178        /// Google-managed self-signed internal CA.
1179        GoogleManagedInternalCa = 1,
1180        /// Google-managed regional CA part of root CA hierarchy hosted on Google
1181        /// Cloud's Certificate Authority Service (CAS).
1182        GoogleManagedCasCa = 2,
1183        /// Customer-managed CA hosted on Google Cloud's Certificate Authority
1184        /// Service (CAS).
1185        CustomerManagedCasCa = 3,
1186    }
1187    impl CaMode {
1188        /// String value of the enum field names used in the ProtoBuf definition.
1189        ///
1190        /// The values are not transformed in any way and thus are considered stable
1191        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1192        pub fn as_str_name(&self) -> &'static str {
1193            match self {
1194                Self::Unspecified => "CA_MODE_UNSPECIFIED",
1195                Self::GoogleManagedInternalCa => "GOOGLE_MANAGED_INTERNAL_CA",
1196                Self::GoogleManagedCasCa => "GOOGLE_MANAGED_CAS_CA",
1197                Self::CustomerManagedCasCa => "CUSTOMER_MANAGED_CAS_CA",
1198            }
1199        }
1200        /// Creates an enum from field names used in the ProtoBuf definition.
1201        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1202            match value {
1203                "CA_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1204                "GOOGLE_MANAGED_INTERNAL_CA" => Some(Self::GoogleManagedInternalCa),
1205                "GOOGLE_MANAGED_CAS_CA" => Some(Self::GoogleManagedCasCa),
1206                "CUSTOMER_MANAGED_CAS_CA" => Some(Self::CustomerManagedCasCa),
1207                _ => None,
1208            }
1209        }
1210    }
1211    /// Settings for automatic server certificate rotation.
1212    #[derive(
1213        Clone,
1214        Copy,
1215        Debug,
1216        PartialEq,
1217        Eq,
1218        Hash,
1219        PartialOrd,
1220        Ord,
1221        ::prost::Enumeration
1222    )]
1223    #[repr(i32)]
1224    pub enum ServerCertificateRotationMode {
1225        /// Unspecified: no automatic server certificate rotation.
1226        Unspecified = 0,
1227        /// No automatic server certificate rotation. The user must [manage server
1228        /// certificate
1229        /// rotation](/sql/docs/mysql/manage-ssl-instance#rotate-server-certificate-cas)
1230        /// on their side.
1231        NoAutomaticRotation = 1,
1232        /// Automatic server certificate rotation during Cloud SQL scheduled
1233        /// maintenance or self-service maintenance updates. Requires
1234        /// `server_ca_mode` to be `GOOGLE_MANAGED_CAS_CA` or
1235        /// `CUSTOMER_MANAGED_CAS_CA`.
1236        AutomaticRotationDuringMaintenance = 2,
1237    }
1238    impl ServerCertificateRotationMode {
1239        /// String value of the enum field names used in the ProtoBuf definition.
1240        ///
1241        /// The values are not transformed in any way and thus are considered stable
1242        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1243        pub fn as_str_name(&self) -> &'static str {
1244            match self {
1245                Self::Unspecified => "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED",
1246                Self::NoAutomaticRotation => "NO_AUTOMATIC_ROTATION",
1247                Self::AutomaticRotationDuringMaintenance => {
1248                    "AUTOMATIC_ROTATION_DURING_MAINTENANCE"
1249                }
1250            }
1251        }
1252        /// Creates an enum from field names used in the ProtoBuf definition.
1253        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1254            match value {
1255                "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1256                "NO_AUTOMATIC_ROTATION" => Some(Self::NoAutomaticRotation),
1257                "AUTOMATIC_ROTATION_DURING_MAINTENANCE" => {
1258                    Some(Self::AutomaticRotationDuringMaintenance)
1259                }
1260                _ => None,
1261            }
1262        }
1263    }
1264}
1265/// PSC settings for a Cloud SQL instance.
1266#[derive(Clone, PartialEq, ::prost::Message)]
1267pub struct PscConfig {
1268    /// Whether PSC connectivity is enabled for this instance.
1269    #[prost(bool, optional, tag = "1")]
1270    pub psc_enabled: ::core::option::Option<bool>,
1271    /// Optional. The list of consumer projects that are allow-listed for PSC
1272    /// connections to this instance. This instance can be connected to with PSC
1273    /// from any network in these projects.
1274    ///
1275    /// Each consumer project in this list may be represented by a project number
1276    /// (numeric) or by a project id (alphanumeric).
1277    #[prost(string, repeated, tag = "2")]
1278    pub allowed_consumer_projects: ::prost::alloc::vec::Vec<
1279        ::prost::alloc::string::String,
1280    >,
1281    /// Optional. The list of settings for requested Private Service Connect
1282    /// consumer endpoints that can be used to connect to this Cloud SQL instance.
1283    #[prost(message, repeated, tag = "3")]
1284    pub psc_auto_connections: ::prost::alloc::vec::Vec<PscAutoConnectionConfig>,
1285    /// Optional. The network attachment of the consumer network that the
1286    /// Private Service Connect enabled Cloud SQL instance is
1287    /// authorized to connect via PSC interface.
1288    /// format: projects/PROJECT/regions/REGION/networkAttachments/ID
1289    #[prost(string, tag = "4")]
1290    pub network_attachment_uri: ::prost::alloc::string::String,
1291}
1292/// Settings for an automatically-setup Private Service Connect consumer endpoint
1293/// that is used to connect to a Cloud SQL instance.
1294#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1295pub struct PscAutoConnectionConfig {
1296    /// Optional. This is the project ID of consumer service project of this
1297    /// consumer endpoint.
1298    ///
1299    /// Optional. This is only applicable if consumer_network is a shared vpc
1300    /// network.
1301    #[prost(string, tag = "1")]
1302    pub consumer_project: ::prost::alloc::string::String,
1303    /// Optional. The consumer network of this consumer endpoint. This must be a
1304    /// resource path that includes both the host project and the network name.
1305    ///
1306    /// For example, `projects/project1/global/networks/network1`.
1307    ///
1308    /// The consumer host project of this network might be different from the
1309    /// consumer service project.
1310    #[prost(string, tag = "2")]
1311    pub consumer_network: ::prost::alloc::string::String,
1312    /// The IP address of the consumer endpoint.
1313    #[prost(string, optional, tag = "3")]
1314    pub ip_address: ::core::option::Option<::prost::alloc::string::String>,
1315    /// The connection status of the consumer endpoint.
1316    #[prost(string, optional, tag = "4")]
1317    pub status: ::core::option::Option<::prost::alloc::string::String>,
1318    /// The connection policy status of the consumer network.
1319    #[prost(string, optional, tag = "5")]
1320    pub consumer_network_status: ::core::option::Option<::prost::alloc::string::String>,
1321}
1322/// Preferred location. This specifies where a Cloud SQL instance is located.
1323/// Note that if the preferred location is not available, the instance will be
1324/// located as close as possible within the region. Only one location may be
1325/// specified.
1326#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1327pub struct LocationPreference {
1328    /// The App Engine application to follow, it must be in the same region as the
1329    /// Cloud SQL instance. WARNING: Changing this might restart the instance.
1330    #[deprecated]
1331    #[prost(string, tag = "1")]
1332    pub follow_gae_application: ::prost::alloc::string::String,
1333    /// The preferred Compute Engine zone (for example: us-central1-a,
1334    /// us-central1-b, etc.). WARNING: Changing this might restart the instance.
1335    #[prost(string, tag = "2")]
1336    pub zone: ::prost::alloc::string::String,
1337    /// The preferred Compute Engine zone for the secondary/failover
1338    /// (for example: us-central1-a, us-central1-b, etc.).
1339    /// To disable this field, set it to 'no_secondary_zone'.
1340    #[prost(string, tag = "4")]
1341    pub secondary_zone: ::prost::alloc::string::String,
1342    /// This is always `sql#locationPreference`.
1343    #[prost(string, tag = "3")]
1344    pub kind: ::prost::alloc::string::String,
1345}
1346/// Maintenance window. This specifies when a Cloud SQL instance is
1347/// restarted for system maintenance purposes.
1348#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1349pub struct MaintenanceWindow {
1350    /// Hour of day - 0 to 23. Specify in the UTC time zone.
1351    #[prost(message, optional, tag = "1")]
1352    pub hour: ::core::option::Option<i32>,
1353    /// Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`,
1354    /// `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone.
1355    /// Returned in output as an integer, 1 to 7, where `1` equals Monday.
1356    #[prost(message, optional, tag = "2")]
1357    pub day: ::core::option::Option<i32>,
1358    /// Maintenance timing settings: `canary`, `stable`, or `week5`.
1359    /// For more information, see [About maintenance on Cloud SQL
1360    /// instances](<https://cloud.google.com/sql/docs/mysql/maintenance>).
1361    #[prost(enumeration = "SqlUpdateTrack", tag = "3")]
1362    pub update_track: i32,
1363    /// This is always `sql#maintenanceWindow`.
1364    #[prost(string, tag = "4")]
1365    pub kind: ::prost::alloc::string::String,
1366}
1367/// Deny maintenance Periods. This specifies a date range during when all CSA
1368/// rollout will be denied.
1369#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1370pub struct DenyMaintenancePeriod {
1371    /// "deny maintenance period" start date. If the year of the start date is
1372    /// empty, the year of the end date also must be empty. In this case, it means
1373    /// the deny maintenance period recurs every year. The date is in format
1374    /// yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1375    #[prost(string, tag = "1")]
1376    pub start_date: ::prost::alloc::string::String,
1377    /// "deny maintenance period" end date. If the year of the end date is empty,
1378    /// the year of the start date also must be empty. In this case, it means the
1379    /// no maintenance interval recurs every year. The date is in format yyyy-mm-dd
1380    /// i.e., 2020-11-01, or mm-dd, i.e., 11-01
1381    #[prost(string, tag = "2")]
1382    pub end_date: ::prost::alloc::string::String,
1383    /// Time in UTC when the "deny maintenance period" starts on start_date and
1384    /// ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
1385    #[prost(string, tag = "3")]
1386    pub time: ::prost::alloc::string::String,
1387}
1388/// Insights configuration. This specifies when Cloud SQL Insights feature is
1389/// enabled and optional configuration.
1390#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1391pub struct InsightsConfig {
1392    /// Whether Query Insights feature is enabled.
1393    #[prost(bool, tag = "1")]
1394    pub query_insights_enabled: bool,
1395    /// Whether Query Insights will record client address when enabled.
1396    #[prost(bool, tag = "2")]
1397    pub record_client_address: bool,
1398    /// Whether Query Insights will record application tags from query when
1399    /// enabled.
1400    #[prost(bool, tag = "3")]
1401    pub record_application_tags: bool,
1402    /// Maximum query length stored in bytes. Default value: 1024 bytes.
1403    /// Range: 256-4500 bytes. Query lengths greater than this field value will be
1404    /// truncated to this value. When unset, query length will be the default
1405    /// value. Changing query length will restart the database.
1406    #[prost(message, optional, tag = "4")]
1407    pub query_string_length: ::core::option::Option<i32>,
1408    /// Number of query execution plans captured by Insights per minute
1409    /// for all queries combined. Default is 5.
1410    #[prost(message, optional, tag = "5")]
1411    pub query_plans_per_minute: ::core::option::Option<i32>,
1412    /// Optional. Whether enhanced query insights feature is enabled.
1413    #[prost(message, optional, tag = "8")]
1414    pub enhanced_query_insights_enabled: ::core::option::Option<bool>,
1415}
1416/// Read-replica configuration specific to MySQL databases.
1417#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1418pub struct MySqlReplicaConfiguration {
1419    /// Path to a SQL dump file in Google Cloud Storage from which the replica
1420    /// instance is to be created. The URI is in the form gs://bucketName/fileName.
1421    /// Compressed gzip files (.gz) are also supported.
1422    /// Dumps have the binlog co-ordinates from which replication
1423    /// begins. This can be accomplished by setting --master-data to 1 when using
1424    /// mysqldump.
1425    #[prost(string, tag = "1")]
1426    pub dump_file_path: ::prost::alloc::string::String,
1427    /// The username for the replication connection.
1428    #[prost(string, tag = "2")]
1429    pub username: ::prost::alloc::string::String,
1430    /// The password for the replication connection.
1431    #[prost(string, tag = "3")]
1432    pub password: ::prost::alloc::string::String,
1433    /// Seconds to wait between connect retries. MySQL's default is 60 seconds.
1434    #[prost(message, optional, tag = "4")]
1435    pub connect_retry_interval: ::core::option::Option<i32>,
1436    /// Interval in milliseconds between replication heartbeats.
1437    #[prost(message, optional, tag = "5")]
1438    pub master_heartbeat_period: ::core::option::Option<i64>,
1439    /// PEM representation of the trusted CA's x509 certificate.
1440    #[prost(string, tag = "6")]
1441    pub ca_certificate: ::prost::alloc::string::String,
1442    /// PEM representation of the replica's x509 certificate.
1443    #[prost(string, tag = "7")]
1444    pub client_certificate: ::prost::alloc::string::String,
1445    /// PEM representation of the replica's private key. The corresponding public
1446    /// key is encoded in the client's certificate.
1447    #[prost(string, tag = "8")]
1448    pub client_key: ::prost::alloc::string::String,
1449    /// A list of permissible ciphers to use for SSL encryption.
1450    #[prost(string, tag = "9")]
1451    pub ssl_cipher: ::prost::alloc::string::String,
1452    /// Whether or not to check the primary instance's Common Name value in the
1453    /// certificate that it sends during the SSL handshake.
1454    #[prost(message, optional, tag = "10")]
1455    pub verify_server_certificate: ::core::option::Option<bool>,
1456    /// This is always `sql#mysqlReplicaConfiguration`.
1457    #[prost(string, tag = "11")]
1458    pub kind: ::prost::alloc::string::String,
1459}
1460/// Disk encryption configuration for an instance.
1461#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1462pub struct DiskEncryptionConfiguration {
1463    /// Resource name of KMS key for disk encryption
1464    #[prost(string, tag = "1")]
1465    pub kms_key_name: ::prost::alloc::string::String,
1466    /// This is always `sql#diskEncryptionConfiguration`.
1467    #[prost(string, tag = "2")]
1468    pub kind: ::prost::alloc::string::String,
1469}
1470/// Disk encryption status for an instance.
1471#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1472pub struct DiskEncryptionStatus {
1473    /// KMS key version used to encrypt the Cloud SQL instance resource
1474    #[prost(string, tag = "1")]
1475    pub kms_key_version_name: ::prost::alloc::string::String,
1476    /// This is always `sql#diskEncryptionStatus`.
1477    #[prost(string, tag = "2")]
1478    pub kind: ::prost::alloc::string::String,
1479}
1480/// Database instance IP mapping
1481#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1482pub struct IpMapping {
1483    /// The type of this IP address. A `PRIMARY` address is a public address that
1484    /// can accept incoming connections. A `PRIVATE` address is a private address
1485    /// that can accept incoming connections. An `OUTGOING` address is the source
1486    /// address of connections originating from the instance, if supported.
1487    #[prost(enumeration = "SqlIpAddressType", tag = "1")]
1488    pub r#type: i32,
1489    /// The IP address assigned.
1490    #[prost(string, tag = "2")]
1491    pub ip_address: ::prost::alloc::string::String,
1492    /// The due time for this IP to be retired in
1493    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
1494    /// `2012-11-15T16:19:00.094Z`. This field is only available when
1495    /// the IP is scheduled to be retired.
1496    #[prost(message, optional, tag = "3")]
1497    pub time_to_retire: ::core::option::Option<::prost_types::Timestamp>,
1498}
1499/// The sub operation type based on the operation type.
1500#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1501pub struct SqlSubOperationType {
1502    /// Sub operation details corresponding to the operation type.
1503    #[prost(oneof = "sql_sub_operation_type::SubOperationDetails", tags = "1")]
1504    pub sub_operation_details: ::core::option::Option<
1505        sql_sub_operation_type::SubOperationDetails,
1506    >,
1507}
1508/// Nested message and enum types in `SqlSubOperationType`.
1509pub mod sql_sub_operation_type {
1510    /// Sub operation details corresponding to the operation type.
1511    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
1512    pub enum SubOperationDetails {
1513        /// The type of maintenance to be performed on the instance.
1514        #[prost(enumeration = "super::SqlMaintenanceType", tag = "1")]
1515        MaintenanceType(i32),
1516    }
1517}
1518/// An Operation resource. For successful operations that return an
1519/// Operation resource, only the fields relevant to the operation are populated
1520/// in the resource.
1521#[derive(Clone, PartialEq, ::prost::Message)]
1522pub struct Operation {
1523    /// This is always `sql#operation`.
1524    #[prost(string, tag = "1")]
1525    pub kind: ::prost::alloc::string::String,
1526    #[prost(string, tag = "2")]
1527    pub target_link: ::prost::alloc::string::String,
1528    /// The status of an operation.
1529    #[prost(enumeration = "operation::SqlOperationStatus", tag = "3")]
1530    pub status: i32,
1531    /// The email address of the user who initiated this operation.
1532    #[prost(string, tag = "4")]
1533    pub user: ::prost::alloc::string::String,
1534    /// The time this operation was enqueued in UTC timezone in [RFC
1535    /// 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
1536    /// `2012-11-15T16:19:00.094Z`.
1537    #[prost(message, optional, tag = "5")]
1538    pub insert_time: ::core::option::Option<::prost_types::Timestamp>,
1539    /// The time this operation actually started in UTC timezone in [RFC
1540    /// 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
1541    /// `2012-11-15T16:19:00.094Z`.
1542    #[prost(message, optional, tag = "6")]
1543    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
1544    /// The time this operation finished in UTC timezone in [RFC
1545    /// 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
1546    /// `2012-11-15T16:19:00.094Z`.
1547    #[prost(message, optional, tag = "7")]
1548    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
1549    /// If errors occurred during processing of this operation, this field will be
1550    /// populated.
1551    #[prost(message, optional, tag = "8")]
1552    pub error: ::core::option::Option<OperationErrors>,
1553    /// An Admin API warning message.
1554    #[prost(message, optional, tag = "19")]
1555    pub api_warning: ::core::option::Option<ApiWarning>,
1556    /// The type of the operation. Valid values are:
1557    ///
1558    /// * `CREATE`
1559    /// * `DELETE`
1560    /// * `UPDATE`
1561    /// * `RESTART`
1562    /// * `IMPORT`
1563    /// * `EXPORT`
1564    /// * `BACKUP_VOLUME`
1565    /// * `RESTORE_VOLUME`
1566    /// * `CREATE_USER`
1567    /// * `DELETE_USER`
1568    /// * `CREATE_DATABASE`
1569    /// * `DELETE_DATABASE`
1570    #[prost(enumeration = "operation::SqlOperationType", tag = "9")]
1571    pub operation_type: i32,
1572    /// The context for import operation, if applicable.
1573    #[prost(message, optional, tag = "10")]
1574    pub import_context: ::core::option::Option<ImportContext>,
1575    /// The context for export operation, if applicable.
1576    #[prost(message, optional, tag = "11")]
1577    pub export_context: ::core::option::Option<ExportContext>,
1578    /// The context for backup operation, if applicable.
1579    #[prost(message, optional, tag = "17")]
1580    pub backup_context: ::core::option::Option<BackupContext>,
1581    /// This field is only populated when the operation_type is
1582    /// PRE_CHECK_MAJOR_VERSION_UPGRADE.
1583    /// The PreCheckMajorVersionUpgradeContext message itself contains the details
1584    /// for that pre-check, such as the target database version for the upgrade
1585    /// and the results of the check (including any warnings or errors found).
1586    #[prost(message, optional, tag = "50")]
1587    pub pre_check_major_version_upgrade_context: ::core::option::Option<
1588        PreCheckMajorVersionUpgradeContext,
1589    >,
1590    /// An identifier that uniquely identifies the operation. You can use this
1591    /// identifier to retrieve the Operations resource that has information about
1592    /// the operation.
1593    #[prost(string, tag = "12")]
1594    pub name: ::prost::alloc::string::String,
1595    /// Name of the resource on which this operation runs.
1596    #[prost(string, tag = "13")]
1597    pub target_id: ::prost::alloc::string::String,
1598    /// The URI of this resource.
1599    #[prost(string, tag = "14")]
1600    pub self_link: ::prost::alloc::string::String,
1601    /// The project ID of the target instance related to this operation.
1602    #[prost(string, tag = "15")]
1603    pub target_project: ::prost::alloc::string::String,
1604    /// The context for acquire SSRS lease operation, if applicable.
1605    #[prost(message, optional, tag = "20")]
1606    pub acquire_ssrs_lease_context: ::core::option::Option<AcquireSsrsLeaseContext>,
1607    /// Optional. The sub operation based on the operation type.
1608    #[prost(message, optional, tag = "48")]
1609    pub sub_operation_type: ::core::option::Option<SqlSubOperationType>,
1610}
1611/// Nested message and enum types in `Operation`.
1612pub mod operation {
1613    /// The type of Cloud SQL operation.
1614    #[derive(
1615        Clone,
1616        Copy,
1617        Debug,
1618        PartialEq,
1619        Eq,
1620        Hash,
1621        PartialOrd,
1622        Ord,
1623        ::prost::Enumeration
1624    )]
1625    #[repr(i32)]
1626    pub enum SqlOperationType {
1627        /// Unknown operation type.
1628        Unspecified = 0,
1629        /// Imports data into a Cloud SQL instance.
1630        Import = 1,
1631        /// Exports data from a Cloud SQL instance to a Cloud Storage
1632        /// bucket.
1633        Export = 2,
1634        /// Creates a new Cloud SQL instance.
1635        Create = 3,
1636        /// Updates the settings of a Cloud SQL instance.
1637        Update = 4,
1638        /// Deletes a Cloud SQL instance.
1639        Delete = 5,
1640        /// Restarts the Cloud SQL instance.
1641        Restart = 6,
1642        #[deprecated]
1643        Backup = 7,
1644        #[deprecated]
1645        Snapshot = 8,
1646        /// Performs instance backup.
1647        BackupVolume = 9,
1648        /// Deletes an instance backup.
1649        DeleteVolume = 10,
1650        /// Restores an instance backup.
1651        RestoreVolume = 11,
1652        /// Injects a privileged user in mysql for MOB instances.
1653        InjectUser = 12,
1654        /// Clones a Cloud SQL instance.
1655        Clone = 14,
1656        /// Stops replication on a Cloud SQL read replica instance.
1657        StopReplica = 15,
1658        /// Starts replication on a Cloud SQL read replica instance.
1659        StartReplica = 16,
1660        /// Promotes a Cloud SQL replica instance.
1661        PromoteReplica = 17,
1662        /// Creates a Cloud SQL replica instance.
1663        CreateReplica = 18,
1664        /// Creates a new user in a Cloud SQL instance.
1665        CreateUser = 19,
1666        /// Deletes a user from a Cloud SQL instance.
1667        DeleteUser = 20,
1668        /// Updates an existing user in a Cloud SQL instance. If a user with the
1669        /// specified username doesn't exist, a new user is created.
1670        UpdateUser = 21,
1671        /// Creates a database in the Cloud SQL instance.
1672        CreateDatabase = 22,
1673        /// Deletes a database in the Cloud SQL instance.
1674        DeleteDatabase = 23,
1675        /// Updates a database in the Cloud SQL instance.
1676        UpdateDatabase = 24,
1677        /// Performs failover of an HA-enabled Cloud SQL
1678        /// failover replica.
1679        Failover = 25,
1680        /// Deletes the backup taken by a backup run.
1681        DeleteBackup = 26,
1682        RecreateReplica = 27,
1683        /// Truncates a general or slow log table in MySQL.
1684        TruncateLog = 28,
1685        /// Demotes the stand-alone instance to be a Cloud SQL
1686        /// read replica for an external database server.
1687        DemoteMaster = 29,
1688        /// Indicates that the instance is currently in maintenance. Maintenance
1689        /// typically causes the instance to be unavailable for 1-3 minutes.
1690        Maintenance = 30,
1691        /// This field is deprecated, and will be removed in future version of API.
1692        #[deprecated]
1693        EnablePrivateIp = 31,
1694        #[deprecated]
1695        DeferMaintenance = 32,
1696        /// Creates clone instance.
1697        #[deprecated]
1698        CreateClone = 33,
1699        /// Reschedule maintenance to another time.
1700        RescheduleMaintenance = 34,
1701        /// Starts external sync of a Cloud SQL EM replica to an external primary
1702        /// instance.
1703        StartExternalSync = 35,
1704        /// Recovers logs from an instance's old data disk.
1705        LogCleanup = 36,
1706        /// Performs auto-restart of an HA-enabled Cloud SQL database for auto
1707        /// recovery.
1708        AutoRestart = 37,
1709        /// Re-encrypts CMEK instances with latest key version.
1710        Reencrypt = 38,
1711        /// Switches the roles of the primary and replica pair. The target instance
1712        /// should be the replica.
1713        Switchover = 39,
1714        /// Update a backup.
1715        UpdateBackup = 40,
1716        /// Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
1717        AcquireSsrsLease = 42,
1718        /// Release a lease for the setup of SQL Server Reporting Services (SSRS).
1719        ReleaseSsrsLease = 43,
1720        /// Reconfigures old primary after a promote replica operation. Effect of a
1721        /// promote operation to the old primary is executed in this operation,
1722        /// asynchronously from the promote replica operation executed to the
1723        /// replica.
1724        ReconfigureOldPrimary = 44,
1725        /// Indicates that the instance, its read replicas, and its cascading
1726        /// replicas are in maintenance. Maintenance typically gets initiated on
1727        /// groups of replicas first, followed by the primary instance. For each
1728        /// instance, maintenance typically causes the instance to be unavailable for
1729        /// 1-3 minutes.
1730        #[deprecated]
1731        ClusterMaintenance = 45,
1732        /// Indicates that the instance (and any of its replicas) are currently in
1733        /// maintenance. This is initiated as a self-service request by using SSM.
1734        /// Maintenance typically causes the instance to be unavailable for 1-3
1735        /// minutes.
1736        #[deprecated]
1737        SelfServiceMaintenance = 46,
1738        /// Switches a primary instance to a replica. This operation runs as part of
1739        /// a switchover operation to the original primary instance.
1740        SwitchoverToReplica = 47,
1741        /// Updates the major version of a Cloud SQL instance.
1742        MajorVersionUpgrade = 48,
1743        /// Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.
1744        #[deprecated]
1745        AdvancedBackup = 49,
1746        /// Changes the BackupTier of a Cloud SQL instance.
1747        ManageBackup = 50,
1748        /// Creates a backup for an Enhanced BackupTier Cloud SQL instance.
1749        EnhancedBackup = 51,
1750        /// Repairs entire read pool or specified read pool nodes in the read pool.
1751        RepairReadPool = 52,
1752        /// Creates a Cloud SQL read pool instance.
1753        CreateReadPool = 53,
1754    }
1755    impl SqlOperationType {
1756        /// String value of the enum field names used in the ProtoBuf definition.
1757        ///
1758        /// The values are not transformed in any way and thus are considered stable
1759        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1760        pub fn as_str_name(&self) -> &'static str {
1761            match self {
1762                Self::Unspecified => "SQL_OPERATION_TYPE_UNSPECIFIED",
1763                Self::Import => "IMPORT",
1764                Self::Export => "EXPORT",
1765                Self::Create => "CREATE",
1766                Self::Update => "UPDATE",
1767                Self::Delete => "DELETE",
1768                Self::Restart => "RESTART",
1769                #[allow(deprecated)]
1770                Self::Backup => "BACKUP",
1771                #[allow(deprecated)]
1772                Self::Snapshot => "SNAPSHOT",
1773                Self::BackupVolume => "BACKUP_VOLUME",
1774                Self::DeleteVolume => "DELETE_VOLUME",
1775                Self::RestoreVolume => "RESTORE_VOLUME",
1776                Self::InjectUser => "INJECT_USER",
1777                Self::Clone => "CLONE",
1778                Self::StopReplica => "STOP_REPLICA",
1779                Self::StartReplica => "START_REPLICA",
1780                Self::PromoteReplica => "PROMOTE_REPLICA",
1781                Self::CreateReplica => "CREATE_REPLICA",
1782                Self::CreateUser => "CREATE_USER",
1783                Self::DeleteUser => "DELETE_USER",
1784                Self::UpdateUser => "UPDATE_USER",
1785                Self::CreateDatabase => "CREATE_DATABASE",
1786                Self::DeleteDatabase => "DELETE_DATABASE",
1787                Self::UpdateDatabase => "UPDATE_DATABASE",
1788                Self::Failover => "FAILOVER",
1789                Self::DeleteBackup => "DELETE_BACKUP",
1790                Self::RecreateReplica => "RECREATE_REPLICA",
1791                Self::TruncateLog => "TRUNCATE_LOG",
1792                Self::DemoteMaster => "DEMOTE_MASTER",
1793                Self::Maintenance => "MAINTENANCE",
1794                #[allow(deprecated)]
1795                Self::EnablePrivateIp => "ENABLE_PRIVATE_IP",
1796                #[allow(deprecated)]
1797                Self::DeferMaintenance => "DEFER_MAINTENANCE",
1798                #[allow(deprecated)]
1799                Self::CreateClone => "CREATE_CLONE",
1800                Self::RescheduleMaintenance => "RESCHEDULE_MAINTENANCE",
1801                Self::StartExternalSync => "START_EXTERNAL_SYNC",
1802                Self::LogCleanup => "LOG_CLEANUP",
1803                Self::AutoRestart => "AUTO_RESTART",
1804                Self::Reencrypt => "REENCRYPT",
1805                Self::Switchover => "SWITCHOVER",
1806                Self::UpdateBackup => "UPDATE_BACKUP",
1807                Self::AcquireSsrsLease => "ACQUIRE_SSRS_LEASE",
1808                Self::ReleaseSsrsLease => "RELEASE_SSRS_LEASE",
1809                Self::ReconfigureOldPrimary => "RECONFIGURE_OLD_PRIMARY",
1810                #[allow(deprecated)]
1811                Self::ClusterMaintenance => "CLUSTER_MAINTENANCE",
1812                #[allow(deprecated)]
1813                Self::SelfServiceMaintenance => "SELF_SERVICE_MAINTENANCE",
1814                Self::SwitchoverToReplica => "SWITCHOVER_TO_REPLICA",
1815                Self::MajorVersionUpgrade => "MAJOR_VERSION_UPGRADE",
1816                #[allow(deprecated)]
1817                Self::AdvancedBackup => "ADVANCED_BACKUP",
1818                Self::ManageBackup => "MANAGE_BACKUP",
1819                Self::EnhancedBackup => "ENHANCED_BACKUP",
1820                Self::RepairReadPool => "REPAIR_READ_POOL",
1821                Self::CreateReadPool => "CREATE_READ_POOL",
1822            }
1823        }
1824        /// Creates an enum from field names used in the ProtoBuf definition.
1825        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1826            match value {
1827                "SQL_OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1828                "IMPORT" => Some(Self::Import),
1829                "EXPORT" => Some(Self::Export),
1830                "CREATE" => Some(Self::Create),
1831                "UPDATE" => Some(Self::Update),
1832                "DELETE" => Some(Self::Delete),
1833                "RESTART" => Some(Self::Restart),
1834                "BACKUP" => Some(#[allow(deprecated)] Self::Backup),
1835                "SNAPSHOT" => Some(#[allow(deprecated)] Self::Snapshot),
1836                "BACKUP_VOLUME" => Some(Self::BackupVolume),
1837                "DELETE_VOLUME" => Some(Self::DeleteVolume),
1838                "RESTORE_VOLUME" => Some(Self::RestoreVolume),
1839                "INJECT_USER" => Some(Self::InjectUser),
1840                "CLONE" => Some(Self::Clone),
1841                "STOP_REPLICA" => Some(Self::StopReplica),
1842                "START_REPLICA" => Some(Self::StartReplica),
1843                "PROMOTE_REPLICA" => Some(Self::PromoteReplica),
1844                "CREATE_REPLICA" => Some(Self::CreateReplica),
1845                "CREATE_USER" => Some(Self::CreateUser),
1846                "DELETE_USER" => Some(Self::DeleteUser),
1847                "UPDATE_USER" => Some(Self::UpdateUser),
1848                "CREATE_DATABASE" => Some(Self::CreateDatabase),
1849                "DELETE_DATABASE" => Some(Self::DeleteDatabase),
1850                "UPDATE_DATABASE" => Some(Self::UpdateDatabase),
1851                "FAILOVER" => Some(Self::Failover),
1852                "DELETE_BACKUP" => Some(Self::DeleteBackup),
1853                "RECREATE_REPLICA" => Some(Self::RecreateReplica),
1854                "TRUNCATE_LOG" => Some(Self::TruncateLog),
1855                "DEMOTE_MASTER" => Some(Self::DemoteMaster),
1856                "MAINTENANCE" => Some(Self::Maintenance),
1857                "ENABLE_PRIVATE_IP" => Some(#[allow(deprecated)] Self::EnablePrivateIp),
1858                "DEFER_MAINTENANCE" => Some(#[allow(deprecated)] Self::DeferMaintenance),
1859                "CREATE_CLONE" => Some(#[allow(deprecated)] Self::CreateClone),
1860                "RESCHEDULE_MAINTENANCE" => Some(Self::RescheduleMaintenance),
1861                "START_EXTERNAL_SYNC" => Some(Self::StartExternalSync),
1862                "LOG_CLEANUP" => Some(Self::LogCleanup),
1863                "AUTO_RESTART" => Some(Self::AutoRestart),
1864                "REENCRYPT" => Some(Self::Reencrypt),
1865                "SWITCHOVER" => Some(Self::Switchover),
1866                "UPDATE_BACKUP" => Some(Self::UpdateBackup),
1867                "ACQUIRE_SSRS_LEASE" => Some(Self::AcquireSsrsLease),
1868                "RELEASE_SSRS_LEASE" => Some(Self::ReleaseSsrsLease),
1869                "RECONFIGURE_OLD_PRIMARY" => Some(Self::ReconfigureOldPrimary),
1870                "CLUSTER_MAINTENANCE" => {
1871                    Some(#[allow(deprecated)] Self::ClusterMaintenance)
1872                }
1873                "SELF_SERVICE_MAINTENANCE" => {
1874                    Some(#[allow(deprecated)] Self::SelfServiceMaintenance)
1875                }
1876                "SWITCHOVER_TO_REPLICA" => Some(Self::SwitchoverToReplica),
1877                "MAJOR_VERSION_UPGRADE" => Some(Self::MajorVersionUpgrade),
1878                "ADVANCED_BACKUP" => Some(#[allow(deprecated)] Self::AdvancedBackup),
1879                "MANAGE_BACKUP" => Some(Self::ManageBackup),
1880                "ENHANCED_BACKUP" => Some(Self::EnhancedBackup),
1881                "REPAIR_READ_POOL" => Some(Self::RepairReadPool),
1882                "CREATE_READ_POOL" => Some(Self::CreateReadPool),
1883                _ => None,
1884            }
1885        }
1886    }
1887    /// The status of an operation.
1888    #[derive(
1889        Clone,
1890        Copy,
1891        Debug,
1892        PartialEq,
1893        Eq,
1894        Hash,
1895        PartialOrd,
1896        Ord,
1897        ::prost::Enumeration
1898    )]
1899    #[repr(i32)]
1900    pub enum SqlOperationStatus {
1901        /// The state of the operation is unknown.
1902        Unspecified = 0,
1903        /// The operation has been queued, but has not started yet.
1904        Pending = 1,
1905        /// The operation is running.
1906        Running = 2,
1907        /// The operation completed.
1908        Done = 3,
1909    }
1910    impl SqlOperationStatus {
1911        /// String value of the enum field names used in the ProtoBuf definition.
1912        ///
1913        /// The values are not transformed in any way and thus are considered stable
1914        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1915        pub fn as_str_name(&self) -> &'static str {
1916            match self {
1917                Self::Unspecified => "SQL_OPERATION_STATUS_UNSPECIFIED",
1918                Self::Pending => "PENDING",
1919                Self::Running => "RUNNING",
1920                Self::Done => "DONE",
1921            }
1922        }
1923        /// Creates an enum from field names used in the ProtoBuf definition.
1924        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1925            match value {
1926                "SQL_OPERATION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1927                "PENDING" => Some(Self::Pending),
1928                "RUNNING" => Some(Self::Running),
1929                "DONE" => Some(Self::Done),
1930                _ => None,
1931            }
1932        }
1933    }
1934}
1935/// Database instance operation error.
1936#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1937pub struct OperationError {
1938    /// This is always `sql#operationError`.
1939    #[prost(string, tag = "1")]
1940    pub kind: ::prost::alloc::string::String,
1941    /// Identifies the specific error that occurred.
1942    #[prost(string, tag = "2")]
1943    pub code: ::prost::alloc::string::String,
1944    /// Additional information about the error encountered.
1945    #[prost(string, tag = "3")]
1946    pub message: ::prost::alloc::string::String,
1947}
1948/// Database instance operation errors list wrapper.
1949#[derive(Clone, PartialEq, ::prost::Message)]
1950pub struct OperationErrors {
1951    /// This is always `sql#operationErrors`.
1952    #[prost(string, tag = "1")]
1953    pub kind: ::prost::alloc::string::String,
1954    /// The list of errors encountered while processing this operation.
1955    #[prost(message, repeated, tag = "2")]
1956    pub errors: ::prost::alloc::vec::Vec<OperationError>,
1957}
1958/// Database instance local user password validation policy.
1959/// This message defines the password policy for local database users.
1960/// When enabled, it enforces constraints on password complexity, length,
1961/// and reuse. Keep this policy enabled to help prevent unauthorized access.
1962#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1963pub struct PasswordValidationPolicy {
1964    /// Minimum number of characters allowed.
1965    #[prost(message, optional, tag = "1")]
1966    pub min_length: ::core::option::Option<i32>,
1967    /// The complexity of the password.
1968    #[prost(enumeration = "password_validation_policy::Complexity", tag = "2")]
1969    pub complexity: i32,
1970    /// Number of previous passwords that cannot be reused.
1971    #[prost(message, optional, tag = "3")]
1972    pub reuse_interval: ::core::option::Option<i32>,
1973    /// Disallow username as a part of the password.
1974    #[prost(message, optional, tag = "4")]
1975    pub disallow_username_substring: ::core::option::Option<bool>,
1976    /// Minimum interval after which the password can be changed. This flag is only
1977    /// supported for PostgreSQL.
1978    #[prost(message, optional, tag = "5")]
1979    pub password_change_interval: ::core::option::Option<::prost_types::Duration>,
1980    /// Whether to enable the password policy or not. When enabled, passwords must
1981    /// meet complexity requirements. Keep this policy enabled to help prevent
1982    /// unauthorized access. Disabling this policy allows weak passwords.
1983    #[prost(message, optional, tag = "6")]
1984    pub enable_password_policy: ::core::option::Option<bool>,
1985    /// This field is deprecated and will be removed in a future version of the
1986    /// API.
1987    #[deprecated]
1988    #[prost(message, optional, tag = "7")]
1989    pub disallow_compromised_credentials: ::core::option::Option<bool>,
1990}
1991/// Nested message and enum types in `PasswordValidationPolicy`.
1992pub mod password_validation_policy {
1993    /// The complexity choices of the password.
1994    #[derive(
1995        Clone,
1996        Copy,
1997        Debug,
1998        PartialEq,
1999        Eq,
2000        Hash,
2001        PartialOrd,
2002        Ord,
2003        ::prost::Enumeration
2004    )]
2005    #[repr(i32)]
2006    pub enum Complexity {
2007        /// Complexity check is not specified.
2008        Unspecified = 0,
2009        /// A combination of lowercase, uppercase, numeric, and non-alphanumeric
2010        /// characters.
2011        Default = 1,
2012    }
2013    impl Complexity {
2014        /// String value of the enum field names used in the ProtoBuf definition.
2015        ///
2016        /// The values are not transformed in any way and thus are considered stable
2017        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2018        pub fn as_str_name(&self) -> &'static str {
2019            match self {
2020                Self::Unspecified => "COMPLEXITY_UNSPECIFIED",
2021                Self::Default => "COMPLEXITY_DEFAULT",
2022            }
2023        }
2024        /// Creates an enum from field names used in the ProtoBuf definition.
2025        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2026            match value {
2027                "COMPLEXITY_UNSPECIFIED" => Some(Self::Unspecified),
2028                "COMPLEXITY_DEFAULT" => Some(Self::Default),
2029                _ => None,
2030            }
2031        }
2032    }
2033}
2034/// Data cache configurations.
2035#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2036pub struct DataCacheConfig {
2037    /// Whether data cache is enabled for the instance.
2038    #[prost(bool, tag = "1")]
2039    pub data_cache_enabled: bool,
2040}
2041/// Config used to determine the final backup settings for the instance.
2042#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2043pub struct FinalBackupConfig {
2044    /// Whether the final backup is enabled for the instance.
2045    #[prost(bool, optional, tag = "1")]
2046    pub enabled: ::core::option::Option<bool>,
2047    /// The number of days to retain the final backup after the instance deletion.
2048    /// The final backup will be purged at (time_of_instance_deletion +
2049    /// retention_days).
2050    #[prost(int32, optional, tag = "3")]
2051    pub retention_days: ::core::option::Option<i32>,
2052}
2053/// Database instance settings.
2054#[derive(Clone, PartialEq, ::prost::Message)]
2055pub struct Settings {
2056    /// The version of instance settings. This is a required field for update
2057    /// method to make sure concurrent updates are handled properly. During update,
2058    /// use the most recent settingsVersion value for this instance and do not try
2059    /// to update this value.
2060    #[prost(message, optional, tag = "1")]
2061    pub settings_version: ::core::option::Option<i64>,
2062    /// The App Engine app IDs that can access this instance.
2063    /// (Deprecated) Applied to First Generation instances only.
2064    #[deprecated]
2065    #[prost(string, repeated, tag = "2")]
2066    pub authorized_gae_applications: ::prost::alloc::vec::Vec<
2067        ::prost::alloc::string::String,
2068    >,
2069    /// The tier (or machine type) for this instance, for example
2070    /// `db-custom-1-3840`. WARNING: Changing this restarts the instance.
2071    #[prost(string, tag = "3")]
2072    pub tier: ::prost::alloc::string::String,
2073    /// This is always `sql#settings`.
2074    #[prost(string, tag = "4")]
2075    pub kind: ::prost::alloc::string::String,
2076    /// User-provided labels, represented as a dictionary where each label is a
2077    /// single key value pair.
2078    #[prost(map = "string, string", tag = "5")]
2079    pub user_labels: ::std::collections::HashMap<
2080        ::prost::alloc::string::String,
2081        ::prost::alloc::string::String,
2082    >,
2083    /// Availability type. Potential values:
2084    ///
2085    /// * `ZONAL`: The instance serves data from only one zone. Outages in that
2086    ///   zone affect data accessibility.
2087    /// * `REGIONAL`: The instance can serve data from more than one zone in a
2088    ///   region (it is highly available)./
2089    ///
2090    /// For more information, see [Overview of the High Availability
2091    /// Configuration](<https://cloud.google.com/sql/docs/mysql/high-availability>).
2092    #[prost(enumeration = "SqlAvailabilityType", tag = "6")]
2093    pub availability_type: i32,
2094    /// The pricing plan for this instance. This can be either `PER_USE` or
2095    /// `PACKAGE`. Only `PER_USE` is supported for Second Generation instances.
2096    #[prost(enumeration = "SqlPricingPlan", tag = "7")]
2097    pub pricing_plan: i32,
2098    /// The type of replication this instance uses. This can be either
2099    /// `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only
2100    /// applicable to First Generation instances.
2101    #[deprecated]
2102    #[prost(enumeration = "SqlReplicationType", tag = "8")]
2103    pub replication_type: i32,
2104    /// The maximum size to which storage capacity can be automatically increased.
2105    /// The default value is 0, which specifies that there is no limit.
2106    #[prost(message, optional, tag = "9")]
2107    pub storage_auto_resize_limit: ::core::option::Option<i64>,
2108    /// The activation policy specifies when the instance is activated; it is
2109    /// applicable only when the instance state is RUNNABLE. Valid values:
2110    ///
2111    /// * `ALWAYS`: The instance is on, and remains so even in the absence of
2112    ///   connection requests.
2113    /// * `NEVER`: The instance is off; it is not activated, even if a
2114    ///   connection request arrives.
2115    #[prost(enumeration = "settings::SqlActivationPolicy", tag = "10")]
2116    pub activation_policy: i32,
2117    /// The settings for IP Management. This allows to enable or disable the
2118    /// instance IP and manage which external networks can connect to the instance.
2119    /// The IPv4 address cannot be disabled for Second Generation instances.
2120    #[prost(message, optional, tag = "11")]
2121    pub ip_configuration: ::core::option::Option<IpConfiguration>,
2122    /// Configuration to increase storage size automatically. The default value is
2123    /// true.
2124    #[prost(message, optional, tag = "12")]
2125    pub storage_auto_resize: ::core::option::Option<bool>,
2126    /// The location preference settings. This allows the instance to be located as
2127    /// near as possible to either an App Engine app or Compute Engine zone for
2128    /// better performance. App Engine co-location was only applicable to First
2129    /// Generation instances.
2130    #[prost(message, optional, tag = "13")]
2131    pub location_preference: ::core::option::Option<LocationPreference>,
2132    /// The database flags passed to the instance at startup.
2133    #[prost(message, repeated, tag = "14")]
2134    pub database_flags: ::prost::alloc::vec::Vec<DatabaseFlags>,
2135    /// The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for
2136    /// First Generation instances.
2137    #[prost(enumeration = "SqlDataDiskType", tag = "15")]
2138    pub data_disk_type: i32,
2139    /// The maintenance window for this instance. This specifies when the instance
2140    /// can be restarted for maintenance purposes.
2141    #[prost(message, optional, tag = "16")]
2142    pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
2143    /// The daily backup configuration for the instance.
2144    #[prost(message, optional, tag = "17")]
2145    pub backup_configuration: ::core::option::Option<BackupConfiguration>,
2146    /// Configuration specific to read replica instances. Indicates whether
2147    /// replication is enabled or not. WARNING: Changing this restarts the
2148    /// instance.
2149    #[prost(message, optional, tag = "18")]
2150    pub database_replication_enabled: ::core::option::Option<bool>,
2151    /// Configuration specific to read replica instances. Indicates whether
2152    /// database flags for crash-safe replication are enabled. This property was
2153    /// only applicable to First Generation instances.
2154    #[deprecated]
2155    #[prost(message, optional, tag = "19")]
2156    pub crash_safe_replication_enabled: ::core::option::Option<bool>,
2157    /// The size of data disk, in GB. The data disk size minimum is 10GB.
2158    #[prost(message, optional, tag = "20")]
2159    pub data_disk_size_gb: ::core::option::Option<i64>,
2160    /// Active Directory configuration, relevant only for Cloud SQL for SQL Server.
2161    #[prost(message, optional, tag = "22")]
2162    pub active_directory_config: ::core::option::Option<SqlActiveDirectoryConfig>,
2163    /// The name of server Instance collation.
2164    #[prost(string, tag = "23")]
2165    pub collation: ::prost::alloc::string::String,
2166    /// Deny maintenance periods
2167    #[prost(message, repeated, tag = "24")]
2168    pub deny_maintenance_periods: ::prost::alloc::vec::Vec<DenyMaintenancePeriod>,
2169    /// Insights configuration, for now relevant only for Postgres.
2170    #[prost(message, optional, tag = "25")]
2171    pub insights_config: ::core::option::Option<InsightsConfig>,
2172    /// The local user password validation policy of the instance.
2173    #[prost(message, optional, tag = "27")]
2174    pub password_validation_policy: ::core::option::Option<PasswordValidationPolicy>,
2175    /// SQL Server specific audit configuration.
2176    #[prost(message, optional, tag = "29")]
2177    pub sql_server_audit_config: ::core::option::Option<SqlServerAuditConfig>,
2178    /// Optional. The edition of the instance.
2179    #[prost(enumeration = "settings::Edition", tag = "38")]
2180    pub edition: i32,
2181    /// Specifies if connections must use Cloud SQL connectors.
2182    /// Option values include the following: `NOT_REQUIRED` (Cloud SQL instances
2183    /// can be connected without Cloud SQL
2184    /// Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL
2185    /// Connectors).
2186    ///
2187    /// Note that using REQUIRED disables all existing authorized networks. If
2188    /// this field is not specified when creating a new instance, NOT_REQUIRED is
2189    /// used. If this field is not specified when patching or updating an existing
2190    /// instance, it is left unchanged in the instance.
2191    #[prost(enumeration = "settings::ConnectorEnforcement", tag = "32")]
2192    pub connector_enforcement: i32,
2193    /// Configuration to protect against accidental instance deletion.
2194    #[prost(message, optional, tag = "33")]
2195    pub deletion_protection_enabled: ::core::option::Option<bool>,
2196    /// Server timezone, relevant only for Cloud SQL for SQL Server.
2197    #[prost(string, tag = "34")]
2198    pub time_zone: ::prost::alloc::string::String,
2199    /// Specifies advanced machine configuration for the instances relevant only
2200    /// for SQL Server.
2201    #[prost(message, optional, tag = "35")]
2202    pub advanced_machine_features: ::core::option::Option<AdvancedMachineFeatures>,
2203    /// Configuration for data cache.
2204    #[prost(message, optional, tag = "37")]
2205    pub data_cache_config: ::core::option::Option<DataCacheConfig>,
2206    /// Optional. Configuration value for recreation of replica after certain
2207    /// replication lag
2208    #[prost(message, optional, tag = "39")]
2209    pub replication_lag_max_seconds: ::core::option::Option<i32>,
2210    /// Optional. When this parameter is set to true, Cloud SQL instances can
2211    /// connect to Vertex AI to pass requests for real-time predictions and
2212    /// insights to the AI. The default value is false. This applies only to Cloud
2213    /// SQL for MySQL and Cloud SQL for PostgreSQL instances.
2214    #[prost(message, optional, tag = "40")]
2215    pub enable_google_ml_integration: ::core::option::Option<bool>,
2216    /// Optional. By default, Cloud SQL instances have schema extraction disabled
2217    /// for Dataplex. When this parameter is set to true, schema extraction for
2218    /// Dataplex on Cloud SQL instances is activated.
2219    #[prost(message, optional, tag = "41")]
2220    pub enable_dataplex_integration: ::core::option::Option<bool>,
2221    /// Optional. When this parameter is set to true, Cloud SQL retains backups of
2222    /// the instance even after the instance is deleted. The ON_DEMAND backup will
2223    /// be retained until customer deletes the backup or the project. The AUTOMATED
2224    /// backup will be retained based on the backups retention setting.
2225    #[prost(message, optional, tag = "42")]
2226    pub retain_backups_on_delete: ::core::option::Option<bool>,
2227    /// Optional. Provisioned number of I/O operations per second for the data
2228    /// disk. This field is only used for hyperdisk-balanced disk types.
2229    #[prost(int64, optional, tag = "43")]
2230    pub data_disk_provisioned_iops: ::core::option::Option<i64>,
2231    /// Optional. Provisioned throughput measured in MiB per second for the data
2232    /// disk. This field is only used for hyperdisk-balanced disk types.
2233    #[prost(int64, optional, tag = "44")]
2234    pub data_disk_provisioned_throughput: ::core::option::Option<i64>,
2235    /// Optional. The managed connection pooling configuration for the instance.
2236    #[prost(message, optional, tag = "45")]
2237    pub connection_pool_config: ::core::option::Option<ConnectionPoolConfig>,
2238    /// Optional. The final backup configuration for the instance.
2239    #[prost(message, optional, tag = "47")]
2240    pub final_backup_config: ::core::option::Option<FinalBackupConfig>,
2241    /// Optional. The read pool auto-scale configuration for the instance.
2242    #[prost(message, optional, tag = "48")]
2243    pub read_pool_auto_scale_config: ::core::option::Option<ReadPoolAutoScaleConfig>,
2244    /// Optional. Cloud SQL for MySQL auto-upgrade configuration. When this
2245    /// parameter is set to true, auto-upgrade is enabled for MySQL 8.0 minor
2246    /// versions. The MySQL version must be 8.0.35 or higher.
2247    #[prost(bool, optional, tag = "50")]
2248    pub auto_upgrade_enabled: ::core::option::Option<bool>,
2249    /// Optional. The Microsoft Entra ID configuration for the SQL Server instance.
2250    #[prost(message, optional, tag = "52")]
2251    pub entraid_config: ::core::option::Option<SqlServerEntraIdConfig>,
2252    /// This parameter controls whether to allow using ExecuteSql API to connect to
2253    /// the instance. Not allowed by default.
2254    #[prost(enumeration = "settings::DataApiAccess", optional, tag = "53")]
2255    pub data_api_access: ::core::option::Option<i32>,
2256    /// Optional. Configuration for Performance Capture, provides diagnostic
2257    /// metrics during high load situations.
2258    #[prost(message, optional, tag = "54")]
2259    pub performance_capture_config: ::core::option::Option<PerformanceCaptureConfig>,
2260}
2261/// Nested message and enum types in `Settings`.
2262pub mod settings {
2263    /// Specifies when the instance is activated.
2264    #[derive(
2265        Clone,
2266        Copy,
2267        Debug,
2268        PartialEq,
2269        Eq,
2270        Hash,
2271        PartialOrd,
2272        Ord,
2273        ::prost::Enumeration
2274    )]
2275    #[repr(i32)]
2276    pub enum SqlActivationPolicy {
2277        /// Unknown activation plan.
2278        Unspecified = 0,
2279        /// The instance is always up and running.
2280        Always = 1,
2281        /// The instance never starts.
2282        Never = 2,
2283        /// The instance starts upon receiving requests.
2284        #[deprecated]
2285        OnDemand = 3,
2286    }
2287    impl SqlActivationPolicy {
2288        /// String value of the enum field names used in the ProtoBuf definition.
2289        ///
2290        /// The values are not transformed in any way and thus are considered stable
2291        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2292        pub fn as_str_name(&self) -> &'static str {
2293            match self {
2294                Self::Unspecified => "SQL_ACTIVATION_POLICY_UNSPECIFIED",
2295                Self::Always => "ALWAYS",
2296                Self::Never => "NEVER",
2297                #[allow(deprecated)]
2298                Self::OnDemand => "ON_DEMAND",
2299            }
2300        }
2301        /// Creates an enum from field names used in the ProtoBuf definition.
2302        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2303            match value {
2304                "SQL_ACTIVATION_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
2305                "ALWAYS" => Some(Self::Always),
2306                "NEVER" => Some(Self::Never),
2307                "ON_DEMAND" => Some(#[allow(deprecated)] Self::OnDemand),
2308                _ => None,
2309            }
2310        }
2311    }
2312    /// The edition of the instance.
2313    #[derive(
2314        Clone,
2315        Copy,
2316        Debug,
2317        PartialEq,
2318        Eq,
2319        Hash,
2320        PartialOrd,
2321        Ord,
2322        ::prost::Enumeration
2323    )]
2324    #[repr(i32)]
2325    pub enum Edition {
2326        /// The instance did not specify the edition.
2327        Unspecified = 0,
2328        /// The instance is an enterprise edition.
2329        Enterprise = 2,
2330        /// The instance is an Enterprise Plus edition.
2331        EnterprisePlus = 3,
2332    }
2333    impl Edition {
2334        /// String value of the enum field names used in the ProtoBuf definition.
2335        ///
2336        /// The values are not transformed in any way and thus are considered stable
2337        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2338        pub fn as_str_name(&self) -> &'static str {
2339            match self {
2340                Self::Unspecified => "EDITION_UNSPECIFIED",
2341                Self::Enterprise => "ENTERPRISE",
2342                Self::EnterprisePlus => "ENTERPRISE_PLUS",
2343            }
2344        }
2345        /// Creates an enum from field names used in the ProtoBuf definition.
2346        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2347            match value {
2348                "EDITION_UNSPECIFIED" => Some(Self::Unspecified),
2349                "ENTERPRISE" => Some(Self::Enterprise),
2350                "ENTERPRISE_PLUS" => Some(Self::EnterprisePlus),
2351                _ => None,
2352            }
2353        }
2354    }
2355    /// The options for enforcing Cloud SQL connectors in the instance.
2356    #[derive(
2357        Clone,
2358        Copy,
2359        Debug,
2360        PartialEq,
2361        Eq,
2362        Hash,
2363        PartialOrd,
2364        Ord,
2365        ::prost::Enumeration
2366    )]
2367    #[repr(i32)]
2368    pub enum ConnectorEnforcement {
2369        /// The requirement for Cloud SQL connectors is unknown.
2370        Unspecified = 0,
2371        /// Do not require Cloud SQL connectors.
2372        NotRequired = 1,
2373        /// Require all connections to use Cloud SQL connectors, including the
2374        /// Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors.
2375        /// Note: This disables all existing authorized networks.
2376        Required = 2,
2377    }
2378    impl ConnectorEnforcement {
2379        /// String value of the enum field names used in the ProtoBuf definition.
2380        ///
2381        /// The values are not transformed in any way and thus are considered stable
2382        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2383        pub fn as_str_name(&self) -> &'static str {
2384            match self {
2385                Self::Unspecified => "CONNECTOR_ENFORCEMENT_UNSPECIFIED",
2386                Self::NotRequired => "NOT_REQUIRED",
2387                Self::Required => "REQUIRED",
2388            }
2389        }
2390        /// Creates an enum from field names used in the ProtoBuf definition.
2391        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2392            match value {
2393                "CONNECTOR_ENFORCEMENT_UNSPECIFIED" => Some(Self::Unspecified),
2394                "NOT_REQUIRED" => Some(Self::NotRequired),
2395                "REQUIRED" => Some(Self::Required),
2396                _ => None,
2397            }
2398        }
2399    }
2400    /// ExecuteSql API's access to the instance.
2401    #[derive(
2402        Clone,
2403        Copy,
2404        Debug,
2405        PartialEq,
2406        Eq,
2407        Hash,
2408        PartialOrd,
2409        Ord,
2410        ::prost::Enumeration
2411    )]
2412    #[repr(i32)]
2413    pub enum DataApiAccess {
2414        /// Unspecified, effectively the same as `DISALLOW_DATA_API`.
2415        Unspecified = 0,
2416        /// Disallow using ExecuteSql API to connect to the instance.
2417        DisallowDataApi = 1,
2418        /// Allow using ExecuteSql API to connect to the instance. For private IP
2419        /// instances, this allows authorized users to access the instance from
2420        /// the public internet using ExecuteSql API.
2421        AllowDataApi = 2,
2422    }
2423    impl DataApiAccess {
2424        /// String value of the enum field names used in the ProtoBuf definition.
2425        ///
2426        /// The values are not transformed in any way and thus are considered stable
2427        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2428        pub fn as_str_name(&self) -> &'static str {
2429            match self {
2430                Self::Unspecified => "DATA_API_ACCESS_UNSPECIFIED",
2431                Self::DisallowDataApi => "DISALLOW_DATA_API",
2432                Self::AllowDataApi => "ALLOW_DATA_API",
2433            }
2434        }
2435        /// Creates an enum from field names used in the ProtoBuf definition.
2436        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2437            match value {
2438                "DATA_API_ACCESS_UNSPECIFIED" => Some(Self::Unspecified),
2439                "DISALLOW_DATA_API" => Some(Self::DisallowDataApi),
2440                "ALLOW_DATA_API" => Some(Self::AllowDataApi),
2441                _ => None,
2442            }
2443        }
2444    }
2445}
2446/// Performance Capture configuration.
2447#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2448pub struct PerformanceCaptureConfig {
2449    /// Optional. Enable or disable the Performance Capture feature.
2450    #[prost(bool, optional, tag = "1")]
2451    pub enabled: ::core::option::Option<bool>,
2452    /// Optional. The time interval in seconds between any two probes.
2453    #[prost(int32, optional, tag = "2")]
2454    pub probing_interval_seconds: ::core::option::Option<i32>,
2455    /// Optional. The minimum number of consecutive readings above threshold that
2456    /// triggers instance state capture.
2457    #[prost(int32, optional, tag = "3")]
2458    pub probe_threshold: ::core::option::Option<i32>,
2459    /// Optional. The minimum number of server threads running to trigger the
2460    /// capture on primary.
2461    #[prost(int32, optional, tag = "4")]
2462    pub running_threads_threshold: ::core::option::Option<i32>,
2463    /// Optional. The minimum number of seconds replica must be lagging behind
2464    /// primary to trigger capture on replica.
2465    #[prost(int32, optional, tag = "5")]
2466    pub seconds_behind_source_threshold: ::core::option::Option<i32>,
2467    /// Optional. The amount of time in seconds that a transaction needs to have
2468    /// been open before the watcher starts recording it.
2469    #[prost(int32, optional, tag = "8")]
2470    pub transaction_duration_threshold: ::core::option::Option<i32>,
2471}
2472/// Connection pool flags for Cloud SQL instances managed connection pool
2473/// configuration.
2474#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2475pub struct ConnectionPoolFlags {
2476    /// Required. The name of the flag.
2477    #[prost(string, tag = "1")]
2478    pub name: ::prost::alloc::string::String,
2479    /// Required. The value of the flag. Boolean flags are set to `on` for true
2480    /// and `off` for false. This field must be omitted if the flag
2481    /// doesn't take a value.
2482    #[prost(string, tag = "2")]
2483    pub value: ::prost::alloc::string::String,
2484}
2485/// The managed connection pooling configuration.
2486#[derive(Clone, PartialEq, ::prost::Message)]
2487pub struct ConnectionPoolConfig {
2488    /// Whether managed connection pooling is enabled.
2489    #[prost(bool, optional, tag = "1")]
2490    pub connection_pooling_enabled: ::core::option::Option<bool>,
2491    /// Optional. List of connection pool configuration flags.
2492    #[prost(message, repeated, tag = "8")]
2493    pub flags: ::prost::alloc::vec::Vec<ConnectionPoolFlags>,
2494    /// Output only. Number of connection poolers.
2495    #[prost(int32, optional, tag = "9")]
2496    pub pooler_count: ::core::option::Option<i32>,
2497}
2498/// The read pool auto-scale configuration.
2499#[derive(Clone, PartialEq, ::prost::Message)]
2500pub struct ReadPoolAutoScaleConfig {
2501    /// Indicates whether read pool auto scaling is enabled.
2502    #[prost(bool, optional, tag = "1")]
2503    pub enabled: ::core::option::Option<bool>,
2504    /// Minimum number of read pool nodes to be maintained.
2505    #[prost(int32, optional, tag = "2")]
2506    pub min_node_count: ::core::option::Option<i32>,
2507    /// Maximum number of read pool nodes to be maintained.
2508    #[prost(int32, optional, tag = "3")]
2509    pub max_node_count: ::core::option::Option<i32>,
2510    /// Optional. Target metrics for read pool auto scaling.
2511    #[prost(message, repeated, tag = "4")]
2512    pub target_metrics: ::prost::alloc::vec::Vec<
2513        read_pool_auto_scale_config::TargetMetric,
2514    >,
2515    /// Indicates whether read pool auto scaling supports scale in operations
2516    /// (removing nodes).
2517    #[prost(bool, optional, tag = "5")]
2518    pub disable_scale_in: ::core::option::Option<bool>,
2519    /// The cooldown period for scale-in operations.
2520    #[prost(int32, optional, tag = "6")]
2521    pub scale_in_cooldown_seconds: ::core::option::Option<i32>,
2522    /// The cooldown period for scale-out operations.
2523    #[prost(int32, optional, tag = "7")]
2524    pub scale_out_cooldown_seconds: ::core::option::Option<i32>,
2525}
2526/// Nested message and enum types in `ReadPoolAutoScaleConfig`.
2527pub mod read_pool_auto_scale_config {
2528    /// Target metric for read pool auto scaling.
2529    #[derive(Clone, PartialEq, ::prost::Message)]
2530    pub struct TargetMetric {
2531        /// The metric name to be used for auto scaling.
2532        #[prost(string, optional, tag = "1")]
2533        pub metric: ::core::option::Option<::prost::alloc::string::String>,
2534        /// The target value for the metric.
2535        #[prost(float, optional, tag = "2")]
2536        pub target_value: ::core::option::Option<f32>,
2537    }
2538}
2539/// Specifies options for controlling advanced machine features.
2540#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2541pub struct AdvancedMachineFeatures {
2542    /// The number of threads per physical core.
2543    #[prost(int32, tag = "1")]
2544    pub threads_per_core: i32,
2545}
2546/// SslCerts Resource
2547#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2548pub struct SslCert {
2549    /// This is always `sql#sslCert`.
2550    #[prost(string, tag = "1")]
2551    pub kind: ::prost::alloc::string::String,
2552    /// Serial number, as extracted from the certificate.
2553    #[prost(string, tag = "2")]
2554    pub cert_serial_number: ::prost::alloc::string::String,
2555    /// PEM representation.
2556    #[prost(string, tag = "3")]
2557    pub cert: ::prost::alloc::string::String,
2558    /// The time when the certificate was created in [RFC
2559    /// 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
2560    /// `2012-11-15T16:19:00.094Z`
2561    #[prost(message, optional, tag = "4")]
2562    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
2563    /// User supplied name.  Constrained to \[a-zA-Z.-\_ \]+.
2564    #[prost(string, tag = "5")]
2565    pub common_name: ::prost::alloc::string::String,
2566    /// The time when the certificate expires in [RFC
2567    /// 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
2568    /// `2012-11-15T16:19:00.094Z`.
2569    #[prost(message, optional, tag = "6")]
2570    pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
2571    /// Sha1 Fingerprint.
2572    #[prost(string, tag = "7")]
2573    pub sha1_fingerprint: ::prost::alloc::string::String,
2574    /// Name of the database instance.
2575    #[prost(string, tag = "8")]
2576    pub instance: ::prost::alloc::string::String,
2577    /// The URI of this resource.
2578    #[prost(string, tag = "9")]
2579    pub self_link: ::prost::alloc::string::String,
2580}
2581/// SslCertDetail.
2582#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2583pub struct SslCertDetail {
2584    /// The public information about the cert.
2585    #[prost(message, optional, tag = "1")]
2586    pub cert_info: ::core::option::Option<SslCert>,
2587    /// The private key for the client cert, in pem format.  Keep private in order
2588    /// to protect your security.
2589    #[prost(string, tag = "2")]
2590    pub cert_private_key: ::prost::alloc::string::String,
2591}
2592/// Active Directory configuration, relevant only for Cloud SQL for SQL Server.
2593#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2594pub struct SqlActiveDirectoryConfig {
2595    /// This is always sql#activeDirectoryConfig.
2596    #[prost(string, tag = "1")]
2597    pub kind: ::prost::alloc::string::String,
2598    /// The name of the domain (e.g., mydomain.com).
2599    #[prost(string, tag = "2")]
2600    pub domain: ::prost::alloc::string::String,
2601    /// Optional. The mode of the Active Directory configuration.
2602    #[prost(enumeration = "sql_active_directory_config::ActiveDirectoryMode", tag = "3")]
2603    pub mode: i32,
2604    /// Optional. Domain controller IPv4 addresses used to bootstrap Active
2605    /// Directory.
2606    #[prost(string, repeated, tag = "4")]
2607    pub dns_servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2608    /// Optional. The secret manager key storing the administrator credential.
2609    /// (e.g., projects/{project}/secrets/{secret}).
2610    #[prost(string, tag = "5")]
2611    pub admin_credential_secret_name: ::prost::alloc::string::String,
2612    /// Optional. The organizational unit distinguished name. This is the full
2613    /// hierarchical path to the organizational unit.
2614    #[prost(string, tag = "6")]
2615    pub organizational_unit: ::prost::alloc::string::String,
2616}
2617/// Nested message and enum types in `SqlActiveDirectoryConfig`.
2618pub mod sql_active_directory_config {
2619    /// The modes of Active Directory configuration.
2620    #[derive(
2621        Clone,
2622        Copy,
2623        Debug,
2624        PartialEq,
2625        Eq,
2626        Hash,
2627        PartialOrd,
2628        Ord,
2629        ::prost::Enumeration
2630    )]
2631    #[repr(i32)]
2632    pub enum ActiveDirectoryMode {
2633        /// Unspecified mode. Will default to MANAGED_ACTIVE_DIRECTORY if the mode is
2634        /// not specified to maintain backward compatibility.
2635        Unspecified = 0,
2636        /// Managed Active Directory mode.
2637        ManagedActiveDirectory = 1,
2638        /// Deprecated: Use CUSTOMER_MANAGED_ACTIVE_DIRECTORY instead.
2639        #[deprecated]
2640        SelfManagedActiveDirectory = 2,
2641        /// Customer-managed Active Directory mode.
2642        CustomerManagedActiveDirectory = 3,
2643    }
2644    impl ActiveDirectoryMode {
2645        /// String value of the enum field names used in the ProtoBuf definition.
2646        ///
2647        /// The values are not transformed in any way and thus are considered stable
2648        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2649        pub fn as_str_name(&self) -> &'static str {
2650            match self {
2651                Self::Unspecified => "ACTIVE_DIRECTORY_MODE_UNSPECIFIED",
2652                Self::ManagedActiveDirectory => "MANAGED_ACTIVE_DIRECTORY",
2653                #[allow(deprecated)]
2654                Self::SelfManagedActiveDirectory => "SELF_MANAGED_ACTIVE_DIRECTORY",
2655                Self::CustomerManagedActiveDirectory => {
2656                    "CUSTOMER_MANAGED_ACTIVE_DIRECTORY"
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                "ACTIVE_DIRECTORY_MODE_UNSPECIFIED" => Some(Self::Unspecified),
2664                "MANAGED_ACTIVE_DIRECTORY" => Some(Self::ManagedActiveDirectory),
2665                "SELF_MANAGED_ACTIVE_DIRECTORY" => {
2666                    Some(#[allow(deprecated)] Self::SelfManagedActiveDirectory)
2667                }
2668                "CUSTOMER_MANAGED_ACTIVE_DIRECTORY" => {
2669                    Some(Self::CustomerManagedActiveDirectory)
2670                }
2671                _ => None,
2672            }
2673        }
2674    }
2675}
2676/// SQL Server specific audit configuration.
2677#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2678pub struct SqlServerAuditConfig {
2679    /// This is always sql#sqlServerAuditConfig
2680    #[prost(string, tag = "1")]
2681    pub kind: ::prost::alloc::string::String,
2682    /// The name of the destination bucket (e.g., gs://mybucket).
2683    #[prost(string, tag = "2")]
2684    pub bucket: ::prost::alloc::string::String,
2685    /// How long to keep generated audit files.
2686    #[prost(message, optional, tag = "3")]
2687    pub retention_interval: ::core::option::Option<::prost_types::Duration>,
2688    /// How often to upload generated audit files.
2689    #[prost(message, optional, tag = "4")]
2690    pub upload_interval: ::core::option::Option<::prost_types::Duration>,
2691}
2692/// SQL Server Entra ID configuration.
2693#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2694pub struct SqlServerEntraIdConfig {
2695    /// Output only. This is always sql#sqlServerEntraIdConfig
2696    #[prost(string, tag = "1")]
2697    pub kind: ::prost::alloc::string::String,
2698    /// Optional. The tenant ID for the Entra ID configuration.
2699    #[prost(string, tag = "2")]
2700    pub tenant_id: ::prost::alloc::string::String,
2701    /// Optional. The application ID for the Entra ID configuration.
2702    #[prost(string, tag = "3")]
2703    pub application_id: ::prost::alloc::string::String,
2704}
2705/// Acquire SSRS lease context.
2706#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2707pub struct AcquireSsrsLeaseContext {
2708    /// The username to be used as the setup login to connect to the database
2709    /// server for SSRS setup.
2710    #[prost(string, optional, tag = "1")]
2711    pub setup_login: ::core::option::Option<::prost::alloc::string::String>,
2712    /// The username to be used as the service login to connect to the report
2713    /// database for SSRS setup.
2714    #[prost(string, optional, tag = "2")]
2715    pub service_login: ::core::option::Option<::prost::alloc::string::String>,
2716    /// The report database to be used for SSRS setup.
2717    #[prost(string, optional, tag = "3")]
2718    pub report_database: ::core::option::Option<::prost::alloc::string::String>,
2719    /// Lease duration needed for SSRS setup.
2720    #[prost(message, optional, tag = "4")]
2721    pub duration: ::core::option::Option<::prost_types::Duration>,
2722}
2723/// DNS metadata.
2724#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2725pub struct DnsNameMapping {
2726    /// Output only. The DNS name.
2727    #[prost(string, tag = "1")]
2728    pub name: ::prost::alloc::string::String,
2729    /// Output only. The connection type of the DNS name.
2730    #[prost(enumeration = "dns_name_mapping::ConnectionType", tag = "2")]
2731    pub connection_type: i32,
2732    /// Output only. The scope that the DNS name applies to.
2733    #[prost(enumeration = "dns_name_mapping::DnsScope", tag = "3")]
2734    pub dns_scope: i32,
2735    /// Output only. The manager for this DNS record.
2736    #[prost(enumeration = "dns_name_mapping::RecordManager", tag = "4")]
2737    pub record_manager: i32,
2738}
2739/// Nested message and enum types in `DnsNameMapping`.
2740pub mod dns_name_mapping {
2741    /// The connection type of the DNS name.
2742    /// This enum is not frozen, and new values may be added in the future.
2743    #[derive(
2744        Clone,
2745        Copy,
2746        Debug,
2747        PartialEq,
2748        Eq,
2749        Hash,
2750        PartialOrd,
2751        Ord,
2752        ::prost::Enumeration
2753    )]
2754    #[repr(i32)]
2755    pub enum ConnectionType {
2756        /// Unknown connection type.
2757        Unspecified = 0,
2758        /// Public IP.
2759        Public = 1,
2760        /// Private services access (private IP).
2761        PrivateServicesAccess = 2,
2762        /// Private Service Connect.
2763        PrivateServiceConnect = 3,
2764    }
2765    impl ConnectionType {
2766        /// String value of the enum field names used in the ProtoBuf definition.
2767        ///
2768        /// The values are not transformed in any way and thus are considered stable
2769        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2770        pub fn as_str_name(&self) -> &'static str {
2771            match self {
2772                Self::Unspecified => "CONNECTION_TYPE_UNSPECIFIED",
2773                Self::Public => "PUBLIC",
2774                Self::PrivateServicesAccess => "PRIVATE_SERVICES_ACCESS",
2775                Self::PrivateServiceConnect => "PRIVATE_SERVICE_CONNECT",
2776            }
2777        }
2778        /// Creates an enum from field names used in the ProtoBuf definition.
2779        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2780            match value {
2781                "CONNECTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2782                "PUBLIC" => Some(Self::Public),
2783                "PRIVATE_SERVICES_ACCESS" => Some(Self::PrivateServicesAccess),
2784                "PRIVATE_SERVICE_CONNECT" => Some(Self::PrivateServiceConnect),
2785                _ => None,
2786            }
2787        }
2788    }
2789    /// The scope that the DNS name applies to.
2790    #[derive(
2791        Clone,
2792        Copy,
2793        Debug,
2794        PartialEq,
2795        Eq,
2796        Hash,
2797        PartialOrd,
2798        Ord,
2799        ::prost::Enumeration
2800    )]
2801    #[repr(i32)]
2802    pub enum DnsScope {
2803        /// DNS scope not set. This value should not be used.
2804        Unspecified = 0,
2805        /// Indicates an instance-level DNS name.
2806        Instance = 1,
2807        /// Indicates a cluster-level DNS name.
2808        Cluster = 2,
2809    }
2810    impl DnsScope {
2811        /// String value of the enum field names used in the ProtoBuf definition.
2812        ///
2813        /// The values are not transformed in any way and thus are considered stable
2814        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2815        pub fn as_str_name(&self) -> &'static str {
2816            match self {
2817                Self::Unspecified => "DNS_SCOPE_UNSPECIFIED",
2818                Self::Instance => "INSTANCE",
2819                Self::Cluster => "CLUSTER",
2820            }
2821        }
2822        /// Creates an enum from field names used in the ProtoBuf definition.
2823        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2824            match value {
2825                "DNS_SCOPE_UNSPECIFIED" => Some(Self::Unspecified),
2826                "INSTANCE" => Some(Self::Instance),
2827                "CLUSTER" => Some(Self::Cluster),
2828                _ => None,
2829            }
2830        }
2831    }
2832    /// The system responsible for managing the DNS record.
2833    #[derive(
2834        Clone,
2835        Copy,
2836        Debug,
2837        PartialEq,
2838        Eq,
2839        Hash,
2840        PartialOrd,
2841        Ord,
2842        ::prost::Enumeration
2843    )]
2844    #[repr(i32)]
2845    pub enum RecordManager {
2846        /// Record manager not set. This value should not be used.
2847        Unspecified = 0,
2848        /// The record may be managed by the customer. It is not automatically
2849        /// managed by Cloud SQL automation.
2850        Customer = 1,
2851        /// The record is managed by Cloud SQL, which will create, update,
2852        /// and delete the DNS records for the zone automatically when
2853        /// the Cloud SQL database instance is created or updated.
2854        CloudSqlAutomation = 2,
2855    }
2856    impl RecordManager {
2857        /// String value of the enum field names used in the ProtoBuf definition.
2858        ///
2859        /// The values are not transformed in any way and thus are considered stable
2860        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2861        pub fn as_str_name(&self) -> &'static str {
2862            match self {
2863                Self::Unspecified => "RECORD_MANAGER_UNSPECIFIED",
2864                Self::Customer => "CUSTOMER",
2865                Self::CloudSqlAutomation => "CLOUD_SQL_AUTOMATION",
2866            }
2867        }
2868        /// Creates an enum from field names used in the ProtoBuf definition.
2869        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2870            match value {
2871                "RECORD_MANAGER_UNSPECIFIED" => Some(Self::Unspecified),
2872                "CUSTOMER" => Some(Self::Customer),
2873                "CLOUD_SQL_AUTOMATION" => Some(Self::CloudSqlAutomation),
2874                _ => None,
2875            }
2876        }
2877    }
2878}
2879#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2880#[repr(i32)]
2881pub enum SqlFileType {
2882    /// Unknown file type.
2883    Unspecified = 0,
2884    /// File containing SQL statements.
2885    Sql = 1,
2886    /// File in CSV format.
2887    Csv = 2,
2888    Bak = 4,
2889    /// TDE certificate.
2890    Tde = 8,
2891}
2892impl SqlFileType {
2893    /// String value of the enum field names used in the ProtoBuf definition.
2894    ///
2895    /// The values are not transformed in any way and thus are considered stable
2896    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2897    pub fn as_str_name(&self) -> &'static str {
2898        match self {
2899            Self::Unspecified => "SQL_FILE_TYPE_UNSPECIFIED",
2900            Self::Sql => "SQL",
2901            Self::Csv => "CSV",
2902            Self::Bak => "BAK",
2903            Self::Tde => "TDE",
2904        }
2905    }
2906    /// Creates an enum from field names used in the ProtoBuf definition.
2907    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2908        match value {
2909            "SQL_FILE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2910            "SQL" => Some(Self::Sql),
2911            "CSV" => Some(Self::Csv),
2912            "BAK" => Some(Self::Bak),
2913            "TDE" => Some(Self::Tde),
2914            _ => None,
2915        }
2916    }
2917}
2918#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2919#[repr(i32)]
2920pub enum BakType {
2921    /// Default type.
2922    Unspecified = 0,
2923    /// Full backup.
2924    Full = 1,
2925    /// Differential backup.
2926    Diff = 2,
2927    /// Transaction Log backup
2928    Tlog = 3,
2929}
2930impl BakType {
2931    /// String value of the enum field names used in the ProtoBuf definition.
2932    ///
2933    /// The values are not transformed in any way and thus are considered stable
2934    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2935    pub fn as_str_name(&self) -> &'static str {
2936        match self {
2937            Self::Unspecified => "BAK_TYPE_UNSPECIFIED",
2938            Self::Full => "FULL",
2939            Self::Diff => "DIFF",
2940            Self::Tlog => "TLOG",
2941        }
2942    }
2943    /// Creates an enum from field names used in the ProtoBuf definition.
2944    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2945        match value {
2946            "BAK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2947            "FULL" => Some(Self::Full),
2948            "DIFF" => Some(Self::Diff),
2949            "TLOG" => Some(Self::Tlog),
2950            _ => None,
2951        }
2952    }
2953}
2954/// The type of maintenance to be performed on the instance.
2955#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2956#[repr(i32)]
2957pub enum SqlMaintenanceType {
2958    /// Maintenance type is unspecified.
2959    Unspecified = 0,
2960    /// Indicates that a standalone instance is undergoing maintenance. The
2961    /// instance can be either a primary instance or a replica.
2962    InstanceMaintenance = 1,
2963    /// Indicates that the primary instance and all of its replicas, including
2964    /// cascading replicas, are undergoing maintenance. Maintenance is performed on
2965    /// groups of replicas first, followed by the primary instance.
2966    ReplicaIncludedMaintenance = 2,
2967    /// Indicates that the standalone instance is undergoing maintenance, initiated
2968    /// by self-service. The instance can be either a primary instance or a
2969    /// replica.
2970    InstanceSelfServiceMaintenance = 3,
2971    /// Indicates that the primary instance and all of its replicas are undergoing
2972    /// maintenance, initiated by self-service. Maintenance is performed on groups
2973    /// of replicas first, followed by the primary instance.
2974    ReplicaIncludedSelfServiceMaintenance = 4,
2975}
2976impl SqlMaintenanceType {
2977    /// String value of the enum field names used in the ProtoBuf definition.
2978    ///
2979    /// The values are not transformed in any way and thus are considered stable
2980    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2981    pub fn as_str_name(&self) -> &'static str {
2982        match self {
2983            Self::Unspecified => "SQL_MAINTENANCE_TYPE_UNSPECIFIED",
2984            Self::InstanceMaintenance => "INSTANCE_MAINTENANCE",
2985            Self::ReplicaIncludedMaintenance => "REPLICA_INCLUDED_MAINTENANCE",
2986            Self::InstanceSelfServiceMaintenance => "INSTANCE_SELF_SERVICE_MAINTENANCE",
2987            Self::ReplicaIncludedSelfServiceMaintenance => {
2988                "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE"
2989            }
2990        }
2991    }
2992    /// Creates an enum from field names used in the ProtoBuf definition.
2993    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2994        match value {
2995            "SQL_MAINTENANCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2996            "INSTANCE_MAINTENANCE" => Some(Self::InstanceMaintenance),
2997            "REPLICA_INCLUDED_MAINTENANCE" => Some(Self::ReplicaIncludedMaintenance),
2998            "INSTANCE_SELF_SERVICE_MAINTENANCE" => {
2999                Some(Self::InstanceSelfServiceMaintenance)
3000            }
3001            "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" => {
3002                Some(Self::ReplicaIncludedSelfServiceMaintenance)
3003            }
3004            _ => None,
3005        }
3006    }
3007}
3008#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3009#[repr(i32)]
3010pub enum SqlBackendType {
3011    /// This is an unknown backend type for instance.
3012    Unspecified = 0,
3013    /// V1 speckle instance.
3014    #[deprecated]
3015    FirstGen = 1,
3016    /// V2 speckle instance.
3017    SecondGen = 2,
3018    /// On premises instance.
3019    External = 3,
3020}
3021impl SqlBackendType {
3022    /// String value of the enum field names used in the ProtoBuf definition.
3023    ///
3024    /// The values are not transformed in any way and thus are considered stable
3025    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3026    pub fn as_str_name(&self) -> &'static str {
3027        match self {
3028            Self::Unspecified => "SQL_BACKEND_TYPE_UNSPECIFIED",
3029            #[allow(deprecated)]
3030            Self::FirstGen => "FIRST_GEN",
3031            Self::SecondGen => "SECOND_GEN",
3032            Self::External => "EXTERNAL",
3033        }
3034    }
3035    /// Creates an enum from field names used in the ProtoBuf definition.
3036    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3037        match value {
3038            "SQL_BACKEND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
3039            "FIRST_GEN" => Some(#[allow(deprecated)] Self::FirstGen),
3040            "SECOND_GEN" => Some(Self::SecondGen),
3041            "EXTERNAL" => Some(Self::External),
3042            _ => None,
3043        }
3044    }
3045}
3046#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3047#[repr(i32)]
3048pub enum SqlIpAddressType {
3049    /// This is an unknown IP address type.
3050    Unspecified = 0,
3051    /// IP address the customer is supposed to connect to. Usually this is the
3052    /// load balancer's IP address
3053    Primary = 1,
3054    /// Source IP address of the connection a read replica establishes to its
3055    /// external primary instance. This IP address can be allowlisted by the
3056    /// customer in case it has a firewall that filters incoming connection to its
3057    /// on premises primary instance.
3058    Outgoing = 2,
3059    /// Private IP used when using private IPs and network peering.
3060    Private = 3,
3061    /// V1 IP of a migrated instance. We want the user to
3062    /// decommission this IP as soon as the migration is complete.
3063    /// Note: V1 instances with V1 ip addresses will be counted as PRIMARY.
3064    Migrated1stGen = 4,
3065}
3066impl SqlIpAddressType {
3067    /// String value of the enum field names used in the ProtoBuf definition.
3068    ///
3069    /// The values are not transformed in any way and thus are considered stable
3070    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3071    pub fn as_str_name(&self) -> &'static str {
3072        match self {
3073            Self::Unspecified => "SQL_IP_ADDRESS_TYPE_UNSPECIFIED",
3074            Self::Primary => "PRIMARY",
3075            Self::Outgoing => "OUTGOING",
3076            Self::Private => "PRIVATE",
3077            Self::Migrated1stGen => "MIGRATED_1ST_GEN",
3078        }
3079    }
3080    /// Creates an enum from field names used in the ProtoBuf definition.
3081    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3082        match value {
3083            "SQL_IP_ADDRESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
3084            "PRIMARY" => Some(Self::Primary),
3085            "OUTGOING" => Some(Self::Outgoing),
3086            "PRIVATE" => Some(Self::Private),
3087            "MIGRATED_1ST_GEN" => Some(Self::Migrated1stGen),
3088            _ => None,
3089        }
3090    }
3091}
3092/// The database engine type and version.
3093#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3094#[repr(i32)]
3095pub enum SqlDatabaseVersion {
3096    /// This is an unknown database version.
3097    Unspecified = 0,
3098    /// The database version is MySQL 5.1.
3099    #[deprecated]
3100    Mysql51 = 2,
3101    /// The database version is MySQL 5.5.
3102    #[deprecated]
3103    Mysql55 = 3,
3104    /// The database version is MySQL 5.6.
3105    Mysql56 = 5,
3106    /// The database version is MySQL 5.7.
3107    Mysql57 = 6,
3108    /// The database version is MySQL 8.
3109    Mysql80 = 20,
3110    /// The database major version is MySQL 8.0 and the minor version is 18.
3111    Mysql8018 = 41,
3112    /// The database major version is MySQL 8.0 and the minor version is 26.
3113    Mysql8026 = 85,
3114    /// The database major version is MySQL 8.0 and the minor version is 27.
3115    Mysql8027 = 111,
3116    /// The database major version is MySQL 8.0 and the minor version is 28.
3117    Mysql8028 = 132,
3118    /// The database major version is MySQL 8.0 and the minor version is 29.
3119    #[deprecated]
3120    Mysql8029 = 148,
3121    /// The database major version is MySQL 8.0 and the minor version is 30.
3122    Mysql8030 = 174,
3123    /// The database major version is MySQL 8.0 and the minor version is 31.
3124    Mysql8031 = 197,
3125    /// The database major version is MySQL 8.0 and the minor version is 32.
3126    Mysql8032 = 213,
3127    /// The database major version is MySQL 8.0 and the minor version is 33.
3128    Mysql8033 = 238,
3129    /// The database major version is MySQL 8.0 and the minor version is 34.
3130    Mysql8034 = 239,
3131    /// The database major version is MySQL 8.0 and the minor version is 35.
3132    Mysql8035 = 240,
3133    /// The database major version is MySQL 8.0 and the minor version is 36.
3134    Mysql8036 = 241,
3135    /// The database major version is MySQL 8.0 and the minor version is 37.
3136    Mysql8037 = 355,
3137    /// The database major version is MySQL 8.0 and the minor version is 39.
3138    Mysql8039 = 357,
3139    /// The database major version is MySQL 8.0 and the minor version is 40.
3140    Mysql8040 = 358,
3141    /// The database major version is MySQL 8.0 and the minor version is 41.
3142    Mysql8041 = 488,
3143    /// The database major version is MySQL 8.0 and the minor version is 42.
3144    Mysql8042 = 489,
3145    /// The database major version is MySQL 8.0 and the minor version is 43.
3146    Mysql8043 = 553,
3147    /// The database major version is MySQL 8.0 and the minor version is 44.
3148    Mysql8044 = 554,
3149    /// The database major version is MySQL 8.0 and the minor version is 45.
3150    Mysql8045 = 555,
3151    /// The database major version is MySQL 8.0 and the minor version is 46.
3152    Mysql8046 = 556,
3153    /// The database version is MySQL 8.4.
3154    Mysql84 = 398,
3155    /// The database version is MySQL 9.7.
3156    Mysql97 = 654,
3157    /// The database version is SQL Server 2017 Standard.
3158    Sqlserver2017Standard = 11,
3159    /// The database version is SQL Server 2017 Enterprise.
3160    Sqlserver2017Enterprise = 14,
3161    /// The database version is SQL Server 2017 Express.
3162    Sqlserver2017Express = 15,
3163    /// The database version is SQL Server 2017 Web.
3164    Sqlserver2017Web = 16,
3165    /// The database version is PostgreSQL 9.6.
3166    Postgres96 = 9,
3167    /// The database version is PostgreSQL 10.
3168    Postgres10 = 18,
3169    /// The database version is PostgreSQL 11.
3170    Postgres11 = 10,
3171    /// The database version is PostgreSQL 12.
3172    Postgres12 = 19,
3173    /// The database version is PostgreSQL 13.
3174    Postgres13 = 23,
3175    /// The database version is PostgreSQL 14.
3176    Postgres14 = 110,
3177    /// The database version is PostgreSQL 15.
3178    Postgres15 = 172,
3179    /// The database version is PostgreSQL 16.
3180    Postgres16 = 272,
3181    /// The database version is PostgreSQL 17.
3182    Postgres17 = 408,
3183    /// The database version is PostgreSQL 18.
3184    Postgres18 = 557,
3185    /// The database version is SQL Server 2019 Standard.
3186    Sqlserver2019Standard = 26,
3187    /// The database version is SQL Server 2019 Enterprise.
3188    Sqlserver2019Enterprise = 27,
3189    /// The database version is SQL Server 2019 Express.
3190    Sqlserver2019Express = 28,
3191    /// The database version is SQL Server 2019 Web.
3192    Sqlserver2019Web = 29,
3193    /// The database version is SQL Server 2022 Standard.
3194    Sqlserver2022Standard = 199,
3195    /// The database version is SQL Server 2022 Enterprise.
3196    Sqlserver2022Enterprise = 200,
3197    /// The database version is SQL Server 2022 Express.
3198    Sqlserver2022Express = 201,
3199    /// The database version is SQL Server 2022 Web.
3200    Sqlserver2022Web = 202,
3201}
3202impl SqlDatabaseVersion {
3203    /// String value of the enum field names used in the ProtoBuf definition.
3204    ///
3205    /// The values are not transformed in any way and thus are considered stable
3206    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3207    pub fn as_str_name(&self) -> &'static str {
3208        match self {
3209            Self::Unspecified => "SQL_DATABASE_VERSION_UNSPECIFIED",
3210            #[allow(deprecated)]
3211            Self::Mysql51 => "MYSQL_5_1",
3212            #[allow(deprecated)]
3213            Self::Mysql55 => "MYSQL_5_5",
3214            Self::Mysql56 => "MYSQL_5_6",
3215            Self::Mysql57 => "MYSQL_5_7",
3216            Self::Mysql80 => "MYSQL_8_0",
3217            Self::Mysql8018 => "MYSQL_8_0_18",
3218            Self::Mysql8026 => "MYSQL_8_0_26",
3219            Self::Mysql8027 => "MYSQL_8_0_27",
3220            Self::Mysql8028 => "MYSQL_8_0_28",
3221            #[allow(deprecated)]
3222            Self::Mysql8029 => "MYSQL_8_0_29",
3223            Self::Mysql8030 => "MYSQL_8_0_30",
3224            Self::Mysql8031 => "MYSQL_8_0_31",
3225            Self::Mysql8032 => "MYSQL_8_0_32",
3226            Self::Mysql8033 => "MYSQL_8_0_33",
3227            Self::Mysql8034 => "MYSQL_8_0_34",
3228            Self::Mysql8035 => "MYSQL_8_0_35",
3229            Self::Mysql8036 => "MYSQL_8_0_36",
3230            Self::Mysql8037 => "MYSQL_8_0_37",
3231            Self::Mysql8039 => "MYSQL_8_0_39",
3232            Self::Mysql8040 => "MYSQL_8_0_40",
3233            Self::Mysql8041 => "MYSQL_8_0_41",
3234            Self::Mysql8042 => "MYSQL_8_0_42",
3235            Self::Mysql8043 => "MYSQL_8_0_43",
3236            Self::Mysql8044 => "MYSQL_8_0_44",
3237            Self::Mysql8045 => "MYSQL_8_0_45",
3238            Self::Mysql8046 => "MYSQL_8_0_46",
3239            Self::Mysql84 => "MYSQL_8_4",
3240            Self::Mysql97 => "MYSQL_9_7",
3241            Self::Sqlserver2017Standard => "SQLSERVER_2017_STANDARD",
3242            Self::Sqlserver2017Enterprise => "SQLSERVER_2017_ENTERPRISE",
3243            Self::Sqlserver2017Express => "SQLSERVER_2017_EXPRESS",
3244            Self::Sqlserver2017Web => "SQLSERVER_2017_WEB",
3245            Self::Postgres96 => "POSTGRES_9_6",
3246            Self::Postgres10 => "POSTGRES_10",
3247            Self::Postgres11 => "POSTGRES_11",
3248            Self::Postgres12 => "POSTGRES_12",
3249            Self::Postgres13 => "POSTGRES_13",
3250            Self::Postgres14 => "POSTGRES_14",
3251            Self::Postgres15 => "POSTGRES_15",
3252            Self::Postgres16 => "POSTGRES_16",
3253            Self::Postgres17 => "POSTGRES_17",
3254            Self::Postgres18 => "POSTGRES_18",
3255            Self::Sqlserver2019Standard => "SQLSERVER_2019_STANDARD",
3256            Self::Sqlserver2019Enterprise => "SQLSERVER_2019_ENTERPRISE",
3257            Self::Sqlserver2019Express => "SQLSERVER_2019_EXPRESS",
3258            Self::Sqlserver2019Web => "SQLSERVER_2019_WEB",
3259            Self::Sqlserver2022Standard => "SQLSERVER_2022_STANDARD",
3260            Self::Sqlserver2022Enterprise => "SQLSERVER_2022_ENTERPRISE",
3261            Self::Sqlserver2022Express => "SQLSERVER_2022_EXPRESS",
3262            Self::Sqlserver2022Web => "SQLSERVER_2022_WEB",
3263        }
3264    }
3265    /// Creates an enum from field names used in the ProtoBuf definition.
3266    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3267        match value {
3268            "SQL_DATABASE_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
3269            "MYSQL_5_1" => Some(#[allow(deprecated)] Self::Mysql51),
3270            "MYSQL_5_5" => Some(#[allow(deprecated)] Self::Mysql55),
3271            "MYSQL_5_6" => Some(Self::Mysql56),
3272            "MYSQL_5_7" => Some(Self::Mysql57),
3273            "MYSQL_8_0" => Some(Self::Mysql80),
3274            "MYSQL_8_0_18" => Some(Self::Mysql8018),
3275            "MYSQL_8_0_26" => Some(Self::Mysql8026),
3276            "MYSQL_8_0_27" => Some(Self::Mysql8027),
3277            "MYSQL_8_0_28" => Some(Self::Mysql8028),
3278            "MYSQL_8_0_29" => Some(#[allow(deprecated)] Self::Mysql8029),
3279            "MYSQL_8_0_30" => Some(Self::Mysql8030),
3280            "MYSQL_8_0_31" => Some(Self::Mysql8031),
3281            "MYSQL_8_0_32" => Some(Self::Mysql8032),
3282            "MYSQL_8_0_33" => Some(Self::Mysql8033),
3283            "MYSQL_8_0_34" => Some(Self::Mysql8034),
3284            "MYSQL_8_0_35" => Some(Self::Mysql8035),
3285            "MYSQL_8_0_36" => Some(Self::Mysql8036),
3286            "MYSQL_8_0_37" => Some(Self::Mysql8037),
3287            "MYSQL_8_0_39" => Some(Self::Mysql8039),
3288            "MYSQL_8_0_40" => Some(Self::Mysql8040),
3289            "MYSQL_8_0_41" => Some(Self::Mysql8041),
3290            "MYSQL_8_0_42" => Some(Self::Mysql8042),
3291            "MYSQL_8_0_43" => Some(Self::Mysql8043),
3292            "MYSQL_8_0_44" => Some(Self::Mysql8044),
3293            "MYSQL_8_0_45" => Some(Self::Mysql8045),
3294            "MYSQL_8_0_46" => Some(Self::Mysql8046),
3295            "MYSQL_8_4" => Some(Self::Mysql84),
3296            "MYSQL_9_7" => Some(Self::Mysql97),
3297            "SQLSERVER_2017_STANDARD" => Some(Self::Sqlserver2017Standard),
3298            "SQLSERVER_2017_ENTERPRISE" => Some(Self::Sqlserver2017Enterprise),
3299            "SQLSERVER_2017_EXPRESS" => Some(Self::Sqlserver2017Express),
3300            "SQLSERVER_2017_WEB" => Some(Self::Sqlserver2017Web),
3301            "POSTGRES_9_6" => Some(Self::Postgres96),
3302            "POSTGRES_10" => Some(Self::Postgres10),
3303            "POSTGRES_11" => Some(Self::Postgres11),
3304            "POSTGRES_12" => Some(Self::Postgres12),
3305            "POSTGRES_13" => Some(Self::Postgres13),
3306            "POSTGRES_14" => Some(Self::Postgres14),
3307            "POSTGRES_15" => Some(Self::Postgres15),
3308            "POSTGRES_16" => Some(Self::Postgres16),
3309            "POSTGRES_17" => Some(Self::Postgres17),
3310            "POSTGRES_18" => Some(Self::Postgres18),
3311            "SQLSERVER_2019_STANDARD" => Some(Self::Sqlserver2019Standard),
3312            "SQLSERVER_2019_ENTERPRISE" => Some(Self::Sqlserver2019Enterprise),
3313            "SQLSERVER_2019_EXPRESS" => Some(Self::Sqlserver2019Express),
3314            "SQLSERVER_2019_WEB" => Some(Self::Sqlserver2019Web),
3315            "SQLSERVER_2022_STANDARD" => Some(Self::Sqlserver2022Standard),
3316            "SQLSERVER_2022_ENTERPRISE" => Some(Self::Sqlserver2022Enterprise),
3317            "SQLSERVER_2022_EXPRESS" => Some(Self::Sqlserver2022Express),
3318            "SQLSERVER_2022_WEB" => Some(Self::Sqlserver2022Web),
3319            _ => None,
3320        }
3321    }
3322}
3323/// The pricing plan for this instance.
3324#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3325#[repr(i32)]
3326pub enum SqlPricingPlan {
3327    /// This is an unknown pricing plan for this instance.
3328    Unspecified = 0,
3329    /// The instance is billed at a monthly flat rate.
3330    Package = 1,
3331    /// The instance is billed per usage.
3332    PerUse = 2,
3333}
3334impl SqlPricingPlan {
3335    /// String value of the enum field names used in the ProtoBuf definition.
3336    ///
3337    /// The values are not transformed in any way and thus are considered stable
3338    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3339    pub fn as_str_name(&self) -> &'static str {
3340        match self {
3341            Self::Unspecified => "SQL_PRICING_PLAN_UNSPECIFIED",
3342            Self::Package => "PACKAGE",
3343            Self::PerUse => "PER_USE",
3344        }
3345    }
3346    /// Creates an enum from field names used in the ProtoBuf definition.
3347    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3348        match value {
3349            "SQL_PRICING_PLAN_UNSPECIFIED" => Some(Self::Unspecified),
3350            "PACKAGE" => Some(Self::Package),
3351            "PER_USE" => Some(Self::PerUse),
3352            _ => None,
3353        }
3354    }
3355}
3356#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3357#[repr(i32)]
3358pub enum SqlReplicationType {
3359    /// This is an unknown replication type for a Cloud SQL instance.
3360    Unspecified = 0,
3361    /// The synchronous replication mode for First Generation instances. It is the
3362    /// default value.
3363    Synchronous = 1,
3364    /// The asynchronous replication mode for First Generation instances. It
3365    /// provides a slight performance gain, but if an outage occurs while this
3366    /// option is set to asynchronous, you can lose up to a few seconds of updates
3367    /// to your data.
3368    Asynchronous = 2,
3369}
3370impl SqlReplicationType {
3371    /// String value of the enum field names used in the ProtoBuf definition.
3372    ///
3373    /// The values are not transformed in any way and thus are considered stable
3374    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3375    pub fn as_str_name(&self) -> &'static str {
3376        match self {
3377            Self::Unspecified => "SQL_REPLICATION_TYPE_UNSPECIFIED",
3378            Self::Synchronous => "SYNCHRONOUS",
3379            Self::Asynchronous => "ASYNCHRONOUS",
3380        }
3381    }
3382    /// Creates an enum from field names used in the ProtoBuf definition.
3383    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3384        match value {
3385            "SQL_REPLICATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
3386            "SYNCHRONOUS" => Some(Self::Synchronous),
3387            "ASYNCHRONOUS" => Some(Self::Asynchronous),
3388            _ => None,
3389        }
3390    }
3391}
3392/// The type of disk that is used for a v2 instance to use.
3393#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3394#[repr(i32)]
3395pub enum SqlDataDiskType {
3396    /// This is an unknown data disk type.
3397    Unspecified = 0,
3398    /// An SSD data disk.
3399    PdSsd = 1,
3400    /// An HDD data disk.
3401    PdHdd = 2,
3402    /// This field is deprecated and will be removed from a future version of the
3403    /// API.
3404    #[deprecated]
3405    ObsoleteLocalSsd = 3,
3406    /// A Hyperdisk Balanced data disk.
3407    HyperdiskBalanced = 4,
3408}
3409impl SqlDataDiskType {
3410    /// String value of the enum field names used in the ProtoBuf definition.
3411    ///
3412    /// The values are not transformed in any way and thus are considered stable
3413    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3414    pub fn as_str_name(&self) -> &'static str {
3415        match self {
3416            Self::Unspecified => "SQL_DATA_DISK_TYPE_UNSPECIFIED",
3417            Self::PdSsd => "PD_SSD",
3418            Self::PdHdd => "PD_HDD",
3419            #[allow(deprecated)]
3420            Self::ObsoleteLocalSsd => "OBSOLETE_LOCAL_SSD",
3421            Self::HyperdiskBalanced => "HYPERDISK_BALANCED",
3422        }
3423    }
3424    /// Creates an enum from field names used in the ProtoBuf definition.
3425    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3426        match value {
3427            "SQL_DATA_DISK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
3428            "PD_SSD" => Some(Self::PdSsd),
3429            "PD_HDD" => Some(Self::PdHdd),
3430            "OBSOLETE_LOCAL_SSD" => Some(#[allow(deprecated)] Self::ObsoleteLocalSsd),
3431            "HYPERDISK_BALANCED" => Some(Self::HyperdiskBalanced),
3432            _ => None,
3433        }
3434    }
3435}
3436/// The availability type of the given Cloud SQL instance.
3437#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3438#[repr(i32)]
3439pub enum SqlAvailabilityType {
3440    /// This is an unknown Availability type.
3441    Unspecified = 0,
3442    /// Zonal available instance.
3443    Zonal = 1,
3444    /// Regional available instance.
3445    Regional = 2,
3446}
3447impl SqlAvailabilityType {
3448    /// String value of the enum field names used in the ProtoBuf definition.
3449    ///
3450    /// The values are not transformed in any way and thus are considered stable
3451    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3452    pub fn as_str_name(&self) -> &'static str {
3453        match self {
3454            Self::Unspecified => "SQL_AVAILABILITY_TYPE_UNSPECIFIED",
3455            Self::Zonal => "ZONAL",
3456            Self::Regional => "REGIONAL",
3457        }
3458    }
3459    /// Creates an enum from field names used in the ProtoBuf definition.
3460    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3461        match value {
3462            "SQL_AVAILABILITY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
3463            "ZONAL" => Some(Self::Zonal),
3464            "REGIONAL" => Some(Self::Regional),
3465            _ => None,
3466        }
3467    }
3468}
3469#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3470#[repr(i32)]
3471pub enum SqlUpdateTrack {
3472    /// This is an unknown maintenance timing preference.
3473    Unspecified = 0,
3474    /// For an instance with a scheduled maintenance window, this maintenance
3475    /// timing indicates that the maintenance update is scheduled 7 to 14 days
3476    /// after the notification is sent out. Also referred to as `Week 1` (Console)
3477    /// and `preview` (gcloud CLI).
3478    Canary = 1,
3479    /// For an instance with a scheduled maintenance window, this maintenance
3480    /// timing indicates that the maintenance update is scheduled 15 to 21 days
3481    /// after the notification is sent out. Also referred to as `Week 2` (Console)
3482    /// and `production` (gcloud CLI).
3483    Stable = 2,
3484    /// For instance with a scheduled maintenance window, this maintenance
3485    /// timing indicates that the maintenance update is scheduled 35 to 42 days
3486    /// after the notification is sent out.
3487    Week5 = 3,
3488}
3489impl SqlUpdateTrack {
3490    /// String value of the enum field names used in the ProtoBuf definition.
3491    ///
3492    /// The values are not transformed in any way and thus are considered stable
3493    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3494    pub fn as_str_name(&self) -> &'static str {
3495        match self {
3496            Self::Unspecified => "SQL_UPDATE_TRACK_UNSPECIFIED",
3497            Self::Canary => "canary",
3498            Self::Stable => "stable",
3499            Self::Week5 => "week5",
3500        }
3501    }
3502    /// Creates an enum from field names used in the ProtoBuf definition.
3503    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3504        match value {
3505            "SQL_UPDATE_TRACK_UNSPECIFIED" => Some(Self::Unspecified),
3506            "canary" => Some(Self::Canary),
3507            "stable" => Some(Self::Stable),
3508            "week5" => Some(Self::Week5),
3509            _ => None,
3510        }
3511    }
3512}
3513/// Backup runs delete request.
3514#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3515pub struct SqlBackupRunsDeleteRequest {
3516    /// The ID of the backup run to delete. To find a backup run ID, use the
3517    /// [list](<https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list>)
3518    /// method.
3519    #[prost(int64, tag = "1")]
3520    pub id: i64,
3521    /// Cloud SQL instance ID. This does not include the project ID.
3522    #[prost(string, tag = "2")]
3523    pub instance: ::prost::alloc::string::String,
3524    /// Project ID of the project that contains the instance.
3525    #[prost(string, tag = "3")]
3526    pub project: ::prost::alloc::string::String,
3527}
3528/// Backup runs get request.
3529#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3530pub struct SqlBackupRunsGetRequest {
3531    /// The ID of this backup run.
3532    #[prost(int64, tag = "1")]
3533    pub id: i64,
3534    /// Cloud SQL instance ID. This does not include the project ID.
3535    #[prost(string, tag = "2")]
3536    pub instance: ::prost::alloc::string::String,
3537    /// Project ID of the project that contains the instance.
3538    #[prost(string, tag = "3")]
3539    pub project: ::prost::alloc::string::String,
3540}
3541/// Backup runs insert request.
3542#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3543pub struct SqlBackupRunsInsertRequest {
3544    /// Cloud SQL instance ID. This does not include the project ID.
3545    #[prost(string, tag = "1")]
3546    pub instance: ::prost::alloc::string::String,
3547    /// Project ID of the project that contains the instance.
3548    #[prost(string, tag = "2")]
3549    pub project: ::prost::alloc::string::String,
3550    #[prost(message, optional, tag = "100")]
3551    pub body: ::core::option::Option<BackupRun>,
3552}
3553/// Backup runs list request.
3554#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3555pub struct SqlBackupRunsListRequest {
3556    /// Cloud SQL instance ID, or "-" for all instances. This does not include
3557    /// the project ID.
3558    #[prost(string, tag = "1")]
3559    pub instance: ::prost::alloc::string::String,
3560    /// Maximum number of backup runs per response.
3561    #[prost(int32, tag = "2")]
3562    pub max_results: i32,
3563    /// A previously-returned page token representing part of the larger set of
3564    /// results to view.
3565    #[prost(string, tag = "3")]
3566    pub page_token: ::prost::alloc::string::String,
3567    /// Project ID of the project that contains the instance.
3568    #[prost(string, tag = "4")]
3569    pub project: ::prost::alloc::string::String,
3570}
3571/// A BackupRun resource.
3572#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3573pub struct BackupRun {
3574    /// This is always `sql#backupRun`.
3575    #[prost(string, tag = "1")]
3576    pub kind: ::prost::alloc::string::String,
3577    /// The status of this run.
3578    #[prost(enumeration = "SqlBackupRunStatus", tag = "2")]
3579    pub status: i32,
3580    /// The time the run was enqueued in UTC timezone in
3581    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
3582    /// `2012-11-15T16:19:00.094Z`.
3583    #[prost(message, optional, tag = "3")]
3584    pub enqueued_time: ::core::option::Option<::prost_types::Timestamp>,
3585    /// The identifier for this backup run. Unique only for a specific Cloud SQL
3586    /// instance.
3587    #[prost(int64, tag = "4")]
3588    pub id: i64,
3589    /// The time the backup operation actually started in UTC timezone in
3590    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
3591    /// `2012-11-15T16:19:00.094Z`.
3592    #[prost(message, optional, tag = "5")]
3593    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
3594    /// The time the backup operation completed in UTC timezone in
3595    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
3596    /// `2012-11-15T16:19:00.094Z`.
3597    #[prost(message, optional, tag = "6")]
3598    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
3599    /// Information about why the backup operation failed. This is only present if
3600    /// the run has the FAILED status.
3601    #[prost(message, optional, tag = "7")]
3602    pub error: ::core::option::Option<OperationError>,
3603    /// The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL".
3604    /// This field defaults to "ON_DEMAND" and is ignored, when specified for
3605    /// insert requests.
3606    #[prost(enumeration = "SqlBackupRunType", tag = "8")]
3607    pub r#type: i32,
3608    /// The description of this run, only applicable to on-demand backups.
3609    #[prost(string, tag = "9")]
3610    pub description: ::prost::alloc::string::String,
3611    /// The start time of the backup window during which this the backup was
3612    /// attempted in [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for
3613    /// example `2012-11-15T16:19:00.094Z`.
3614    #[prost(message, optional, tag = "10")]
3615    pub window_start_time: ::core::option::Option<::prost_types::Timestamp>,
3616    /// Name of the database instance.
3617    #[prost(string, tag = "11")]
3618    pub instance: ::prost::alloc::string::String,
3619    /// The URI of this resource.
3620    #[prost(string, tag = "12")]
3621    pub self_link: ::prost::alloc::string::String,
3622    /// Location of the backups.
3623    #[prost(string, tag = "13")]
3624    pub location: ::prost::alloc::string::String,
3625    /// Output only. The instance database version at the time this backup was
3626    /// made.
3627    #[prost(enumeration = "SqlDatabaseVersion", tag = "15")]
3628    pub database_version: i32,
3629    /// Encryption configuration specific to a backup.
3630    #[prost(message, optional, tag = "16")]
3631    pub disk_encryption_configuration: ::core::option::Option<
3632        DiskEncryptionConfiguration,
3633    >,
3634    /// Encryption status specific to a backup.
3635    #[prost(message, optional, tag = "17")]
3636    pub disk_encryption_status: ::core::option::Option<DiskEncryptionStatus>,
3637    /// Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
3638    #[prost(enumeration = "SqlBackupKind", tag = "19")]
3639    pub backup_kind: i32,
3640    /// Backup time zone to prevent restores to an instance with
3641    /// a different time zone. Now relevant only for SQL Server.
3642    #[prost(string, tag = "23")]
3643    pub time_zone: ::prost::alloc::string::String,
3644    /// Output only. The maximum chargeable bytes for the backup.
3645    #[prost(int64, optional, tag = "24")]
3646    pub max_chargeable_bytes: ::core::option::Option<i64>,
3647}
3648/// Backup run list results.
3649#[derive(Clone, PartialEq, ::prost::Message)]
3650pub struct BackupRunsListResponse {
3651    /// This is always `sql#backupRunsList`.
3652    #[prost(string, tag = "1")]
3653    pub kind: ::prost::alloc::string::String,
3654    /// A list of backup runs in reverse chronological order of the enqueued time.
3655    #[prost(message, repeated, tag = "2")]
3656    pub items: ::prost::alloc::vec::Vec<BackupRun>,
3657    /// The continuation token, used to page through large result sets. Provide
3658    /// this value in a subsequent request to return the next page of results.
3659    #[prost(string, tag = "3")]
3660    pub next_page_token: ::prost::alloc::string::String,
3661}
3662/// The status of a backup run.
3663#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3664#[repr(i32)]
3665pub enum SqlBackupRunStatus {
3666    /// The status of the run is unknown.
3667    Unspecified = 0,
3668    /// The backup operation was enqueued.
3669    Enqueued = 1,
3670    /// The backup is overdue across a given backup window. Indicates a
3671    /// problem. Example: Long-running operation in progress during
3672    /// the whole window.
3673    Overdue = 2,
3674    /// The backup is in progress.
3675    Running = 3,
3676    /// The backup failed.
3677    Failed = 4,
3678    /// The backup was successful.
3679    Successful = 5,
3680    /// The backup was skipped (without problems) for a given backup
3681    /// window. Example: Instance was idle.
3682    Skipped = 6,
3683    /// The backup is about to be deleted.
3684    DeletionPending = 7,
3685    /// The backup deletion failed.
3686    DeletionFailed = 8,
3687    /// The backup has been deleted.
3688    Deleted = 9,
3689}
3690impl SqlBackupRunStatus {
3691    /// String value of the enum field names used in the ProtoBuf definition.
3692    ///
3693    /// The values are not transformed in any way and thus are considered stable
3694    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3695    pub fn as_str_name(&self) -> &'static str {
3696        match self {
3697            Self::Unspecified => "SQL_BACKUP_RUN_STATUS_UNSPECIFIED",
3698            Self::Enqueued => "ENQUEUED",
3699            Self::Overdue => "OVERDUE",
3700            Self::Running => "RUNNING",
3701            Self::Failed => "FAILED",
3702            Self::Successful => "SUCCESSFUL",
3703            Self::Skipped => "SKIPPED",
3704            Self::DeletionPending => "DELETION_PENDING",
3705            Self::DeletionFailed => "DELETION_FAILED",
3706            Self::Deleted => "DELETED",
3707        }
3708    }
3709    /// Creates an enum from field names used in the ProtoBuf definition.
3710    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3711        match value {
3712            "SQL_BACKUP_RUN_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
3713            "ENQUEUED" => Some(Self::Enqueued),
3714            "OVERDUE" => Some(Self::Overdue),
3715            "RUNNING" => Some(Self::Running),
3716            "FAILED" => Some(Self::Failed),
3717            "SUCCESSFUL" => Some(Self::Successful),
3718            "SKIPPED" => Some(Self::Skipped),
3719            "DELETION_PENDING" => Some(Self::DeletionPending),
3720            "DELETION_FAILED" => Some(Self::DeletionFailed),
3721            "DELETED" => Some(Self::Deleted),
3722            _ => None,
3723        }
3724    }
3725}
3726/// Defines the supported backup kinds.
3727#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3728#[repr(i32)]
3729pub enum SqlBackupKind {
3730    /// This is an unknown BackupKind.
3731    Unspecified = 0,
3732    /// Snapshot-based backups.
3733    Snapshot = 1,
3734    /// Physical backups.
3735    Physical = 2,
3736}
3737impl SqlBackupKind {
3738    /// String value of the enum field names used in the ProtoBuf definition.
3739    ///
3740    /// The values are not transformed in any way and thus are considered stable
3741    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3742    pub fn as_str_name(&self) -> &'static str {
3743        match self {
3744            Self::Unspecified => "SQL_BACKUP_KIND_UNSPECIFIED",
3745            Self::Snapshot => "SNAPSHOT",
3746            Self::Physical => "PHYSICAL",
3747        }
3748    }
3749    /// Creates an enum from field names used in the ProtoBuf definition.
3750    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3751        match value {
3752            "SQL_BACKUP_KIND_UNSPECIFIED" => Some(Self::Unspecified),
3753            "SNAPSHOT" => Some(Self::Snapshot),
3754            "PHYSICAL" => Some(Self::Physical),
3755            _ => None,
3756        }
3757    }
3758}
3759/// Type of backup (i.e. automated, on demand, etc).
3760#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3761#[repr(i32)]
3762pub enum SqlBackupRunType {
3763    /// This is an unknown BackupRun type.
3764    Unspecified = 0,
3765    /// The backup schedule automatically triggers a backup.
3766    Automated = 1,
3767    /// The user manually triggers a backup.
3768    OnDemand = 2,
3769}
3770impl SqlBackupRunType {
3771    /// String value of the enum field names used in the ProtoBuf definition.
3772    ///
3773    /// The values are not transformed in any way and thus are considered stable
3774    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3775    pub fn as_str_name(&self) -> &'static str {
3776        match self {
3777            Self::Unspecified => "SQL_BACKUP_RUN_TYPE_UNSPECIFIED",
3778            Self::Automated => "AUTOMATED",
3779            Self::OnDemand => "ON_DEMAND",
3780        }
3781    }
3782    /// Creates an enum from field names used in the ProtoBuf definition.
3783    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3784        match value {
3785            "SQL_BACKUP_RUN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
3786            "AUTOMATED" => Some(Self::Automated),
3787            "ON_DEMAND" => Some(Self::OnDemand),
3788            _ => None,
3789        }
3790    }
3791}
3792/// Generated client implementations.
3793pub mod sql_backup_runs_service_client {
3794    #![allow(
3795        unused_variables,
3796        dead_code,
3797        missing_docs,
3798        clippy::wildcard_imports,
3799        clippy::let_unit_value,
3800    )]
3801    use tonic::codegen::*;
3802    use tonic::codegen::http::Uri;
3803    /// Service for managing database backups.
3804    #[derive(Debug, Clone)]
3805    pub struct SqlBackupRunsServiceClient<T> {
3806        inner: tonic::client::Grpc<T>,
3807    }
3808    impl<T> SqlBackupRunsServiceClient<T>
3809    where
3810        T: tonic::client::GrpcService<tonic::body::Body>,
3811        T::Error: Into<StdError>,
3812        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3813        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3814    {
3815        pub fn new(inner: T) -> Self {
3816            let inner = tonic::client::Grpc::new(inner);
3817            Self { inner }
3818        }
3819        pub fn with_origin(inner: T, origin: Uri) -> Self {
3820            let inner = tonic::client::Grpc::with_origin(inner, origin);
3821            Self { inner }
3822        }
3823        pub fn with_interceptor<F>(
3824            inner: T,
3825            interceptor: F,
3826        ) -> SqlBackupRunsServiceClient<InterceptedService<T, F>>
3827        where
3828            F: tonic::service::Interceptor,
3829            T::ResponseBody: Default,
3830            T: tonic::codegen::Service<
3831                http::Request<tonic::body::Body>,
3832                Response = http::Response<
3833                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
3834                >,
3835            >,
3836            <T as tonic::codegen::Service<
3837                http::Request<tonic::body::Body>,
3838            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3839        {
3840            SqlBackupRunsServiceClient::new(InterceptedService::new(inner, interceptor))
3841        }
3842        /// Compress requests with the given encoding.
3843        ///
3844        /// This requires the server to support it otherwise it might respond with an
3845        /// error.
3846        #[must_use]
3847        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3848            self.inner = self.inner.send_compressed(encoding);
3849            self
3850        }
3851        /// Enable decompressing responses.
3852        #[must_use]
3853        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3854            self.inner = self.inner.accept_compressed(encoding);
3855            self
3856        }
3857        /// Limits the maximum size of a decoded message.
3858        ///
3859        /// Default: `4MB`
3860        #[must_use]
3861        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3862            self.inner = self.inner.max_decoding_message_size(limit);
3863            self
3864        }
3865        /// Limits the maximum size of an encoded message.
3866        ///
3867        /// Default: `usize::MAX`
3868        #[must_use]
3869        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3870            self.inner = self.inner.max_encoding_message_size(limit);
3871            self
3872        }
3873        /// Deletes the backup taken by a backup run.
3874        pub async fn delete(
3875            &mut self,
3876            request: impl tonic::IntoRequest<super::SqlBackupRunsDeleteRequest>,
3877        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
3878            self.inner
3879                .ready()
3880                .await
3881                .map_err(|e| {
3882                    tonic::Status::unknown(
3883                        format!("Service was not ready: {}", e.into()),
3884                    )
3885                })?;
3886            let codec = tonic_prost::ProstCodec::default();
3887            let path = http::uri::PathAndQuery::from_static(
3888                "/google.cloud.sql.v1.SqlBackupRunsService/Delete",
3889            );
3890            let mut req = request.into_request();
3891            req.extensions_mut()
3892                .insert(
3893                    GrpcMethod::new("google.cloud.sql.v1.SqlBackupRunsService", "Delete"),
3894                );
3895            self.inner.unary(req, path, codec).await
3896        }
3897        /// Retrieves a resource containing information about a backup run.
3898        pub async fn get(
3899            &mut self,
3900            request: impl tonic::IntoRequest<super::SqlBackupRunsGetRequest>,
3901        ) -> std::result::Result<tonic::Response<super::BackupRun>, tonic::Status> {
3902            self.inner
3903                .ready()
3904                .await
3905                .map_err(|e| {
3906                    tonic::Status::unknown(
3907                        format!("Service was not ready: {}", e.into()),
3908                    )
3909                })?;
3910            let codec = tonic_prost::ProstCodec::default();
3911            let path = http::uri::PathAndQuery::from_static(
3912                "/google.cloud.sql.v1.SqlBackupRunsService/Get",
3913            );
3914            let mut req = request.into_request();
3915            req.extensions_mut()
3916                .insert(
3917                    GrpcMethod::new("google.cloud.sql.v1.SqlBackupRunsService", "Get"),
3918                );
3919            self.inner.unary(req, path, codec).await
3920        }
3921        /// Creates a new backup run on demand.
3922        pub async fn insert(
3923            &mut self,
3924            request: impl tonic::IntoRequest<super::SqlBackupRunsInsertRequest>,
3925        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
3926            self.inner
3927                .ready()
3928                .await
3929                .map_err(|e| {
3930                    tonic::Status::unknown(
3931                        format!("Service was not ready: {}", e.into()),
3932                    )
3933                })?;
3934            let codec = tonic_prost::ProstCodec::default();
3935            let path = http::uri::PathAndQuery::from_static(
3936                "/google.cloud.sql.v1.SqlBackupRunsService/Insert",
3937            );
3938            let mut req = request.into_request();
3939            req.extensions_mut()
3940                .insert(
3941                    GrpcMethod::new("google.cloud.sql.v1.SqlBackupRunsService", "Insert"),
3942                );
3943            self.inner.unary(req, path, codec).await
3944        }
3945        /// Lists all backup runs associated with the project or a given instance
3946        /// and configuration in the reverse chronological order of the backup
3947        /// initiation time.
3948        pub async fn list(
3949            &mut self,
3950            request: impl tonic::IntoRequest<super::SqlBackupRunsListRequest>,
3951        ) -> std::result::Result<
3952            tonic::Response<super::BackupRunsListResponse>,
3953            tonic::Status,
3954        > {
3955            self.inner
3956                .ready()
3957                .await
3958                .map_err(|e| {
3959                    tonic::Status::unknown(
3960                        format!("Service was not ready: {}", e.into()),
3961                    )
3962                })?;
3963            let codec = tonic_prost::ProstCodec::default();
3964            let path = http::uri::PathAndQuery::from_static(
3965                "/google.cloud.sql.v1.SqlBackupRunsService/List",
3966            );
3967            let mut req = request.into_request();
3968            req.extensions_mut()
3969                .insert(
3970                    GrpcMethod::new("google.cloud.sql.v1.SqlBackupRunsService", "List"),
3971                );
3972            self.inner.unary(req, path, codec).await
3973        }
3974    }
3975}
3976/// Instance add server CA request.
3977#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3978pub struct SqlInstancesAddServerCaRequest {
3979    /// Cloud SQL instance ID. This does not include the project ID.
3980    #[prost(string, tag = "1")]
3981    pub instance: ::prost::alloc::string::String,
3982    /// Project ID of the project that contains the instance.
3983    #[prost(string, tag = "2")]
3984    pub project: ::prost::alloc::string::String,
3985}
3986/// Instance add server certificate request.
3987#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3988pub struct SqlInstancesAddServerCertificateRequest {
3989    /// Cloud SQL instance ID. This does not include the project ID.
3990    #[prost(string, tag = "1")]
3991    pub instance: ::prost::alloc::string::String,
3992    /// Project ID of the project that contains the instance.
3993    #[prost(string, tag = "2")]
3994    pub project: ::prost::alloc::string::String,
3995}
3996/// Instance add Entra ID certificate request.
3997#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3998pub struct SqlInstancesAddEntraIdCertificateRequest {
3999    /// Required. Cloud SQL instance ID. This does not include the project ID.
4000    #[prost(string, tag = "1")]
4001    pub instance: ::prost::alloc::string::String,
4002    /// Required. Project ID of the project that contains the instance.
4003    #[prost(string, tag = "2")]
4004    pub project: ::prost::alloc::string::String,
4005}
4006/// Instance clone request.
4007#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4008pub struct SqlInstancesCloneRequest {
4009    /// Required. The ID of the Cloud SQL instance to be cloned (source). This does
4010    /// not include the project ID.
4011    #[prost(string, tag = "1")]
4012    pub instance: ::prost::alloc::string::String,
4013    /// Required. Project ID of the source as well as the clone Cloud SQL instance.
4014    #[prost(string, tag = "2")]
4015    pub project: ::prost::alloc::string::String,
4016    #[prost(message, optional, tag = "100")]
4017    pub body: ::core::option::Option<InstancesCloneRequest>,
4018}
4019/// Instance delete request.
4020#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4021pub struct SqlInstancesDeleteRequest {
4022    /// Cloud SQL instance ID. This does not include the project ID.
4023    #[prost(string, tag = "1")]
4024    pub instance: ::prost::alloc::string::String,
4025    /// Project ID of the project that contains the instance to be deleted.
4026    #[prost(string, tag = "2")]
4027    pub project: ::prost::alloc::string::String,
4028    /// Flag to opt-in for final backup. By default, it is turned off.
4029    #[prost(bool, optional, tag = "7")]
4030    pub enable_final_backup: ::core::option::Option<bool>,
4031    /// Optional. The description of the final backup.
4032    #[prost(string, tag = "5")]
4033    pub final_backup_description: ::prost::alloc::string::String,
4034    #[prost(oneof = "sql_instances_delete_request::Expiration", tags = "4, 6")]
4035    pub expiration: ::core::option::Option<sql_instances_delete_request::Expiration>,
4036}
4037/// Nested message and enum types in `SqlInstancesDeleteRequest`.
4038pub mod sql_instances_delete_request {
4039    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
4040    pub enum Expiration {
4041        /// Optional. Retention period of the final backup.
4042        #[prost(int64, tag = "4")]
4043        FinalBackupTtlDays(i64),
4044        /// Optional. Final Backup expiration time.
4045        /// Timestamp in UTC of when this resource is considered expired.
4046        #[prost(message, tag = "6")]
4047        FinalBackupExpiryTime(::prost_types::Timestamp),
4048    }
4049}
4050/// Instance demote master request.
4051#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4052pub struct SqlInstancesDemoteMasterRequest {
4053    /// Cloud SQL instance name.
4054    #[prost(string, tag = "1")]
4055    pub instance: ::prost::alloc::string::String,
4056    /// ID of the project that contains the instance.
4057    #[prost(string, tag = "2")]
4058    pub project: ::prost::alloc::string::String,
4059    #[prost(message, optional, tag = "100")]
4060    pub body: ::core::option::Option<InstancesDemoteMasterRequest>,
4061}
4062/// Instance demote request.
4063#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4064pub struct SqlInstancesDemoteRequest {
4065    /// Required. Cloud SQL instance name.
4066    #[prost(string, tag = "1")]
4067    pub instance: ::prost::alloc::string::String,
4068    /// Required. ID of the project that contains the instance.
4069    #[prost(string, tag = "2")]
4070    pub project: ::prost::alloc::string::String,
4071    /// Required. The request body.
4072    #[prost(message, optional, tag = "100")]
4073    pub body: ::core::option::Option<InstancesDemoteRequest>,
4074}
4075/// Instance export request.
4076#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4077pub struct SqlInstancesExportRequest {
4078    /// Cloud SQL instance ID. This does not include the project ID.
4079    #[prost(string, tag = "1")]
4080    pub instance: ::prost::alloc::string::String,
4081    /// Project ID of the project that contains the instance to be exported.
4082    #[prost(string, tag = "2")]
4083    pub project: ::prost::alloc::string::String,
4084    #[prost(message, optional, tag = "100")]
4085    pub body: ::core::option::Option<InstancesExportRequest>,
4086}
4087/// Instance failover request.
4088#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4089pub struct SqlInstancesFailoverRequest {
4090    /// Cloud SQL instance ID. This does not include the project ID.
4091    #[prost(string, tag = "1")]
4092    pub instance: ::prost::alloc::string::String,
4093    /// ID of the project that contains the read replica.
4094    #[prost(string, tag = "2")]
4095    pub project: ::prost::alloc::string::String,
4096    #[prost(message, optional, tag = "100")]
4097    pub body: ::core::option::Option<InstancesFailoverRequest>,
4098}
4099/// Instance get request.
4100#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4101pub struct SqlInstancesGetRequest {
4102    /// Required. Database instance ID. This does not include the project ID.
4103    #[prost(string, tag = "1")]
4104    pub instance: ::prost::alloc::string::String,
4105    /// Required. Project ID of the project that contains the instance.
4106    #[prost(string, tag = "2")]
4107    pub project: ::prost::alloc::string::String,
4108}
4109/// Instance import request.
4110#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4111pub struct SqlInstancesImportRequest {
4112    /// Cloud SQL instance ID. This does not include the project ID.
4113    #[prost(string, tag = "1")]
4114    pub instance: ::prost::alloc::string::String,
4115    /// Project ID of the project that contains the instance.
4116    #[prost(string, tag = "2")]
4117    pub project: ::prost::alloc::string::String,
4118    #[prost(message, optional, tag = "100")]
4119    pub body: ::core::option::Option<InstancesImportRequest>,
4120}
4121/// Instance insert request.
4122#[derive(Clone, PartialEq, ::prost::Message)]
4123pub struct SqlInstancesInsertRequest {
4124    /// Project ID of the project to which the newly created Cloud SQL instances
4125    /// should belong.
4126    #[prost(string, tag = "1")]
4127    pub project: ::prost::alloc::string::String,
4128    #[prost(message, optional, tag = "100")]
4129    pub body: ::core::option::Option<DatabaseInstance>,
4130}
4131/// Instance list request.
4132#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4133pub struct SqlInstancesListRequest {
4134    /// A filter expression that filters resources listed in the response.
4135    /// The expression is in the form of field:value. For example,
4136    /// 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per
4137    /// their JSON representation, such as 'settings.userLabels.auto_start:true'.
4138    ///
4139    /// Multiple filter queries are space-separated. For example.
4140    /// 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each
4141    /// expression is an AND expression. However, you can include AND and OR
4142    /// expressions explicitly.
4143    #[prost(string, tag = "1")]
4144    pub filter: ::prost::alloc::string::String,
4145    /// The maximum number of instances to return. The service may return fewer
4146    /// than this value.
4147    /// If unspecified, at most 500 instances are returned.
4148    /// The maximum value is 1000; values above 1000 are coerced to 1000.
4149    #[prost(uint32, tag = "2")]
4150    pub max_results: u32,
4151    /// A previously-returned page token representing part of the larger set of
4152    /// results to view.
4153    #[prost(string, tag = "3")]
4154    pub page_token: ::prost::alloc::string::String,
4155    /// Project ID of the project for which to list Cloud SQL instances.
4156    #[prost(string, tag = "4")]
4157    pub project: ::prost::alloc::string::String,
4158}
4159/// Instance list server CAs request.
4160#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4161pub struct SqlInstancesListServerCasRequest {
4162    /// Cloud SQL instance ID. This does not include the project ID.
4163    #[prost(string, tag = "1")]
4164    pub instance: ::prost::alloc::string::String,
4165    /// Project ID of the project that contains the instance.
4166    #[prost(string, tag = "2")]
4167    pub project: ::prost::alloc::string::String,
4168}
4169/// Instance list server certificates request.
4170#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4171pub struct SqlInstancesListServerCertificatesRequest {
4172    /// Required. Cloud SQL instance ID. This does not include the project ID.
4173    #[prost(string, tag = "1")]
4174    pub instance: ::prost::alloc::string::String,
4175    /// Required. Project ID of the project that contains the instance.
4176    #[prost(string, tag = "2")]
4177    pub project: ::prost::alloc::string::String,
4178}
4179/// Instance list Entra ID certificates request.
4180#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4181pub struct SqlInstancesListEntraIdCertificatesRequest {
4182    /// Required. Cloud SQL instance ID. This does not include the project ID.
4183    #[prost(string, tag = "1")]
4184    pub instance: ::prost::alloc::string::String,
4185    /// Required. Project ID of the project that contains the instance.
4186    #[prost(string, tag = "2")]
4187    pub project: ::prost::alloc::string::String,
4188}
4189/// Instance patch request.
4190#[derive(Clone, PartialEq, ::prost::Message)]
4191pub struct SqlInstancesPatchRequest {
4192    /// Cloud SQL instance ID. This does not include the project ID.
4193    #[prost(string, tag = "1")]
4194    pub instance: ::prost::alloc::string::String,
4195    /// Project ID of the project that contains the instance.
4196    #[prost(string, tag = "2")]
4197    pub project: ::prost::alloc::string::String,
4198    #[prost(message, optional, tag = "100")]
4199    pub body: ::core::option::Option<DatabaseInstance>,
4200}
4201/// Instance promote replica request.
4202#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4203pub struct SqlInstancesPromoteReplicaRequest {
4204    /// Cloud SQL read replica instance name.
4205    #[prost(string, tag = "1")]
4206    pub instance: ::prost::alloc::string::String,
4207    /// ID of the project that contains the read replica.
4208    #[prost(string, tag = "2")]
4209    pub project: ::prost::alloc::string::String,
4210    /// Set to true to invoke a replica failover to the DR
4211    /// replica. As part of replica failover, the promote operation attempts
4212    /// to add the original primary instance as a replica of the promoted
4213    /// DR replica when the original primary instance comes back online.
4214    /// If set to false or not specified, then the original primary
4215    /// instance becomes an independent Cloud SQL primary instance.
4216    #[prost(bool, tag = "3")]
4217    pub failover: bool,
4218}
4219/// Instance switchover request.
4220#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4221pub struct SqlInstancesSwitchoverRequest {
4222    /// Cloud SQL read replica instance name.
4223    #[prost(string, tag = "1")]
4224    pub instance: ::prost::alloc::string::String,
4225    /// ID of the project that contains the replica.
4226    #[prost(string, tag = "2")]
4227    pub project: ::prost::alloc::string::String,
4228    /// Optional. (MySQL and PostgreSQL only) Cloud SQL instance operations
4229    /// timeout, which is a sum of all database operations. Default value is 10
4230    /// minutes and can be modified to a maximum value of 24 hours.
4231    #[prost(message, optional, tag = "3")]
4232    pub db_timeout: ::core::option::Option<::prost_types::Duration>,
4233}
4234/// Instance reset SSL config request.
4235#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4236pub struct SqlInstancesResetSslConfigRequest {
4237    /// Cloud SQL instance ID. This does not include the project ID.
4238    #[prost(string, tag = "1")]
4239    pub instance: ::prost::alloc::string::String,
4240    /// Project ID of the project that contains the instance.
4241    #[prost(string, tag = "2")]
4242    pub project: ::prost::alloc::string::String,
4243    /// Optional. Reset SSL mode to use.
4244    #[prost(
4245        enumeration = "sql_instances_reset_ssl_config_request::ResetSslMode",
4246        tag = "3"
4247    )]
4248    pub mode: i32,
4249}
4250/// Nested message and enum types in `SqlInstancesResetSslConfigRequest`.
4251pub mod sql_instances_reset_ssl_config_request {
4252    /// Reset SSL mode to selectively refresh the SSL materials.
4253    #[derive(
4254        Clone,
4255        Copy,
4256        Debug,
4257        PartialEq,
4258        Eq,
4259        Hash,
4260        PartialOrd,
4261        Ord,
4262        ::prost::Enumeration
4263    )]
4264    #[repr(i32)]
4265    pub enum ResetSslMode {
4266        /// Reset SSL mode is not specified.
4267        Unspecified = 0,
4268        /// Refresh all TLS configs. This is the default behaviour.
4269        All = 1,
4270        /// Refreshes the replication-related TLS configuration settings provided by
4271        /// the primary instance.
4272        /// Not applicable to on-premises replication instances.
4273        SyncFromPrimary = 2,
4274    }
4275    impl ResetSslMode {
4276        /// String value of the enum field names used in the ProtoBuf definition.
4277        ///
4278        /// The values are not transformed in any way and thus are considered stable
4279        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4280        pub fn as_str_name(&self) -> &'static str {
4281            match self {
4282                Self::Unspecified => "RESET_SSL_MODE_UNSPECIFIED",
4283                Self::All => "ALL",
4284                Self::SyncFromPrimary => "SYNC_FROM_PRIMARY",
4285            }
4286        }
4287        /// Creates an enum from field names used in the ProtoBuf definition.
4288        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4289            match value {
4290                "RESET_SSL_MODE_UNSPECIFIED" => Some(Self::Unspecified),
4291                "ALL" => Some(Self::All),
4292                "SYNC_FROM_PRIMARY" => Some(Self::SyncFromPrimary),
4293                _ => None,
4294            }
4295        }
4296    }
4297}
4298/// Instance restart request.
4299#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4300pub struct SqlInstancesRestartRequest {
4301    /// Cloud SQL instance ID. This does not include the project ID.
4302    #[prost(string, tag = "1")]
4303    pub instance: ::prost::alloc::string::String,
4304    /// Project ID of the project that contains the instance to be restarted.
4305    #[prost(string, tag = "2")]
4306    pub project: ::prost::alloc::string::String,
4307}
4308/// Instance restore backup request.
4309#[derive(Clone, PartialEq, ::prost::Message)]
4310pub struct SqlInstancesRestoreBackupRequest {
4311    /// Cloud SQL instance ID. This does not include the project ID.
4312    #[prost(string, tag = "1")]
4313    pub instance: ::prost::alloc::string::String,
4314    /// Project ID of the project that contains the instance.
4315    #[prost(string, tag = "2")]
4316    pub project: ::prost::alloc::string::String,
4317    #[prost(message, optional, tag = "100")]
4318    pub body: ::core::option::Option<InstancesRestoreBackupRequest>,
4319}
4320/// Instance rotate server CA request.
4321#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4322pub struct SqlInstancesRotateServerCaRequest {
4323    /// Cloud SQL instance ID. This does not include the project ID.
4324    #[prost(string, tag = "1")]
4325    pub instance: ::prost::alloc::string::String,
4326    /// Project ID of the project that contains the instance.
4327    #[prost(string, tag = "2")]
4328    pub project: ::prost::alloc::string::String,
4329    #[prost(message, optional, tag = "100")]
4330    pub body: ::core::option::Option<InstancesRotateServerCaRequest>,
4331}
4332/// Instance rotate server certificate request.
4333#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4334pub struct SqlInstancesRotateServerCertificateRequest {
4335    /// Required. Cloud SQL instance ID. This does not include the project ID.
4336    #[prost(string, tag = "1")]
4337    pub instance: ::prost::alloc::string::String,
4338    /// Required. Project ID of the project that contains the instance.
4339    #[prost(string, tag = "2")]
4340    pub project: ::prost::alloc::string::String,
4341    /// Optional. Rotate server certificate request body.
4342    #[prost(message, optional, tag = "100")]
4343    pub body: ::core::option::Option<InstancesRotateServerCertificateRequest>,
4344}
4345/// Instance rotate server certificate request.
4346#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4347pub struct SqlInstancesRotateEntraIdCertificateRequest {
4348    /// Required. Cloud SQL instance ID. This does not include the project ID.
4349    #[prost(string, tag = "1")]
4350    pub instance: ::prost::alloc::string::String,
4351    /// Required. Project ID of the project that contains the instance.
4352    #[prost(string, tag = "2")]
4353    pub project: ::prost::alloc::string::String,
4354    /// Optional. Rotate Entra ID certificate request body.
4355    #[prost(message, optional, tag = "100")]
4356    pub body: ::core::option::Option<InstancesRotateEntraIdCertificateRequest>,
4357}
4358/// Instance start replica request.
4359#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4360pub struct SqlInstancesStartReplicaRequest {
4361    /// Cloud SQL read replica instance name.
4362    #[prost(string, tag = "1")]
4363    pub instance: ::prost::alloc::string::String,
4364    /// ID of the project that contains the read replica.
4365    #[prost(string, tag = "2")]
4366    pub project: ::prost::alloc::string::String,
4367}
4368/// Instance stop replica request.
4369#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4370pub struct SqlInstancesStopReplicaRequest {
4371    /// Cloud SQL read replica instance name.
4372    #[prost(string, tag = "1")]
4373    pub instance: ::prost::alloc::string::String,
4374    /// ID of the project that contains the read replica.
4375    #[prost(string, tag = "2")]
4376    pub project: ::prost::alloc::string::String,
4377}
4378/// Instance truncate log request.
4379#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4380pub struct SqlInstancesTruncateLogRequest {
4381    /// Cloud SQL instance ID. This does not include the project ID.
4382    #[prost(string, tag = "1")]
4383    pub instance: ::prost::alloc::string::String,
4384    /// Project ID of the Cloud SQL project.
4385    #[prost(string, tag = "2")]
4386    pub project: ::prost::alloc::string::String,
4387    #[prost(message, optional, tag = "100")]
4388    pub body: ::core::option::Option<InstancesTruncateLogRequest>,
4389}
4390/// Instance perform disk shrink request.
4391#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4392pub struct SqlInstancesPerformDiskShrinkRequest {
4393    /// Cloud SQL instance ID. This does not include the project ID.
4394    #[prost(string, tag = "1")]
4395    pub instance: ::prost::alloc::string::String,
4396    /// Project ID of the project that contains the instance.
4397    #[prost(string, tag = "2")]
4398    pub project: ::prost::alloc::string::String,
4399    /// Perform disk shrink context.
4400    #[prost(message, optional, tag = "100")]
4401    pub body: ::core::option::Option<PerformDiskShrinkContext>,
4402}
4403/// Instance update request.
4404#[derive(Clone, PartialEq, ::prost::Message)]
4405pub struct SqlInstancesUpdateRequest {
4406    /// Cloud SQL instance ID. This does not include the project ID.
4407    #[prost(string, tag = "1")]
4408    pub instance: ::prost::alloc::string::String,
4409    /// Project ID of the project that contains the instance.
4410    #[prost(string, tag = "2")]
4411    pub project: ::prost::alloc::string::String,
4412    #[prost(message, optional, tag = "100")]
4413    pub body: ::core::option::Option<DatabaseInstance>,
4414}
4415/// Instance reschedule maintenance request.
4416#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4417pub struct SqlInstancesRescheduleMaintenanceRequest {
4418    /// Cloud SQL instance ID. This does not include the project ID.
4419    #[prost(string, tag = "1")]
4420    pub instance: ::prost::alloc::string::String,
4421    /// ID of the project that contains the instance.
4422    #[prost(string, tag = "2")]
4423    pub project: ::prost::alloc::string::String,
4424    #[prost(message, optional, tag = "100")]
4425    pub body: ::core::option::Option<SqlInstancesRescheduleMaintenanceRequestBody>,
4426}
4427/// Instance reencrypt request.
4428#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4429pub struct SqlInstancesReencryptRequest {
4430    /// Cloud SQL instance ID. This does not include the project ID.
4431    #[prost(string, tag = "1")]
4432    pub instance: ::prost::alloc::string::String,
4433    /// ID of the project that contains the instance.
4434    #[prost(string, tag = "2")]
4435    pub project: ::prost::alloc::string::String,
4436    /// Reencrypt body that users request
4437    #[prost(message, optional, tag = "3")]
4438    pub body: ::core::option::Option<InstancesReencryptRequest>,
4439}
4440/// Database Instance reencrypt request.
4441#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4442pub struct InstancesReencryptRequest {
4443    /// Configuration specific to backup re-encryption
4444    #[prost(message, optional, tag = "1")]
4445    pub backup_reencryption_config: ::core::option::Option<BackupReencryptionConfig>,
4446}
4447/// Backup Reencryption Config
4448#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4449pub struct BackupReencryptionConfig {
4450    /// Backup re-encryption limit
4451    #[prost(int32, optional, tag = "1")]
4452    pub backup_limit: ::core::option::Option<i32>,
4453    /// Type of backups users want to re-encrypt.
4454    #[prost(enumeration = "backup_reencryption_config::BackupType", optional, tag = "2")]
4455    pub backup_type: ::core::option::Option<i32>,
4456}
4457/// Nested message and enum types in `BackupReencryptionConfig`.
4458pub mod backup_reencryption_config {
4459    /// Backup type for re-encryption
4460    #[derive(
4461        Clone,
4462        Copy,
4463        Debug,
4464        PartialEq,
4465        Eq,
4466        Hash,
4467        PartialOrd,
4468        Ord,
4469        ::prost::Enumeration
4470    )]
4471    #[repr(i32)]
4472    pub enum BackupType {
4473        /// Unknown backup type, will be defaulted to AUTOMATIC backup type
4474        Unspecified = 0,
4475        /// Reencrypt automatic backups
4476        Automated = 1,
4477        /// Reencrypt on-demand backups
4478        OnDemand = 2,
4479    }
4480    impl BackupType {
4481        /// String value of the enum field names used in the ProtoBuf definition.
4482        ///
4483        /// The values are not transformed in any way and thus are considered stable
4484        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4485        pub fn as_str_name(&self) -> &'static str {
4486            match self {
4487                Self::Unspecified => "BACKUP_TYPE_UNSPECIFIED",
4488                Self::Automated => "AUTOMATED",
4489                Self::OnDemand => "ON_DEMAND",
4490            }
4491        }
4492        /// Creates an enum from field names used in the ProtoBuf definition.
4493        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4494            match value {
4495                "BACKUP_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
4496                "AUTOMATED" => Some(Self::Automated),
4497                "ON_DEMAND" => Some(Self::OnDemand),
4498                _ => None,
4499            }
4500        }
4501    }
4502}
4503/// The selected object that Cloud SQL migrates.
4504#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4505pub struct ExternalSyncSelectedObject {
4506    /// The name of the database that Cloud SQL migrates.
4507    #[prost(string, tag = "1")]
4508    pub database: ::prost::alloc::string::String,
4509}
4510/// Instance get disk shrink config request.
4511#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4512pub struct SqlInstancesGetDiskShrinkConfigRequest {
4513    /// Cloud SQL instance ID. This does not include the project ID.
4514    #[prost(string, tag = "1")]
4515    pub instance: ::prost::alloc::string::String,
4516    /// Project ID of the project that contains the instance.
4517    #[prost(string, tag = "2")]
4518    pub project: ::prost::alloc::string::String,
4519}
4520/// Instance verify external sync settings request.
4521#[derive(Clone, PartialEq, ::prost::Message)]
4522pub struct SqlInstancesVerifyExternalSyncSettingsRequest {
4523    /// Cloud SQL instance ID. This does not include the project ID.
4524    #[prost(string, tag = "1")]
4525    pub instance: ::prost::alloc::string::String,
4526    /// Project ID of the project that contains the instance.
4527    #[prost(string, tag = "2")]
4528    pub project: ::prost::alloc::string::String,
4529    /// Flag to enable verifying connection only
4530    #[prost(bool, tag = "3")]
4531    pub verify_connection_only: bool,
4532    /// External sync mode
4533    #[prost(
4534        enumeration = "sql_instances_verify_external_sync_settings_request::ExternalSyncMode",
4535        tag = "4"
4536    )]
4537    pub sync_mode: i32,
4538    /// Optional. Flag to verify settings required by replication setup only
4539    #[prost(bool, tag = "5")]
4540    pub verify_replication_only: bool,
4541    /// Optional. MigrationType configures the migration to use physical files or
4542    /// logical dump files. If not set, then the logical dump file configuration is
4543    /// used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL.
4544    #[prost(
4545        enumeration = "sql_instances_verify_external_sync_settings_request::MigrationType",
4546        tag = "7"
4547    )]
4548    pub migration_type: i32,
4549    /// Optional. Parallel level for initial data sync. Only applicable for
4550    /// PostgreSQL.
4551    #[prost(enumeration = "ExternalSyncParallelLevel", tag = "8")]
4552    pub sync_parallel_level: i32,
4553    /// Optional. Migrate only the specified objects from the source instance. If
4554    /// this field is empty, then migrate all objects.
4555    #[prost(message, repeated, tag = "9")]
4556    pub selected_objects: ::prost::alloc::vec::Vec<ExternalSyncSelectedObject>,
4557    #[prost(
4558        oneof = "sql_instances_verify_external_sync_settings_request::SyncConfig",
4559        tags = "6"
4560    )]
4561    pub sync_config: ::core::option::Option<
4562        sql_instances_verify_external_sync_settings_request::SyncConfig,
4563    >,
4564}
4565/// Nested message and enum types in `SqlInstancesVerifyExternalSyncSettingsRequest`.
4566pub mod sql_instances_verify_external_sync_settings_request {
4567    #[derive(
4568        Clone,
4569        Copy,
4570        Debug,
4571        PartialEq,
4572        Eq,
4573        Hash,
4574        PartialOrd,
4575        Ord,
4576        ::prost::Enumeration
4577    )]
4578    #[repr(i32)]
4579    pub enum ExternalSyncMode {
4580        /// Unknown external sync mode, will be defaulted to ONLINE mode
4581        Unspecified = 0,
4582        /// Online external sync will set up replication after initial data external
4583        /// sync
4584        Online = 1,
4585        /// Offline external sync only dumps and loads a one-time snapshot of
4586        /// the primary instance's data
4587        Offline = 2,
4588    }
4589    impl ExternalSyncMode {
4590        /// String value of the enum field names used in the ProtoBuf definition.
4591        ///
4592        /// The values are not transformed in any way and thus are considered stable
4593        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4594        pub fn as_str_name(&self) -> &'static str {
4595            match self {
4596                Self::Unspecified => "EXTERNAL_SYNC_MODE_UNSPECIFIED",
4597                Self::Online => "ONLINE",
4598                Self::Offline => "OFFLINE",
4599            }
4600        }
4601        /// Creates an enum from field names used in the ProtoBuf definition.
4602        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4603            match value {
4604                "EXTERNAL_SYNC_MODE_UNSPECIFIED" => Some(Self::Unspecified),
4605                "ONLINE" => Some(Self::Online),
4606                "OFFLINE" => Some(Self::Offline),
4607                _ => None,
4608            }
4609        }
4610    }
4611    /// MigrationType determines whether the migration is a physical file-based
4612    /// migration or a logical dump file-based migration.
4613    #[derive(
4614        Clone,
4615        Copy,
4616        Debug,
4617        PartialEq,
4618        Eq,
4619        Hash,
4620        PartialOrd,
4621        Ord,
4622        ::prost::Enumeration
4623    )]
4624    #[repr(i32)]
4625    pub enum MigrationType {
4626        /// Default value is a logical dump file-based migration
4627        Unspecified = 0,
4628        /// Logical dump file-based migration
4629        Logical = 1,
4630        /// Physical file-based migration
4631        Physical = 2,
4632    }
4633    impl MigrationType {
4634        /// String value of the enum field names used in the ProtoBuf definition.
4635        ///
4636        /// The values are not transformed in any way and thus are considered stable
4637        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4638        pub fn as_str_name(&self) -> &'static str {
4639            match self {
4640                Self::Unspecified => "MIGRATION_TYPE_UNSPECIFIED",
4641                Self::Logical => "LOGICAL",
4642                Self::Physical => "PHYSICAL",
4643            }
4644        }
4645        /// Creates an enum from field names used in the ProtoBuf definition.
4646        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4647            match value {
4648                "MIGRATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
4649                "LOGICAL" => Some(Self::Logical),
4650                "PHYSICAL" => Some(Self::Physical),
4651                _ => None,
4652            }
4653        }
4654    }
4655    #[derive(Clone, PartialEq, ::prost::Oneof)]
4656    pub enum SyncConfig {
4657        /// Optional. MySQL-specific settings for start external sync.
4658        #[prost(message, tag = "6")]
4659        MysqlSyncConfig(super::MySqlSyncConfig),
4660    }
4661}
4662/// Instance start external sync request.
4663#[derive(Clone, PartialEq, ::prost::Message)]
4664pub struct SqlInstancesStartExternalSyncRequest {
4665    /// Cloud SQL instance ID. This does not include the project ID.
4666    #[prost(string, tag = "1")]
4667    pub instance: ::prost::alloc::string::String,
4668    /// ID of the project that contains the instance.
4669    #[prost(string, tag = "2")]
4670    pub project: ::prost::alloc::string::String,
4671    /// External sync mode.
4672    #[prost(
4673        enumeration = "sql_instances_verify_external_sync_settings_request::ExternalSyncMode",
4674        tag = "3"
4675    )]
4676    pub sync_mode: i32,
4677    /// Whether to skip the verification step (VESS).
4678    #[prost(bool, tag = "4")]
4679    pub skip_verification: bool,
4680    /// Optional. Parallel level for initial data sync. Currently only applicable
4681    /// for MySQL.
4682    #[prost(enumeration = "ExternalSyncParallelLevel", tag = "7")]
4683    pub sync_parallel_level: i32,
4684    /// Optional. MigrationType configures the migration to use physical files or
4685    /// logical dump files. If not set, then the logical dump file configuration is
4686    /// used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL.
4687    #[prost(
4688        enumeration = "sql_instances_verify_external_sync_settings_request::MigrationType",
4689        tag = "8"
4690    )]
4691    pub migration_type: i32,
4692    /// Optional. MySQL only. True if end-user has confirmed that this SES call
4693    /// will wipe replica databases overlapping with the proposed selected_objects.
4694    /// If this field is not set and there are both overlapping and additional
4695    /// databases proposed, an error will be returned.
4696    #[prost(bool, tag = "9")]
4697    pub replica_overwrite_enabled: bool,
4698    #[prost(oneof = "sql_instances_start_external_sync_request::SyncConfig", tags = "6")]
4699    pub sync_config: ::core::option::Option<
4700        sql_instances_start_external_sync_request::SyncConfig,
4701    >,
4702}
4703/// Nested message and enum types in `SqlInstancesStartExternalSyncRequest`.
4704pub mod sql_instances_start_external_sync_request {
4705    #[derive(Clone, PartialEq, ::prost::Oneof)]
4706    pub enum SyncConfig {
4707        /// MySQL-specific settings for start external sync.
4708        #[prost(message, tag = "6")]
4709        MysqlSyncConfig(super::MySqlSyncConfig),
4710    }
4711}
4712/// Instance reset replica size request.
4713#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4714pub struct SqlInstancesResetReplicaSizeRequest {
4715    /// Cloud SQL read replica instance name.
4716    #[prost(string, tag = "1")]
4717    pub instance: ::prost::alloc::string::String,
4718    /// ID of the project that contains the read replica.
4719    #[prost(string, tag = "2")]
4720    pub project: ::prost::alloc::string::String,
4721}
4722/// Instance create ephemeral certificate request.
4723#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4724pub struct SqlInstancesCreateEphemeralCertRequest {
4725    /// Cloud SQL instance ID. This does not include the project ID.
4726    #[prost(string, tag = "1")]
4727    pub instance: ::prost::alloc::string::String,
4728    /// Project ID of the Cloud SQL project.
4729    #[prost(string, tag = "2")]
4730    pub project: ::prost::alloc::string::String,
4731    #[prost(message, optional, tag = "100")]
4732    pub body: ::core::option::Option<SslCertsCreateEphemeralRequest>,
4733}
4734/// Database instance clone request.
4735#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4736pub struct InstancesCloneRequest {
4737    /// Required. Contains details about the clone operation.
4738    #[prost(message, optional, tag = "1")]
4739    pub clone_context: ::core::option::Option<CloneContext>,
4740}
4741/// Database demote primary instance request.
4742#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4743pub struct InstancesDemoteMasterRequest {
4744    /// Contains details about the demoteMaster operation.
4745    #[prost(message, optional, tag = "1")]
4746    pub demote_master_context: ::core::option::Option<DemoteMasterContext>,
4747}
4748/// This request is used to demote an existing standalone instance to be a
4749/// Cloud SQL read replica for an external database server.
4750#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4751pub struct InstancesDemoteRequest {
4752    /// Required. Contains details about the demote operation.
4753    #[prost(message, optional, tag = "1")]
4754    pub demote_context: ::core::option::Option<DemoteContext>,
4755}
4756/// Database instance export request.
4757#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4758pub struct InstancesExportRequest {
4759    /// Contains details about the export operation.
4760    #[prost(message, optional, tag = "1")]
4761    pub export_context: ::core::option::Option<ExportContext>,
4762}
4763/// Instance failover request.
4764#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4765pub struct InstancesFailoverRequest {
4766    /// Failover Context.
4767    #[prost(message, optional, tag = "1")]
4768    pub failover_context: ::core::option::Option<FailoverContext>,
4769}
4770/// SslCerts create ephemeral certificate request.
4771#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4772pub struct SslCertsCreateEphemeralRequest {
4773    /// PEM encoded public key to include in the signed certificate.
4774    #[prost(string, tag = "1")]
4775    pub public_key: ::prost::alloc::string::String,
4776    /// Access token to include in the signed certificate.
4777    #[prost(string, tag = "2")]
4778    pub access_token: ::prost::alloc::string::String,
4779}
4780/// Database instance import request.
4781#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4782pub struct InstancesImportRequest {
4783    /// Contains details about the import operation.
4784    #[prost(message, optional, tag = "1")]
4785    pub import_context: ::core::option::Option<ImportContext>,
4786}
4787/// Request for Pre-checks for MVU
4788#[derive(Clone, PartialEq, ::prost::Message)]
4789pub struct InstancesPreCheckMajorVersionUpgradeRequest {
4790    /// Required. Contains details about the pre-check major version upgrade
4791    /// operation.
4792    #[prost(message, optional, tag = "1")]
4793    pub pre_check_major_version_upgrade_context: ::core::option::Option<
4794        PreCheckMajorVersionUpgradeContext,
4795    >,
4796}
4797/// Database instances list response.
4798#[derive(Clone, PartialEq, ::prost::Message)]
4799pub struct InstancesListResponse {
4800    /// This is always `sql#instancesList`.
4801    #[prost(string, tag = "1")]
4802    pub kind: ::prost::alloc::string::String,
4803    /// List of warnings that occurred while handling the request.
4804    #[prost(message, repeated, tag = "2")]
4805    pub warnings: ::prost::alloc::vec::Vec<ApiWarning>,
4806    /// List of database instance resources.
4807    #[prost(message, repeated, tag = "3")]
4808    pub items: ::prost::alloc::vec::Vec<DatabaseInstance>,
4809    /// The continuation token, used to page through large result sets. Provide
4810    /// this value in a subsequent request to return the next page of results.
4811    #[prost(string, tag = "4")]
4812    pub next_page_token: ::prost::alloc::string::String,
4813}
4814/// Instances ListServerCas response.
4815#[derive(Clone, PartialEq, ::prost::Message)]
4816pub struct InstancesListServerCasResponse {
4817    /// List of server CA certificates for the instance.
4818    #[prost(message, repeated, tag = "1")]
4819    pub certs: ::prost::alloc::vec::Vec<SslCert>,
4820    #[prost(string, tag = "2")]
4821    pub active_version: ::prost::alloc::string::String,
4822    /// This is always `sql#instancesListServerCas`.
4823    #[prost(string, tag = "3")]
4824    pub kind: ::prost::alloc::string::String,
4825}
4826/// Instances ListServerCertificates response.
4827#[derive(Clone, PartialEq, ::prost::Message)]
4828pub struct InstancesListServerCertificatesResponse {
4829    /// List of server CA certificates for the instance.
4830    #[prost(message, repeated, tag = "1")]
4831    pub ca_certs: ::prost::alloc::vec::Vec<SslCert>,
4832    /// List of server certificates for the instance, signed by the corresponding
4833    /// CA from the `ca_certs` list.
4834    #[prost(message, repeated, tag = "2")]
4835    pub server_certs: ::prost::alloc::vec::Vec<SslCert>,
4836    /// The `sha1_fingerprint` of the active certificate from `server_certs`.
4837    #[prost(string, tag = "3")]
4838    pub active_version: ::prost::alloc::string::String,
4839    /// This is always `sql#instancesListServerCertificates`.
4840    #[prost(string, tag = "4")]
4841    pub kind: ::prost::alloc::string::String,
4842}
4843/// Instances ListEntraIdCertificates response.
4844#[derive(Clone, PartialEq, ::prost::Message)]
4845pub struct InstancesListEntraIdCertificatesResponse {
4846    /// List of Entra ID certificates for the instance.
4847    #[prost(message, repeated, tag = "1")]
4848    pub certs: ::prost::alloc::vec::Vec<SslCert>,
4849    /// The `sha1_fingerprint` of the active certificate from `certs`.
4850    #[prost(string, tag = "2")]
4851    pub active_version: ::prost::alloc::string::String,
4852    /// This is always `sql#instancesListEntraIdCertificates`.
4853    #[prost(string, tag = "3")]
4854    pub kind: ::prost::alloc::string::String,
4855}
4856/// Database instance restore backup request.
4857#[derive(Clone, PartialEq, ::prost::Message)]
4858pub struct InstancesRestoreBackupRequest {
4859    /// Parameters required to perform the restore backup operation.
4860    #[prost(message, optional, tag = "1")]
4861    pub restore_backup_context: ::core::option::Option<RestoreBackupContext>,
4862    /// The name of the backup that's used to restore a Cloud SQL instance:
4863    /// Format:  projects/{project-id}/backups/{backup-uid}. Only one of
4864    /// restore_backup_context, backup, backupdr_backup can be passed to the input.
4865    #[prost(string, tag = "2")]
4866    pub backup: ::prost::alloc::string::String,
4867    /// The name of the backup that's used to restore a Cloud SQL instance:
4868    /// Format:
4869    /// "projects/{project-id}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup-uid}".
4870    /// Only one of restore_backup_context, backup, backupdr_backup can be
4871    /// passed to the input.
4872    #[prost(string, tag = "4")]
4873    pub backupdr_backup: ::prost::alloc::string::String,
4874    /// Optional. By using this parameter, Cloud SQL overrides any instance
4875    /// settings stored in the backup you are restoring from. You can't change the
4876    /// instance's major database version and you can only increase the disk size.
4877    /// You can use this field to restore new instances only. This field is not
4878    /// applicable for restore to existing instances.
4879    #[prost(message, optional, tag = "3")]
4880    pub restore_instance_settings: ::core::option::Option<DatabaseInstance>,
4881    /// Optional. This field has the same purpose as restore_instance_settings,
4882    /// changes any instance settings stored in the backup you are restoring from.
4883    /// With the difference that these fields are cleared in the settings.
4884    #[prost(string, repeated, tag = "5")]
4885    pub restore_instance_clear_overrides_field_names: ::prost::alloc::vec::Vec<
4886        ::prost::alloc::string::String,
4887    >,
4888}
4889/// Rotate server CA request.
4890#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4891pub struct InstancesRotateServerCaRequest {
4892    /// Contains details about the rotate server CA operation.
4893    #[prost(message, optional, tag = "1")]
4894    pub rotate_server_ca_context: ::core::option::Option<RotateServerCaContext>,
4895}
4896/// Rotate server certificate request.
4897#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4898pub struct InstancesRotateServerCertificateRequest {
4899    /// Optional. Contains details about the rotate server certificate operation.
4900    #[prost(message, optional, tag = "1")]
4901    pub rotate_server_certificate_context: ::core::option::Option<
4902        RotateServerCertificateContext,
4903    >,
4904}
4905/// Rotate Entra ID certificate request.
4906#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4907pub struct InstancesRotateEntraIdCertificateRequest {
4908    /// Optional. Contains details about the rotate server certificate operation.
4909    #[prost(message, optional, tag = "1")]
4910    pub rotate_entra_id_certificate_context: ::core::option::Option<
4911        RotateEntraIdCertificateContext,
4912    >,
4913}
4914/// Instance truncate log request.
4915#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4916pub struct InstancesTruncateLogRequest {
4917    /// Contains details about the truncate log operation.
4918    #[prost(message, optional, tag = "1")]
4919    pub truncate_log_context: ::core::option::Option<TruncateLogContext>,
4920}
4921/// Request to acquire a lease for SSRS.
4922#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4923pub struct InstancesAcquireSsrsLeaseRequest {
4924    /// Contains details about the acquire SSRS lease operation.
4925    #[prost(message, optional, tag = "1")]
4926    pub acquire_ssrs_lease_context: ::core::option::Option<AcquireSsrsLeaseContext>,
4927}
4928/// Request for Pre-checks for MVU
4929#[derive(Clone, PartialEq, ::prost::Message)]
4930pub struct SqlInstancesPreCheckMajorVersionUpgradeRequest {
4931    /// Required. Cloud SQL instance ID. This does not include the project ID.
4932    #[prost(string, tag = "1")]
4933    pub instance: ::prost::alloc::string::String,
4934    /// Required. Project ID of the project that contains the instance.
4935    #[prost(string, tag = "2")]
4936    pub project: ::prost::alloc::string::String,
4937    /// Required. The context for request to perform the pre-check major version
4938    /// upgrade operation.
4939    #[prost(message, optional, tag = "3")]
4940    pub body: ::core::option::Option<InstancesPreCheckMajorVersionUpgradeRequest>,
4941}
4942/// Instance verify external sync settings response.
4943#[derive(Clone, PartialEq, ::prost::Message)]
4944pub struct SqlInstancesVerifyExternalSyncSettingsResponse {
4945    /// This is always `sql#migrationSettingErrorList`.
4946    #[prost(string, tag = "1")]
4947    pub kind: ::prost::alloc::string::String,
4948    /// List of migration violations.
4949    #[prost(message, repeated, tag = "2")]
4950    pub errors: ::prost::alloc::vec::Vec<SqlExternalSyncSettingError>,
4951    /// List of migration warnings.
4952    #[prost(message, repeated, tag = "3")]
4953    pub warnings: ::prost::alloc::vec::Vec<SqlExternalSyncSettingError>,
4954}
4955/// Instance get disk shrink config response.
4956#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4957pub struct SqlInstancesGetDiskShrinkConfigResponse {
4958    /// This is always `sql#getDiskShrinkConfig`.
4959    #[prost(string, tag = "1")]
4960    pub kind: ::prost::alloc::string::String,
4961    /// The minimum size to which a disk can be shrunk in GigaBytes.
4962    #[prost(int64, tag = "2")]
4963    pub minimal_target_size_gb: i64,
4964    /// Additional message to customers.
4965    #[prost(string, tag = "3")]
4966    pub message: ::prost::alloc::string::String,
4967}
4968/// Instance get latest recovery time request.
4969#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4970pub struct SqlInstancesGetLatestRecoveryTimeRequest {
4971    /// Cloud SQL instance ID. This does not include the project ID.
4972    #[prost(string, tag = "1")]
4973    pub instance: ::prost::alloc::string::String,
4974    /// Project ID of the project that contains the instance.
4975    #[prost(string, tag = "2")]
4976    pub project: ::prost::alloc::string::String,
4977    /// The timestamp used to identify the time when the source instance is
4978    /// deleted. If this instance is deleted, then you must set the timestamp.
4979    #[prost(message, optional, tag = "3")]
4980    pub source_instance_deletion_time: ::core::option::Option<::prost_types::Timestamp>,
4981}
4982/// Instance get latest recovery time response.
4983#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4984pub struct SqlInstancesGetLatestRecoveryTimeResponse {
4985    /// This is always `sql#getLatestRecoveryTime`.
4986    #[prost(string, tag = "1")]
4987    pub kind: ::prost::alloc::string::String,
4988    /// Timestamp, identifies the latest recovery time of the source instance.
4989    #[prost(message, optional, tag = "2")]
4990    pub latest_recovery_time: ::core::option::Option<::prost_types::Timestamp>,
4991    /// Timestamp, identifies the earliest recovery time of the source instance.
4992    #[prost(message, optional, tag = "3")]
4993    pub earliest_recovery_time: ::core::option::Option<::prost_types::Timestamp>,
4994}
4995/// Database instance clone context.
4996#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4997pub struct CloneContext {
4998    /// This is always `sql#cloneContext`.
4999    #[prost(string, tag = "1")]
5000    pub kind: ::prost::alloc::string::String,
5001    /// Reserved for future use.
5002    #[prost(int64, tag = "2")]
5003    pub pitr_timestamp_ms: i64,
5004    /// Required. Name of the Cloud SQL instance to be created as a clone.
5005    #[prost(string, tag = "3")]
5006    pub destination_instance_name: ::prost::alloc::string::String,
5007    /// Binary log coordinates, if specified, identify the position up to which the
5008    /// source instance is cloned. If not specified, the source instance is
5009    /// cloned up to the most recent binary log coordinates.
5010    #[prost(message, optional, tag = "4")]
5011    pub bin_log_coordinates: ::core::option::Option<BinLogCoordinates>,
5012    /// Timestamp, if specified, identifies the time to which the source instance
5013    /// is cloned.
5014    #[prost(message, optional, tag = "5")]
5015    pub point_in_time: ::core::option::Option<::prost_types::Timestamp>,
5016    /// The name of the allocated ip range for the private ip Cloud SQL instance.
5017    /// For example: "google-managed-services-default". If set, the cloned instance
5018    /// ip will be created in the allocated range. The range name must comply with
5019    /// [RFC 1035](<https://tools.ietf.org/html/rfc1035>). Specifically, the name
5020    /// must be 1-63 characters long and match the regular expression
5021    /// [a-z](\[-a-z0-9\]*[a-z0-9])?.
5022    /// Reserved for future use.
5023    #[prost(string, tag = "6")]
5024    pub allocated_ip_range: ::prost::alloc::string::String,
5025    /// (SQL Server only) Clone only the specified databases from the source
5026    /// instance. Clone all databases if empty.
5027    #[prost(string, repeated, tag = "9")]
5028    pub database_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
5029    /// Optional. Copy clone and point-in-time recovery clone of an instance to the
5030    /// specified zone. If no zone is specified, clone to the same primary zone as
5031    /// the source instance. This field applies to all DB types.
5032    #[prost(string, optional, tag = "10")]
5033    pub preferred_zone: ::core::option::Option<::prost::alloc::string::String>,
5034    /// Optional. Copy clone and point-in-time recovery clone of a regional
5035    /// instance in the specified zones. If not specified, clone to the same
5036    /// secondary zone as the source instance. This value cannot be the same as the
5037    /// preferred_zone field. This field applies to all DB types.
5038    #[prost(string, optional, tag = "11")]
5039    pub preferred_secondary_zone: ::core::option::Option<::prost::alloc::string::String>,
5040    /// The timestamp used to identify the time when the source instance is
5041    /// deleted. If this instance is deleted, then you must set the timestamp.
5042    #[prost(message, optional, tag = "12")]
5043    pub source_instance_deletion_time: ::core::option::Option<::prost_types::Timestamp>,
5044    /// Optional. The project ID of the destination project where the cloned
5045    /// instance will be created. To perform a cross-project clone, this field is
5046    /// required. If not specified, the clone is created in the same project
5047    /// as the source instance.
5048    #[prost(string, optional, tag = "13")]
5049    pub destination_project: ::core::option::Option<::prost::alloc::string::String>,
5050    /// Optional. The fully qualified URI of the VPC network to which the cloned
5051    /// instance will be connected via Private Services Access for private IP. For
5052    /// example:`projects/my-network-project/global/networks/my-network`. This
5053    /// field is only required for cross-project cloning.
5054    #[prost(string, optional, tag = "14")]
5055    pub destination_network: ::core::option::Option<::prost::alloc::string::String>,
5056}
5057/// The context to perform a point-in-time recovery of an instance managed by
5058/// Backup and Disaster Recovery (DR) Service.
5059#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5060pub struct PointInTimeRestoreContext {
5061    /// The Backup and Disaster Recovery (DR) Service Datasource URI.
5062    /// Format:
5063    /// projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/{datasource}.
5064    #[prost(string, optional, tag = "1")]
5065    pub datasource: ::core::option::Option<::prost::alloc::string::String>,
5066    /// Required. The date and time to which you want to restore the instance.
5067    #[prost(message, optional, tag = "2")]
5068    pub point_in_time: ::core::option::Option<::prost_types::Timestamp>,
5069    /// Target instance name.
5070    #[prost(string, optional, tag = "3")]
5071    pub target_instance: ::core::option::Option<::prost::alloc::string::String>,
5072    /// Optional. The resource link for the VPC network from which the Cloud SQL
5073    /// instance is accessible for private IP. For example,
5074    /// `/projects/myProject/global/networks/default`.
5075    #[prost(string, optional, tag = "4")]
5076    pub private_network: ::core::option::Option<::prost::alloc::string::String>,
5077    /// Optional. The name of the allocated IP range for the internal IP Cloud SQL
5078    /// instance. For example: "google-managed-services-default". If you set this,
5079    /// then Cloud SQL creates the IP address for the cloned instance in the
5080    /// allocated range. This range must comply with [RFC
5081    /// 1035](<https://tools.ietf.org/html/rfc1035>) standards. Specifically, the
5082    /// name must be 1-63 characters long and match the regular expression
5083    /// [a-z](\[-a-z0-9\]*[a-z0-9])?. Reserved for future use.
5084    #[prost(string, optional, tag = "5")]
5085    pub allocated_ip_range: ::core::option::Option<::prost::alloc::string::String>,
5086    /// Optional. Point-in-time recovery of an instance to the specified zone. If
5087    /// no zone is specified, then clone to the same primary zone as the source
5088    /// instance.
5089    #[prost(string, optional, tag = "6")]
5090    pub preferred_zone: ::core::option::Option<::prost::alloc::string::String>,
5091    /// Optional. Point-in-time recovery of a regional instance in the specified
5092    /// zones. If not specified, clone to the same secondary zone as the source
5093    /// instance. This value cannot be the same as the preferred_zone field.
5094    #[prost(string, optional, tag = "9")]
5095    pub preferred_secondary_zone: ::core::option::Option<::prost::alloc::string::String>,
5096}
5097/// Binary log coordinates.
5098#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5099pub struct BinLogCoordinates {
5100    /// Name of the binary log file for a Cloud SQL instance.
5101    #[prost(string, tag = "1")]
5102    pub bin_log_file_name: ::prost::alloc::string::String,
5103    /// Position (offset) within the binary log file.
5104    #[prost(int64, tag = "2")]
5105    pub bin_log_position: i64,
5106    /// This is always `sql#binLogCoordinates`.
5107    #[prost(string, tag = "3")]
5108    pub kind: ::prost::alloc::string::String,
5109}
5110/// A Cloud SQL instance resource.
5111#[derive(Clone, PartialEq, ::prost::Message)]
5112pub struct DatabaseInstance {
5113    /// This is always `sql#instance`.
5114    #[prost(string, tag = "1")]
5115    pub kind: ::prost::alloc::string::String,
5116    /// The current serving state of the Cloud SQL instance.
5117    #[prost(enumeration = "database_instance::SqlInstanceState", tag = "2")]
5118    pub state: i32,
5119    /// The database engine type and version. The `databaseVersion` field cannot
5120    /// be changed after instance creation.
5121    #[prost(enumeration = "SqlDatabaseVersion", tag = "3")]
5122    pub database_version: i32,
5123    /// The user settings.
5124    #[prost(message, optional, tag = "4")]
5125    pub settings: ::core::option::Option<Settings>,
5126    /// This field is deprecated and will be removed from a future version of the
5127    /// API. Use the `settings.settingsVersion` field instead.
5128    #[prost(string, tag = "5")]
5129    pub etag: ::prost::alloc::string::String,
5130    /// The name and status of the failover replica.
5131    #[prost(message, optional, tag = "6")]
5132    pub failover_replica: ::core::option::Option<database_instance::SqlFailoverReplica>,
5133    /// The name of the instance which will act as primary in the replication
5134    /// setup.
5135    #[prost(string, tag = "7")]
5136    pub master_instance_name: ::prost::alloc::string::String,
5137    /// The replicas of the instance.
5138    #[prost(string, repeated, tag = "8")]
5139    pub replica_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
5140    /// The maximum disk size of the instance in bytes.
5141    #[deprecated]
5142    #[prost(message, optional, tag = "9")]
5143    pub max_disk_size: ::core::option::Option<i64>,
5144    /// The current disk usage of the instance in bytes. This property has been
5145    /// deprecated. Use the
5146    /// "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
5147    /// Monitoring API instead. Please see [this
5148    /// announcement](<https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ>)
5149    /// for details.
5150    #[deprecated]
5151    #[prost(message, optional, tag = "10")]
5152    pub current_disk_size: ::core::option::Option<i64>,
5153    /// The assigned IP addresses for the instance.
5154    #[prost(message, repeated, tag = "11")]
5155    pub ip_addresses: ::prost::alloc::vec::Vec<IpMapping>,
5156    /// SSL configuration.
5157    #[prost(message, optional, tag = "12")]
5158    pub server_ca_cert: ::core::option::Option<SslCert>,
5159    /// The instance type.
5160    #[prost(enumeration = "SqlInstanceType", tag = "13")]
5161    pub instance_type: i32,
5162    /// The project ID of the project containing the Cloud SQL instance. The Google
5163    /// apps domain is prefixed if applicable.
5164    #[prost(string, tag = "14")]
5165    pub project: ::prost::alloc::string::String,
5166    /// The IPv6 address assigned to the instance.
5167    /// (Deprecated) This property was applicable only
5168    /// to First Generation instances.
5169    #[deprecated]
5170    #[prost(string, tag = "15")]
5171    pub ipv6_address: ::prost::alloc::string::String,
5172    /// The service account email address assigned to the instance.\This
5173    /// property is read-only.
5174    #[prost(string, tag = "16")]
5175    pub service_account_email_address: ::prost::alloc::string::String,
5176    /// Configuration specific to on-premises instances.
5177    #[prost(message, optional, tag = "17")]
5178    pub on_premises_configuration: ::core::option::Option<OnPremisesConfiguration>,
5179    /// Configuration specific to failover replicas and read replicas.
5180    #[prost(message, optional, tag = "18")]
5181    pub replica_configuration: ::core::option::Option<ReplicaConfiguration>,
5182    /// The backend type.
5183    /// `SECOND_GEN`: Cloud SQL database instance.
5184    /// `EXTERNAL`: A database server that is not managed by Google.
5185    ///
5186    /// This property is read-only; use the `tier` property in the `settings`
5187    /// object to determine the database type.
5188    #[prost(enumeration = "SqlBackendType", tag = "19")]
5189    pub backend_type: i32,
5190    /// The URI of this resource.
5191    #[prost(string, tag = "20")]
5192    pub self_link: ::prost::alloc::string::String,
5193    /// If the instance state is SUSPENDED, the reason for the suspension.
5194    #[prost(enumeration = "SqlSuspensionReason", repeated, tag = "21")]
5195    pub suspension_reason: ::prost::alloc::vec::Vec<i32>,
5196    /// Connection name of the Cloud SQL instance used in connection strings.
5197    #[prost(string, tag = "22")]
5198    pub connection_name: ::prost::alloc::string::String,
5199    /// Name of the Cloud SQL instance. This does not include the project ID.
5200    #[prost(string, tag = "23")]
5201    pub name: ::prost::alloc::string::String,
5202    /// The geographical region of the Cloud SQL instance.
5203    ///
5204    /// It can be one of the
5205    /// [regions](<https://cloud.google.com/sql/docs/mysql/locations#location-r>)
5206    /// where Cloud SQL operates:
5207    ///
5208    /// For example,  `asia-east1`, `europe-west1`, and  `us-central1`.
5209    /// The default value is `us-central1`.
5210    #[prost(string, tag = "24")]
5211    pub region: ::prost::alloc::string::String,
5212    /// The Compute Engine zone that the instance is currently serving from. This
5213    /// value could be different from the zone that was specified when the instance
5214    /// was created if the instance has failed over to its secondary zone. WARNING:
5215    /// Changing this might restart the instance.
5216    #[prost(string, tag = "25")]
5217    pub gce_zone: ::prost::alloc::string::String,
5218    /// The Compute Engine zone that the failover instance is currently serving
5219    /// from for a regional instance. This value could be different
5220    /// from the zone that was specified when the instance
5221    /// was created if the instance has failed over to its secondary/failover zone.
5222    #[prost(string, tag = "34")]
5223    pub secondary_gce_zone: ::prost::alloc::string::String,
5224    /// Disk encryption configuration specific to an instance.
5225    #[prost(message, optional, tag = "26")]
5226    pub disk_encryption_configuration: ::core::option::Option<
5227        DiskEncryptionConfiguration,
5228    >,
5229    /// Disk encryption status specific to an instance.
5230    #[prost(message, optional, tag = "27")]
5231    pub disk_encryption_status: ::core::option::Option<DiskEncryptionStatus>,
5232    /// Initial root password. Use only on creation. You must set root passwords
5233    /// before you can connect to PostgreSQL instances.
5234    #[prost(string, tag = "29")]
5235    pub root_password: ::prost::alloc::string::String,
5236    /// The start time of any upcoming scheduled maintenance for this instance.
5237    #[prost(message, optional, tag = "30")]
5238    pub scheduled_maintenance: ::core::option::Option<
5239        database_instance::SqlScheduledMaintenance,
5240    >,
5241    /// This status indicates whether the instance satisfies PZS.
5242    ///
5243    /// The status is reserved for future use.
5244    #[prost(message, optional, tag = "35")]
5245    pub satisfies_pzs: ::core::option::Option<bool>,
5246    /// Output only. Stores the current database version running on the instance
5247    /// including minor version such as `MYSQL_8_0_18`.
5248    #[prost(string, tag = "40")]
5249    pub database_installed_version: ::prost::alloc::string::String,
5250    /// This field represents the report generated by the proactive database
5251    /// wellness job for OutOfDisk issues.
5252    ///
5253    /// * Writers:
5254    /// * the proactive database wellness job for OOD.
5255    /// * Readers:
5256    /// * the proactive database wellness job
5257    #[prost(message, optional, tag = "38")]
5258    pub out_of_disk_report: ::core::option::Option<
5259        database_instance::SqlOutOfDiskReport,
5260    >,
5261    /// Output only. The time when the instance was created in
5262    /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
5263    /// `2012-11-15T16:19:00.094Z`.
5264    #[prost(message, optional, tag = "39")]
5265    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
5266    /// Output only. List all maintenance versions applicable on the instance
5267    #[prost(string, repeated, tag = "41")]
5268    pub available_maintenance_versions: ::prost::alloc::vec::Vec<
5269        ::prost::alloc::string::String,
5270    >,
5271    /// The current software version on the instance.
5272    #[prost(string, tag = "42")]
5273    pub maintenance_version: ::prost::alloc::string::String,
5274    /// Output only. All database versions that are available for upgrade.
5275    #[prost(message, repeated, tag = "45")]
5276    pub upgradable_database_versions: ::prost::alloc::vec::Vec<AvailableDatabaseVersion>,
5277    #[prost(
5278        enumeration = "database_instance::SqlNetworkArchitecture",
5279        optional,
5280        tag = "47"
5281    )]
5282    pub sql_network_architecture: ::core::option::Option<i32>,
5283    /// Output only. The link to service attachment of PSC instance.
5284    #[prost(string, optional, tag = "48")]
5285    pub psc_service_attachment_link: ::core::option::Option<
5286        ::prost::alloc::string::String,
5287    >,
5288    /// Output only. The dns name of the instance.
5289    #[prost(string, optional, tag = "49")]
5290    pub dns_name: ::core::option::Option<::prost::alloc::string::String>,
5291    /// Output only. DEPRECATED: please use write_endpoint instead.
5292    #[deprecated]
5293    #[prost(string, optional, tag = "51")]
5294    pub primary_dns_name: ::core::option::Option<::prost::alloc::string::String>,
5295    /// Output only. The dns name of the primary instance in a replication group.
5296    #[prost(string, optional, tag = "52")]
5297    pub write_endpoint: ::core::option::Option<::prost::alloc::string::String>,
5298    /// Optional. A primary instance and disaster recovery (DR) replica pair.
5299    /// A DR replica is a cross-region replica that you designate
5300    /// for failover in the event that the primary instance
5301    /// experiences regional failure.
5302    /// Applicable to MySQL and PostgreSQL.
5303    #[prost(message, optional, tag = "54")]
5304    pub replication_cluster: ::core::option::Option<ReplicationCluster>,
5305    /// Gemini instance configuration.
5306    #[prost(message, optional, tag = "55")]
5307    pub gemini_config: ::core::option::Option<GeminiInstanceConfig>,
5308    /// Output only. This status indicates whether the instance satisfies PZI.
5309    ///
5310    /// The status is reserved for future use.
5311    #[prost(message, optional, tag = "56")]
5312    pub satisfies_pzi: ::core::option::Option<bool>,
5313    /// Input only. Whether Cloud SQL is enabled to switch storing point-in-time
5314    /// recovery log files from a data disk to Cloud Storage.
5315    #[prost(message, optional, tag = "57")]
5316    pub switch_transaction_logs_to_cloud_storage_enabled: ::core::option::Option<bool>,
5317    /// Input only. Determines whether an in-place major version upgrade of
5318    /// replicas happens when an in-place major version upgrade of a primary
5319    /// instance is initiated.
5320    #[prost(message, optional, tag = "59")]
5321    pub include_replicas_for_major_version_upgrade: ::core::option::Option<bool>,
5322    /// Optional. Input only. Immutable. Tag keys and tag values that are bound to
5323    /// this instance. You must represent each item in the map as:
5324    /// `"<tag-key-namespaced-name>" : "<tag-value-short-name>"`.
5325    ///
5326    /// For example, a single resource can have the following tags:
5327    ///
5328    /// ```text,
5329    ///   "123/environment": "production",
5330    ///   "123/costCenter": "marketing",
5331    /// ```
5332    ///
5333    /// For more information on tag creation and management, see
5334    /// <https://cloud.google.com/resource-manager/docs/tags/tags-overview.>
5335    #[prost(map = "string, string", tag = "60")]
5336    pub tags: ::std::collections::HashMap<
5337        ::prost::alloc::string::String,
5338        ::prost::alloc::string::String,
5339    >,
5340    /// The number of read pool nodes in a read pool.
5341    #[prost(int32, optional, tag = "63")]
5342    pub node_count: ::core::option::Option<i32>,
5343    /// Output only. Entries containing information about each read pool node of
5344    /// the read pool.
5345    #[prost(message, repeated, tag = "64")]
5346    pub nodes: ::prost::alloc::vec::Vec<database_instance::PoolNodeConfig>,
5347    /// Output only. The list of DNS names used by this instance.
5348    #[prost(message, repeated, tag = "67")]
5349    pub dns_names: ::prost::alloc::vec::Vec<DnsNameMapping>,
5350}
5351/// Nested message and enum types in `DatabaseInstance`.
5352pub mod database_instance {
5353    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5354    pub struct SqlFailoverReplica {
5355        /// The name of the failover replica. If specified at instance creation, a
5356        /// failover replica is created for the instance. The name
5357        /// doesn't include the project ID.
5358        #[prost(string, tag = "1")]
5359        pub name: ::prost::alloc::string::String,
5360        /// The availability status of the failover replica. A false status indicates
5361        /// that the failover replica is out of sync. The primary instance can only
5362        /// failover to the failover replica when the status is true.
5363        #[prost(message, optional, tag = "2")]
5364        pub available: ::core::option::Option<bool>,
5365    }
5366    /// Any scheduled maintenance for this instance.
5367    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5368    pub struct SqlScheduledMaintenance {
5369        /// The start time of any upcoming scheduled maintenance for this instance.
5370        #[prost(message, optional, tag = "1")]
5371        pub start_time: ::core::option::Option<::prost_types::Timestamp>,
5372        #[deprecated]
5373        #[prost(bool, tag = "2")]
5374        pub can_defer: bool,
5375        /// If the scheduled maintenance can be rescheduled.
5376        #[prost(bool, tag = "3")]
5377        pub can_reschedule: bool,
5378        /// Maintenance cannot be rescheduled to start beyond this deadline.
5379        #[prost(message, optional, tag = "4")]
5380        pub schedule_deadline_time: ::core::option::Option<::prost_types::Timestamp>,
5381    }
5382    /// This message wraps up the information written by out-of-disk detection job.
5383    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5384    pub struct SqlOutOfDiskReport {
5385        /// This field represents the state generated by the proactive database
5386        /// wellness job for OutOfDisk issues.
5387        ///
5388        /// * Writers:
5389        /// * the proactive database wellness job for OOD.
5390        /// * Readers:
5391        /// * the proactive database wellness job
5392        #[prost(
5393            enumeration = "sql_out_of_disk_report::SqlOutOfDiskState",
5394            optional,
5395            tag = "1"
5396        )]
5397        pub sql_out_of_disk_state: ::core::option::Option<i32>,
5398        /// The minimum recommended increase size in GigaBytes
5399        /// This field is consumed by the frontend
5400        ///
5401        /// * Writers:
5402        /// * the proactive database wellness job for OOD.
5403        /// * Readers:
5404        #[prost(int32, optional, tag = "2")]
5405        pub sql_min_recommended_increase_size_gb: ::core::option::Option<i32>,
5406    }
5407    /// Nested message and enum types in `SqlOutOfDiskReport`.
5408    pub mod sql_out_of_disk_report {
5409        /// This enum lists all possible states regarding out-of-disk issues.
5410        #[derive(
5411            Clone,
5412            Copy,
5413            Debug,
5414            PartialEq,
5415            Eq,
5416            Hash,
5417            PartialOrd,
5418            Ord,
5419            ::prost::Enumeration
5420        )]
5421        #[repr(i32)]
5422        pub enum SqlOutOfDiskState {
5423            /// Unspecified state
5424            Unspecified = 0,
5425            /// The instance has plenty space on data disk
5426            Normal = 1,
5427            /// Data disk is almost used up. It is shutdown to prevent data
5428            /// corruption.
5429            SoftShutdown = 2,
5430        }
5431        impl SqlOutOfDiskState {
5432            /// String value of the enum field names used in the ProtoBuf definition.
5433            ///
5434            /// The values are not transformed in any way and thus are considered stable
5435            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5436            pub fn as_str_name(&self) -> &'static str {
5437                match self {
5438                    Self::Unspecified => "SQL_OUT_OF_DISK_STATE_UNSPECIFIED",
5439                    Self::Normal => "NORMAL",
5440                    Self::SoftShutdown => "SOFT_SHUTDOWN",
5441                }
5442            }
5443            /// Creates an enum from field names used in the ProtoBuf definition.
5444            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5445                match value {
5446                    "SQL_OUT_OF_DISK_STATE_UNSPECIFIED" => Some(Self::Unspecified),
5447                    "NORMAL" => Some(Self::Normal),
5448                    "SOFT_SHUTDOWN" => Some(Self::SoftShutdown),
5449                    _ => None,
5450                }
5451            }
5452        }
5453    }
5454    /// Details of a single read pool node of a read pool.
5455    #[derive(Clone, PartialEq, ::prost::Message)]
5456    pub struct PoolNodeConfig {
5457        /// Output only. The name of the read pool node, to be used for retrieving
5458        /// metrics and logs.
5459        #[prost(string, optional, tag = "1")]
5460        pub name: ::core::option::Option<::prost::alloc::string::String>,
5461        /// Output only. The zone of the read pool node.
5462        #[prost(string, optional, tag = "2")]
5463        pub gce_zone: ::core::option::Option<::prost::alloc::string::String>,
5464        /// Output only. Mappings containing IP addresses that can be used to connect
5465        /// to the read pool node.
5466        #[prost(message, repeated, tag = "3")]
5467        pub ip_addresses: ::prost::alloc::vec::Vec<super::IpMapping>,
5468        /// Output only. The DNS name of the read pool node.
5469        #[prost(string, optional, tag = "4")]
5470        pub dns_name: ::core::option::Option<::prost::alloc::string::String>,
5471        /// Output only. The current state of the read pool node.
5472        #[prost(enumeration = "SqlInstanceState", optional, tag = "5")]
5473        pub state: ::core::option::Option<i32>,
5474        /// Output only. The list of DNS names used by this read pool node.
5475        #[prost(message, repeated, tag = "6")]
5476        pub dns_names: ::prost::alloc::vec::Vec<super::DnsNameMapping>,
5477        /// Output only. The Private Service Connect (PSC) service attachment of the
5478        /// read pool node.
5479        #[prost(string, optional, tag = "7")]
5480        pub psc_service_attachment_link: ::core::option::Option<
5481            ::prost::alloc::string::String,
5482        >,
5483        /// Output only. The list of settings for requested automatically-setup
5484        /// Private Service Connect (PSC) consumer endpoints that can be used to
5485        /// connect to this read pool node.
5486        #[prost(message, repeated, tag = "8")]
5487        pub psc_auto_connections: ::prost::alloc::vec::Vec<
5488            super::PscAutoConnectionConfig,
5489        >,
5490    }
5491    /// The current serving state of the database instance.
5492    #[derive(
5493        Clone,
5494        Copy,
5495        Debug,
5496        PartialEq,
5497        Eq,
5498        Hash,
5499        PartialOrd,
5500        Ord,
5501        ::prost::Enumeration
5502    )]
5503    #[repr(i32)]
5504    pub enum SqlInstanceState {
5505        /// The state of the instance is unknown.
5506        Unspecified = 0,
5507        /// The instance is running, or has been stopped by owner.
5508        Runnable = 1,
5509        /// The instance is not available, for example due to problems with billing.
5510        Suspended = 2,
5511        /// The instance is being deleted.
5512        PendingDelete = 3,
5513        /// The instance is being created.
5514        PendingCreate = 4,
5515        /// The instance is down for maintenance.
5516        Maintenance = 5,
5517        /// The creation of the instance failed or a fatal error occurred during
5518        /// maintenance.
5519        Failed = 6,
5520        /// Deprecated
5521        #[deprecated]
5522        OnlineMaintenance = 7,
5523        /// (Applicable to read pool nodes only.) The read pool node needs to be
5524        /// repaired. The database might be unavailable.
5525        Repairing = 8,
5526    }
5527    impl SqlInstanceState {
5528        /// String value of the enum field names used in the ProtoBuf definition.
5529        ///
5530        /// The values are not transformed in any way and thus are considered stable
5531        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5532        pub fn as_str_name(&self) -> &'static str {
5533            match self {
5534                Self::Unspecified => "SQL_INSTANCE_STATE_UNSPECIFIED",
5535                Self::Runnable => "RUNNABLE",
5536                Self::Suspended => "SUSPENDED",
5537                Self::PendingDelete => "PENDING_DELETE",
5538                Self::PendingCreate => "PENDING_CREATE",
5539                Self::Maintenance => "MAINTENANCE",
5540                Self::Failed => "FAILED",
5541                #[allow(deprecated)]
5542                Self::OnlineMaintenance => "ONLINE_MAINTENANCE",
5543                Self::Repairing => "REPAIRING",
5544            }
5545        }
5546        /// Creates an enum from field names used in the ProtoBuf definition.
5547        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5548            match value {
5549                "SQL_INSTANCE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
5550                "RUNNABLE" => Some(Self::Runnable),
5551                "SUSPENDED" => Some(Self::Suspended),
5552                "PENDING_DELETE" => Some(Self::PendingDelete),
5553                "PENDING_CREATE" => Some(Self::PendingCreate),
5554                "MAINTENANCE" => Some(Self::Maintenance),
5555                "FAILED" => Some(Self::Failed),
5556                "ONLINE_MAINTENANCE" => {
5557                    Some(#[allow(deprecated)] Self::OnlineMaintenance)
5558                }
5559                "REPAIRING" => Some(Self::Repairing),
5560                _ => None,
5561            }
5562        }
5563    }
5564    /// The SQL network architecture for the instance.
5565    #[derive(
5566        Clone,
5567        Copy,
5568        Debug,
5569        PartialEq,
5570        Eq,
5571        Hash,
5572        PartialOrd,
5573        Ord,
5574        ::prost::Enumeration
5575    )]
5576    #[repr(i32)]
5577    pub enum SqlNetworkArchitecture {
5578        Unspecified = 0,
5579        /// The instance uses the new network architecture.
5580        NewNetworkArchitecture = 1,
5581        /// The instance uses the old network architecture.
5582        OldNetworkArchitecture = 2,
5583    }
5584    impl SqlNetworkArchitecture {
5585        /// String value of the enum field names used in the ProtoBuf definition.
5586        ///
5587        /// The values are not transformed in any way and thus are considered stable
5588        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5589        pub fn as_str_name(&self) -> &'static str {
5590            match self {
5591                Self::Unspecified => "SQL_NETWORK_ARCHITECTURE_UNSPECIFIED",
5592                Self::NewNetworkArchitecture => "NEW_NETWORK_ARCHITECTURE",
5593                Self::OldNetworkArchitecture => "OLD_NETWORK_ARCHITECTURE",
5594            }
5595        }
5596        /// Creates an enum from field names used in the ProtoBuf definition.
5597        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5598            match value {
5599                "SQL_NETWORK_ARCHITECTURE_UNSPECIFIED" => Some(Self::Unspecified),
5600                "NEW_NETWORK_ARCHITECTURE" => Some(Self::NewNetworkArchitecture),
5601                "OLD_NETWORK_ARCHITECTURE" => Some(Self::OldNetworkArchitecture),
5602                _ => None,
5603            }
5604        }
5605    }
5606}
5607/// Gemini instance configuration.
5608#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5609pub struct GeminiInstanceConfig {
5610    /// Output only. Whether Gemini is enabled.
5611    #[prost(bool, optional, tag = "1")]
5612    pub entitled: ::core::option::Option<bool>,
5613    /// Output only. Whether the vacuum management is enabled.
5614    #[prost(bool, optional, tag = "2")]
5615    pub google_vacuum_mgmt_enabled: ::core::option::Option<bool>,
5616    /// Output only. Whether canceling the out-of-memory (OOM) session is enabled.
5617    #[prost(bool, optional, tag = "3")]
5618    pub oom_session_cancel_enabled: ::core::option::Option<bool>,
5619    /// Output only. Whether the active query is enabled.
5620    #[prost(bool, optional, tag = "4")]
5621    pub active_query_enabled: ::core::option::Option<bool>,
5622    /// Output only. Whether the index advisor is enabled.
5623    #[prost(bool, optional, tag = "5")]
5624    pub index_advisor_enabled: ::core::option::Option<bool>,
5625    /// Output only. Whether the flag recommender is enabled.
5626    #[prost(bool, optional, tag = "6")]
5627    pub flag_recommender_enabled: ::core::option::Option<bool>,
5628}
5629/// A primary instance and disaster recovery (DR) replica pair.
5630/// A DR replica is a cross-region replica that you designate for failover in
5631/// the event that the primary instance experiences regional failure.
5632/// Applicable to MySQL and PostgreSQL.
5633#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5634pub struct ReplicationCluster {
5635    /// Output only. If set, this field indicates this instance has a private
5636    /// service access (PSA) DNS endpoint that is pointing to the primary instance
5637    /// of the cluster. If this instance is the primary, then the DNS endpoint
5638    /// points to this instance. After a switchover or replica failover operation,
5639    /// this DNS endpoint points to the promoted instance. This is a read-only
5640    /// field, returned to the user as information. This field can exist even if a
5641    /// standalone instance doesn't have a DR replica yet or the DR replica is
5642    /// deleted.
5643    #[prost(string, tag = "1")]
5644    pub psa_write_endpoint: ::prost::alloc::string::String,
5645    /// Optional. If the instance is a primary instance, then this field identifies
5646    /// the disaster recovery (DR) replica. A DR replica is an optional
5647    /// configuration for Enterprise Plus edition instances. If the instance is a
5648    /// read replica, then the field is not set. Set this field to a replica name
5649    /// to designate a DR replica for a primary instance. Remove the replica name
5650    /// to remove the DR replica designation.
5651    #[prost(string, tag = "2")]
5652    pub failover_dr_replica_name: ::prost::alloc::string::String,
5653    /// Output only. Read-only field that indicates whether the replica is a DR
5654    /// replica. This field is not set if the instance is a primary instance.
5655    #[prost(bool, tag = "4")]
5656    pub dr_replica: bool,
5657}
5658/// An available database version. It can be a major or a minor version.
5659#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5660pub struct AvailableDatabaseVersion {
5661    /// The version's major version name.
5662    #[prost(string, optional, tag = "3")]
5663    pub major_version: ::core::option::Option<::prost::alloc::string::String>,
5664    /// The database version name. For MySQL 8.0, this string provides the database
5665    /// major and minor version.
5666    #[prost(string, optional, tag = "8")]
5667    pub name: ::core::option::Option<::prost::alloc::string::String>,
5668    /// The database version's display name.
5669    #[prost(string, optional, tag = "9")]
5670    pub display_name: ::core::option::Option<::prost::alloc::string::String>,
5671}
5672/// Reschedule options for maintenance windows.
5673#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5674pub struct SqlInstancesRescheduleMaintenanceRequestBody {
5675    /// Required. The type of the reschedule the user wants.
5676    #[prost(message, optional, tag = "3")]
5677    pub reschedule: ::core::option::Option<
5678        sql_instances_reschedule_maintenance_request_body::Reschedule,
5679    >,
5680}
5681/// Nested message and enum types in `SqlInstancesRescheduleMaintenanceRequestBody`.
5682pub mod sql_instances_reschedule_maintenance_request_body {
5683    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5684    pub struct Reschedule {
5685        /// Required. The type of the reschedule.
5686        #[prost(enumeration = "RescheduleType", tag = "1")]
5687        pub reschedule_type: i32,
5688        /// Optional. Timestamp when the maintenance shall be rescheduled to if
5689        /// reschedule_type=SPECIFIC_TIME, in
5690        /// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
5691        /// `2012-11-15T16:19:00.094Z`.
5692        #[prost(message, optional, tag = "2")]
5693        pub schedule_time: ::core::option::Option<::prost_types::Timestamp>,
5694    }
5695    #[derive(
5696        Clone,
5697        Copy,
5698        Debug,
5699        PartialEq,
5700        Eq,
5701        Hash,
5702        PartialOrd,
5703        Ord,
5704        ::prost::Enumeration
5705    )]
5706    #[repr(i32)]
5707    pub enum RescheduleType {
5708        Unspecified = 0,
5709        /// Reschedules maintenance to happen now (within 5 minutes).
5710        Immediate = 1,
5711        /// Reschedules maintenance to occur within one week from the originally
5712        /// scheduled day and time.
5713        NextAvailableWindow = 2,
5714        /// Reschedules maintenance to a specific time and day.
5715        SpecificTime = 3,
5716    }
5717    impl RescheduleType {
5718        /// String value of the enum field names used in the ProtoBuf definition.
5719        ///
5720        /// The values are not transformed in any way and thus are considered stable
5721        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5722        pub fn as_str_name(&self) -> &'static str {
5723            match self {
5724                Self::Unspecified => "RESCHEDULE_TYPE_UNSPECIFIED",
5725                Self::Immediate => "IMMEDIATE",
5726                Self::NextAvailableWindow => "NEXT_AVAILABLE_WINDOW",
5727                Self::SpecificTime => "SPECIFIC_TIME",
5728            }
5729        }
5730        /// Creates an enum from field names used in the ProtoBuf definition.
5731        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5732            match value {
5733                "RESCHEDULE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
5734                "IMMEDIATE" => Some(Self::Immediate),
5735                "NEXT_AVAILABLE_WINDOW" => Some(Self::NextAvailableWindow),
5736                "SPECIFIC_TIME" => Some(Self::SpecificTime),
5737                _ => None,
5738            }
5739        }
5740    }
5741}
5742/// Database instance demote primary instance context.
5743#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5744pub struct DemoteMasterContext {
5745    /// This is always `sql#demoteMasterContext`.
5746    #[prost(string, tag = "1")]
5747    pub kind: ::prost::alloc::string::String,
5748    /// Verify the GTID consistency for demote operation. Default value:
5749    /// `True`. Setting this flag to `false` enables you to bypass the GTID
5750    /// consistency check between on-premises primary instance and Cloud SQL
5751    /// instance during the demotion operation but also exposes you to the risk of
5752    /// future replication failures. Change the value only if you know the reason
5753    /// for the GTID divergence and are confident that doing so will not cause any
5754    /// replication issues.
5755    #[prost(message, optional, tag = "2")]
5756    pub verify_gtid_consistency: ::core::option::Option<bool>,
5757    /// The name of the instance which will act as on-premises primary instance
5758    /// in the replication setup.
5759    #[prost(string, tag = "3")]
5760    pub master_instance_name: ::prost::alloc::string::String,
5761    /// Configuration specific to read-replicas replicating from the on-premises
5762    /// primary instance.
5763    #[prost(message, optional, tag = "4")]
5764    pub replica_configuration: ::core::option::Option<DemoteMasterConfiguration>,
5765    /// Flag to skip replication setup on the instance.
5766    #[prost(bool, tag = "5")]
5767    pub skip_replication_setup: bool,
5768}
5769/// This context is used to demote an existing standalone instance to be
5770/// a Cloud SQL read replica for an external database server.
5771#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5772pub struct DemoteContext {
5773    /// This is always `sql#demoteContext`.
5774    #[prost(string, tag = "1")]
5775    pub kind: ::prost::alloc::string::String,
5776    /// Required. The name of the instance which acts as the on-premises primary
5777    /// instance in the replication setup.
5778    #[prost(string, tag = "2")]
5779    pub source_representative_instance_name: ::prost::alloc::string::String,
5780}
5781/// Database instance failover context.
5782#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5783pub struct FailoverContext {
5784    /// The current settings version of this instance. Request will be rejected if
5785    /// this version doesn't match the current settings version.
5786    #[prost(int64, tag = "1")]
5787    pub settings_version: i64,
5788    /// This is always `sql#failoverContext`.
5789    #[prost(string, tag = "2")]
5790    pub kind: ::prost::alloc::string::String,
5791}
5792/// Database instance restore from backup context.
5793/// Backup context contains source instance id and project id.
5794#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5795pub struct RestoreBackupContext {
5796    /// This is always `sql#restoreBackupContext`.
5797    #[prost(string, tag = "1")]
5798    pub kind: ::prost::alloc::string::String,
5799    /// The ID of the backup run to restore from.
5800    #[prost(int64, tag = "2")]
5801    pub backup_run_id: i64,
5802    /// The ID of the instance that the backup was taken from.
5803    #[prost(string, tag = "3")]
5804    pub instance_id: ::prost::alloc::string::String,
5805    /// The full project ID of the source instance.
5806    #[prost(string, tag = "4")]
5807    pub project: ::prost::alloc::string::String,
5808}
5809/// Instance rotate server CA context.
5810#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5811pub struct RotateServerCaContext {
5812    /// This is always `sql#rotateServerCaContext`.
5813    #[prost(string, tag = "1")]
5814    pub kind: ::prost::alloc::string::String,
5815    /// The fingerprint of the next version to be rotated to. If left unspecified,
5816    /// will be rotated to the most recently added server CA version.
5817    #[prost(string, tag = "2")]
5818    pub next_version: ::prost::alloc::string::String,
5819}
5820/// Instance rotate server certificate context.
5821#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5822pub struct RotateServerCertificateContext {
5823    /// Optional. This is always `sql#rotateServerCertificateContext`.
5824    #[prost(string, tag = "1")]
5825    pub kind: ::prost::alloc::string::String,
5826    /// The fingerprint of the next version to be rotated to. If left unspecified,
5827    /// will be rotated to the most recently added server certificate version.
5828    #[prost(string, tag = "2")]
5829    pub next_version: ::prost::alloc::string::String,
5830}
5831/// Instance rotate Entra ID certificate context.
5832#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5833pub struct RotateEntraIdCertificateContext {
5834    /// Optional. This is always `sql#rotateEntraIdCertificateContext`.
5835    #[prost(string, tag = "1")]
5836    pub kind: ::prost::alloc::string::String,
5837    /// Optional. The fingerprint of the next version to be rotated to. If left
5838    /// unspecified, will be rotated to the most recently added server certificate
5839    /// version.
5840    #[prost(string, tag = "2")]
5841    pub next_version: ::prost::alloc::string::String,
5842}
5843/// Database Instance truncate log context.
5844#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5845pub struct TruncateLogContext {
5846    /// This is always `sql#truncateLogContext`.
5847    #[prost(string, tag = "1")]
5848    pub kind: ::prost::alloc::string::String,
5849    /// The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and
5850    /// `MYSQL_SLOW_TABLE`.
5851    #[prost(string, tag = "2")]
5852    pub log_type: ::prost::alloc::string::String,
5853}
5854/// External primary instance migration setting error/warning.
5855#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5856pub struct SqlExternalSyncSettingError {
5857    /// Can be `sql#externalSyncSettingError` or
5858    /// `sql#externalSyncSettingWarning`.
5859    #[prost(string, tag = "1")]
5860    pub kind: ::prost::alloc::string::String,
5861    /// Identifies the specific error that occurred.
5862    #[prost(
5863        enumeration = "sql_external_sync_setting_error::SqlExternalSyncSettingErrorType",
5864        tag = "2"
5865    )]
5866    pub r#type: i32,
5867    /// Additional information about the error encountered.
5868    #[prost(string, tag = "3")]
5869    pub detail: ::prost::alloc::string::String,
5870}
5871/// Nested message and enum types in `SqlExternalSyncSettingError`.
5872pub mod sql_external_sync_setting_error {
5873    #[derive(
5874        Clone,
5875        Copy,
5876        Debug,
5877        PartialEq,
5878        Eq,
5879        Hash,
5880        PartialOrd,
5881        Ord,
5882        ::prost::Enumeration
5883    )]
5884    #[repr(i32)]
5885    pub enum SqlExternalSyncSettingErrorType {
5886        Unspecified = 0,
5887        ConnectionFailure = 1,
5888        BinlogNotEnabled = 2,
5889        IncompatibleDatabaseVersion = 3,
5890        ReplicaAlreadySetup = 4,
5891        /// The replication user is missing privileges that are required.
5892        InsufficientPrivilege = 5,
5893        /// Unsupported migration type.
5894        UnsupportedMigrationType = 6,
5895        /// No pglogical extension installed on databases, applicable for postgres.
5896        NoPglogicalInstalled = 7,
5897        /// pglogical node already exists on databases, applicable for postgres.
5898        PglogicalNodeAlreadyExists = 8,
5899        /// The value of parameter wal_level is not set to logical.
5900        InvalidWalLevel = 9,
5901        /// The value of parameter shared_preload_libraries does not include
5902        /// pglogical.
5903        InvalidSharedPreloadLibrary = 10,
5904        /// The value of parameter max_replication_slots is not sufficient.
5905        InsufficientMaxReplicationSlots = 11,
5906        /// The value of parameter max_wal_senders is not sufficient.
5907        InsufficientMaxWalSenders = 12,
5908        /// The value of parameter max_worker_processes is not sufficient.
5909        InsufficientMaxWorkerProcesses = 13,
5910        /// Extensions installed are either not supported or having unsupported
5911        /// versions.
5912        UnsupportedExtensions = 14,
5913        /// The value of parameter rds.logical_replication is not set to 1.
5914        InvalidRdsLogicalReplication = 15,
5915        /// The primary instance logging setup doesn't allow EM sync.
5916        InvalidLoggingSetup = 16,
5917        /// The primary instance database parameter setup doesn't allow EM sync.
5918        InvalidDbParam = 17,
5919        /// The gtid_mode is not supported, applicable for MySQL.
5920        UnsupportedGtidMode = 18,
5921        /// SQL Server Agent is not running.
5922        SqlserverAgentNotRunning = 19,
5923        /// The table definition is not support due to missing primary key or replica
5924        /// identity, applicable for postgres. Note that this is a warning and won't
5925        /// block the migration.
5926        UnsupportedTableDefinition = 20,
5927        /// The customer has a definer that will break EM setup.
5928        UnsupportedDefiner = 21,
5929        /// SQL Server @@SERVERNAME does not match actual host name.
5930        SqlserverServernameMismatch = 22,
5931        /// The primary instance has been setup and will fail the setup.
5932        PrimaryAlreadySetup = 23,
5933        /// The primary instance has unsupported binary log format.
5934        UnsupportedBinlogFormat = 24,
5935        /// The primary instance's binary log retention setting.
5936        BinlogRetentionSetting = 25,
5937        /// The primary instance has tables with unsupported storage engine.
5938        UnsupportedStorageEngine = 26,
5939        /// Source has tables with limited support
5940        /// eg: PostgreSQL tables without primary keys.
5941        LimitedSupportTables = 27,
5942        /// The replica instance contains existing data.
5943        ExistingDataInReplica = 28,
5944        /// The replication user is missing privileges that are optional.
5945        MissingOptionalPrivileges = 29,
5946        /// Additional BACKUP_ADMIN privilege is granted to the replication user
5947        /// which may lock source MySQL 8 instance for DDLs during initial sync.
5948        RiskyBackupAdminPrivilege = 30,
5949        /// The Cloud Storage bucket is missing necessary permissions.
5950        InsufficientGcsPermissions = 31,
5951        /// The Cloud Storage bucket has an error in the file or contains invalid
5952        /// file information.
5953        InvalidFileInfo = 32,
5954        /// The source instance has unsupported database settings for migration.
5955        UnsupportedDatabaseSettings = 33,
5956        /// The replication user is missing parallel import specific privileges.
5957        /// (e.g. LOCK TABLES) for MySQL.
5958        MysqlParallelImportInsufficientPrivilege = 34,
5959        /// The global variable local_infile is off on external server replica.
5960        LocalInfileOff = 35,
5961        /// This code instructs customers to turn on point-in-time recovery manually
5962        /// for the instance after promoting the Cloud SQL for PostgreSQL instance.
5963        TurnOnPitrAfterPromote = 36,
5964        /// The minor version of replica database is incompatible with the source.
5965        IncompatibleDatabaseMinorVersion = 37,
5966        /// This warning message indicates that Cloud SQL uses the maximum number of
5967        /// subscriptions to migrate data from the source to the destination.
5968        SourceMaxSubscriptions = 38,
5969        /// Unable to verify definers on the source for MySQL.
5970        UnableToVerifyDefiners = 39,
5971        /// If a time out occurs while the subscription counts are calculated, then
5972        /// this value is set to 1. Otherwise, this value is set to 2.
5973        SubscriptionCalculationStatus = 40,
5974        /// Count of subscriptions needed to sync source data for PostgreSQL
5975        /// database.
5976        PgSubscriptionCount = 41,
5977        /// Final parallel level that is used to do migration.
5978        PgSyncParallelLevel = 42,
5979        /// The disk size of the replica instance is smaller than the data size of
5980        /// the source instance.
5981        InsufficientDiskSize = 43,
5982        /// The data size of the source instance is greater than 1 TB, the number of
5983        /// cores of the replica instance is less than 8, and the memory of the
5984        /// replica is less than 32 GB.
5985        InsufficientMachineTier = 44,
5986        /// The warning message indicates the unsupported extensions will not be
5987        /// migrated to the destination.
5988        UnsupportedExtensionsNotMigrated = 45,
5989        /// The warning message indicates the pg_cron extension and settings will not
5990        /// be migrated to the destination.
5991        ExtensionsNotMigrated = 46,
5992        /// The error message indicates that pg_cron flags are enabled on the
5993        /// destination which is not supported during the migration.
5994        PgCronFlagEnabledInReplica = 47,
5995        /// This error message indicates that the specified extensions are not
5996        /// enabled on destination instance. For example, before you can migrate
5997        /// data to the destination instance, you must enable the PGAudit extension
5998        /// on the instance.
5999        ExtensionsNotEnabledInReplica = 48,
6000        /// The source database has generated columns that can't be migrated. Please
6001        /// change them to regular columns before migration.
6002        UnsupportedColumns = 49,
6003        /// The source database has users that aren't created in the replica.
6004        /// First, create all users, which are in the pg_user_mappings table
6005        /// of the source database, in the destination instance. Then, perform the
6006        /// migration.
6007        UsersNotCreatedInReplica = 50,
6008        /// The selected objects include system objects that aren't supported for
6009        /// migration.
6010        UnsupportedSystemObjects = 51,
6011        /// The source database has tables with the FULL or NOTHING replica identity.
6012        /// Before starting your migration, either remove the identity or change it
6013        /// to DEFAULT. Note that this is an error and will block the migration.
6014        UnsupportedTablesWithReplicaIdentity = 52,
6015        /// The selected objects don't exist on the source instance.
6016        SelectedObjectsNotExistOnSource = 53,
6017        /// PSC only destination instance does not have a network attachment URI.
6018        PscOnlyInstanceWithNoNetworkAttachmentUri = 54,
6019        /// Selected objects reference unselected objects. Based on their object type
6020        /// (foreign key constraint or view), selected objects will fail during
6021        /// migration.
6022        SelectedObjectsReferenceUnselectedObjects = 55,
6023        /// The migration will delete existing data in the replica; set
6024        /// \[replica_overwrite_enabled\]\[google.cloud.sql.v1.SqlInstancesStartExternalSyncRequest.replica_overwrite_enabled\]
6025        /// in the request to acknowledge this. This is an error. MySQL only.
6026        PromptDeleteExisting = 56,
6027        /// The migration will delete existing data in the replica;
6028        /// \[replica_overwrite_enabled\]\[google.cloud.sql.v1.SqlInstancesStartExternalSyncRequest.replica_overwrite_enabled\]
6029        /// was set in the request acknowledging this. This is a warning rather than
6030        /// an error. MySQL only.
6031        WillDeleteExisting = 57,
6032        /// The replication user is missing specific privileges to setup DDL
6033        /// replication. (e.g. CREATE EVENT TRIGGER, CREATE SCHEMA) for PostgreSQL.
6034        PgDdlReplicationInsufficientPrivilege = 58,
6035    }
6036    impl SqlExternalSyncSettingErrorType {
6037        /// String value of the enum field names used in the ProtoBuf definition.
6038        ///
6039        /// The values are not transformed in any way and thus are considered stable
6040        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6041        pub fn as_str_name(&self) -> &'static str {
6042            match self {
6043                Self::Unspecified => "SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED",
6044                Self::ConnectionFailure => "CONNECTION_FAILURE",
6045                Self::BinlogNotEnabled => "BINLOG_NOT_ENABLED",
6046                Self::IncompatibleDatabaseVersion => "INCOMPATIBLE_DATABASE_VERSION",
6047                Self::ReplicaAlreadySetup => "REPLICA_ALREADY_SETUP",
6048                Self::InsufficientPrivilege => "INSUFFICIENT_PRIVILEGE",
6049                Self::UnsupportedMigrationType => "UNSUPPORTED_MIGRATION_TYPE",
6050                Self::NoPglogicalInstalled => "NO_PGLOGICAL_INSTALLED",
6051                Self::PglogicalNodeAlreadyExists => "PGLOGICAL_NODE_ALREADY_EXISTS",
6052                Self::InvalidWalLevel => "INVALID_WAL_LEVEL",
6053                Self::InvalidSharedPreloadLibrary => "INVALID_SHARED_PRELOAD_LIBRARY",
6054                Self::InsufficientMaxReplicationSlots => {
6055                    "INSUFFICIENT_MAX_REPLICATION_SLOTS"
6056                }
6057                Self::InsufficientMaxWalSenders => "INSUFFICIENT_MAX_WAL_SENDERS",
6058                Self::InsufficientMaxWorkerProcesses => {
6059                    "INSUFFICIENT_MAX_WORKER_PROCESSES"
6060                }
6061                Self::UnsupportedExtensions => "UNSUPPORTED_EXTENSIONS",
6062                Self::InvalidRdsLogicalReplication => "INVALID_RDS_LOGICAL_REPLICATION",
6063                Self::InvalidLoggingSetup => "INVALID_LOGGING_SETUP",
6064                Self::InvalidDbParam => "INVALID_DB_PARAM",
6065                Self::UnsupportedGtidMode => "UNSUPPORTED_GTID_MODE",
6066                Self::SqlserverAgentNotRunning => "SQLSERVER_AGENT_NOT_RUNNING",
6067                Self::UnsupportedTableDefinition => "UNSUPPORTED_TABLE_DEFINITION",
6068                Self::UnsupportedDefiner => "UNSUPPORTED_DEFINER",
6069                Self::SqlserverServernameMismatch => "SQLSERVER_SERVERNAME_MISMATCH",
6070                Self::PrimaryAlreadySetup => "PRIMARY_ALREADY_SETUP",
6071                Self::UnsupportedBinlogFormat => "UNSUPPORTED_BINLOG_FORMAT",
6072                Self::BinlogRetentionSetting => "BINLOG_RETENTION_SETTING",
6073                Self::UnsupportedStorageEngine => "UNSUPPORTED_STORAGE_ENGINE",
6074                Self::LimitedSupportTables => "LIMITED_SUPPORT_TABLES",
6075                Self::ExistingDataInReplica => "EXISTING_DATA_IN_REPLICA",
6076                Self::MissingOptionalPrivileges => "MISSING_OPTIONAL_PRIVILEGES",
6077                Self::RiskyBackupAdminPrivilege => "RISKY_BACKUP_ADMIN_PRIVILEGE",
6078                Self::InsufficientGcsPermissions => "INSUFFICIENT_GCS_PERMISSIONS",
6079                Self::InvalidFileInfo => "INVALID_FILE_INFO",
6080                Self::UnsupportedDatabaseSettings => "UNSUPPORTED_DATABASE_SETTINGS",
6081                Self::MysqlParallelImportInsufficientPrivilege => {
6082                    "MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE"
6083                }
6084                Self::LocalInfileOff => "LOCAL_INFILE_OFF",
6085                Self::TurnOnPitrAfterPromote => "TURN_ON_PITR_AFTER_PROMOTE",
6086                Self::IncompatibleDatabaseMinorVersion => {
6087                    "INCOMPATIBLE_DATABASE_MINOR_VERSION"
6088                }
6089                Self::SourceMaxSubscriptions => "SOURCE_MAX_SUBSCRIPTIONS",
6090                Self::UnableToVerifyDefiners => "UNABLE_TO_VERIFY_DEFINERS",
6091                Self::SubscriptionCalculationStatus => "SUBSCRIPTION_CALCULATION_STATUS",
6092                Self::PgSubscriptionCount => "PG_SUBSCRIPTION_COUNT",
6093                Self::PgSyncParallelLevel => "PG_SYNC_PARALLEL_LEVEL",
6094                Self::InsufficientDiskSize => "INSUFFICIENT_DISK_SIZE",
6095                Self::InsufficientMachineTier => "INSUFFICIENT_MACHINE_TIER",
6096                Self::UnsupportedExtensionsNotMigrated => {
6097                    "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED"
6098                }
6099                Self::ExtensionsNotMigrated => "EXTENSIONS_NOT_MIGRATED",
6100                Self::PgCronFlagEnabledInReplica => "PG_CRON_FLAG_ENABLED_IN_REPLICA",
6101                Self::ExtensionsNotEnabledInReplica => {
6102                    "EXTENSIONS_NOT_ENABLED_IN_REPLICA"
6103                }
6104                Self::UnsupportedColumns => "UNSUPPORTED_COLUMNS",
6105                Self::UsersNotCreatedInReplica => "USERS_NOT_CREATED_IN_REPLICA",
6106                Self::UnsupportedSystemObjects => "UNSUPPORTED_SYSTEM_OBJECTS",
6107                Self::UnsupportedTablesWithReplicaIdentity => {
6108                    "UNSUPPORTED_TABLES_WITH_REPLICA_IDENTITY"
6109                }
6110                Self::SelectedObjectsNotExistOnSource => {
6111                    "SELECTED_OBJECTS_NOT_EXIST_ON_SOURCE"
6112                }
6113                Self::PscOnlyInstanceWithNoNetworkAttachmentUri => {
6114                    "PSC_ONLY_INSTANCE_WITH_NO_NETWORK_ATTACHMENT_URI"
6115                }
6116                Self::SelectedObjectsReferenceUnselectedObjects => {
6117                    "SELECTED_OBJECTS_REFERENCE_UNSELECTED_OBJECTS"
6118                }
6119                Self::PromptDeleteExisting => "PROMPT_DELETE_EXISTING",
6120                Self::WillDeleteExisting => "WILL_DELETE_EXISTING",
6121                Self::PgDdlReplicationInsufficientPrivilege => {
6122                    "PG_DDL_REPLICATION_INSUFFICIENT_PRIVILEGE"
6123                }
6124            }
6125        }
6126        /// Creates an enum from field names used in the ProtoBuf definition.
6127        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6128            match value {
6129                "SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED" => {
6130                    Some(Self::Unspecified)
6131                }
6132                "CONNECTION_FAILURE" => Some(Self::ConnectionFailure),
6133                "BINLOG_NOT_ENABLED" => Some(Self::BinlogNotEnabled),
6134                "INCOMPATIBLE_DATABASE_VERSION" => {
6135                    Some(Self::IncompatibleDatabaseVersion)
6136                }
6137                "REPLICA_ALREADY_SETUP" => Some(Self::ReplicaAlreadySetup),
6138                "INSUFFICIENT_PRIVILEGE" => Some(Self::InsufficientPrivilege),
6139                "UNSUPPORTED_MIGRATION_TYPE" => Some(Self::UnsupportedMigrationType),
6140                "NO_PGLOGICAL_INSTALLED" => Some(Self::NoPglogicalInstalled),
6141                "PGLOGICAL_NODE_ALREADY_EXISTS" => Some(Self::PglogicalNodeAlreadyExists),
6142                "INVALID_WAL_LEVEL" => Some(Self::InvalidWalLevel),
6143                "INVALID_SHARED_PRELOAD_LIBRARY" => {
6144                    Some(Self::InvalidSharedPreloadLibrary)
6145                }
6146                "INSUFFICIENT_MAX_REPLICATION_SLOTS" => {
6147                    Some(Self::InsufficientMaxReplicationSlots)
6148                }
6149                "INSUFFICIENT_MAX_WAL_SENDERS" => Some(Self::InsufficientMaxWalSenders),
6150                "INSUFFICIENT_MAX_WORKER_PROCESSES" => {
6151                    Some(Self::InsufficientMaxWorkerProcesses)
6152                }
6153                "UNSUPPORTED_EXTENSIONS" => Some(Self::UnsupportedExtensions),
6154                "INVALID_RDS_LOGICAL_REPLICATION" => {
6155                    Some(Self::InvalidRdsLogicalReplication)
6156                }
6157                "INVALID_LOGGING_SETUP" => Some(Self::InvalidLoggingSetup),
6158                "INVALID_DB_PARAM" => Some(Self::InvalidDbParam),
6159                "UNSUPPORTED_GTID_MODE" => Some(Self::UnsupportedGtidMode),
6160                "SQLSERVER_AGENT_NOT_RUNNING" => Some(Self::SqlserverAgentNotRunning),
6161                "UNSUPPORTED_TABLE_DEFINITION" => Some(Self::UnsupportedTableDefinition),
6162                "UNSUPPORTED_DEFINER" => Some(Self::UnsupportedDefiner),
6163                "SQLSERVER_SERVERNAME_MISMATCH" => {
6164                    Some(Self::SqlserverServernameMismatch)
6165                }
6166                "PRIMARY_ALREADY_SETUP" => Some(Self::PrimaryAlreadySetup),
6167                "UNSUPPORTED_BINLOG_FORMAT" => Some(Self::UnsupportedBinlogFormat),
6168                "BINLOG_RETENTION_SETTING" => Some(Self::BinlogRetentionSetting),
6169                "UNSUPPORTED_STORAGE_ENGINE" => Some(Self::UnsupportedStorageEngine),
6170                "LIMITED_SUPPORT_TABLES" => Some(Self::LimitedSupportTables),
6171                "EXISTING_DATA_IN_REPLICA" => Some(Self::ExistingDataInReplica),
6172                "MISSING_OPTIONAL_PRIVILEGES" => Some(Self::MissingOptionalPrivileges),
6173                "RISKY_BACKUP_ADMIN_PRIVILEGE" => Some(Self::RiskyBackupAdminPrivilege),
6174                "INSUFFICIENT_GCS_PERMISSIONS" => Some(Self::InsufficientGcsPermissions),
6175                "INVALID_FILE_INFO" => Some(Self::InvalidFileInfo),
6176                "UNSUPPORTED_DATABASE_SETTINGS" => {
6177                    Some(Self::UnsupportedDatabaseSettings)
6178                }
6179                "MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE" => {
6180                    Some(Self::MysqlParallelImportInsufficientPrivilege)
6181                }
6182                "LOCAL_INFILE_OFF" => Some(Self::LocalInfileOff),
6183                "TURN_ON_PITR_AFTER_PROMOTE" => Some(Self::TurnOnPitrAfterPromote),
6184                "INCOMPATIBLE_DATABASE_MINOR_VERSION" => {
6185                    Some(Self::IncompatibleDatabaseMinorVersion)
6186                }
6187                "SOURCE_MAX_SUBSCRIPTIONS" => Some(Self::SourceMaxSubscriptions),
6188                "UNABLE_TO_VERIFY_DEFINERS" => Some(Self::UnableToVerifyDefiners),
6189                "SUBSCRIPTION_CALCULATION_STATUS" => {
6190                    Some(Self::SubscriptionCalculationStatus)
6191                }
6192                "PG_SUBSCRIPTION_COUNT" => Some(Self::PgSubscriptionCount),
6193                "PG_SYNC_PARALLEL_LEVEL" => Some(Self::PgSyncParallelLevel),
6194                "INSUFFICIENT_DISK_SIZE" => Some(Self::InsufficientDiskSize),
6195                "INSUFFICIENT_MACHINE_TIER" => Some(Self::InsufficientMachineTier),
6196                "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED" => {
6197                    Some(Self::UnsupportedExtensionsNotMigrated)
6198                }
6199                "EXTENSIONS_NOT_MIGRATED" => Some(Self::ExtensionsNotMigrated),
6200                "PG_CRON_FLAG_ENABLED_IN_REPLICA" => {
6201                    Some(Self::PgCronFlagEnabledInReplica)
6202                }
6203                "EXTENSIONS_NOT_ENABLED_IN_REPLICA" => {
6204                    Some(Self::ExtensionsNotEnabledInReplica)
6205                }
6206                "UNSUPPORTED_COLUMNS" => Some(Self::UnsupportedColumns),
6207                "USERS_NOT_CREATED_IN_REPLICA" => Some(Self::UsersNotCreatedInReplica),
6208                "UNSUPPORTED_SYSTEM_OBJECTS" => Some(Self::UnsupportedSystemObjects),
6209                "UNSUPPORTED_TABLES_WITH_REPLICA_IDENTITY" => {
6210                    Some(Self::UnsupportedTablesWithReplicaIdentity)
6211                }
6212                "SELECTED_OBJECTS_NOT_EXIST_ON_SOURCE" => {
6213                    Some(Self::SelectedObjectsNotExistOnSource)
6214                }
6215                "PSC_ONLY_INSTANCE_WITH_NO_NETWORK_ATTACHMENT_URI" => {
6216                    Some(Self::PscOnlyInstanceWithNoNetworkAttachmentUri)
6217                }
6218                "SELECTED_OBJECTS_REFERENCE_UNSELECTED_OBJECTS" => {
6219                    Some(Self::SelectedObjectsReferenceUnselectedObjects)
6220                }
6221                "PROMPT_DELETE_EXISTING" => Some(Self::PromptDeleteExisting),
6222                "WILL_DELETE_EXISTING" => Some(Self::WillDeleteExisting),
6223                "PG_DDL_REPLICATION_INSUFFICIENT_PRIVILEGE" => {
6224                    Some(Self::PgDdlReplicationInsufficientPrivilege)
6225                }
6226                _ => None,
6227            }
6228        }
6229    }
6230}
6231/// A list of objects that the user selects for replication from an external
6232/// source instance.
6233#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6234pub struct SelectedObjects {
6235    /// Required. The name of the database to migrate.
6236    #[prost(string, tag = "1")]
6237    pub database: ::prost::alloc::string::String,
6238}
6239/// On-premises instance configuration.
6240#[derive(Clone, PartialEq, ::prost::Message)]
6241pub struct OnPremisesConfiguration {
6242    /// The host and port of the on-premises instance in host:port format
6243    #[prost(string, tag = "1")]
6244    pub host_port: ::prost::alloc::string::String,
6245    /// This is always `sql#onPremisesConfiguration`.
6246    #[prost(string, tag = "2")]
6247    pub kind: ::prost::alloc::string::String,
6248    /// The username for connecting to on-premises instance.
6249    #[prost(string, tag = "3")]
6250    pub username: ::prost::alloc::string::String,
6251    /// The password for connecting to on-premises instance.
6252    #[prost(string, tag = "4")]
6253    pub password: ::prost::alloc::string::String,
6254    /// PEM representation of the trusted CA's x509 certificate.
6255    #[prost(string, tag = "5")]
6256    pub ca_certificate: ::prost::alloc::string::String,
6257    /// PEM representation of the replica's x509 certificate.
6258    #[prost(string, tag = "6")]
6259    pub client_certificate: ::prost::alloc::string::String,
6260    /// PEM representation of the replica's private key. The corresponding public
6261    /// key is encoded in the client's certificate.
6262    #[prost(string, tag = "7")]
6263    pub client_key: ::prost::alloc::string::String,
6264    /// The dump file to create the Cloud SQL replica.
6265    #[prost(string, tag = "8")]
6266    pub dump_file_path: ::prost::alloc::string::String,
6267    /// The reference to Cloud SQL instance if the source is Cloud SQL.
6268    #[prost(message, optional, tag = "15")]
6269    pub source_instance: ::core::option::Option<InstanceReference>,
6270    /// Optional. A list of objects that the user selects for replication from an
6271    /// external source instance.
6272    #[prost(message, repeated, tag = "16")]
6273    pub selected_objects: ::prost::alloc::vec::Vec<SelectedObjects>,
6274    /// Optional. SSL option for replica connection to the on-premises source.
6275    #[prost(enumeration = "on_premises_configuration::SslOption", tag = "18")]
6276    pub ssl_option: i32,
6277}
6278/// Nested message and enum types in `OnPremisesConfiguration`.
6279pub mod on_premises_configuration {
6280    /// SslOption defines the SSL mode to be used for replica connection to the
6281    /// on-premises source.
6282    #[derive(
6283        Clone,
6284        Copy,
6285        Debug,
6286        PartialEq,
6287        Eq,
6288        Hash,
6289        PartialOrd,
6290        Ord,
6291        ::prost::Enumeration
6292    )]
6293    #[repr(i32)]
6294    pub enum SslOption {
6295        /// Unknown SSL option i.e. SSL option not specified by user.
6296        Unspecified = 0,
6297        /// SSL is not used for replica connection to the on-premises source.
6298        Disable = 1,
6299        /// SSL is required for replica connection to the on-premises source.
6300        Require = 2,
6301        /// Verify CA is required for replica connection to the on-premises source.
6302        VerifyCa = 3,
6303    }
6304    impl SslOption {
6305        /// String value of the enum field names used in the ProtoBuf definition.
6306        ///
6307        /// The values are not transformed in any way and thus are considered stable
6308        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6309        pub fn as_str_name(&self) -> &'static str {
6310            match self {
6311                Self::Unspecified => "SSL_OPTION_UNSPECIFIED",
6312                Self::Disable => "DISABLE",
6313                Self::Require => "REQUIRE",
6314                Self::VerifyCa => "VERIFY_CA",
6315            }
6316        }
6317        /// Creates an enum from field names used in the ProtoBuf definition.
6318        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6319            match value {
6320                "SSL_OPTION_UNSPECIFIED" => Some(Self::Unspecified),
6321                "DISABLE" => Some(Self::Disable),
6322                "REQUIRE" => Some(Self::Require),
6323                "VERIFY_CA" => Some(Self::VerifyCa),
6324                _ => None,
6325            }
6326        }
6327    }
6328}
6329/// Read-replica configuration for connecting to the primary instance.
6330#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6331pub struct ReplicaConfiguration {
6332    /// This is always `sql#replicaConfiguration`.
6333    #[prost(string, tag = "1")]
6334    pub kind: ::prost::alloc::string::String,
6335    /// MySQL specific configuration when replicating from a MySQL on-premises
6336    /// primary instance. Replication configuration information such as the
6337    /// username, password, certificates, and keys are not stored in the instance
6338    /// metadata. The configuration information is used only to set up the
6339    /// replication connection and is stored by MySQL in a file named
6340    /// `master.info` in the data directory.
6341    #[prost(message, optional, tag = "2")]
6342    pub mysql_replica_configuration: ::core::option::Option<MySqlReplicaConfiguration>,
6343    /// Specifies if the replica is the failover target. If the field is set to
6344    /// `true`, the replica will be designated as a failover replica. In case the
6345    /// primary instance fails, the replica instance will be promoted as the new
6346    /// primary instance. Only one replica can be specified as failover target, and
6347    /// the replica has to be in different zone with the primary instance.
6348    #[prost(message, optional, tag = "3")]
6349    pub failover_target: ::core::option::Option<bool>,
6350    /// Optional. Specifies if a SQL Server replica is a cascadable replica. A
6351    /// cascadable replica is a SQL Server cross region replica that supports
6352    /// replica(s) under it.
6353    #[prost(message, optional, tag = "5")]
6354    pub cascadable_replica: ::core::option::Option<bool>,
6355}
6356/// Execute SQL statements request.
6357#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6358pub struct SqlInstancesExecuteSqlRequest {
6359    /// Required. Database instance ID. This does not include the project ID.
6360    #[prost(string, tag = "1")]
6361    pub instance: ::prost::alloc::string::String,
6362    /// Required. Project ID of the project that contains the instance.
6363    #[prost(string, tag = "2")]
6364    pub project: ::prost::alloc::string::String,
6365    /// The request body.
6366    #[prost(message, optional, tag = "100")]
6367    pub body: ::core::option::Option<ExecuteSqlPayload>,
6368}
6369/// The request payload used to execute SQL statements.
6370#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6371pub struct ExecuteSqlPayload {
6372    /// Optional. The name of an existing database user to connect to the database.
6373    /// When `auto_iam_authn` is set to true, this field is ignored and the API
6374    /// caller's IAM user is used.
6375    #[prost(string, tag = "1")]
6376    pub user: ::prost::alloc::string::String,
6377    /// Required. SQL statements to run on the database. It can be a single
6378    /// statement or a sequence of statements separated by semicolons.
6379    #[prost(string, tag = "2")]
6380    pub sql_statement: ::prost::alloc::string::String,
6381    /// Optional. Name of the database on which the statement will be executed.
6382    #[prost(string, tag = "3")]
6383    pub database: ::prost::alloc::string::String,
6384    /// Optional. The maximum number of rows returned per SQL statement.
6385    #[prost(int64, tag = "10")]
6386    pub row_limit: i64,
6387    /// Optional. Controls how the API should respond when the SQL execution result
6388    /// is incomplete due to the size limit or another error. The default mode is
6389    /// to throw an error.
6390    #[prost(enumeration = "execute_sql_payload::PartialResultMode", tag = "13")]
6391    pub partial_result_mode: i32,
6392    /// Optional. Specifies the name of the application that is making the request.
6393    /// This field is used for telemetry. Only alphanumeric characters, dashes, and
6394    /// underscores are allowed. The maximum length is 32 characters.
6395    #[prost(string, tag = "16")]
6396    pub application: ::prost::alloc::string::String,
6397    /// Credentials for the database connection.
6398    #[prost(oneof = "execute_sql_payload::UserPassword", tags = "11")]
6399    pub user_password: ::core::option::Option<execute_sql_payload::UserPassword>,
6400}
6401/// Nested message and enum types in `ExecuteSqlPayload`.
6402pub mod execute_sql_payload {
6403    /// Controls how the API should respond when the SQL execution result exceeds
6404    /// 10 MB.
6405    #[derive(
6406        Clone,
6407        Copy,
6408        Debug,
6409        PartialEq,
6410        Eq,
6411        Hash,
6412        PartialOrd,
6413        Ord,
6414        ::prost::Enumeration
6415    )]
6416    #[repr(i32)]
6417    pub enum PartialResultMode {
6418        /// Unspecified mode, effectively the same as `FAIL_PARTIAL_RESULT`.
6419        Unspecified = 0,
6420        /// Throw an error if the result exceeds 10 MB or if only a partial result
6421        /// can be retrieved. Don't return the result.
6422        FailPartialResult = 1,
6423        /// Return a truncated result and set `partial_result` to true if the result
6424        /// exceeds 10 MB or if only a partial result can be retrieved due to error.
6425        /// Don't throw an error.
6426        AllowPartialResult = 2,
6427    }
6428    impl PartialResultMode {
6429        /// String value of the enum field names used in the ProtoBuf definition.
6430        ///
6431        /// The values are not transformed in any way and thus are considered stable
6432        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6433        pub fn as_str_name(&self) -> &'static str {
6434            match self {
6435                Self::Unspecified => "PARTIAL_RESULT_MODE_UNSPECIFIED",
6436                Self::FailPartialResult => "FAIL_PARTIAL_RESULT",
6437                Self::AllowPartialResult => "ALLOW_PARTIAL_RESULT",
6438            }
6439        }
6440        /// Creates an enum from field names used in the ProtoBuf definition.
6441        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6442            match value {
6443                "PARTIAL_RESULT_MODE_UNSPECIFIED" => Some(Self::Unspecified),
6444                "FAIL_PARTIAL_RESULT" => Some(Self::FailPartialResult),
6445                "ALLOW_PARTIAL_RESULT" => Some(Self::AllowPartialResult),
6446                _ => None,
6447            }
6448        }
6449    }
6450    /// Credentials for the database connection.
6451    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
6452    pub enum UserPassword {
6453        /// Optional. When set to true, the API caller identity associated with the
6454        /// request is used for database authentication. The API caller must be an
6455        /// IAM user in the database.
6456        #[prost(bool, tag = "11")]
6457        AutoIamAuthn(bool),
6458    }
6459}
6460/// Execute SQL statements response.
6461#[derive(Clone, PartialEq, ::prost::Message)]
6462pub struct SqlInstancesExecuteSqlResponse {
6463    /// A list of notices and warnings generated during query execution.
6464    /// For PostgreSQL, this includes all notices and warnings.
6465    /// For MySQL, this includes warnings generated by the last executed statement.
6466    /// To retrieve all warnings for a multi-statement query, `SHOW WARNINGS` must
6467    /// be executed after each statement.
6468    #[prost(message, repeated, tag = "9")]
6469    pub messages: ::prost::alloc::vec::Vec<sql_instances_execute_sql_response::Message>,
6470    /// The additional metadata information regarding the execution of the SQL
6471    /// statements.
6472    #[prost(message, optional, tag = "6")]
6473    pub metadata: ::core::option::Option<Metadata>,
6474    /// The list of results after executing all the SQL statements.
6475    #[prost(message, repeated, tag = "7")]
6476    pub results: ::prost::alloc::vec::Vec<QueryResult>,
6477    /// Contains the error from the database if the SQL execution failed.
6478    #[prost(message, optional, tag = "8")]
6479    pub status: ::core::option::Option<super::super::super::rpc::Status>,
6480}
6481/// Nested message and enum types in `SqlInstancesExecuteSqlResponse`.
6482pub mod sql_instances_execute_sql_response {
6483    /// Represents a notice or warning message from the database.
6484    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6485    pub struct Message {
6486        /// The full message string.
6487        /// For PostgreSQL, this is a formatted string that may include severity,
6488        /// code, and the notice/warning message.
6489        /// For MySQL, this contains the warning message.
6490        #[prost(string, optional, tag = "1")]
6491        pub message: ::core::option::Option<::prost::alloc::string::String>,
6492        /// The severity of the message (e.g., "NOTICE" for PostgreSQL, "WARNING" for
6493        /// MySQL).
6494        #[prost(string, optional, tag = "2")]
6495        pub severity: ::core::option::Option<::prost::alloc::string::String>,
6496    }
6497}
6498/// QueryResult contains the result of executing a single SQL statement.
6499#[derive(Clone, PartialEq, ::prost::Message)]
6500pub struct QueryResult {
6501    /// List of columns included in the result. This also includes the data type
6502    /// of the column.
6503    #[prost(message, repeated, tag = "1")]
6504    pub columns: ::prost::alloc::vec::Vec<Column>,
6505    /// Rows returned by the SQL statement.
6506    #[prost(message, repeated, tag = "2")]
6507    pub rows: ::prost::alloc::vec::Vec<Row>,
6508    /// Message related to the SQL execution result.
6509    #[prost(string, tag = "3")]
6510    pub message: ::prost::alloc::string::String,
6511    /// Set to true if the SQL execution's result is truncated due to size limits
6512    /// or an error retrieving results.
6513    #[prost(bool, tag = "4")]
6514    pub partial_result: bool,
6515    /// If results were truncated due to an error, details of that error.
6516    #[prost(message, optional, tag = "8")]
6517    pub status: ::core::option::Option<super::super::super::rpc::Status>,
6518}
6519/// Contains the name and datatype of a column.
6520#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6521pub struct Column {
6522    /// Name of the column.
6523    #[prost(string, tag = "1")]
6524    pub name: ::prost::alloc::string::String,
6525    /// Datatype of the column.
6526    #[prost(string, tag = "2")]
6527    pub r#type: ::prost::alloc::string::String,
6528}
6529/// Contains the values for a row.
6530#[derive(Clone, PartialEq, ::prost::Message)]
6531pub struct Row {
6532    /// The values for the row.
6533    #[prost(message, repeated, tag = "1")]
6534    pub values: ::prost::alloc::vec::Vec<Value>,
6535}
6536/// The cell value of the table.
6537#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6538pub struct Value {
6539    /// The cell value in string format.
6540    #[prost(string, tag = "1")]
6541    pub value: ::prost::alloc::string::String,
6542    /// If cell value is null, then this flag will be set to true.
6543    #[prost(bool, tag = "2")]
6544    pub null_value: bool,
6545}
6546/// The additional metadata information regarding the execution of the SQL
6547/// statements.
6548#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6549pub struct Metadata {
6550    /// The time taken to execute the SQL statements.
6551    #[prost(message, optional, tag = "1")]
6552    pub sql_statement_execution_time: ::core::option::Option<::prost_types::Duration>,
6553}
6554/// Request to acquire a lease for SSRS.
6555#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6556pub struct SqlInstancesAcquireSsrsLeaseRequest {
6557    /// Required. Cloud SQL instance ID. This doesn't include the project ID. It's
6558    /// composed of lowercase letters, numbers, and hyphens, and it must start with
6559    /// a letter. The total length must be 98 characters or less (Example:
6560    /// instance-id).
6561    #[prost(string, tag = "1")]
6562    pub instance: ::prost::alloc::string::String,
6563    /// Required. Project ID of the project that contains the instance (Example:
6564    /// project-id).
6565    #[prost(string, tag = "2")]
6566    pub project: ::prost::alloc::string::String,
6567    /// Required. The request body.
6568    #[prost(message, optional, tag = "100")]
6569    pub body: ::core::option::Option<InstancesAcquireSsrsLeaseRequest>,
6570}
6571/// Response for the acquire SSRS lease request.
6572#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6573pub struct SqlInstancesAcquireSsrsLeaseResponse {
6574    /// The unique identifier for this operation.
6575    #[prost(string, tag = "1")]
6576    pub operation_id: ::prost::alloc::string::String,
6577}
6578/// Request to release a lease for SSRS.
6579#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6580pub struct SqlInstancesReleaseSsrsLeaseRequest {
6581    /// Required. The Cloud SQL instance ID. This doesn't include the project ID.
6582    /// The instance ID contains lowercase letters, numbers, and hyphens, and it
6583    /// must start with a letter. This ID can have a maximum length of 98
6584    /// characters.
6585    #[prost(string, tag = "1")]
6586    pub instance: ::prost::alloc::string::String,
6587    /// Required. The project ID that contains the instance.
6588    #[prost(string, tag = "2")]
6589    pub project: ::prost::alloc::string::String,
6590}
6591/// Response for the release SSRS lease request.
6592#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6593pub struct SqlInstancesReleaseSsrsLeaseResponse {
6594    /// The unique identifier for this operation.
6595    #[prost(string, tag = "1")]
6596    pub operation_id: ::prost::alloc::string::String,
6597}
6598/// Request to perform a point in time restore on a Google Cloud Backup and
6599/// Disaster Recovery managed instance.
6600#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6601pub struct SqlInstancesPointInTimeRestoreRequest {
6602    /// Required. The parent resource where you created this instance.
6603    /// Format: projects/{project}
6604    #[prost(string, tag = "1")]
6605    pub parent: ::prost::alloc::string::String,
6606    /// Required. The context for request to perform a PITR on a Google Cloud
6607    /// Backup and Disaster Recovery managed instance.
6608    #[prost(message, optional, tag = "100")]
6609    pub context: ::core::option::Option<PointInTimeRestoreContext>,
6610}
6611/// External Sync parallel level.
6612#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6613#[repr(i32)]
6614pub enum ExternalSyncParallelLevel {
6615    /// Unknown sync parallel level. Will be defaulted to OPTIMAL.
6616    Unspecified = 0,
6617    /// Minimal parallel level.
6618    Min = 1,
6619    /// Optimal parallel level.
6620    Optimal = 2,
6621    /// Maximum parallel level.
6622    Max = 3,
6623}
6624impl ExternalSyncParallelLevel {
6625    /// String value of the enum field names used in the ProtoBuf definition.
6626    ///
6627    /// The values are not transformed in any way and thus are considered stable
6628    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6629    pub fn as_str_name(&self) -> &'static str {
6630        match self {
6631            Self::Unspecified => "EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED",
6632            Self::Min => "MIN",
6633            Self::Optimal => "OPTIMAL",
6634            Self::Max => "MAX",
6635        }
6636    }
6637    /// Creates an enum from field names used in the ProtoBuf definition.
6638    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6639        match value {
6640            "EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
6641            "MIN" => Some(Self::Min),
6642            "OPTIMAL" => Some(Self::Optimal),
6643            "MAX" => Some(Self::Max),
6644            _ => None,
6645        }
6646    }
6647}
6648#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6649#[repr(i32)]
6650pub enum SqlInstanceType {
6651    /// This is an unknown Cloud SQL instance type.
6652    Unspecified = 0,
6653    /// A regular Cloud SQL instance that is not replicating from a primary
6654    /// instance.
6655    CloudSqlInstance = 1,
6656    /// An instance running on the customer's premises that is not managed by
6657    /// Cloud SQL.
6658    OnPremisesInstance = 2,
6659    /// A Cloud SQL instance acting as a read-replica.
6660    ReadReplicaInstance = 3,
6661    /// A Cloud SQL read pool.
6662    ReadPoolInstance = 5,
6663}
6664impl SqlInstanceType {
6665    /// String value of the enum field names used in the ProtoBuf definition.
6666    ///
6667    /// The values are not transformed in any way and thus are considered stable
6668    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6669    pub fn as_str_name(&self) -> &'static str {
6670        match self {
6671            Self::Unspecified => "SQL_INSTANCE_TYPE_UNSPECIFIED",
6672            Self::CloudSqlInstance => "CLOUD_SQL_INSTANCE",
6673            Self::OnPremisesInstance => "ON_PREMISES_INSTANCE",
6674            Self::ReadReplicaInstance => "READ_REPLICA_INSTANCE",
6675            Self::ReadPoolInstance => "READ_POOL_INSTANCE",
6676        }
6677    }
6678    /// Creates an enum from field names used in the ProtoBuf definition.
6679    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6680        match value {
6681            "SQL_INSTANCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
6682            "CLOUD_SQL_INSTANCE" => Some(Self::CloudSqlInstance),
6683            "ON_PREMISES_INSTANCE" => Some(Self::OnPremisesInstance),
6684            "READ_REPLICA_INSTANCE" => Some(Self::ReadReplicaInstance),
6685            "READ_POOL_INSTANCE" => Some(Self::ReadPoolInstance),
6686            _ => None,
6687        }
6688    }
6689}
6690/// The suspension reason of the database instance if the state is SUSPENDED.
6691#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6692#[repr(i32)]
6693pub enum SqlSuspensionReason {
6694    /// This is an unknown suspension reason.
6695    Unspecified = 0,
6696    /// The instance is suspended due to billing issues (for example:, account
6697    /// issue)
6698    BillingIssue = 2,
6699    /// The instance is suspended due to illegal content (for example:, child
6700    /// pornography, copyrighted material, etc.).
6701    LegalIssue = 3,
6702    /// The instance is causing operational issues (for example:, causing the
6703    /// database to crash).
6704    OperationalIssue = 4,
6705    /// The KMS key used by the instance is either revoked or denied access to
6706    KmsKeyIssue = 5,
6707}
6708impl SqlSuspensionReason {
6709    /// String value of the enum field names used in the ProtoBuf definition.
6710    ///
6711    /// The values are not transformed in any way and thus are considered stable
6712    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6713    pub fn as_str_name(&self) -> &'static str {
6714        match self {
6715            Self::Unspecified => "SQL_SUSPENSION_REASON_UNSPECIFIED",
6716            Self::BillingIssue => "BILLING_ISSUE",
6717            Self::LegalIssue => "LEGAL_ISSUE",
6718            Self::OperationalIssue => "OPERATIONAL_ISSUE",
6719            Self::KmsKeyIssue => "KMS_KEY_ISSUE",
6720        }
6721    }
6722    /// Creates an enum from field names used in the ProtoBuf definition.
6723    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6724        match value {
6725            "SQL_SUSPENSION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
6726            "BILLING_ISSUE" => Some(Self::BillingIssue),
6727            "LEGAL_ISSUE" => Some(Self::LegalIssue),
6728            "OPERATIONAL_ISSUE" => Some(Self::OperationalIssue),
6729            "KMS_KEY_ISSUE" => Some(Self::KmsKeyIssue),
6730            _ => None,
6731        }
6732    }
6733}
6734/// Generated client implementations.
6735pub mod sql_instances_service_client {
6736    #![allow(
6737        unused_variables,
6738        dead_code,
6739        missing_docs,
6740        clippy::wildcard_imports,
6741        clippy::let_unit_value,
6742    )]
6743    use tonic::codegen::*;
6744    use tonic::codegen::http::Uri;
6745    #[derive(Debug, Clone)]
6746    pub struct SqlInstancesServiceClient<T> {
6747        inner: tonic::client::Grpc<T>,
6748    }
6749    impl<T> SqlInstancesServiceClient<T>
6750    where
6751        T: tonic::client::GrpcService<tonic::body::Body>,
6752        T::Error: Into<StdError>,
6753        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
6754        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
6755    {
6756        pub fn new(inner: T) -> Self {
6757            let inner = tonic::client::Grpc::new(inner);
6758            Self { inner }
6759        }
6760        pub fn with_origin(inner: T, origin: Uri) -> Self {
6761            let inner = tonic::client::Grpc::with_origin(inner, origin);
6762            Self { inner }
6763        }
6764        pub fn with_interceptor<F>(
6765            inner: T,
6766            interceptor: F,
6767        ) -> SqlInstancesServiceClient<InterceptedService<T, F>>
6768        where
6769            F: tonic::service::Interceptor,
6770            T::ResponseBody: Default,
6771            T: tonic::codegen::Service<
6772                http::Request<tonic::body::Body>,
6773                Response = http::Response<
6774                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
6775                >,
6776            >,
6777            <T as tonic::codegen::Service<
6778                http::Request<tonic::body::Body>,
6779            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
6780        {
6781            SqlInstancesServiceClient::new(InterceptedService::new(inner, interceptor))
6782        }
6783        /// Compress requests with the given encoding.
6784        ///
6785        /// This requires the server to support it otherwise it might respond with an
6786        /// error.
6787        #[must_use]
6788        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6789            self.inner = self.inner.send_compressed(encoding);
6790            self
6791        }
6792        /// Enable decompressing responses.
6793        #[must_use]
6794        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6795            self.inner = self.inner.accept_compressed(encoding);
6796            self
6797        }
6798        /// Limits the maximum size of a decoded message.
6799        ///
6800        /// Default: `4MB`
6801        #[must_use]
6802        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6803            self.inner = self.inner.max_decoding_message_size(limit);
6804            self
6805        }
6806        /// Limits the maximum size of an encoded message.
6807        ///
6808        /// Default: `usize::MAX`
6809        #[must_use]
6810        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6811            self.inner = self.inner.max_encoding_message_size(limit);
6812            self
6813        }
6814        /// Adds a new trusted Certificate Authority (CA) version for the specified
6815        /// instance. Required to prepare for a certificate rotation. If a CA version
6816        /// was previously added but never used in a certificate rotation, this
6817        /// operation replaces that version. There cannot be more than one CA version
6818        /// waiting to be rotated in. For instances that have enabled Certificate
6819        /// Authority Service (CAS) based server CA, use AddServerCertificate to add a
6820        /// new server certificate.
6821        pub async fn add_server_ca(
6822            &mut self,
6823            request: impl tonic::IntoRequest<super::SqlInstancesAddServerCaRequest>,
6824        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
6825            self.inner
6826                .ready()
6827                .await
6828                .map_err(|e| {
6829                    tonic::Status::unknown(
6830                        format!("Service was not ready: {}", e.into()),
6831                    )
6832                })?;
6833            let codec = tonic_prost::ProstCodec::default();
6834            let path = http::uri::PathAndQuery::from_static(
6835                "/google.cloud.sql.v1.SqlInstancesService/AddServerCa",
6836            );
6837            let mut req = request.into_request();
6838            req.extensions_mut()
6839                .insert(
6840                    GrpcMethod::new(
6841                        "google.cloud.sql.v1.SqlInstancesService",
6842                        "AddServerCa",
6843                    ),
6844                );
6845            self.inner.unary(req, path, codec).await
6846        }
6847        /// Add a new trusted server certificate version for the specified instance
6848        /// using Certificate Authority Service (CAS) server CA. Required to prepare
6849        /// for a certificate rotation. If a server certificate version was previously
6850        /// added but never used in a certificate rotation, this operation replaces
6851        /// that version. There cannot be more than one certificate version waiting to
6852        /// be rotated in. For instances not using CAS server CA, use AddServerCa
6853        /// instead.
6854        pub async fn add_server_certificate(
6855            &mut self,
6856            request: impl tonic::IntoRequest<
6857                super::SqlInstancesAddServerCertificateRequest,
6858            >,
6859        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
6860            self.inner
6861                .ready()
6862                .await
6863                .map_err(|e| {
6864                    tonic::Status::unknown(
6865                        format!("Service was not ready: {}", e.into()),
6866                    )
6867                })?;
6868            let codec = tonic_prost::ProstCodec::default();
6869            let path = http::uri::PathAndQuery::from_static(
6870                "/google.cloud.sql.v1.SqlInstancesService/AddServerCertificate",
6871            );
6872            let mut req = request.into_request();
6873            req.extensions_mut()
6874                .insert(
6875                    GrpcMethod::new(
6876                        "google.cloud.sql.v1.SqlInstancesService",
6877                        "AddServerCertificate",
6878                    ),
6879                );
6880            self.inner.unary(req, path, codec).await
6881        }
6882        /// Adds a new Entra ID certificate for the specified instance. If an Entra ID
6883        /// certificate was previously added but never used in a certificate rotation,
6884        /// this operation replaces that version.
6885        pub async fn add_entra_id_certificate(
6886            &mut self,
6887            request: impl tonic::IntoRequest<
6888                super::SqlInstancesAddEntraIdCertificateRequest,
6889            >,
6890        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
6891            self.inner
6892                .ready()
6893                .await
6894                .map_err(|e| {
6895                    tonic::Status::unknown(
6896                        format!("Service was not ready: {}", e.into()),
6897                    )
6898                })?;
6899            let codec = tonic_prost::ProstCodec::default();
6900            let path = http::uri::PathAndQuery::from_static(
6901                "/google.cloud.sql.v1.SqlInstancesService/AddEntraIdCertificate",
6902            );
6903            let mut req = request.into_request();
6904            req.extensions_mut()
6905                .insert(
6906                    GrpcMethod::new(
6907                        "google.cloud.sql.v1.SqlInstancesService",
6908                        "AddEntraIdCertificate",
6909                    ),
6910                );
6911            self.inner.unary(req, path, codec).await
6912        }
6913        /// Creates a Cloud SQL instance as a clone of the source instance. Using this
6914        /// operation might cause your instance to restart.
6915        pub async fn clone(
6916            &mut self,
6917            request: impl tonic::IntoRequest<super::SqlInstancesCloneRequest>,
6918        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
6919            self.inner
6920                .ready()
6921                .await
6922                .map_err(|e| {
6923                    tonic::Status::unknown(
6924                        format!("Service was not ready: {}", e.into()),
6925                    )
6926                })?;
6927            let codec = tonic_prost::ProstCodec::default();
6928            let path = http::uri::PathAndQuery::from_static(
6929                "/google.cloud.sql.v1.SqlInstancesService/Clone",
6930            );
6931            let mut req = request.into_request();
6932            req.extensions_mut()
6933                .insert(
6934                    GrpcMethod::new("google.cloud.sql.v1.SqlInstancesService", "Clone"),
6935                );
6936            self.inner.unary(req, path, codec).await
6937        }
6938        /// Deletes a Cloud SQL instance.
6939        pub async fn delete(
6940            &mut self,
6941            request: impl tonic::IntoRequest<super::SqlInstancesDeleteRequest>,
6942        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
6943            self.inner
6944                .ready()
6945                .await
6946                .map_err(|e| {
6947                    tonic::Status::unknown(
6948                        format!("Service was not ready: {}", e.into()),
6949                    )
6950                })?;
6951            let codec = tonic_prost::ProstCodec::default();
6952            let path = http::uri::PathAndQuery::from_static(
6953                "/google.cloud.sql.v1.SqlInstancesService/Delete",
6954            );
6955            let mut req = request.into_request();
6956            req.extensions_mut()
6957                .insert(
6958                    GrpcMethod::new("google.cloud.sql.v1.SqlInstancesService", "Delete"),
6959                );
6960            self.inner.unary(req, path, codec).await
6961        }
6962        /// Demotes the stand-alone instance to be a Cloud SQL read replica for an
6963        /// external database server.
6964        pub async fn demote_master(
6965            &mut self,
6966            request: impl tonic::IntoRequest<super::SqlInstancesDemoteMasterRequest>,
6967        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
6968            self.inner
6969                .ready()
6970                .await
6971                .map_err(|e| {
6972                    tonic::Status::unknown(
6973                        format!("Service was not ready: {}", e.into()),
6974                    )
6975                })?;
6976            let codec = tonic_prost::ProstCodec::default();
6977            let path = http::uri::PathAndQuery::from_static(
6978                "/google.cloud.sql.v1.SqlInstancesService/DemoteMaster",
6979            );
6980            let mut req = request.into_request();
6981            req.extensions_mut()
6982                .insert(
6983                    GrpcMethod::new(
6984                        "google.cloud.sql.v1.SqlInstancesService",
6985                        "DemoteMaster",
6986                    ),
6987                );
6988            self.inner.unary(req, path, codec).await
6989        }
6990        /// Demotes an existing standalone instance to be a Cloud SQL read replica
6991        /// for an external database server.
6992        pub async fn demote(
6993            &mut self,
6994            request: impl tonic::IntoRequest<super::SqlInstancesDemoteRequest>,
6995        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
6996            self.inner
6997                .ready()
6998                .await
6999                .map_err(|e| {
7000                    tonic::Status::unknown(
7001                        format!("Service was not ready: {}", e.into()),
7002                    )
7003                })?;
7004            let codec = tonic_prost::ProstCodec::default();
7005            let path = http::uri::PathAndQuery::from_static(
7006                "/google.cloud.sql.v1.SqlInstancesService/Demote",
7007            );
7008            let mut req = request.into_request();
7009            req.extensions_mut()
7010                .insert(
7011                    GrpcMethod::new("google.cloud.sql.v1.SqlInstancesService", "Demote"),
7012                );
7013            self.inner.unary(req, path, codec).await
7014        }
7015        /// Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL
7016        /// dump or CSV file.
7017        pub async fn export(
7018            &mut self,
7019            request: impl tonic::IntoRequest<super::SqlInstancesExportRequest>,
7020        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7021            self.inner
7022                .ready()
7023                .await
7024                .map_err(|e| {
7025                    tonic::Status::unknown(
7026                        format!("Service was not ready: {}", e.into()),
7027                    )
7028                })?;
7029            let codec = tonic_prost::ProstCodec::default();
7030            let path = http::uri::PathAndQuery::from_static(
7031                "/google.cloud.sql.v1.SqlInstancesService/Export",
7032            );
7033            let mut req = request.into_request();
7034            req.extensions_mut()
7035                .insert(
7036                    GrpcMethod::new("google.cloud.sql.v1.SqlInstancesService", "Export"),
7037                );
7038            self.inner.unary(req, path, codec).await
7039        }
7040        /// Initiates a manual failover of a high availability (HA) primary instance
7041        /// to a standby instance, which becomes the primary instance. Users are
7042        /// then rerouted to the new primary. For more information, see the
7043        /// [Overview of high
7044        /// availability](https://cloud.google.com/sql/docs/mysql/high-availability)
7045        /// page in the Cloud SQL documentation.
7046        /// If using Legacy HA (MySQL only), this causes the instance to failover to
7047        /// its failover replica instance.
7048        pub async fn failover(
7049            &mut self,
7050            request: impl tonic::IntoRequest<super::SqlInstancesFailoverRequest>,
7051        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7052            self.inner
7053                .ready()
7054                .await
7055                .map_err(|e| {
7056                    tonic::Status::unknown(
7057                        format!("Service was not ready: {}", e.into()),
7058                    )
7059                })?;
7060            let codec = tonic_prost::ProstCodec::default();
7061            let path = http::uri::PathAndQuery::from_static(
7062                "/google.cloud.sql.v1.SqlInstancesService/Failover",
7063            );
7064            let mut req = request.into_request();
7065            req.extensions_mut()
7066                .insert(
7067                    GrpcMethod::new(
7068                        "google.cloud.sql.v1.SqlInstancesService",
7069                        "Failover",
7070                    ),
7071                );
7072            self.inner.unary(req, path, codec).await
7073        }
7074        /// Reencrypt CMEK instance with latest key version.
7075        pub async fn reencrypt(
7076            &mut self,
7077            request: impl tonic::IntoRequest<super::SqlInstancesReencryptRequest>,
7078        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7079            self.inner
7080                .ready()
7081                .await
7082                .map_err(|e| {
7083                    tonic::Status::unknown(
7084                        format!("Service was not ready: {}", e.into()),
7085                    )
7086                })?;
7087            let codec = tonic_prost::ProstCodec::default();
7088            let path = http::uri::PathAndQuery::from_static(
7089                "/google.cloud.sql.v1.SqlInstancesService/Reencrypt",
7090            );
7091            let mut req = request.into_request();
7092            req.extensions_mut()
7093                .insert(
7094                    GrpcMethod::new(
7095                        "google.cloud.sql.v1.SqlInstancesService",
7096                        "Reencrypt",
7097                    ),
7098                );
7099            self.inner.unary(req, path, codec).await
7100        }
7101        /// Retrieves a resource containing information about a Cloud SQL instance.
7102        pub async fn get(
7103            &mut self,
7104            request: impl tonic::IntoRequest<super::SqlInstancesGetRequest>,
7105        ) -> std::result::Result<
7106            tonic::Response<super::DatabaseInstance>,
7107            tonic::Status,
7108        > {
7109            self.inner
7110                .ready()
7111                .await
7112                .map_err(|e| {
7113                    tonic::Status::unknown(
7114                        format!("Service was not ready: {}", e.into()),
7115                    )
7116                })?;
7117            let codec = tonic_prost::ProstCodec::default();
7118            let path = http::uri::PathAndQuery::from_static(
7119                "/google.cloud.sql.v1.SqlInstancesService/Get",
7120            );
7121            let mut req = request.into_request();
7122            req.extensions_mut()
7123                .insert(
7124                    GrpcMethod::new("google.cloud.sql.v1.SqlInstancesService", "Get"),
7125                );
7126            self.inner.unary(req, path, codec).await
7127        }
7128        /// Imports data into a Cloud SQL instance from a SQL dump  or CSV file in
7129        /// Cloud Storage.
7130        pub async fn import(
7131            &mut self,
7132            request: impl tonic::IntoRequest<super::SqlInstancesImportRequest>,
7133        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7134            self.inner
7135                .ready()
7136                .await
7137                .map_err(|e| {
7138                    tonic::Status::unknown(
7139                        format!("Service was not ready: {}", e.into()),
7140                    )
7141                })?;
7142            let codec = tonic_prost::ProstCodec::default();
7143            let path = http::uri::PathAndQuery::from_static(
7144                "/google.cloud.sql.v1.SqlInstancesService/Import",
7145            );
7146            let mut req = request.into_request();
7147            req.extensions_mut()
7148                .insert(
7149                    GrpcMethod::new("google.cloud.sql.v1.SqlInstancesService", "Import"),
7150                );
7151            self.inner.unary(req, path, codec).await
7152        }
7153        /// Creates a new Cloud SQL instance.
7154        pub async fn insert(
7155            &mut self,
7156            request: impl tonic::IntoRequest<super::SqlInstancesInsertRequest>,
7157        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7158            self.inner
7159                .ready()
7160                .await
7161                .map_err(|e| {
7162                    tonic::Status::unknown(
7163                        format!("Service was not ready: {}", e.into()),
7164                    )
7165                })?;
7166            let codec = tonic_prost::ProstCodec::default();
7167            let path = http::uri::PathAndQuery::from_static(
7168                "/google.cloud.sql.v1.SqlInstancesService/Insert",
7169            );
7170            let mut req = request.into_request();
7171            req.extensions_mut()
7172                .insert(
7173                    GrpcMethod::new("google.cloud.sql.v1.SqlInstancesService", "Insert"),
7174                );
7175            self.inner.unary(req, path, codec).await
7176        }
7177        /// Lists instances under a given project.
7178        pub async fn list(
7179            &mut self,
7180            request: impl tonic::IntoRequest<super::SqlInstancesListRequest>,
7181        ) -> std::result::Result<
7182            tonic::Response<super::InstancesListResponse>,
7183            tonic::Status,
7184        > {
7185            self.inner
7186                .ready()
7187                .await
7188                .map_err(|e| {
7189                    tonic::Status::unknown(
7190                        format!("Service was not ready: {}", e.into()),
7191                    )
7192                })?;
7193            let codec = tonic_prost::ProstCodec::default();
7194            let path = http::uri::PathAndQuery::from_static(
7195                "/google.cloud.sql.v1.SqlInstancesService/List",
7196            );
7197            let mut req = request.into_request();
7198            req.extensions_mut()
7199                .insert(
7200                    GrpcMethod::new("google.cloud.sql.v1.SqlInstancesService", "List"),
7201                );
7202            self.inner.unary(req, path, codec).await
7203        }
7204        /// Lists all of the trusted Certificate Authorities (CAs) for the specified
7205        /// instance. There can be up to three CAs listed: the CA that was used to sign
7206        /// the certificate that is currently in use, a CA that has been added but not
7207        /// yet used to sign a certificate, and a CA used to sign a certificate that
7208        /// has previously rotated out.
7209        pub async fn list_server_cas(
7210            &mut self,
7211            request: impl tonic::IntoRequest<super::SqlInstancesListServerCasRequest>,
7212        ) -> std::result::Result<
7213            tonic::Response<super::InstancesListServerCasResponse>,
7214            tonic::Status,
7215        > {
7216            self.inner
7217                .ready()
7218                .await
7219                .map_err(|e| {
7220                    tonic::Status::unknown(
7221                        format!("Service was not ready: {}", e.into()),
7222                    )
7223                })?;
7224            let codec = tonic_prost::ProstCodec::default();
7225            let path = http::uri::PathAndQuery::from_static(
7226                "/google.cloud.sql.v1.SqlInstancesService/ListServerCas",
7227            );
7228            let mut req = request.into_request();
7229            req.extensions_mut()
7230                .insert(
7231                    GrpcMethod::new(
7232                        "google.cloud.sql.v1.SqlInstancesService",
7233                        "ListServerCas",
7234                    ),
7235                );
7236            self.inner.unary(req, path, codec).await
7237        }
7238        /// Lists all versions of server certificates and certificate authorities (CAs)
7239        /// for the specified instance. There can be up to three sets of certs listed:
7240        /// the certificate that is currently in use, a future that has been added but
7241        /// not yet used to sign a certificate, and a certificate that has been rotated
7242        /// out. For instances not using Certificate Authority Service (CAS) server CA,
7243        /// use ListServerCas instead.
7244        pub async fn list_server_certificates(
7245            &mut self,
7246            request: impl tonic::IntoRequest<
7247                super::SqlInstancesListServerCertificatesRequest,
7248            >,
7249        ) -> std::result::Result<
7250            tonic::Response<super::InstancesListServerCertificatesResponse>,
7251            tonic::Status,
7252        > {
7253            self.inner
7254                .ready()
7255                .await
7256                .map_err(|e| {
7257                    tonic::Status::unknown(
7258                        format!("Service was not ready: {}", e.into()),
7259                    )
7260                })?;
7261            let codec = tonic_prost::ProstCodec::default();
7262            let path = http::uri::PathAndQuery::from_static(
7263                "/google.cloud.sql.v1.SqlInstancesService/ListServerCertificates",
7264            );
7265            let mut req = request.into_request();
7266            req.extensions_mut()
7267                .insert(
7268                    GrpcMethod::new(
7269                        "google.cloud.sql.v1.SqlInstancesService",
7270                        "ListServerCertificates",
7271                    ),
7272                );
7273            self.inner.unary(req, path, codec).await
7274        }
7275        /// Lists all versions of EntraID certificates for the specified instance.
7276        /// There can be up to three sets of certificates listed: the certificate that
7277        /// is currently in use, a future that has been added but not yet used to sign
7278        /// a certificate, and a certificate that has been rotated out.
7279        pub async fn list_entra_id_certificates(
7280            &mut self,
7281            request: impl tonic::IntoRequest<
7282                super::SqlInstancesListEntraIdCertificatesRequest,
7283            >,
7284        ) -> std::result::Result<
7285            tonic::Response<super::InstancesListEntraIdCertificatesResponse>,
7286            tonic::Status,
7287        > {
7288            self.inner
7289                .ready()
7290                .await
7291                .map_err(|e| {
7292                    tonic::Status::unknown(
7293                        format!("Service was not ready: {}", e.into()),
7294                    )
7295                })?;
7296            let codec = tonic_prost::ProstCodec::default();
7297            let path = http::uri::PathAndQuery::from_static(
7298                "/google.cloud.sql.v1.SqlInstancesService/ListEntraIdCertificates",
7299            );
7300            let mut req = request.into_request();
7301            req.extensions_mut()
7302                .insert(
7303                    GrpcMethod::new(
7304                        "google.cloud.sql.v1.SqlInstancesService",
7305                        "ListEntraIdCertificates",
7306                    ),
7307                );
7308            self.inner.unary(req, path, codec).await
7309        }
7310        /// Partially updates settings of a Cloud SQL instance by merging the request
7311        /// with the current configuration. This method supports patch semantics.
7312        pub async fn patch(
7313            &mut self,
7314            request: impl tonic::IntoRequest<super::SqlInstancesPatchRequest>,
7315        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7316            self.inner
7317                .ready()
7318                .await
7319                .map_err(|e| {
7320                    tonic::Status::unknown(
7321                        format!("Service was not ready: {}", e.into()),
7322                    )
7323                })?;
7324            let codec = tonic_prost::ProstCodec::default();
7325            let path = http::uri::PathAndQuery::from_static(
7326                "/google.cloud.sql.v1.SqlInstancesService/Patch",
7327            );
7328            let mut req = request.into_request();
7329            req.extensions_mut()
7330                .insert(
7331                    GrpcMethod::new("google.cloud.sql.v1.SqlInstancesService", "Patch"),
7332                );
7333            self.inner.unary(req, path, codec).await
7334        }
7335        /// Promotes the read replica instance to be an independent Cloud SQL
7336        /// primary instance.
7337        /// Using this operation might cause your instance to restart.
7338        pub async fn promote_replica(
7339            &mut self,
7340            request: impl tonic::IntoRequest<super::SqlInstancesPromoteReplicaRequest>,
7341        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7342            self.inner
7343                .ready()
7344                .await
7345                .map_err(|e| {
7346                    tonic::Status::unknown(
7347                        format!("Service was not ready: {}", e.into()),
7348                    )
7349                })?;
7350            let codec = tonic_prost::ProstCodec::default();
7351            let path = http::uri::PathAndQuery::from_static(
7352                "/google.cloud.sql.v1.SqlInstancesService/PromoteReplica",
7353            );
7354            let mut req = request.into_request();
7355            req.extensions_mut()
7356                .insert(
7357                    GrpcMethod::new(
7358                        "google.cloud.sql.v1.SqlInstancesService",
7359                        "PromoteReplica",
7360                    ),
7361                );
7362            self.inner.unary(req, path, codec).await
7363        }
7364        /// Switches over from the primary instance to the DR replica
7365        /// instance.
7366        pub async fn switchover(
7367            &mut self,
7368            request: impl tonic::IntoRequest<super::SqlInstancesSwitchoverRequest>,
7369        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7370            self.inner
7371                .ready()
7372                .await
7373                .map_err(|e| {
7374                    tonic::Status::unknown(
7375                        format!("Service was not ready: {}", e.into()),
7376                    )
7377                })?;
7378            let codec = tonic_prost::ProstCodec::default();
7379            let path = http::uri::PathAndQuery::from_static(
7380                "/google.cloud.sql.v1.SqlInstancesService/Switchover",
7381            );
7382            let mut req = request.into_request();
7383            req.extensions_mut()
7384                .insert(
7385                    GrpcMethod::new(
7386                        "google.cloud.sql.v1.SqlInstancesService",
7387                        "Switchover",
7388                    ),
7389                );
7390            self.inner.unary(req, path, codec).await
7391        }
7392        /// Deletes all client certificates and generates a new server SSL certificate
7393        /// for the instance.
7394        pub async fn reset_ssl_config(
7395            &mut self,
7396            request: impl tonic::IntoRequest<super::SqlInstancesResetSslConfigRequest>,
7397        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7398            self.inner
7399                .ready()
7400                .await
7401                .map_err(|e| {
7402                    tonic::Status::unknown(
7403                        format!("Service was not ready: {}", e.into()),
7404                    )
7405                })?;
7406            let codec = tonic_prost::ProstCodec::default();
7407            let path = http::uri::PathAndQuery::from_static(
7408                "/google.cloud.sql.v1.SqlInstancesService/ResetSslConfig",
7409            );
7410            let mut req = request.into_request();
7411            req.extensions_mut()
7412                .insert(
7413                    GrpcMethod::new(
7414                        "google.cloud.sql.v1.SqlInstancesService",
7415                        "ResetSslConfig",
7416                    ),
7417                );
7418            self.inner.unary(req, path, codec).await
7419        }
7420        /// Restarts a Cloud SQL instance.
7421        pub async fn restart(
7422            &mut self,
7423            request: impl tonic::IntoRequest<super::SqlInstancesRestartRequest>,
7424        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7425            self.inner
7426                .ready()
7427                .await
7428                .map_err(|e| {
7429                    tonic::Status::unknown(
7430                        format!("Service was not ready: {}", e.into()),
7431                    )
7432                })?;
7433            let codec = tonic_prost::ProstCodec::default();
7434            let path = http::uri::PathAndQuery::from_static(
7435                "/google.cloud.sql.v1.SqlInstancesService/Restart",
7436            );
7437            let mut req = request.into_request();
7438            req.extensions_mut()
7439                .insert(
7440                    GrpcMethod::new("google.cloud.sql.v1.SqlInstancesService", "Restart"),
7441                );
7442            self.inner.unary(req, path, codec).await
7443        }
7444        /// Restores a backup of a Cloud SQL instance. Using this operation might cause
7445        /// your instance to restart.
7446        pub async fn restore_backup(
7447            &mut self,
7448            request: impl tonic::IntoRequest<super::SqlInstancesRestoreBackupRequest>,
7449        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7450            self.inner
7451                .ready()
7452                .await
7453                .map_err(|e| {
7454                    tonic::Status::unknown(
7455                        format!("Service was not ready: {}", e.into()),
7456                    )
7457                })?;
7458            let codec = tonic_prost::ProstCodec::default();
7459            let path = http::uri::PathAndQuery::from_static(
7460                "/google.cloud.sql.v1.SqlInstancesService/RestoreBackup",
7461            );
7462            let mut req = request.into_request();
7463            req.extensions_mut()
7464                .insert(
7465                    GrpcMethod::new(
7466                        "google.cloud.sql.v1.SqlInstancesService",
7467                        "RestoreBackup",
7468                    ),
7469                );
7470            self.inner.unary(req, path, codec).await
7471        }
7472        /// Rotates the server certificate to one signed by the Certificate Authority
7473        /// (CA) version previously added with the addServerCA method. For instances
7474        /// that have enabled Certificate Authority Service (CAS) based server CA,
7475        /// use RotateServerCertificate to rotate the server certificate.
7476        pub async fn rotate_server_ca(
7477            &mut self,
7478            request: impl tonic::IntoRequest<super::SqlInstancesRotateServerCaRequest>,
7479        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7480            self.inner
7481                .ready()
7482                .await
7483                .map_err(|e| {
7484                    tonic::Status::unknown(
7485                        format!("Service was not ready: {}", e.into()),
7486                    )
7487                })?;
7488            let codec = tonic_prost::ProstCodec::default();
7489            let path = http::uri::PathAndQuery::from_static(
7490                "/google.cloud.sql.v1.SqlInstancesService/RotateServerCa",
7491            );
7492            let mut req = request.into_request();
7493            req.extensions_mut()
7494                .insert(
7495                    GrpcMethod::new(
7496                        "google.cloud.sql.v1.SqlInstancesService",
7497                        "RotateServerCa",
7498                    ),
7499                );
7500            self.inner.unary(req, path, codec).await
7501        }
7502        /// Rotates the server certificate version to one previously added with the
7503        /// addServerCertificate method. For instances not using Certificate Authority
7504        /// Service (CAS) server CA, use RotateServerCa instead.
7505        pub async fn rotate_server_certificate(
7506            &mut self,
7507            request: impl tonic::IntoRequest<
7508                super::SqlInstancesRotateServerCertificateRequest,
7509            >,
7510        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7511            self.inner
7512                .ready()
7513                .await
7514                .map_err(|e| {
7515                    tonic::Status::unknown(
7516                        format!("Service was not ready: {}", e.into()),
7517                    )
7518                })?;
7519            let codec = tonic_prost::ProstCodec::default();
7520            let path = http::uri::PathAndQuery::from_static(
7521                "/google.cloud.sql.v1.SqlInstancesService/RotateServerCertificate",
7522            );
7523            let mut req = request.into_request();
7524            req.extensions_mut()
7525                .insert(
7526                    GrpcMethod::new(
7527                        "google.cloud.sql.v1.SqlInstancesService",
7528                        "RotateServerCertificate",
7529                    ),
7530                );
7531            self.inner.unary(req, path, codec).await
7532        }
7533        /// Rotates the server certificate version to one previously added with the
7534        /// addEntraIdCertificate method.
7535        pub async fn rotate_entra_id_certificate(
7536            &mut self,
7537            request: impl tonic::IntoRequest<
7538                super::SqlInstancesRotateEntraIdCertificateRequest,
7539            >,
7540        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7541            self.inner
7542                .ready()
7543                .await
7544                .map_err(|e| {
7545                    tonic::Status::unknown(
7546                        format!("Service was not ready: {}", e.into()),
7547                    )
7548                })?;
7549            let codec = tonic_prost::ProstCodec::default();
7550            let path = http::uri::PathAndQuery::from_static(
7551                "/google.cloud.sql.v1.SqlInstancesService/RotateEntraIdCertificate",
7552            );
7553            let mut req = request.into_request();
7554            req.extensions_mut()
7555                .insert(
7556                    GrpcMethod::new(
7557                        "google.cloud.sql.v1.SqlInstancesService",
7558                        "RotateEntraIdCertificate",
7559                    ),
7560                );
7561            self.inner.unary(req, path, codec).await
7562        }
7563        /// Starts the replication in the read replica instance.
7564        pub async fn start_replica(
7565            &mut self,
7566            request: impl tonic::IntoRequest<super::SqlInstancesStartReplicaRequest>,
7567        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7568            self.inner
7569                .ready()
7570                .await
7571                .map_err(|e| {
7572                    tonic::Status::unknown(
7573                        format!("Service was not ready: {}", e.into()),
7574                    )
7575                })?;
7576            let codec = tonic_prost::ProstCodec::default();
7577            let path = http::uri::PathAndQuery::from_static(
7578                "/google.cloud.sql.v1.SqlInstancesService/StartReplica",
7579            );
7580            let mut req = request.into_request();
7581            req.extensions_mut()
7582                .insert(
7583                    GrpcMethod::new(
7584                        "google.cloud.sql.v1.SqlInstancesService",
7585                        "StartReplica",
7586                    ),
7587                );
7588            self.inner.unary(req, path, codec).await
7589        }
7590        /// Stops the replication in the read replica instance.
7591        pub async fn stop_replica(
7592            &mut self,
7593            request: impl tonic::IntoRequest<super::SqlInstancesStopReplicaRequest>,
7594        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7595            self.inner
7596                .ready()
7597                .await
7598                .map_err(|e| {
7599                    tonic::Status::unknown(
7600                        format!("Service was not ready: {}", e.into()),
7601                    )
7602                })?;
7603            let codec = tonic_prost::ProstCodec::default();
7604            let path = http::uri::PathAndQuery::from_static(
7605                "/google.cloud.sql.v1.SqlInstancesService/StopReplica",
7606            );
7607            let mut req = request.into_request();
7608            req.extensions_mut()
7609                .insert(
7610                    GrpcMethod::new(
7611                        "google.cloud.sql.v1.SqlInstancesService",
7612                        "StopReplica",
7613                    ),
7614                );
7615            self.inner.unary(req, path, codec).await
7616        }
7617        /// Truncate MySQL general and slow query log tables
7618        /// MySQL only.
7619        pub async fn truncate_log(
7620            &mut self,
7621            request: impl tonic::IntoRequest<super::SqlInstancesTruncateLogRequest>,
7622        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7623            self.inner
7624                .ready()
7625                .await
7626                .map_err(|e| {
7627                    tonic::Status::unknown(
7628                        format!("Service was not ready: {}", e.into()),
7629                    )
7630                })?;
7631            let codec = tonic_prost::ProstCodec::default();
7632            let path = http::uri::PathAndQuery::from_static(
7633                "/google.cloud.sql.v1.SqlInstancesService/TruncateLog",
7634            );
7635            let mut req = request.into_request();
7636            req.extensions_mut()
7637                .insert(
7638                    GrpcMethod::new(
7639                        "google.cloud.sql.v1.SqlInstancesService",
7640                        "TruncateLog",
7641                    ),
7642                );
7643            self.inner.unary(req, path, codec).await
7644        }
7645        /// Updates settings of a Cloud SQL instance. Using this operation might cause
7646        /// your instance to restart.
7647        pub async fn update(
7648            &mut self,
7649            request: impl tonic::IntoRequest<super::SqlInstancesUpdateRequest>,
7650        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7651            self.inner
7652                .ready()
7653                .await
7654                .map_err(|e| {
7655                    tonic::Status::unknown(
7656                        format!("Service was not ready: {}", e.into()),
7657                    )
7658                })?;
7659            let codec = tonic_prost::ProstCodec::default();
7660            let path = http::uri::PathAndQuery::from_static(
7661                "/google.cloud.sql.v1.SqlInstancesService/Update",
7662            );
7663            let mut req = request.into_request();
7664            req.extensions_mut()
7665                .insert(
7666                    GrpcMethod::new("google.cloud.sql.v1.SqlInstancesService", "Update"),
7667                );
7668            self.inner.unary(req, path, codec).await
7669        }
7670        /// Generates a short-lived X509 certificate containing the provided public key
7671        /// and signed by a private key specific to the target instance. Users may use
7672        /// the certificate to authenticate as themselves when connecting to the
7673        /// database.
7674        pub async fn create_ephemeral(
7675            &mut self,
7676            request: impl tonic::IntoRequest<
7677                super::SqlInstancesCreateEphemeralCertRequest,
7678            >,
7679        ) -> std::result::Result<tonic::Response<super::SslCert>, tonic::Status> {
7680            self.inner
7681                .ready()
7682                .await
7683                .map_err(|e| {
7684                    tonic::Status::unknown(
7685                        format!("Service was not ready: {}", e.into()),
7686                    )
7687                })?;
7688            let codec = tonic_prost::ProstCodec::default();
7689            let path = http::uri::PathAndQuery::from_static(
7690                "/google.cloud.sql.v1.SqlInstancesService/CreateEphemeral",
7691            );
7692            let mut req = request.into_request();
7693            req.extensions_mut()
7694                .insert(
7695                    GrpcMethod::new(
7696                        "google.cloud.sql.v1.SqlInstancesService",
7697                        "CreateEphemeral",
7698                    ),
7699                );
7700            self.inner.unary(req, path, codec).await
7701        }
7702        /// Reschedules the maintenance on the given instance.
7703        pub async fn reschedule_maintenance(
7704            &mut self,
7705            request: impl tonic::IntoRequest<
7706                super::SqlInstancesRescheduleMaintenanceRequest,
7707            >,
7708        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7709            self.inner
7710                .ready()
7711                .await
7712                .map_err(|e| {
7713                    tonic::Status::unknown(
7714                        format!("Service was not ready: {}", e.into()),
7715                    )
7716                })?;
7717            let codec = tonic_prost::ProstCodec::default();
7718            let path = http::uri::PathAndQuery::from_static(
7719                "/google.cloud.sql.v1.SqlInstancesService/RescheduleMaintenance",
7720            );
7721            let mut req = request.into_request();
7722            req.extensions_mut()
7723                .insert(
7724                    GrpcMethod::new(
7725                        "google.cloud.sql.v1.SqlInstancesService",
7726                        "RescheduleMaintenance",
7727                    ),
7728                );
7729            self.inner.unary(req, path, codec).await
7730        }
7731        /// Verify External primary instance external sync settings.
7732        pub async fn verify_external_sync_settings(
7733            &mut self,
7734            request: impl tonic::IntoRequest<
7735                super::SqlInstancesVerifyExternalSyncSettingsRequest,
7736            >,
7737        ) -> std::result::Result<
7738            tonic::Response<super::SqlInstancesVerifyExternalSyncSettingsResponse>,
7739            tonic::Status,
7740        > {
7741            self.inner
7742                .ready()
7743                .await
7744                .map_err(|e| {
7745                    tonic::Status::unknown(
7746                        format!("Service was not ready: {}", e.into()),
7747                    )
7748                })?;
7749            let codec = tonic_prost::ProstCodec::default();
7750            let path = http::uri::PathAndQuery::from_static(
7751                "/google.cloud.sql.v1.SqlInstancesService/VerifyExternalSyncSettings",
7752            );
7753            let mut req = request.into_request();
7754            req.extensions_mut()
7755                .insert(
7756                    GrpcMethod::new(
7757                        "google.cloud.sql.v1.SqlInstancesService",
7758                        "VerifyExternalSyncSettings",
7759                    ),
7760                );
7761            self.inner.unary(req, path, codec).await
7762        }
7763        /// Start External primary instance migration.
7764        pub async fn start_external_sync(
7765            &mut self,
7766            request: impl tonic::IntoRequest<super::SqlInstancesStartExternalSyncRequest>,
7767        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7768            self.inner
7769                .ready()
7770                .await
7771                .map_err(|e| {
7772                    tonic::Status::unknown(
7773                        format!("Service was not ready: {}", e.into()),
7774                    )
7775                })?;
7776            let codec = tonic_prost::ProstCodec::default();
7777            let path = http::uri::PathAndQuery::from_static(
7778                "/google.cloud.sql.v1.SqlInstancesService/StartExternalSync",
7779            );
7780            let mut req = request.into_request();
7781            req.extensions_mut()
7782                .insert(
7783                    GrpcMethod::new(
7784                        "google.cloud.sql.v1.SqlInstancesService",
7785                        "StartExternalSync",
7786                    ),
7787                );
7788            self.inner.unary(req, path, codec).await
7789        }
7790        /// Perform Disk Shrink on primary instance.
7791        pub async fn perform_disk_shrink(
7792            &mut self,
7793            request: impl tonic::IntoRequest<super::SqlInstancesPerformDiskShrinkRequest>,
7794        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7795            self.inner
7796                .ready()
7797                .await
7798                .map_err(|e| {
7799                    tonic::Status::unknown(
7800                        format!("Service was not ready: {}", e.into()),
7801                    )
7802                })?;
7803            let codec = tonic_prost::ProstCodec::default();
7804            let path = http::uri::PathAndQuery::from_static(
7805                "/google.cloud.sql.v1.SqlInstancesService/PerformDiskShrink",
7806            );
7807            let mut req = request.into_request();
7808            req.extensions_mut()
7809                .insert(
7810                    GrpcMethod::new(
7811                        "google.cloud.sql.v1.SqlInstancesService",
7812                        "PerformDiskShrink",
7813                    ),
7814                );
7815            self.inner.unary(req, path, codec).await
7816        }
7817        /// Get Disk Shrink Config for a given instance.
7818        pub async fn get_disk_shrink_config(
7819            &mut self,
7820            request: impl tonic::IntoRequest<
7821                super::SqlInstancesGetDiskShrinkConfigRequest,
7822            >,
7823        ) -> std::result::Result<
7824            tonic::Response<super::SqlInstancesGetDiskShrinkConfigResponse>,
7825            tonic::Status,
7826        > {
7827            self.inner
7828                .ready()
7829                .await
7830                .map_err(|e| {
7831                    tonic::Status::unknown(
7832                        format!("Service was not ready: {}", e.into()),
7833                    )
7834                })?;
7835            let codec = tonic_prost::ProstCodec::default();
7836            let path = http::uri::PathAndQuery::from_static(
7837                "/google.cloud.sql.v1.SqlInstancesService/GetDiskShrinkConfig",
7838            );
7839            let mut req = request.into_request();
7840            req.extensions_mut()
7841                .insert(
7842                    GrpcMethod::new(
7843                        "google.cloud.sql.v1.SqlInstancesService",
7844                        "GetDiskShrinkConfig",
7845                    ),
7846                );
7847            self.inner.unary(req, path, codec).await
7848        }
7849        /// Reset Replica Size to primary instance disk size.
7850        pub async fn reset_replica_size(
7851            &mut self,
7852            request: impl tonic::IntoRequest<super::SqlInstancesResetReplicaSizeRequest>,
7853        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
7854            self.inner
7855                .ready()
7856                .await
7857                .map_err(|e| {
7858                    tonic::Status::unknown(
7859                        format!("Service was not ready: {}", e.into()),
7860                    )
7861                })?;
7862            let codec = tonic_prost::ProstCodec::default();
7863            let path = http::uri::PathAndQuery::from_static(
7864                "/google.cloud.sql.v1.SqlInstancesService/ResetReplicaSize",
7865            );
7866            let mut req = request.into_request();
7867            req.extensions_mut()
7868                .insert(
7869                    GrpcMethod::new(
7870                        "google.cloud.sql.v1.SqlInstancesService",
7871                        "ResetReplicaSize",
7872                    ),
7873                );
7874            self.inner.unary(req, path, codec).await
7875        }
7876        /// Get Latest Recovery Time for a given instance.
7877        pub async fn get_latest_recovery_time(
7878            &mut self,
7879            request: impl tonic::IntoRequest<
7880                super::SqlInstancesGetLatestRecoveryTimeRequest,
7881            >,
7882        ) -> std::result::Result<
7883            tonic::Response<super::SqlInstancesGetLatestRecoveryTimeResponse>,
7884            tonic::Status,
7885        > {
7886            self.inner
7887                .ready()
7888                .await
7889                .map_err(|e| {
7890                    tonic::Status::unknown(
7891                        format!("Service was not ready: {}", e.into()),
7892                    )
7893                })?;
7894            let codec = tonic_prost::ProstCodec::default();
7895            let path = http::uri::PathAndQuery::from_static(
7896                "/google.cloud.sql.v1.SqlInstancesService/GetLatestRecoveryTime",
7897            );
7898            let mut req = request.into_request();
7899            req.extensions_mut()
7900                .insert(
7901                    GrpcMethod::new(
7902                        "google.cloud.sql.v1.SqlInstancesService",
7903                        "GetLatestRecoveryTime",
7904                    ),
7905                );
7906            self.inner.unary(req, path, codec).await
7907        }
7908        /// Execute SQL statements.
7909        pub async fn execute_sql(
7910            &mut self,
7911            request: impl tonic::IntoRequest<super::SqlInstancesExecuteSqlRequest>,
7912        ) -> std::result::Result<
7913            tonic::Response<super::SqlInstancesExecuteSqlResponse>,
7914            tonic::Status,
7915        > {
7916            self.inner
7917                .ready()
7918                .await
7919                .map_err(|e| {
7920                    tonic::Status::unknown(
7921                        format!("Service was not ready: {}", e.into()),
7922                    )
7923                })?;
7924            let codec = tonic_prost::ProstCodec::default();
7925            let path = http::uri::PathAndQuery::from_static(
7926                "/google.cloud.sql.v1.SqlInstancesService/ExecuteSql",
7927            );
7928            let mut req = request.into_request();
7929            req.extensions_mut()
7930                .insert(
7931                    GrpcMethod::new(
7932                        "google.cloud.sql.v1.SqlInstancesService",
7933                        "ExecuteSql",
7934                    ),
7935                );
7936            self.inner.unary(req, path, codec).await
7937        }
7938        /// Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
7939        pub async fn acquire_ssrs_lease(
7940            &mut self,
7941            request: impl tonic::IntoRequest<super::SqlInstancesAcquireSsrsLeaseRequest>,
7942        ) -> std::result::Result<
7943            tonic::Response<super::SqlInstancesAcquireSsrsLeaseResponse>,
7944            tonic::Status,
7945        > {
7946            self.inner
7947                .ready()
7948                .await
7949                .map_err(|e| {
7950                    tonic::Status::unknown(
7951                        format!("Service was not ready: {}", e.into()),
7952                    )
7953                })?;
7954            let codec = tonic_prost::ProstCodec::default();
7955            let path = http::uri::PathAndQuery::from_static(
7956                "/google.cloud.sql.v1.SqlInstancesService/AcquireSsrsLease",
7957            );
7958            let mut req = request.into_request();
7959            req.extensions_mut()
7960                .insert(
7961                    GrpcMethod::new(
7962                        "google.cloud.sql.v1.SqlInstancesService",
7963                        "AcquireSsrsLease",
7964                    ),
7965                );
7966            self.inner.unary(req, path, codec).await
7967        }
7968        /// Release a lease for the setup of SQL Server Reporting Services (SSRS).
7969        pub async fn release_ssrs_lease(
7970            &mut self,
7971            request: impl tonic::IntoRequest<super::SqlInstancesReleaseSsrsLeaseRequest>,
7972        ) -> std::result::Result<
7973            tonic::Response<super::SqlInstancesReleaseSsrsLeaseResponse>,
7974            tonic::Status,
7975        > {
7976            self.inner
7977                .ready()
7978                .await
7979                .map_err(|e| {
7980                    tonic::Status::unknown(
7981                        format!("Service was not ready: {}", e.into()),
7982                    )
7983                })?;
7984            let codec = tonic_prost::ProstCodec::default();
7985            let path = http::uri::PathAndQuery::from_static(
7986                "/google.cloud.sql.v1.SqlInstancesService/ReleaseSsrsLease",
7987            );
7988            let mut req = request.into_request();
7989            req.extensions_mut()
7990                .insert(
7991                    GrpcMethod::new(
7992                        "google.cloud.sql.v1.SqlInstancesService",
7993                        "ReleaseSsrsLease",
7994                    ),
7995                );
7996            self.inner.unary(req, path, codec).await
7997        }
7998        /// Execute MVU Pre-checks
7999        pub async fn pre_check_major_version_upgrade(
8000            &mut self,
8001            request: impl tonic::IntoRequest<
8002                super::SqlInstancesPreCheckMajorVersionUpgradeRequest,
8003            >,
8004        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8005            self.inner
8006                .ready()
8007                .await
8008                .map_err(|e| {
8009                    tonic::Status::unknown(
8010                        format!("Service was not ready: {}", e.into()),
8011                    )
8012                })?;
8013            let codec = tonic_prost::ProstCodec::default();
8014            let path = http::uri::PathAndQuery::from_static(
8015                "/google.cloud.sql.v1.SqlInstancesService/PreCheckMajorVersionUpgrade",
8016            );
8017            let mut req = request.into_request();
8018            req.extensions_mut()
8019                .insert(
8020                    GrpcMethod::new(
8021                        "google.cloud.sql.v1.SqlInstancesService",
8022                        "PreCheckMajorVersionUpgrade",
8023                    ),
8024                );
8025            self.inner.unary(req, path, codec).await
8026        }
8027        /// Point in time restore for an instance managed by Google Cloud Backup and
8028        /// Disaster Recovery.
8029        pub async fn point_in_time_restore(
8030            &mut self,
8031            request: impl tonic::IntoRequest<
8032                super::SqlInstancesPointInTimeRestoreRequest,
8033            >,
8034        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8035            self.inner
8036                .ready()
8037                .await
8038                .map_err(|e| {
8039                    tonic::Status::unknown(
8040                        format!("Service was not ready: {}", e.into()),
8041                    )
8042                })?;
8043            let codec = tonic_prost::ProstCodec::default();
8044            let path = http::uri::PathAndQuery::from_static(
8045                "/google.cloud.sql.v1.SqlInstancesService/PointInTimeRestore",
8046            );
8047            let mut req = request.into_request();
8048            req.extensions_mut()
8049                .insert(
8050                    GrpcMethod::new(
8051                        "google.cloud.sql.v1.SqlInstancesService",
8052                        "PointInTimeRestore",
8053                    ),
8054                );
8055            self.inner.unary(req, path, codec).await
8056        }
8057    }
8058}
8059/// The request payload to create the backup
8060#[derive(Clone, PartialEq, ::prost::Message)]
8061pub struct CreateBackupRequest {
8062    /// Required. The parent resource where this backup is created.
8063    /// Format: projects/{project}
8064    #[prost(string, tag = "1")]
8065    pub parent: ::prost::alloc::string::String,
8066    /// Required. The Backup to create.
8067    #[prost(message, optional, tag = "2")]
8068    pub backup: ::core::option::Option<Backup>,
8069}
8070/// The request payload to get the backup.
8071#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8072pub struct GetBackupRequest {
8073    /// Required. The name of the backup to retrieve.
8074    /// Format: projects/{project}/backups/{backup}
8075    #[prost(string, tag = "1")]
8076    pub name: ::prost::alloc::string::String,
8077}
8078/// The request payload to list the backups.
8079#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8080pub struct ListBackupsRequest {
8081    /// Required. The parent that owns this collection of backups.
8082    /// Format: projects/{project}
8083    #[prost(string, tag = "1")]
8084    pub parent: ::prost::alloc::string::String,
8085    /// The maximum number of backups to return per response. The service might
8086    /// return fewer backups than this value. If a value for this parameter isn't
8087    /// specified, then, at most, 500 backups are returned. The maximum value is
8088    /// 2,000. Any values that you set, which are greater than 2,000, are changed
8089    /// to 2,000.
8090    #[prost(int32, tag = "2")]
8091    pub page_size: i32,
8092    /// A page token, received from a previous `ListBackups` call.
8093    /// Provide this to retrieve the subsequent page.
8094    ///
8095    /// When paginating, all other parameters provided to `ListBackups` must match
8096    /// the call that provided the page token.
8097    #[prost(string, tag = "3")]
8098    pub page_token: ::prost::alloc::string::String,
8099    /// Multiple filter queries are separated by spaces. For example,
8100    /// 'instance:abc AND type:FINAL, 'location:us',
8101    /// 'backupInterval.startTime>=1950-01-01T01:01:25.771Z'. You can filter by
8102    /// type, instance, backupInterval.startTime (creation time), or location.
8103    #[prost(string, tag = "4")]
8104    pub filter: ::prost::alloc::string::String,
8105}
8106/// The response payload containing a list of the backups.
8107#[derive(Clone, PartialEq, ::prost::Message)]
8108pub struct ListBackupsResponse {
8109    /// A list of backups.
8110    #[prost(message, repeated, tag = "1")]
8111    pub backups: ::prost::alloc::vec::Vec<Backup>,
8112    /// A token, which can be sent as `page_token` to retrieve the next page.
8113    /// If this field is omitted, then there aren't subsequent pages.
8114    #[prost(string, tag = "2")]
8115    pub next_page_token: ::prost::alloc::string::String,
8116    /// If a region isn't unavailable or if an unknown error occurs, then a warning
8117    /// message is returned.
8118    #[prost(message, repeated, tag = "3")]
8119    pub warnings: ::prost::alloc::vec::Vec<ApiWarning>,
8120}
8121/// The request payload to update the backup.
8122#[derive(Clone, PartialEq, ::prost::Message)]
8123pub struct UpdateBackupRequest {
8124    /// Required. The backup to update.
8125    /// The backup’s `name` field is used to identify the backup to update.
8126    /// Format: projects/{project}/backups/{backup}
8127    #[prost(message, optional, tag = "1")]
8128    pub backup: ::core::option::Option<Backup>,
8129    /// The list of fields that you can update. You can update only the description
8130    /// and retention period of the final backup.
8131    #[prost(message, optional, tag = "2")]
8132    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
8133}
8134/// The request payload to delete the backup.
8135#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8136pub struct DeleteBackupRequest {
8137    /// Required. The name of the backup to delete.
8138    /// Format: projects/{project}/backups/{backup}
8139    #[prost(string, tag = "1")]
8140    pub name: ::prost::alloc::string::String,
8141}
8142/// A backup resource.
8143#[derive(Clone, PartialEq, ::prost::Message)]
8144pub struct Backup {
8145    /// Output only. The resource name of the backup.
8146    /// Format: projects/{project}/backups/{backup}.
8147    #[prost(string, tag = "1")]
8148    pub name: ::prost::alloc::string::String,
8149    /// Output only. This is always `sql#backup`.
8150    #[prost(string, tag = "2")]
8151    pub kind: ::prost::alloc::string::String,
8152    /// Output only. The URI of this resource.
8153    #[prost(string, tag = "3")]
8154    pub self_link: ::prost::alloc::string::String,
8155    /// Output only. The type of this backup. The type can be "AUTOMATED",
8156    /// "ON_DEMAND" or “FINAL”.
8157    #[prost(enumeration = "backup::SqlBackupType", tag = "4")]
8158    pub r#type: i32,
8159    /// The description of this backup.
8160    #[prost(string, tag = "5")]
8161    pub description: ::prost::alloc::string::String,
8162    /// The name of the source database instance.
8163    #[prost(string, tag = "6")]
8164    pub instance: ::prost::alloc::string::String,
8165    /// The storage location of the backups. The location can be multi-regional.
8166    #[prost(string, tag = "7")]
8167    pub location: ::prost::alloc::string::String,
8168    /// Output only. This output contains the following values:
8169    /// start_time: All database writes up to this time are available.
8170    /// end_time: Any database writes after this time aren't available.
8171    #[prost(message, optional, tag = "8")]
8172    pub backup_interval: ::core::option::Option<super::super::super::r#type::Interval>,
8173    /// Output only. The status of this backup.
8174    #[prost(enumeration = "backup::SqlBackupState", tag = "9")]
8175    pub state: i32,
8176    /// Output only. Information about why the backup operation fails (for example,
8177    /// when the backup state fails).
8178    #[prost(message, optional, tag = "10")]
8179    pub error: ::core::option::Option<OperationError>,
8180    /// Output only. This output contains the encryption configuration for a backup
8181    /// and the resource name of the KMS key for disk encryption.
8182    #[prost(string, tag = "11")]
8183    pub kms_key: ::prost::alloc::string::String,
8184    /// Output only. This output contains the encryption status for a backup and
8185    /// the version of the KMS key that's used to encrypt the Cloud SQL instance.
8186    #[prost(string, tag = "12")]
8187    pub kms_key_version: ::prost::alloc::string::String,
8188    /// Output only. Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
8189    #[prost(enumeration = "SqlBackupKind", tag = "13")]
8190    pub backup_kind: i32,
8191    /// Output only. This output contains a backup time zone. If a Cloud SQL for
8192    /// SQL Server instance has a different time zone from the backup's time zone,
8193    /// then the restore to the instance doesn't happen.
8194    #[prost(string, tag = "15")]
8195    pub time_zone: ::prost::alloc::string::String,
8196    /// Output only. The database version of the instance of at the time this
8197    /// backup was made.
8198    #[prost(enumeration = "SqlDatabaseVersion", tag = "20")]
8199    pub database_version: i32,
8200    /// Output only. The maximum chargeable bytes for the backup.
8201    #[prost(int64, optional, tag = "23")]
8202    pub max_chargeable_bytes: ::core::option::Option<i64>,
8203    /// Optional. Output only. Timestamp in UTC of when the instance associated
8204    /// with this backup is deleted.
8205    #[prost(message, optional, tag = "24")]
8206    pub instance_deletion_time: ::core::option::Option<::prost_types::Timestamp>,
8207    /// Optional. Output only. The instance setting of the source instance that's
8208    /// associated with this backup.
8209    #[prost(message, optional, tag = "25")]
8210    pub instance_settings: ::core::option::Option<DatabaseInstance>,
8211    /// Output only. The mapping to backup run resource used for IAM validations.
8212    #[prost(string, tag = "26")]
8213    pub backup_run: ::prost::alloc::string::String,
8214    /// Output only. This status indicates whether the backup satisfies PZS.
8215    ///
8216    /// The status is reserved for future use.
8217    #[prost(message, optional, tag = "27")]
8218    pub satisfies_pzs: ::core::option::Option<bool>,
8219    /// Output only. This status indicates whether the backup satisfies PZI.
8220    ///
8221    /// The status is reserved for future use.
8222    #[prost(message, optional, tag = "28")]
8223    pub satisfies_pzi: ::core::option::Option<bool>,
8224    #[prost(oneof = "backup::Expiration", tags = "16, 17")]
8225    pub expiration: ::core::option::Option<backup::Expiration>,
8226}
8227/// Nested message and enum types in `Backup`.
8228pub mod backup {
8229    /// The backup type.
8230    #[derive(
8231        Clone,
8232        Copy,
8233        Debug,
8234        PartialEq,
8235        Eq,
8236        Hash,
8237        PartialOrd,
8238        Ord,
8239        ::prost::Enumeration
8240    )]
8241    #[repr(i32)]
8242    pub enum SqlBackupType {
8243        /// This is an unknown backup type.
8244        Unspecified = 0,
8245        /// The backup schedule triggers a backup automatically.
8246        Automated = 1,
8247        /// The user triggers a backup manually.
8248        OnDemand = 2,
8249        /// The backup created when instance is deleted.
8250        Final = 3,
8251    }
8252    impl SqlBackupType {
8253        /// String value of the enum field names used in the ProtoBuf definition.
8254        ///
8255        /// The values are not transformed in any way and thus are considered stable
8256        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
8257        pub fn as_str_name(&self) -> &'static str {
8258            match self {
8259                Self::Unspecified => "SQL_BACKUP_TYPE_UNSPECIFIED",
8260                Self::Automated => "AUTOMATED",
8261                Self::OnDemand => "ON_DEMAND",
8262                Self::Final => "FINAL",
8263            }
8264        }
8265        /// Creates an enum from field names used in the ProtoBuf definition.
8266        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
8267            match value {
8268                "SQL_BACKUP_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
8269                "AUTOMATED" => Some(Self::Automated),
8270                "ON_DEMAND" => Some(Self::OnDemand),
8271                "FINAL" => Some(Self::Final),
8272                _ => None,
8273            }
8274        }
8275    }
8276    /// The backup's state
8277    #[derive(
8278        Clone,
8279        Copy,
8280        Debug,
8281        PartialEq,
8282        Eq,
8283        Hash,
8284        PartialOrd,
8285        Ord,
8286        ::prost::Enumeration
8287    )]
8288    #[repr(i32)]
8289    pub enum SqlBackupState {
8290        /// The state of the backup is unknown.
8291        Unspecified = 0,
8292        /// The backup that's added to a queue.
8293        Enqueued = 1,
8294        /// The backup is in progress.
8295        Running = 2,
8296        /// The backup failed.
8297        Failed = 3,
8298        /// The backup is successful.
8299        Successful = 4,
8300        /// The backup is being deleted.
8301        Deleting = 5,
8302        /// Deletion of the backup failed.
8303        DeletionFailed = 6,
8304    }
8305    impl SqlBackupState {
8306        /// String value of the enum field names used in the ProtoBuf definition.
8307        ///
8308        /// The values are not transformed in any way and thus are considered stable
8309        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
8310        pub fn as_str_name(&self) -> &'static str {
8311            match self {
8312                Self::Unspecified => "SQL_BACKUP_STATE_UNSPECIFIED",
8313                Self::Enqueued => "ENQUEUED",
8314                Self::Running => "RUNNING",
8315                Self::Failed => "FAILED",
8316                Self::Successful => "SUCCESSFUL",
8317                Self::Deleting => "DELETING",
8318                Self::DeletionFailed => "DELETION_FAILED",
8319            }
8320        }
8321        /// Creates an enum from field names used in the ProtoBuf definition.
8322        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
8323            match value {
8324                "SQL_BACKUP_STATE_UNSPECIFIED" => Some(Self::Unspecified),
8325                "ENQUEUED" => Some(Self::Enqueued),
8326                "RUNNING" => Some(Self::Running),
8327                "FAILED" => Some(Self::Failed),
8328                "SUCCESSFUL" => Some(Self::Successful),
8329                "DELETING" => Some(Self::Deleting),
8330                "DELETION_FAILED" => Some(Self::DeletionFailed),
8331                _ => None,
8332            }
8333        }
8334    }
8335    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
8336    pub enum Expiration {
8337        /// Input only. The time-to-live (TTL) interval for this resource (in days).
8338        /// For example: ttlDays:7, means 7 days from the current time. The
8339        /// expiration time can't exceed 365 days from the time that the backup is
8340        /// created.
8341        #[prost(int64, tag = "16")]
8342        TtlDays(i64),
8343        /// Backup expiration time.
8344        /// A UTC timestamp of when this backup expired.
8345        #[prost(message, tag = "17")]
8346        ExpiryTime(::prost_types::Timestamp),
8347    }
8348}
8349/// Generated client implementations.
8350pub mod sql_backups_service_client {
8351    #![allow(
8352        unused_variables,
8353        dead_code,
8354        missing_docs,
8355        clippy::wildcard_imports,
8356        clippy::let_unit_value,
8357    )]
8358    use tonic::codegen::*;
8359    use tonic::codegen::http::Uri;
8360    #[derive(Debug, Clone)]
8361    pub struct SqlBackupsServiceClient<T> {
8362        inner: tonic::client::Grpc<T>,
8363    }
8364    impl<T> SqlBackupsServiceClient<T>
8365    where
8366        T: tonic::client::GrpcService<tonic::body::Body>,
8367        T::Error: Into<StdError>,
8368        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
8369        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
8370    {
8371        pub fn new(inner: T) -> Self {
8372            let inner = tonic::client::Grpc::new(inner);
8373            Self { inner }
8374        }
8375        pub fn with_origin(inner: T, origin: Uri) -> Self {
8376            let inner = tonic::client::Grpc::with_origin(inner, origin);
8377            Self { inner }
8378        }
8379        pub fn with_interceptor<F>(
8380            inner: T,
8381            interceptor: F,
8382        ) -> SqlBackupsServiceClient<InterceptedService<T, F>>
8383        where
8384            F: tonic::service::Interceptor,
8385            T::ResponseBody: Default,
8386            T: tonic::codegen::Service<
8387                http::Request<tonic::body::Body>,
8388                Response = http::Response<
8389                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
8390                >,
8391            >,
8392            <T as tonic::codegen::Service<
8393                http::Request<tonic::body::Body>,
8394            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
8395        {
8396            SqlBackupsServiceClient::new(InterceptedService::new(inner, interceptor))
8397        }
8398        /// Compress requests with the given encoding.
8399        ///
8400        /// This requires the server to support it otherwise it might respond with an
8401        /// error.
8402        #[must_use]
8403        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8404            self.inner = self.inner.send_compressed(encoding);
8405            self
8406        }
8407        /// Enable decompressing responses.
8408        #[must_use]
8409        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8410            self.inner = self.inner.accept_compressed(encoding);
8411            self
8412        }
8413        /// Limits the maximum size of a decoded message.
8414        ///
8415        /// Default: `4MB`
8416        #[must_use]
8417        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8418            self.inner = self.inner.max_decoding_message_size(limit);
8419            self
8420        }
8421        /// Limits the maximum size of an encoded message.
8422        ///
8423        /// Default: `usize::MAX`
8424        #[must_use]
8425        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8426            self.inner = self.inner.max_encoding_message_size(limit);
8427            self
8428        }
8429        /// Creates a backup for a Cloud SQL instance. This API can be used only to
8430        /// create on-demand backups.
8431        pub async fn create_backup(
8432            &mut self,
8433            request: impl tonic::IntoRequest<super::CreateBackupRequest>,
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.v1.SqlBackupsService/CreateBackup",
8446            );
8447            let mut req = request.into_request();
8448            req.extensions_mut()
8449                .insert(
8450                    GrpcMethod::new(
8451                        "google.cloud.sql.v1.SqlBackupsService",
8452                        "CreateBackup",
8453                    ),
8454                );
8455            self.inner.unary(req, path, codec).await
8456        }
8457        /// Retrieves a resource containing information about a backup.
8458        pub async fn get_backup(
8459            &mut self,
8460            request: impl tonic::IntoRequest<super::GetBackupRequest>,
8461        ) -> std::result::Result<tonic::Response<super::Backup>, tonic::Status> {
8462            self.inner
8463                .ready()
8464                .await
8465                .map_err(|e| {
8466                    tonic::Status::unknown(
8467                        format!("Service was not ready: {}", e.into()),
8468                    )
8469                })?;
8470            let codec = tonic_prost::ProstCodec::default();
8471            let path = http::uri::PathAndQuery::from_static(
8472                "/google.cloud.sql.v1.SqlBackupsService/GetBackup",
8473            );
8474            let mut req = request.into_request();
8475            req.extensions_mut()
8476                .insert(
8477                    GrpcMethod::new("google.cloud.sql.v1.SqlBackupsService", "GetBackup"),
8478                );
8479            self.inner.unary(req, path, codec).await
8480        }
8481        /// Lists all backups associated with the project.
8482        pub async fn list_backups(
8483            &mut self,
8484            request: impl tonic::IntoRequest<super::ListBackupsRequest>,
8485        ) -> std::result::Result<
8486            tonic::Response<super::ListBackupsResponse>,
8487            tonic::Status,
8488        > {
8489            self.inner
8490                .ready()
8491                .await
8492                .map_err(|e| {
8493                    tonic::Status::unknown(
8494                        format!("Service was not ready: {}", e.into()),
8495                    )
8496                })?;
8497            let codec = tonic_prost::ProstCodec::default();
8498            let path = http::uri::PathAndQuery::from_static(
8499                "/google.cloud.sql.v1.SqlBackupsService/ListBackups",
8500            );
8501            let mut req = request.into_request();
8502            req.extensions_mut()
8503                .insert(
8504                    GrpcMethod::new(
8505                        "google.cloud.sql.v1.SqlBackupsService",
8506                        "ListBackups",
8507                    ),
8508                );
8509            self.inner.unary(req, path, codec).await
8510        }
8511        /// Updates the retention period and description of the backup. You can use
8512        /// this API to update final backups only.
8513        pub async fn update_backup(
8514            &mut self,
8515            request: impl tonic::IntoRequest<super::UpdateBackupRequest>,
8516        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8517            self.inner
8518                .ready()
8519                .await
8520                .map_err(|e| {
8521                    tonic::Status::unknown(
8522                        format!("Service was not ready: {}", e.into()),
8523                    )
8524                })?;
8525            let codec = tonic_prost::ProstCodec::default();
8526            let path = http::uri::PathAndQuery::from_static(
8527                "/google.cloud.sql.v1.SqlBackupsService/UpdateBackup",
8528            );
8529            let mut req = request.into_request();
8530            req.extensions_mut()
8531                .insert(
8532                    GrpcMethod::new(
8533                        "google.cloud.sql.v1.SqlBackupsService",
8534                        "UpdateBackup",
8535                    ),
8536                );
8537            self.inner.unary(req, path, codec).await
8538        }
8539        /// Deletes the backup.
8540        pub async fn delete_backup(
8541            &mut self,
8542            request: impl tonic::IntoRequest<super::DeleteBackupRequest>,
8543        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
8544            self.inner
8545                .ready()
8546                .await
8547                .map_err(|e| {
8548                    tonic::Status::unknown(
8549                        format!("Service was not ready: {}", e.into()),
8550                    )
8551                })?;
8552            let codec = tonic_prost::ProstCodec::default();
8553            let path = http::uri::PathAndQuery::from_static(
8554                "/google.cloud.sql.v1.SqlBackupsService/DeleteBackup",
8555            );
8556            let mut req = request.into_request();
8557            req.extensions_mut()
8558                .insert(
8559                    GrpcMethod::new(
8560                        "google.cloud.sql.v1.SqlBackupsService",
8561                        "DeleteBackup",
8562                    ),
8563                );
8564            self.inner.unary(req, path, codec).await
8565        }
8566    }
8567}
8568/// Connect settings retrieval request.
8569#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8570pub struct GetConnectSettingsRequest {
8571    /// Cloud SQL instance ID. This does not include the project ID.
8572    #[prost(string, tag = "1")]
8573    pub instance: ::prost::alloc::string::String,
8574    /// Project ID of the project that contains the instance.
8575    #[prost(string, tag = "2")]
8576    pub project: ::prost::alloc::string::String,
8577    /// Optional. Optional snapshot read timestamp to trade freshness for
8578    /// performance.
8579    #[prost(message, optional, tag = "7")]
8580    pub read_time: ::core::option::Option<::prost_types::Timestamp>,
8581}
8582/// Connect settings retrieval response.
8583#[derive(Clone, PartialEq, ::prost::Message)]
8584pub struct ConnectSettings {
8585    /// This is always `sql#connectSettings`.
8586    #[prost(string, tag = "1")]
8587    pub kind: ::prost::alloc::string::String,
8588    /// SSL configuration.
8589    #[prost(message, optional, tag = "2")]
8590    pub server_ca_cert: ::core::option::Option<SslCert>,
8591    /// The assigned IP addresses for the instance.
8592    #[prost(message, repeated, tag = "3")]
8593    pub ip_addresses: ::prost::alloc::vec::Vec<IpMapping>,
8594    /// The cloud region for the instance. For example, `us-central1`,
8595    /// `europe-west1`. The region cannot be changed after instance creation.
8596    #[prost(string, tag = "4")]
8597    pub region: ::prost::alloc::string::String,
8598    /// The database engine type and version. The `databaseVersion`
8599    /// field cannot be changed after instance creation.
8600    /// MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default),
8601    /// or `MYSQL_5_6`.
8602    /// PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,
8603    /// `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`.
8604    /// SQL Server instances: `SQLSERVER_2017_STANDARD` (default),
8605    /// `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`,
8606    /// `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,
8607    /// `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or
8608    /// `SQLSERVER_2019_WEB`.
8609    #[prost(enumeration = "SqlDatabaseVersion", tag = "31")]
8610    pub database_version: i32,
8611    /// `SECOND_GEN`: Cloud SQL database instance.
8612    /// `EXTERNAL`: A database server that is not managed by Google.
8613    /// This property is read-only; use the `tier` property in the `settings`
8614    /// object to determine the database type.
8615    #[prost(enumeration = "SqlBackendType", tag = "32")]
8616    pub backend_type: i32,
8617    /// Whether PSC connectivity is enabled for this instance.
8618    #[prost(bool, tag = "33")]
8619    pub psc_enabled: bool,
8620    /// The dns name of the instance.
8621    #[prost(string, tag = "34")]
8622    pub dns_name: ::prost::alloc::string::String,
8623    /// Specify what type of CA is used for the server certificate.
8624    #[prost(enumeration = "connect_settings::CaMode", tag = "35")]
8625    pub server_ca_mode: i32,
8626    /// Custom subject alternative names for the server certificate.
8627    #[prost(string, repeated, tag = "37")]
8628    pub custom_subject_alternative_names: ::prost::alloc::vec::Vec<
8629        ::prost::alloc::string::String,
8630    >,
8631    /// Output only. The list of DNS names used by this instance.
8632    #[prost(message, repeated, tag = "38")]
8633    pub dns_names: ::prost::alloc::vec::Vec<DnsNameMapping>,
8634    /// The number of read pool nodes in a read pool.
8635    #[prost(int32, optional, tag = "63")]
8636    pub node_count: ::core::option::Option<i32>,
8637    /// Output only. Entries containing information about each read pool node of
8638    /// the read pool.
8639    #[prost(message, repeated, tag = "64")]
8640    pub nodes: ::prost::alloc::vec::Vec<connect_settings::ConnectPoolNodeConfig>,
8641    /// Optional. Output only. mdx_protocol_support controls how the client uses
8642    /// metadata exchange when connecting to the instance. The values in the list
8643    /// representing parts of the MDX protocol that are supported by this instance.
8644    /// When the list is empty, the instance does not support MDX, so the client
8645    /// must not send an MDX request. The default is empty.
8646    #[prost(
8647        enumeration = "connect_settings::MdxProtocolSupport",
8648        repeated,
8649        packed = "false",
8650        tag = "39"
8651    )]
8652    pub mdx_protocol_support: ::prost::alloc::vec::Vec<i32>,
8653}
8654/// Nested message and enum types in `ConnectSettings`.
8655pub mod connect_settings {
8656    /// Details of a single read pool node of a read pool.
8657    #[derive(Clone, PartialEq, ::prost::Message)]
8658    pub struct ConnectPoolNodeConfig {
8659        /// Output only. The name of the read pool node. Doesn't include the project
8660        /// ID.
8661        #[prost(string, optional, tag = "1")]
8662        pub name: ::core::option::Option<::prost::alloc::string::String>,
8663        /// Output only. Mappings containing IP addresses that can be used to connect
8664        /// to the read pool node.
8665        #[prost(message, repeated, tag = "2")]
8666        pub ip_addresses: ::prost::alloc::vec::Vec<super::IpMapping>,
8667        /// Output only. The DNS name of the read pool node.
8668        #[prost(string, optional, tag = "3")]
8669        pub dns_name: ::core::option::Option<::prost::alloc::string::String>,
8670        /// Output only. The list of DNS names used by this read pool node.
8671        #[prost(message, repeated, tag = "4")]
8672        pub dns_names: ::prost::alloc::vec::Vec<super::DnsNameMapping>,
8673    }
8674    /// Various Certificate Authority (CA) modes for certificate signing.
8675    #[derive(
8676        Clone,
8677        Copy,
8678        Debug,
8679        PartialEq,
8680        Eq,
8681        Hash,
8682        PartialOrd,
8683        Ord,
8684        ::prost::Enumeration
8685    )]
8686    #[repr(i32)]
8687    pub enum CaMode {
8688        /// CA mode is unknown.
8689        Unspecified = 0,
8690        /// Google-managed self-signed internal CA.
8691        GoogleManagedInternalCa = 1,
8692        /// Google-managed regional CA part of root CA hierarchy hosted on Google
8693        /// Cloud's Certificate Authority Service (CAS).
8694        GoogleManagedCasCa = 2,
8695        /// Customer-managed CA hosted on Google Cloud's Certificate Authority
8696        /// Service (CAS).
8697        CustomerManagedCasCa = 3,
8698    }
8699    impl CaMode {
8700        /// String value of the enum field names used in the ProtoBuf definition.
8701        ///
8702        /// The values are not transformed in any way and thus are considered stable
8703        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
8704        pub fn as_str_name(&self) -> &'static str {
8705            match self {
8706                Self::Unspecified => "CA_MODE_UNSPECIFIED",
8707                Self::GoogleManagedInternalCa => "GOOGLE_MANAGED_INTERNAL_CA",
8708                Self::GoogleManagedCasCa => "GOOGLE_MANAGED_CAS_CA",
8709                Self::CustomerManagedCasCa => "CUSTOMER_MANAGED_CAS_CA",
8710            }
8711        }
8712        /// Creates an enum from field names used in the ProtoBuf definition.
8713        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
8714            match value {
8715                "CA_MODE_UNSPECIFIED" => Some(Self::Unspecified),
8716                "GOOGLE_MANAGED_INTERNAL_CA" => Some(Self::GoogleManagedInternalCa),
8717                "GOOGLE_MANAGED_CAS_CA" => Some(Self::GoogleManagedCasCa),
8718                "CUSTOMER_MANAGED_CAS_CA" => Some(Self::CustomerManagedCasCa),
8719                _ => None,
8720            }
8721        }
8722    }
8723    /// MdxProtocolSupport describes parts of the MDX protocol supported by this
8724    /// instance.
8725    #[derive(
8726        Clone,
8727        Copy,
8728        Debug,
8729        PartialEq,
8730        Eq,
8731        Hash,
8732        PartialOrd,
8733        Ord,
8734        ::prost::Enumeration
8735    )]
8736    #[repr(i32)]
8737    pub enum MdxProtocolSupport {
8738        /// Not specified.
8739        Unspecified = 0,
8740        /// Client should send the client protocol type in the MDX request.
8741        ClientProtocolType = 1,
8742    }
8743    impl MdxProtocolSupport {
8744        /// String value of the enum field names used in the ProtoBuf definition.
8745        ///
8746        /// The values are not transformed in any way and thus are considered stable
8747        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
8748        pub fn as_str_name(&self) -> &'static str {
8749            match self {
8750                Self::Unspecified => "MDX_PROTOCOL_SUPPORT_UNSPECIFIED",
8751                Self::ClientProtocolType => "CLIENT_PROTOCOL_TYPE",
8752            }
8753        }
8754        /// Creates an enum from field names used in the ProtoBuf definition.
8755        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
8756            match value {
8757                "MDX_PROTOCOL_SUPPORT_UNSPECIFIED" => Some(Self::Unspecified),
8758                "CLIENT_PROTOCOL_TYPE" => Some(Self::ClientProtocolType),
8759                _ => None,
8760            }
8761        }
8762    }
8763}
8764/// Ephemeral certificate creation request.
8765#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8766pub struct GenerateEphemeralCertRequest {
8767    /// Cloud SQL instance ID. This does not include the project ID.
8768    #[prost(string, tag = "1")]
8769    pub instance: ::prost::alloc::string::String,
8770    /// Project ID of the project that contains the instance.
8771    #[prost(string, tag = "2")]
8772    pub project: ::prost::alloc::string::String,
8773    /// PEM encoded public key to include in the signed certificate.
8774    #[prost(string, tag = "3")]
8775    pub public_key: ::prost::alloc::string::String,
8776    /// Optional. Access token to include in the signed certificate.
8777    #[prost(string, tag = "4")]
8778    pub access_token: ::prost::alloc::string::String,
8779    /// Optional. Optional snapshot read timestamp to trade freshness for
8780    /// performance.
8781    #[prost(message, optional, tag = "7")]
8782    pub read_time: ::core::option::Option<::prost_types::Timestamp>,
8783    /// Optional. If set, it will contain the cert valid duration.
8784    #[prost(message, optional, tag = "12")]
8785    pub valid_duration: ::core::option::Option<::prost_types::Duration>,
8786}
8787/// Ephemeral certificate creation request.
8788#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8789pub struct GenerateEphemeralCertResponse {
8790    /// Generated cert
8791    #[prost(message, optional, tag = "1")]
8792    pub ephemeral_cert: ::core::option::Option<SslCert>,
8793}
8794/// Generated client implementations.
8795pub mod sql_connect_service_client {
8796    #![allow(
8797        unused_variables,
8798        dead_code,
8799        missing_docs,
8800        clippy::wildcard_imports,
8801        clippy::let_unit_value,
8802    )]
8803    use tonic::codegen::*;
8804    use tonic::codegen::http::Uri;
8805    /// Cloud SQL connect service.
8806    #[derive(Debug, Clone)]
8807    pub struct SqlConnectServiceClient<T> {
8808        inner: tonic::client::Grpc<T>,
8809    }
8810    impl<T> SqlConnectServiceClient<T>
8811    where
8812        T: tonic::client::GrpcService<tonic::body::Body>,
8813        T::Error: Into<StdError>,
8814        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
8815        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
8816    {
8817        pub fn new(inner: T) -> Self {
8818            let inner = tonic::client::Grpc::new(inner);
8819            Self { inner }
8820        }
8821        pub fn with_origin(inner: T, origin: Uri) -> Self {
8822            let inner = tonic::client::Grpc::with_origin(inner, origin);
8823            Self { inner }
8824        }
8825        pub fn with_interceptor<F>(
8826            inner: T,
8827            interceptor: F,
8828        ) -> SqlConnectServiceClient<InterceptedService<T, F>>
8829        where
8830            F: tonic::service::Interceptor,
8831            T::ResponseBody: Default,
8832            T: tonic::codegen::Service<
8833                http::Request<tonic::body::Body>,
8834                Response = http::Response<
8835                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
8836                >,
8837            >,
8838            <T as tonic::codegen::Service<
8839                http::Request<tonic::body::Body>,
8840            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
8841        {
8842            SqlConnectServiceClient::new(InterceptedService::new(inner, interceptor))
8843        }
8844        /// Compress requests with the given encoding.
8845        ///
8846        /// This requires the server to support it otherwise it might respond with an
8847        /// error.
8848        #[must_use]
8849        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8850            self.inner = self.inner.send_compressed(encoding);
8851            self
8852        }
8853        /// Enable decompressing responses.
8854        #[must_use]
8855        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8856            self.inner = self.inner.accept_compressed(encoding);
8857            self
8858        }
8859        /// Limits the maximum size of a decoded message.
8860        ///
8861        /// Default: `4MB`
8862        #[must_use]
8863        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8864            self.inner = self.inner.max_decoding_message_size(limit);
8865            self
8866        }
8867        /// Limits the maximum size of an encoded message.
8868        ///
8869        /// Default: `usize::MAX`
8870        #[must_use]
8871        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8872            self.inner = self.inner.max_encoding_message_size(limit);
8873            self
8874        }
8875        /// Retrieves connect settings about a Cloud SQL instance.
8876        pub async fn get_connect_settings(
8877            &mut self,
8878            request: impl tonic::IntoRequest<super::GetConnectSettingsRequest>,
8879        ) -> std::result::Result<
8880            tonic::Response<super::ConnectSettings>,
8881            tonic::Status,
8882        > {
8883            self.inner
8884                .ready()
8885                .await
8886                .map_err(|e| {
8887                    tonic::Status::unknown(
8888                        format!("Service was not ready: {}", e.into()),
8889                    )
8890                })?;
8891            let codec = tonic_prost::ProstCodec::default();
8892            let path = http::uri::PathAndQuery::from_static(
8893                "/google.cloud.sql.v1.SqlConnectService/GetConnectSettings",
8894            );
8895            let mut req = request.into_request();
8896            req.extensions_mut()
8897                .insert(
8898                    GrpcMethod::new(
8899                        "google.cloud.sql.v1.SqlConnectService",
8900                        "GetConnectSettings",
8901                    ),
8902                );
8903            self.inner.unary(req, path, codec).await
8904        }
8905        /// Generates a short-lived X509 certificate containing the provided public key
8906        /// and signed by a private key specific to the target instance. Users may use
8907        /// the certificate to authenticate as themselves when connecting to the
8908        /// database.
8909        pub async fn generate_ephemeral_cert(
8910            &mut self,
8911            request: impl tonic::IntoRequest<super::GenerateEphemeralCertRequest>,
8912        ) -> std::result::Result<
8913            tonic::Response<super::GenerateEphemeralCertResponse>,
8914            tonic::Status,
8915        > {
8916            self.inner
8917                .ready()
8918                .await
8919                .map_err(|e| {
8920                    tonic::Status::unknown(
8921                        format!("Service was not ready: {}", e.into()),
8922                    )
8923                })?;
8924            let codec = tonic_prost::ProstCodec::default();
8925            let path = http::uri::PathAndQuery::from_static(
8926                "/google.cloud.sql.v1.SqlConnectService/GenerateEphemeralCert",
8927            );
8928            let mut req = request.into_request();
8929            req.extensions_mut()
8930                .insert(
8931                    GrpcMethod::new(
8932                        "google.cloud.sql.v1.SqlConnectService",
8933                        "GenerateEphemeralCert",
8934                    ),
8935                );
8936            self.inner.unary(req, path, codec).await
8937        }
8938    }
8939}
8940/// Database delete request.
8941#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8942pub struct SqlDatabasesDeleteRequest {
8943    /// Name of the database to be deleted in the instance.
8944    #[prost(string, tag = "1")]
8945    pub database: ::prost::alloc::string::String,
8946    /// Database instance ID. This does not include the project ID.
8947    #[prost(string, tag = "2")]
8948    pub instance: ::prost::alloc::string::String,
8949    /// Project ID of the project that contains the instance.
8950    #[prost(string, tag = "3")]
8951    pub project: ::prost::alloc::string::String,
8952}
8953/// Database get request.
8954#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8955pub struct SqlDatabasesGetRequest {
8956    /// Name of the database in the instance.
8957    #[prost(string, tag = "1")]
8958    pub database: ::prost::alloc::string::String,
8959    /// Database instance ID. This does not include the project ID.
8960    #[prost(string, tag = "2")]
8961    pub instance: ::prost::alloc::string::String,
8962    /// Project ID of the project that contains the instance.
8963    #[prost(string, tag = "3")]
8964    pub project: ::prost::alloc::string::String,
8965}
8966/// Database insert request.
8967#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8968pub struct SqlDatabasesInsertRequest {
8969    /// Database instance ID. This does not include the project ID.
8970    #[prost(string, tag = "1")]
8971    pub instance: ::prost::alloc::string::String,
8972    /// Project ID of the project that contains the instance.
8973    #[prost(string, tag = "2")]
8974    pub project: ::prost::alloc::string::String,
8975    #[prost(message, optional, tag = "100")]
8976    pub body: ::core::option::Option<Database>,
8977}
8978/// Database list request.
8979#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8980pub struct SqlDatabasesListRequest {
8981    /// Cloud SQL instance ID. This does not include the project ID.
8982    #[prost(string, tag = "1")]
8983    pub instance: ::prost::alloc::string::String,
8984    /// Project ID of the project that contains the instance.
8985    #[prost(string, tag = "2")]
8986    pub project: ::prost::alloc::string::String,
8987}
8988/// Database update request.
8989#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8990pub struct SqlDatabasesUpdateRequest {
8991    /// Name of the database to be updated in the instance.
8992    #[prost(string, tag = "1")]
8993    pub database: ::prost::alloc::string::String,
8994    /// Database instance ID. This does not include the project ID.
8995    #[prost(string, tag = "2")]
8996    pub instance: ::prost::alloc::string::String,
8997    /// Project ID of the project that contains the instance.
8998    #[prost(string, tag = "3")]
8999    pub project: ::prost::alloc::string::String,
9000    #[prost(message, optional, tag = "100")]
9001    pub body: ::core::option::Option<Database>,
9002}
9003/// Database list response.
9004#[derive(Clone, PartialEq, ::prost::Message)]
9005pub struct DatabasesListResponse {
9006    /// This is always `sql#databasesList`.
9007    #[prost(string, tag = "1")]
9008    pub kind: ::prost::alloc::string::String,
9009    /// List of database resources in the instance.
9010    #[prost(message, repeated, tag = "2")]
9011    pub items: ::prost::alloc::vec::Vec<Database>,
9012}
9013/// Generated client implementations.
9014pub mod sql_databases_service_client {
9015    #![allow(
9016        unused_variables,
9017        dead_code,
9018        missing_docs,
9019        clippy::wildcard_imports,
9020        clippy::let_unit_value,
9021    )]
9022    use tonic::codegen::*;
9023    use tonic::codegen::http::Uri;
9024    /// Service to manage databases.
9025    #[derive(Debug, Clone)]
9026    pub struct SqlDatabasesServiceClient<T> {
9027        inner: tonic::client::Grpc<T>,
9028    }
9029    impl<T> SqlDatabasesServiceClient<T>
9030    where
9031        T: tonic::client::GrpcService<tonic::body::Body>,
9032        T::Error: Into<StdError>,
9033        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9034        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9035    {
9036        pub fn new(inner: T) -> Self {
9037            let inner = tonic::client::Grpc::new(inner);
9038            Self { inner }
9039        }
9040        pub fn with_origin(inner: T, origin: Uri) -> Self {
9041            let inner = tonic::client::Grpc::with_origin(inner, origin);
9042            Self { inner }
9043        }
9044        pub fn with_interceptor<F>(
9045            inner: T,
9046            interceptor: F,
9047        ) -> SqlDatabasesServiceClient<InterceptedService<T, F>>
9048        where
9049            F: tonic::service::Interceptor,
9050            T::ResponseBody: Default,
9051            T: tonic::codegen::Service<
9052                http::Request<tonic::body::Body>,
9053                Response = http::Response<
9054                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9055                >,
9056            >,
9057            <T as tonic::codegen::Service<
9058                http::Request<tonic::body::Body>,
9059            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9060        {
9061            SqlDatabasesServiceClient::new(InterceptedService::new(inner, interceptor))
9062        }
9063        /// Compress requests with the given encoding.
9064        ///
9065        /// This requires the server to support it otherwise it might respond with an
9066        /// error.
9067        #[must_use]
9068        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9069            self.inner = self.inner.send_compressed(encoding);
9070            self
9071        }
9072        /// Enable decompressing responses.
9073        #[must_use]
9074        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9075            self.inner = self.inner.accept_compressed(encoding);
9076            self
9077        }
9078        /// Limits the maximum size of a decoded message.
9079        ///
9080        /// Default: `4MB`
9081        #[must_use]
9082        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9083            self.inner = self.inner.max_decoding_message_size(limit);
9084            self
9085        }
9086        /// Limits the maximum size of an encoded message.
9087        ///
9088        /// Default: `usize::MAX`
9089        #[must_use]
9090        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9091            self.inner = self.inner.max_encoding_message_size(limit);
9092            self
9093        }
9094        /// Deletes a database from a Cloud SQL instance.
9095        pub async fn delete(
9096            &mut self,
9097            request: impl tonic::IntoRequest<super::SqlDatabasesDeleteRequest>,
9098        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
9099            self.inner
9100                .ready()
9101                .await
9102                .map_err(|e| {
9103                    tonic::Status::unknown(
9104                        format!("Service was not ready: {}", e.into()),
9105                    )
9106                })?;
9107            let codec = tonic_prost::ProstCodec::default();
9108            let path = http::uri::PathAndQuery::from_static(
9109                "/google.cloud.sql.v1.SqlDatabasesService/Delete",
9110            );
9111            let mut req = request.into_request();
9112            req.extensions_mut()
9113                .insert(
9114                    GrpcMethod::new("google.cloud.sql.v1.SqlDatabasesService", "Delete"),
9115                );
9116            self.inner.unary(req, path, codec).await
9117        }
9118        /// Retrieves a resource containing information about a database inside a Cloud
9119        /// SQL instance.
9120        pub async fn get(
9121            &mut self,
9122            request: impl tonic::IntoRequest<super::SqlDatabasesGetRequest>,
9123        ) -> std::result::Result<tonic::Response<super::Database>, tonic::Status> {
9124            self.inner
9125                .ready()
9126                .await
9127                .map_err(|e| {
9128                    tonic::Status::unknown(
9129                        format!("Service was not ready: {}", e.into()),
9130                    )
9131                })?;
9132            let codec = tonic_prost::ProstCodec::default();
9133            let path = http::uri::PathAndQuery::from_static(
9134                "/google.cloud.sql.v1.SqlDatabasesService/Get",
9135            );
9136            let mut req = request.into_request();
9137            req.extensions_mut()
9138                .insert(
9139                    GrpcMethod::new("google.cloud.sql.v1.SqlDatabasesService", "Get"),
9140                );
9141            self.inner.unary(req, path, codec).await
9142        }
9143        /// Inserts a resource containing information about a database inside a Cloud
9144        /// SQL instance.
9145        ///
9146        /// **Note:** You can't modify the default character set and collation.
9147        pub async fn insert(
9148            &mut self,
9149            request: impl tonic::IntoRequest<super::SqlDatabasesInsertRequest>,
9150        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
9151            self.inner
9152                .ready()
9153                .await
9154                .map_err(|e| {
9155                    tonic::Status::unknown(
9156                        format!("Service was not ready: {}", e.into()),
9157                    )
9158                })?;
9159            let codec = tonic_prost::ProstCodec::default();
9160            let path = http::uri::PathAndQuery::from_static(
9161                "/google.cloud.sql.v1.SqlDatabasesService/Insert",
9162            );
9163            let mut req = request.into_request();
9164            req.extensions_mut()
9165                .insert(
9166                    GrpcMethod::new("google.cloud.sql.v1.SqlDatabasesService", "Insert"),
9167                );
9168            self.inner.unary(req, path, codec).await
9169        }
9170        /// Lists databases in the specified Cloud SQL instance.
9171        pub async fn list(
9172            &mut self,
9173            request: impl tonic::IntoRequest<super::SqlDatabasesListRequest>,
9174        ) -> std::result::Result<
9175            tonic::Response<super::DatabasesListResponse>,
9176            tonic::Status,
9177        > {
9178            self.inner
9179                .ready()
9180                .await
9181                .map_err(|e| {
9182                    tonic::Status::unknown(
9183                        format!("Service was not ready: {}", e.into()),
9184                    )
9185                })?;
9186            let codec = tonic_prost::ProstCodec::default();
9187            let path = http::uri::PathAndQuery::from_static(
9188                "/google.cloud.sql.v1.SqlDatabasesService/List",
9189            );
9190            let mut req = request.into_request();
9191            req.extensions_mut()
9192                .insert(
9193                    GrpcMethod::new("google.cloud.sql.v1.SqlDatabasesService", "List"),
9194                );
9195            self.inner.unary(req, path, codec).await
9196        }
9197        /// Partially updates a resource containing information about a database inside
9198        /// a Cloud SQL instance. This method supports patch semantics.
9199        pub async fn patch(
9200            &mut self,
9201            request: impl tonic::IntoRequest<super::SqlDatabasesUpdateRequest>,
9202        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
9203            self.inner
9204                .ready()
9205                .await
9206                .map_err(|e| {
9207                    tonic::Status::unknown(
9208                        format!("Service was not ready: {}", e.into()),
9209                    )
9210                })?;
9211            let codec = tonic_prost::ProstCodec::default();
9212            let path = http::uri::PathAndQuery::from_static(
9213                "/google.cloud.sql.v1.SqlDatabasesService/Patch",
9214            );
9215            let mut req = request.into_request();
9216            req.extensions_mut()
9217                .insert(
9218                    GrpcMethod::new("google.cloud.sql.v1.SqlDatabasesService", "Patch"),
9219                );
9220            self.inner.unary(req, path, codec).await
9221        }
9222        /// Updates a resource containing information about a database inside a Cloud
9223        /// SQL instance.
9224        pub async fn update(
9225            &mut self,
9226            request: impl tonic::IntoRequest<super::SqlDatabasesUpdateRequest>,
9227        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
9228            self.inner
9229                .ready()
9230                .await
9231                .map_err(|e| {
9232                    tonic::Status::unknown(
9233                        format!("Service was not ready: {}", e.into()),
9234                    )
9235                })?;
9236            let codec = tonic_prost::ProstCodec::default();
9237            let path = http::uri::PathAndQuery::from_static(
9238                "/google.cloud.sql.v1.SqlDatabasesService/Update",
9239            );
9240            let mut req = request.into_request();
9241            req.extensions_mut()
9242                .insert(
9243                    GrpcMethod::new("google.cloud.sql.v1.SqlDatabasesService", "Update"),
9244                );
9245            self.inner.unary(req, path, codec).await
9246        }
9247    }
9248}
9249/// Generated client implementations.
9250pub mod sql_events_service_client {
9251    #![allow(
9252        unused_variables,
9253        dead_code,
9254        missing_docs,
9255        clippy::wildcard_imports,
9256        clippy::let_unit_value,
9257    )]
9258    use tonic::codegen::*;
9259    use tonic::codegen::http::Uri;
9260    /// Service that exposes Cloud SQL event information. This
9261    /// service is only used internally.
9262    #[derive(Debug, Clone)]
9263    pub struct SqlEventsServiceClient<T> {
9264        inner: tonic::client::Grpc<T>,
9265    }
9266    impl<T> SqlEventsServiceClient<T>
9267    where
9268        T: tonic::client::GrpcService<tonic::body::Body>,
9269        T::Error: Into<StdError>,
9270        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9271        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9272    {
9273        pub fn new(inner: T) -> Self {
9274            let inner = tonic::client::Grpc::new(inner);
9275            Self { inner }
9276        }
9277        pub fn with_origin(inner: T, origin: Uri) -> Self {
9278            let inner = tonic::client::Grpc::with_origin(inner, origin);
9279            Self { inner }
9280        }
9281        pub fn with_interceptor<F>(
9282            inner: T,
9283            interceptor: F,
9284        ) -> SqlEventsServiceClient<InterceptedService<T, F>>
9285        where
9286            F: tonic::service::Interceptor,
9287            T::ResponseBody: Default,
9288            T: tonic::codegen::Service<
9289                http::Request<tonic::body::Body>,
9290                Response = http::Response<
9291                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9292                >,
9293            >,
9294            <T as tonic::codegen::Service<
9295                http::Request<tonic::body::Body>,
9296            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9297        {
9298            SqlEventsServiceClient::new(InterceptedService::new(inner, interceptor))
9299        }
9300        /// Compress requests with the given encoding.
9301        ///
9302        /// This requires the server to support it otherwise it might respond with an
9303        /// error.
9304        #[must_use]
9305        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9306            self.inner = self.inner.send_compressed(encoding);
9307            self
9308        }
9309        /// Enable decompressing responses.
9310        #[must_use]
9311        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9312            self.inner = self.inner.accept_compressed(encoding);
9313            self
9314        }
9315        /// Limits the maximum size of a decoded message.
9316        ///
9317        /// Default: `4MB`
9318        #[must_use]
9319        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9320            self.inner = self.inner.max_decoding_message_size(limit);
9321            self
9322        }
9323        /// Limits the maximum size of an encoded message.
9324        ///
9325        /// Default: `usize::MAX`
9326        #[must_use]
9327        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9328            self.inner = self.inner.max_encoding_message_size(limit);
9329            self
9330        }
9331    }
9332}
9333/// Generated client implementations.
9334pub mod sql_feature_eligibility_service_client {
9335    #![allow(
9336        unused_variables,
9337        dead_code,
9338        missing_docs,
9339        clippy::wildcard_imports,
9340        clippy::let_unit_value,
9341    )]
9342    use tonic::codegen::*;
9343    use tonic::codegen::http::Uri;
9344    /// Service to verify the eligibility of an instance for a given operation.
9345    #[derive(Debug, Clone)]
9346    pub struct SqlFeatureEligibilityServiceClient<T> {
9347        inner: tonic::client::Grpc<T>,
9348    }
9349    impl<T> SqlFeatureEligibilityServiceClient<T>
9350    where
9351        T: tonic::client::GrpcService<tonic::body::Body>,
9352        T::Error: Into<StdError>,
9353        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9354        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9355    {
9356        pub fn new(inner: T) -> Self {
9357            let inner = tonic::client::Grpc::new(inner);
9358            Self { inner }
9359        }
9360        pub fn with_origin(inner: T, origin: Uri) -> Self {
9361            let inner = tonic::client::Grpc::with_origin(inner, origin);
9362            Self { inner }
9363        }
9364        pub fn with_interceptor<F>(
9365            inner: T,
9366            interceptor: F,
9367        ) -> SqlFeatureEligibilityServiceClient<InterceptedService<T, F>>
9368        where
9369            F: tonic::service::Interceptor,
9370            T::ResponseBody: Default,
9371            T: tonic::codegen::Service<
9372                http::Request<tonic::body::Body>,
9373                Response = http::Response<
9374                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9375                >,
9376            >,
9377            <T as tonic::codegen::Service<
9378                http::Request<tonic::body::Body>,
9379            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9380        {
9381            SqlFeatureEligibilityServiceClient::new(
9382                InterceptedService::new(inner, interceptor),
9383            )
9384        }
9385        /// Compress requests with the given encoding.
9386        ///
9387        /// This requires the server to support it otherwise it might respond with an
9388        /// error.
9389        #[must_use]
9390        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9391            self.inner = self.inner.send_compressed(encoding);
9392            self
9393        }
9394        /// Enable decompressing responses.
9395        #[must_use]
9396        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9397            self.inner = self.inner.accept_compressed(encoding);
9398            self
9399        }
9400        /// Limits the maximum size of a decoded message.
9401        ///
9402        /// Default: `4MB`
9403        #[must_use]
9404        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9405            self.inner = self.inner.max_decoding_message_size(limit);
9406            self
9407        }
9408        /// Limits the maximum size of an encoded message.
9409        ///
9410        /// Default: `usize::MAX`
9411        #[must_use]
9412        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9413            self.inner = self.inner.max_encoding_message_size(limit);
9414            self
9415        }
9416    }
9417}
9418/// Flags list request.
9419#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9420pub struct SqlFlagsListRequest {
9421    /// Database type and version you want to retrieve flags for. By default, this
9422    /// method returns flags for all database types and versions.
9423    #[prost(string, tag = "1")]
9424    pub database_version: ::prost::alloc::string::String,
9425    /// Optional. Specify the scope of flags to be returned by SqlFlagsListService.
9426    /// Return list of database flags if unspecified.
9427    #[prost(enumeration = "SqlFlagScope", optional, tag = "3")]
9428    pub flag_scope: ::core::option::Option<i32>,
9429}
9430/// Flags list response.
9431#[derive(Clone, PartialEq, ::prost::Message)]
9432pub struct FlagsListResponse {
9433    /// This is always `sql#flagsList`.
9434    #[prost(string, tag = "1")]
9435    pub kind: ::prost::alloc::string::String,
9436    /// List of flags.
9437    #[prost(message, repeated, tag = "2")]
9438    pub items: ::prost::alloc::vec::Vec<Flag>,
9439}
9440/// A flag resource.
9441#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9442pub struct Flag {
9443    /// This is the name of the flag. Flag names always use underscores, not
9444    /// hyphens, for example: `max_allowed_packet`
9445    #[prost(string, tag = "1")]
9446    pub name: ::prost::alloc::string::String,
9447    /// The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`,
9448    /// `INTEGER` or `NONE`. `NONE` is used for flags that do not take a
9449    /// value, such as `skip_grant_tables`.
9450    #[prost(enumeration = "SqlFlagType", tag = "2")]
9451    pub r#type: i32,
9452    /// The database version this flag applies to. Can be
9453    /// MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`,
9454    /// or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,
9455    /// `POSTGRES_11` or `POSTGRES_12`. SQL Server instances:
9456    /// `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`,
9457    /// `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,
9458    /// `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or
9459    /// `SQLSERVER_2019_WEB`.
9460    /// See [the complete
9461    /// list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
9462    #[prost(enumeration = "SqlDatabaseVersion", repeated, tag = "3")]
9463    pub applies_to: ::prost::alloc::vec::Vec<i32>,
9464    /// For `STRING` flags, a list of strings that the value can be set to.
9465    #[prost(string, repeated, tag = "4")]
9466    pub allowed_string_values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
9467    /// For `INTEGER` flags, the minimum allowed value.
9468    #[prost(message, optional, tag = "5")]
9469    pub min_value: ::core::option::Option<i64>,
9470    /// For `INTEGER` flags, the maximum allowed value.
9471    #[prost(message, optional, tag = "6")]
9472    pub max_value: ::core::option::Option<i64>,
9473    /// Indicates whether changing this flag will trigger a database restart. Only
9474    /// applicable to Second Generation instances.
9475    #[prost(message, optional, tag = "7")]
9476    pub requires_restart: ::core::option::Option<bool>,
9477    /// This is always `sql#flag`.
9478    #[prost(string, tag = "8")]
9479    pub kind: ::prost::alloc::string::String,
9480    /// Whether or not the flag is considered in beta.
9481    #[prost(message, optional, tag = "9")]
9482    pub in_beta: ::core::option::Option<bool>,
9483    /// Use this field if only certain integers are accepted. Can be combined
9484    /// with min_value and max_value to add additional values.
9485    #[prost(int64, repeated, tag = "10")]
9486    pub allowed_int_values: ::prost::alloc::vec::Vec<i64>,
9487    /// Scope of flag.
9488    #[prost(enumeration = "SqlFlagScope", tag = "15")]
9489    pub flag_scope: i32,
9490    /// Recommended flag value for UI display.
9491    #[prost(oneof = "flag::RecommendedValue", tags = "16, 17")]
9492    pub recommended_value: ::core::option::Option<flag::RecommendedValue>,
9493}
9494/// Nested message and enum types in `Flag`.
9495pub mod flag {
9496    /// Recommended flag value for UI display.
9497    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
9498    pub enum RecommendedValue {
9499        /// Recommended string value in string format for UI display.
9500        #[prost(string, tag = "16")]
9501        RecommendedStringValue(::prost::alloc::string::String),
9502        /// Recommended int value in integer format for UI display.
9503        #[prost(message, tag = "17")]
9504        RecommendedIntValue(i64),
9505    }
9506}
9507#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
9508#[repr(i32)]
9509pub enum SqlFlagType {
9510    /// This is an unknown flag type.
9511    Unspecified = 0,
9512    /// Boolean type flag.
9513    Boolean = 1,
9514    /// String type flag.
9515    String = 2,
9516    /// Integer type flag.
9517    Integer = 3,
9518    /// Flag type used for a server startup option.
9519    None = 4,
9520    /// Type introduced specially for MySQL TimeZone offset. Accept a string value
9521    /// with the format \[-12:59, 13:00\].
9522    MysqlTimezoneOffset = 5,
9523    /// Float type flag.
9524    Float = 6,
9525    /// Comma-separated list of the strings in a SqlFlagType enum.
9526    RepeatedString = 7,
9527}
9528impl SqlFlagType {
9529    /// String value of the enum field names used in the ProtoBuf definition.
9530    ///
9531    /// The values are not transformed in any way and thus are considered stable
9532    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
9533    pub fn as_str_name(&self) -> &'static str {
9534        match self {
9535            Self::Unspecified => "SQL_FLAG_TYPE_UNSPECIFIED",
9536            Self::Boolean => "BOOLEAN",
9537            Self::String => "STRING",
9538            Self::Integer => "INTEGER",
9539            Self::None => "NONE",
9540            Self::MysqlTimezoneOffset => "MYSQL_TIMEZONE_OFFSET",
9541            Self::Float => "FLOAT",
9542            Self::RepeatedString => "REPEATED_STRING",
9543        }
9544    }
9545    /// Creates an enum from field names used in the ProtoBuf definition.
9546    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
9547        match value {
9548            "SQL_FLAG_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
9549            "BOOLEAN" => Some(Self::Boolean),
9550            "STRING" => Some(Self::String),
9551            "INTEGER" => Some(Self::Integer),
9552            "NONE" => Some(Self::None),
9553            "MYSQL_TIMEZONE_OFFSET" => Some(Self::MysqlTimezoneOffset),
9554            "FLOAT" => Some(Self::Float),
9555            "REPEATED_STRING" => Some(Self::RepeatedString),
9556            _ => None,
9557        }
9558    }
9559}
9560/// Scopes of a flag describe where the flag is used.
9561#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
9562#[repr(i32)]
9563pub enum SqlFlagScope {
9564    /// Assume database flags if unspecified
9565    Unspecified = 0,
9566    /// database flags
9567    Database = 1,
9568    /// connection pool configuration flags
9569    ConnectionPool = 2,
9570}
9571impl SqlFlagScope {
9572    /// String value of the enum field names used in the ProtoBuf definition.
9573    ///
9574    /// The values are not transformed in any way and thus are considered stable
9575    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
9576    pub fn as_str_name(&self) -> &'static str {
9577        match self {
9578            Self::Unspecified => "SQL_FLAG_SCOPE_UNSPECIFIED",
9579            Self::Database => "SQL_FLAG_SCOPE_DATABASE",
9580            Self::ConnectionPool => "SQL_FLAG_SCOPE_CONNECTION_POOL",
9581        }
9582    }
9583    /// Creates an enum from field names used in the ProtoBuf definition.
9584    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
9585        match value {
9586            "SQL_FLAG_SCOPE_UNSPECIFIED" => Some(Self::Unspecified),
9587            "SQL_FLAG_SCOPE_DATABASE" => Some(Self::Database),
9588            "SQL_FLAG_SCOPE_CONNECTION_POOL" => Some(Self::ConnectionPool),
9589            _ => None,
9590        }
9591    }
9592}
9593/// Generated client implementations.
9594pub mod sql_flags_service_client {
9595    #![allow(
9596        unused_variables,
9597        dead_code,
9598        missing_docs,
9599        clippy::wildcard_imports,
9600        clippy::let_unit_value,
9601    )]
9602    use tonic::codegen::*;
9603    use tonic::codegen::http::Uri;
9604    /// Service to manage database flags for Cloud SQL instances.
9605    #[derive(Debug, Clone)]
9606    pub struct SqlFlagsServiceClient<T> {
9607        inner: tonic::client::Grpc<T>,
9608    }
9609    impl<T> SqlFlagsServiceClient<T>
9610    where
9611        T: tonic::client::GrpcService<tonic::body::Body>,
9612        T::Error: Into<StdError>,
9613        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9614        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9615    {
9616        pub fn new(inner: T) -> Self {
9617            let inner = tonic::client::Grpc::new(inner);
9618            Self { inner }
9619        }
9620        pub fn with_origin(inner: T, origin: Uri) -> Self {
9621            let inner = tonic::client::Grpc::with_origin(inner, origin);
9622            Self { inner }
9623        }
9624        pub fn with_interceptor<F>(
9625            inner: T,
9626            interceptor: F,
9627        ) -> SqlFlagsServiceClient<InterceptedService<T, F>>
9628        where
9629            F: tonic::service::Interceptor,
9630            T::ResponseBody: Default,
9631            T: tonic::codegen::Service<
9632                http::Request<tonic::body::Body>,
9633                Response = http::Response<
9634                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9635                >,
9636            >,
9637            <T as tonic::codegen::Service<
9638                http::Request<tonic::body::Body>,
9639            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9640        {
9641            SqlFlagsServiceClient::new(InterceptedService::new(inner, interceptor))
9642        }
9643        /// Compress requests with the given encoding.
9644        ///
9645        /// This requires the server to support it otherwise it might respond with an
9646        /// error.
9647        #[must_use]
9648        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9649            self.inner = self.inner.send_compressed(encoding);
9650            self
9651        }
9652        /// Enable decompressing responses.
9653        #[must_use]
9654        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9655            self.inner = self.inner.accept_compressed(encoding);
9656            self
9657        }
9658        /// Limits the maximum size of a decoded message.
9659        ///
9660        /// Default: `4MB`
9661        #[must_use]
9662        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9663            self.inner = self.inner.max_decoding_message_size(limit);
9664            self
9665        }
9666        /// Limits the maximum size of an encoded message.
9667        ///
9668        /// Default: `usize::MAX`
9669        #[must_use]
9670        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9671            self.inner = self.inner.max_encoding_message_size(limit);
9672            self
9673        }
9674        /// Lists all available database flags for Cloud SQL instances.
9675        pub async fn list(
9676            &mut self,
9677            request: impl tonic::IntoRequest<super::SqlFlagsListRequest>,
9678        ) -> std::result::Result<
9679            tonic::Response<super::FlagsListResponse>,
9680            tonic::Status,
9681        > {
9682            self.inner
9683                .ready()
9684                .await
9685                .map_err(|e| {
9686                    tonic::Status::unknown(
9687                        format!("Service was not ready: {}", e.into()),
9688                    )
9689                })?;
9690            let codec = tonic_prost::ProstCodec::default();
9691            let path = http::uri::PathAndQuery::from_static(
9692                "/google.cloud.sql.v1.SqlFlagsService/List",
9693            );
9694            let mut req = request.into_request();
9695            req.extensions_mut()
9696                .insert(GrpcMethod::new("google.cloud.sql.v1.SqlFlagsService", "List"));
9697            self.inner.unary(req, path, codec).await
9698        }
9699    }
9700}
9701/// Generated client implementations.
9702pub mod sql_iam_policies_service_client {
9703    #![allow(
9704        unused_variables,
9705        dead_code,
9706        missing_docs,
9707        clippy::wildcard_imports,
9708        clippy::let_unit_value,
9709    )]
9710    use tonic::codegen::*;
9711    use tonic::codegen::http::Uri;
9712    /// Service for providing IAM Meta APIs for Cloud SQL.
9713    #[derive(Debug, Clone)]
9714    pub struct SqlIamPoliciesServiceClient<T> {
9715        inner: tonic::client::Grpc<T>,
9716    }
9717    impl<T> SqlIamPoliciesServiceClient<T>
9718    where
9719        T: tonic::client::GrpcService<tonic::body::Body>,
9720        T::Error: Into<StdError>,
9721        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9722        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9723    {
9724        pub fn new(inner: T) -> Self {
9725            let inner = tonic::client::Grpc::new(inner);
9726            Self { inner }
9727        }
9728        pub fn with_origin(inner: T, origin: Uri) -> Self {
9729            let inner = tonic::client::Grpc::with_origin(inner, origin);
9730            Self { inner }
9731        }
9732        pub fn with_interceptor<F>(
9733            inner: T,
9734            interceptor: F,
9735        ) -> SqlIamPoliciesServiceClient<InterceptedService<T, F>>
9736        where
9737            F: tonic::service::Interceptor,
9738            T::ResponseBody: Default,
9739            T: tonic::codegen::Service<
9740                http::Request<tonic::body::Body>,
9741                Response = http::Response<
9742                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9743                >,
9744            >,
9745            <T as tonic::codegen::Service<
9746                http::Request<tonic::body::Body>,
9747            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9748        {
9749            SqlIamPoliciesServiceClient::new(InterceptedService::new(inner, interceptor))
9750        }
9751        /// Compress requests with the given encoding.
9752        ///
9753        /// This requires the server to support it otherwise it might respond with an
9754        /// error.
9755        #[must_use]
9756        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9757            self.inner = self.inner.send_compressed(encoding);
9758            self
9759        }
9760        /// Enable decompressing responses.
9761        #[must_use]
9762        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9763            self.inner = self.inner.accept_compressed(encoding);
9764            self
9765        }
9766        /// Limits the maximum size of a decoded message.
9767        ///
9768        /// Default: `4MB`
9769        #[must_use]
9770        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9771            self.inner = self.inner.max_decoding_message_size(limit);
9772            self
9773        }
9774        /// Limits the maximum size of an encoded message.
9775        ///
9776        /// Default: `usize::MAX`
9777        #[must_use]
9778        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9779            self.inner = self.inner.max_encoding_message_size(limit);
9780            self
9781        }
9782    }
9783}
9784/// Generated client implementations.
9785pub mod sql_instance_names_service_client {
9786    #![allow(
9787        unused_variables,
9788        dead_code,
9789        missing_docs,
9790        clippy::wildcard_imports,
9791        clippy::let_unit_value,
9792    )]
9793    use tonic::codegen::*;
9794    use tonic::codegen::http::Uri;
9795    /// Cloud SQL instance names service.
9796    #[derive(Debug, Clone)]
9797    pub struct SqlInstanceNamesServiceClient<T> {
9798        inner: tonic::client::Grpc<T>,
9799    }
9800    impl<T> SqlInstanceNamesServiceClient<T>
9801    where
9802        T: tonic::client::GrpcService<tonic::body::Body>,
9803        T::Error: Into<StdError>,
9804        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9805        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9806    {
9807        pub fn new(inner: T) -> Self {
9808            let inner = tonic::client::Grpc::new(inner);
9809            Self { inner }
9810        }
9811        pub fn with_origin(inner: T, origin: Uri) -> Self {
9812            let inner = tonic::client::Grpc::with_origin(inner, origin);
9813            Self { inner }
9814        }
9815        pub fn with_interceptor<F>(
9816            inner: T,
9817            interceptor: F,
9818        ) -> SqlInstanceNamesServiceClient<InterceptedService<T, F>>
9819        where
9820            F: tonic::service::Interceptor,
9821            T::ResponseBody: Default,
9822            T: tonic::codegen::Service<
9823                http::Request<tonic::body::Body>,
9824                Response = http::Response<
9825                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9826                >,
9827            >,
9828            <T as tonic::codegen::Service<
9829                http::Request<tonic::body::Body>,
9830            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9831        {
9832            SqlInstanceNamesServiceClient::new(
9833                InterceptedService::new(inner, interceptor),
9834            )
9835        }
9836        /// Compress requests with the given encoding.
9837        ///
9838        /// This requires the server to support it otherwise it might respond with an
9839        /// error.
9840        #[must_use]
9841        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9842            self.inner = self.inner.send_compressed(encoding);
9843            self
9844        }
9845        /// Enable decompressing responses.
9846        #[must_use]
9847        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9848            self.inner = self.inner.accept_compressed(encoding);
9849            self
9850        }
9851        /// Limits the maximum size of a decoded message.
9852        ///
9853        /// Default: `4MB`
9854        #[must_use]
9855        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9856            self.inner = self.inner.max_decoding_message_size(limit);
9857            self
9858        }
9859        /// Limits the maximum size of an encoded message.
9860        ///
9861        /// Default: `usize::MAX`
9862        #[must_use]
9863        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9864            self.inner = self.inner.max_encoding_message_size(limit);
9865            self
9866        }
9867    }
9868}
9869/// Operations get request.
9870#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9871pub struct SqlOperationsGetRequest {
9872    /// Required. Instance operation ID.
9873    #[prost(string, tag = "1")]
9874    pub operation: ::prost::alloc::string::String,
9875    /// Required. Project ID of the project that contains the instance.
9876    #[prost(string, tag = "2")]
9877    pub project: ::prost::alloc::string::String,
9878}
9879/// Operations list request.
9880#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9881pub struct SqlOperationsListRequest {
9882    /// Cloud SQL instance ID. This does not include the project ID.
9883    #[prost(string, tag = "1")]
9884    pub instance: ::prost::alloc::string::String,
9885    /// Maximum number of operations per response.
9886    #[prost(uint32, tag = "2")]
9887    pub max_results: u32,
9888    /// A previously-returned page token representing part of the larger set of
9889    /// results to view.
9890    #[prost(string, tag = "3")]
9891    pub page_token: ::prost::alloc::string::String,
9892    /// Project ID of the project that contains the instance.
9893    #[prost(string, tag = "4")]
9894    pub project: ::prost::alloc::string::String,
9895}
9896/// Operations list response.
9897#[derive(Clone, PartialEq, ::prost::Message)]
9898pub struct OperationsListResponse {
9899    /// This is always `sql#operationsList`.
9900    #[prost(string, tag = "1")]
9901    pub kind: ::prost::alloc::string::String,
9902    /// List of operation resources.
9903    #[prost(message, repeated, tag = "2")]
9904    pub items: ::prost::alloc::vec::Vec<Operation>,
9905    /// The continuation token, used to page through large result sets. Provide
9906    /// this value in a subsequent request to return the next page of results.
9907    #[prost(string, tag = "3")]
9908    pub next_page_token: ::prost::alloc::string::String,
9909}
9910/// Operations cancel request.
9911#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9912pub struct SqlOperationsCancelRequest {
9913    /// Instance operation ID.
9914    #[prost(string, tag = "1")]
9915    pub operation: ::prost::alloc::string::String,
9916    /// Project ID of the project that contains the instance.
9917    #[prost(string, tag = "2")]
9918    pub project: ::prost::alloc::string::String,
9919}
9920/// Generated client implementations.
9921pub mod sql_operations_service_client {
9922    #![allow(
9923        unused_variables,
9924        dead_code,
9925        missing_docs,
9926        clippy::wildcard_imports,
9927        clippy::let_unit_value,
9928    )]
9929    use tonic::codegen::*;
9930    use tonic::codegen::http::Uri;
9931    /// Service to fetch operations for database instances.
9932    #[derive(Debug, Clone)]
9933    pub struct SqlOperationsServiceClient<T> {
9934        inner: tonic::client::Grpc<T>,
9935    }
9936    impl<T> SqlOperationsServiceClient<T>
9937    where
9938        T: tonic::client::GrpcService<tonic::body::Body>,
9939        T::Error: Into<StdError>,
9940        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9941        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9942    {
9943        pub fn new(inner: T) -> Self {
9944            let inner = tonic::client::Grpc::new(inner);
9945            Self { inner }
9946        }
9947        pub fn with_origin(inner: T, origin: Uri) -> Self {
9948            let inner = tonic::client::Grpc::with_origin(inner, origin);
9949            Self { inner }
9950        }
9951        pub fn with_interceptor<F>(
9952            inner: T,
9953            interceptor: F,
9954        ) -> SqlOperationsServiceClient<InterceptedService<T, F>>
9955        where
9956            F: tonic::service::Interceptor,
9957            T::ResponseBody: Default,
9958            T: tonic::codegen::Service<
9959                http::Request<tonic::body::Body>,
9960                Response = http::Response<
9961                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9962                >,
9963            >,
9964            <T as tonic::codegen::Service<
9965                http::Request<tonic::body::Body>,
9966            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9967        {
9968            SqlOperationsServiceClient::new(InterceptedService::new(inner, interceptor))
9969        }
9970        /// Compress requests with the given encoding.
9971        ///
9972        /// This requires the server to support it otherwise it might respond with an
9973        /// error.
9974        #[must_use]
9975        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9976            self.inner = self.inner.send_compressed(encoding);
9977            self
9978        }
9979        /// Enable decompressing responses.
9980        #[must_use]
9981        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9982            self.inner = self.inner.accept_compressed(encoding);
9983            self
9984        }
9985        /// Limits the maximum size of a decoded message.
9986        ///
9987        /// Default: `4MB`
9988        #[must_use]
9989        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9990            self.inner = self.inner.max_decoding_message_size(limit);
9991            self
9992        }
9993        /// Limits the maximum size of an encoded message.
9994        ///
9995        /// Default: `usize::MAX`
9996        #[must_use]
9997        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9998            self.inner = self.inner.max_encoding_message_size(limit);
9999            self
10000        }
10001        /// Retrieves an instance operation that has been performed on an instance.
10002        pub async fn get(
10003            &mut self,
10004            request: impl tonic::IntoRequest<super::SqlOperationsGetRequest>,
10005        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
10006            self.inner
10007                .ready()
10008                .await
10009                .map_err(|e| {
10010                    tonic::Status::unknown(
10011                        format!("Service was not ready: {}", e.into()),
10012                    )
10013                })?;
10014            let codec = tonic_prost::ProstCodec::default();
10015            let path = http::uri::PathAndQuery::from_static(
10016                "/google.cloud.sql.v1.SqlOperationsService/Get",
10017            );
10018            let mut req = request.into_request();
10019            req.extensions_mut()
10020                .insert(
10021                    GrpcMethod::new("google.cloud.sql.v1.SqlOperationsService", "Get"),
10022                );
10023            self.inner.unary(req, path, codec).await
10024        }
10025        /// Lists all instance operations that have been performed on the given Cloud
10026        /// SQL instance in the reverse chronological order of the start time.
10027        pub async fn list(
10028            &mut self,
10029            request: impl tonic::IntoRequest<super::SqlOperationsListRequest>,
10030        ) -> std::result::Result<
10031            tonic::Response<super::OperationsListResponse>,
10032            tonic::Status,
10033        > {
10034            self.inner
10035                .ready()
10036                .await
10037                .map_err(|e| {
10038                    tonic::Status::unknown(
10039                        format!("Service was not ready: {}", e.into()),
10040                    )
10041                })?;
10042            let codec = tonic_prost::ProstCodec::default();
10043            let path = http::uri::PathAndQuery::from_static(
10044                "/google.cloud.sql.v1.SqlOperationsService/List",
10045            );
10046            let mut req = request.into_request();
10047            req.extensions_mut()
10048                .insert(
10049                    GrpcMethod::new("google.cloud.sql.v1.SqlOperationsService", "List"),
10050                );
10051            self.inner.unary(req, path, codec).await
10052        }
10053        /// Cancels an instance operation that has been performed on an instance.
10054        pub async fn cancel(
10055            &mut self,
10056            request: impl tonic::IntoRequest<super::SqlOperationsCancelRequest>,
10057        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
10058            self.inner
10059                .ready()
10060                .await
10061                .map_err(|e| {
10062                    tonic::Status::unknown(
10063                        format!("Service was not ready: {}", e.into()),
10064                    )
10065                })?;
10066            let codec = tonic_prost::ProstCodec::default();
10067            let path = http::uri::PathAndQuery::from_static(
10068                "/google.cloud.sql.v1.SqlOperationsService/Cancel",
10069            );
10070            let mut req = request.into_request();
10071            req.extensions_mut()
10072                .insert(
10073                    GrpcMethod::new("google.cloud.sql.v1.SqlOperationsService", "Cancel"),
10074                );
10075            self.inner.unary(req, path, codec).await
10076        }
10077    }
10078}
10079/// Generated client implementations.
10080pub mod sql_regions_service_client {
10081    #![allow(
10082        unused_variables,
10083        dead_code,
10084        missing_docs,
10085        clippy::wildcard_imports,
10086        clippy::let_unit_value,
10087    )]
10088    use tonic::codegen::*;
10089    use tonic::codegen::http::Uri;
10090    /// Service that exposes Cloud SQL region information. This service is only used
10091    /// internally and does not follow the same patterns as the other v1 RPCs.
10092    #[derive(Debug, Clone)]
10093    pub struct SqlRegionsServiceClient<T> {
10094        inner: tonic::client::Grpc<T>,
10095    }
10096    impl<T> SqlRegionsServiceClient<T>
10097    where
10098        T: tonic::client::GrpcService<tonic::body::Body>,
10099        T::Error: Into<StdError>,
10100        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
10101        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
10102    {
10103        pub fn new(inner: T) -> Self {
10104            let inner = tonic::client::Grpc::new(inner);
10105            Self { inner }
10106        }
10107        pub fn with_origin(inner: T, origin: Uri) -> Self {
10108            let inner = tonic::client::Grpc::with_origin(inner, origin);
10109            Self { inner }
10110        }
10111        pub fn with_interceptor<F>(
10112            inner: T,
10113            interceptor: F,
10114        ) -> SqlRegionsServiceClient<InterceptedService<T, F>>
10115        where
10116            F: tonic::service::Interceptor,
10117            T::ResponseBody: Default,
10118            T: tonic::codegen::Service<
10119                http::Request<tonic::body::Body>,
10120                Response = http::Response<
10121                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
10122                >,
10123            >,
10124            <T as tonic::codegen::Service<
10125                http::Request<tonic::body::Body>,
10126            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
10127        {
10128            SqlRegionsServiceClient::new(InterceptedService::new(inner, interceptor))
10129        }
10130        /// Compress requests with the given encoding.
10131        ///
10132        /// This requires the server to support it otherwise it might respond with an
10133        /// error.
10134        #[must_use]
10135        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10136            self.inner = self.inner.send_compressed(encoding);
10137            self
10138        }
10139        /// Enable decompressing responses.
10140        #[must_use]
10141        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10142            self.inner = self.inner.accept_compressed(encoding);
10143            self
10144        }
10145        /// Limits the maximum size of a decoded message.
10146        ///
10147        /// Default: `4MB`
10148        #[must_use]
10149        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
10150            self.inner = self.inner.max_decoding_message_size(limit);
10151            self
10152        }
10153        /// Limits the maximum size of an encoded message.
10154        ///
10155        /// Default: `usize::MAX`
10156        #[must_use]
10157        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
10158            self.inner = self.inner.max_encoding_message_size(limit);
10159            self
10160        }
10161    }
10162}
10163#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10164pub struct SqlSslCertsDeleteRequest {
10165    /// Cloud SQL instance ID. This does not include the project ID.
10166    #[prost(string, tag = "1")]
10167    pub instance: ::prost::alloc::string::String,
10168    /// Project ID of the project that contains the instance.
10169    #[prost(string, tag = "2")]
10170    pub project: ::prost::alloc::string::String,
10171    /// Sha1 FingerPrint.
10172    #[prost(string, tag = "3")]
10173    pub sha1_fingerprint: ::prost::alloc::string::String,
10174}
10175#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10176pub struct SqlSslCertsGetRequest {
10177    /// Cloud SQL instance ID. This does not include the project ID.
10178    #[prost(string, tag = "1")]
10179    pub instance: ::prost::alloc::string::String,
10180    /// Project ID of the project that contains the instance.
10181    #[prost(string, tag = "2")]
10182    pub project: ::prost::alloc::string::String,
10183    /// Sha1 FingerPrint.
10184    #[prost(string, tag = "3")]
10185    pub sha1_fingerprint: ::prost::alloc::string::String,
10186}
10187#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10188pub struct SqlSslCertsInsertRequest {
10189    /// Cloud SQL instance ID. This does not include the project ID.
10190    #[prost(string, tag = "1")]
10191    pub instance: ::prost::alloc::string::String,
10192    /// Project ID of the project that contains the instance.
10193    #[prost(string, tag = "2")]
10194    pub project: ::prost::alloc::string::String,
10195    #[prost(message, optional, tag = "100")]
10196    pub body: ::core::option::Option<SslCertsInsertRequest>,
10197}
10198#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10199pub struct SqlSslCertsListRequest {
10200    /// Cloud SQL instance ID. This does not include the project ID.
10201    #[prost(string, tag = "1")]
10202    pub instance: ::prost::alloc::string::String,
10203    /// Project ID of the project that contains the instance.
10204    #[prost(string, tag = "2")]
10205    pub project: ::prost::alloc::string::String,
10206}
10207/// SslCerts insert request.
10208#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10209pub struct SslCertsInsertRequest {
10210    /// User supplied name.  Must be a distinct name from the other certificates
10211    /// for this instance.
10212    #[prost(string, tag = "1")]
10213    pub common_name: ::prost::alloc::string::String,
10214}
10215/// SslCert insert response.
10216#[derive(Clone, PartialEq, ::prost::Message)]
10217pub struct SslCertsInsertResponse {
10218    /// This is always `sql#sslCertsInsert`.
10219    #[prost(string, tag = "1")]
10220    pub kind: ::prost::alloc::string::String,
10221    /// The operation to track the ssl certs insert request.
10222    #[prost(message, optional, tag = "2")]
10223    pub operation: ::core::option::Option<Operation>,
10224    /// The server Certificate Authority's certificate.  If this is missing you can
10225    /// force a new one to be generated by calling resetSslConfig method on
10226    /// instances resource.
10227    #[prost(message, optional, tag = "3")]
10228    pub server_ca_cert: ::core::option::Option<SslCert>,
10229    /// The new client certificate and private key.
10230    #[prost(message, optional, tag = "4")]
10231    pub client_cert: ::core::option::Option<SslCertDetail>,
10232}
10233/// SslCerts list response.
10234#[derive(Clone, PartialEq, ::prost::Message)]
10235pub struct SslCertsListResponse {
10236    /// This is always `sql#sslCertsList`.
10237    #[prost(string, tag = "1")]
10238    pub kind: ::prost::alloc::string::String,
10239    /// List of client certificates for the instance.
10240    #[prost(message, repeated, tag = "2")]
10241    pub items: ::prost::alloc::vec::Vec<SslCert>,
10242}
10243/// Generated client implementations.
10244pub mod sql_ssl_certs_service_client {
10245    #![allow(
10246        unused_variables,
10247        dead_code,
10248        missing_docs,
10249        clippy::wildcard_imports,
10250        clippy::let_unit_value,
10251    )]
10252    use tonic::codegen::*;
10253    use tonic::codegen::http::Uri;
10254    /// Service to manage SSL certs for Cloud SQL instances.
10255    #[derive(Debug, Clone)]
10256    pub struct SqlSslCertsServiceClient<T> {
10257        inner: tonic::client::Grpc<T>,
10258    }
10259    impl<T> SqlSslCertsServiceClient<T>
10260    where
10261        T: tonic::client::GrpcService<tonic::body::Body>,
10262        T::Error: Into<StdError>,
10263        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
10264        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
10265    {
10266        pub fn new(inner: T) -> Self {
10267            let inner = tonic::client::Grpc::new(inner);
10268            Self { inner }
10269        }
10270        pub fn with_origin(inner: T, origin: Uri) -> Self {
10271            let inner = tonic::client::Grpc::with_origin(inner, origin);
10272            Self { inner }
10273        }
10274        pub fn with_interceptor<F>(
10275            inner: T,
10276            interceptor: F,
10277        ) -> SqlSslCertsServiceClient<InterceptedService<T, F>>
10278        where
10279            F: tonic::service::Interceptor,
10280            T::ResponseBody: Default,
10281            T: tonic::codegen::Service<
10282                http::Request<tonic::body::Body>,
10283                Response = http::Response<
10284                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
10285                >,
10286            >,
10287            <T as tonic::codegen::Service<
10288                http::Request<tonic::body::Body>,
10289            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
10290        {
10291            SqlSslCertsServiceClient::new(InterceptedService::new(inner, interceptor))
10292        }
10293        /// Compress requests with the given encoding.
10294        ///
10295        /// This requires the server to support it otherwise it might respond with an
10296        /// error.
10297        #[must_use]
10298        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10299            self.inner = self.inner.send_compressed(encoding);
10300            self
10301        }
10302        /// Enable decompressing responses.
10303        #[must_use]
10304        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10305            self.inner = self.inner.accept_compressed(encoding);
10306            self
10307        }
10308        /// Limits the maximum size of a decoded message.
10309        ///
10310        /// Default: `4MB`
10311        #[must_use]
10312        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
10313            self.inner = self.inner.max_decoding_message_size(limit);
10314            self
10315        }
10316        /// Limits the maximum size of an encoded message.
10317        ///
10318        /// Default: `usize::MAX`
10319        #[must_use]
10320        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
10321            self.inner = self.inner.max_encoding_message_size(limit);
10322            self
10323        }
10324        /// Deletes the SSL certificate. For First Generation instances, the
10325        /// certificate remains valid until the instance is restarted.
10326        pub async fn delete(
10327            &mut self,
10328            request: impl tonic::IntoRequest<super::SqlSslCertsDeleteRequest>,
10329        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
10330            self.inner
10331                .ready()
10332                .await
10333                .map_err(|e| {
10334                    tonic::Status::unknown(
10335                        format!("Service was not ready: {}", e.into()),
10336                    )
10337                })?;
10338            let codec = tonic_prost::ProstCodec::default();
10339            let path = http::uri::PathAndQuery::from_static(
10340                "/google.cloud.sql.v1.SqlSslCertsService/Delete",
10341            );
10342            let mut req = request.into_request();
10343            req.extensions_mut()
10344                .insert(
10345                    GrpcMethod::new("google.cloud.sql.v1.SqlSslCertsService", "Delete"),
10346                );
10347            self.inner.unary(req, path, codec).await
10348        }
10349        /// Retrieves a particular SSL certificate.  Does not include the private key
10350        /// (required for usage).  The private key must be saved from the response to
10351        /// initial creation.
10352        pub async fn get(
10353            &mut self,
10354            request: impl tonic::IntoRequest<super::SqlSslCertsGetRequest>,
10355        ) -> std::result::Result<tonic::Response<super::SslCert>, tonic::Status> {
10356            self.inner
10357                .ready()
10358                .await
10359                .map_err(|e| {
10360                    tonic::Status::unknown(
10361                        format!("Service was not ready: {}", e.into()),
10362                    )
10363                })?;
10364            let codec = tonic_prost::ProstCodec::default();
10365            let path = http::uri::PathAndQuery::from_static(
10366                "/google.cloud.sql.v1.SqlSslCertsService/Get",
10367            );
10368            let mut req = request.into_request();
10369            req.extensions_mut()
10370                .insert(
10371                    GrpcMethod::new("google.cloud.sql.v1.SqlSslCertsService", "Get"),
10372                );
10373            self.inner.unary(req, path, codec).await
10374        }
10375        /// Creates an SSL certificate and returns it along with the private key and
10376        /// server certificate authority.  The new certificate will not be usable until
10377        /// the instance is restarted.
10378        pub async fn insert(
10379            &mut self,
10380            request: impl tonic::IntoRequest<super::SqlSslCertsInsertRequest>,
10381        ) -> std::result::Result<
10382            tonic::Response<super::SslCertsInsertResponse>,
10383            tonic::Status,
10384        > {
10385            self.inner
10386                .ready()
10387                .await
10388                .map_err(|e| {
10389                    tonic::Status::unknown(
10390                        format!("Service was not ready: {}", e.into()),
10391                    )
10392                })?;
10393            let codec = tonic_prost::ProstCodec::default();
10394            let path = http::uri::PathAndQuery::from_static(
10395                "/google.cloud.sql.v1.SqlSslCertsService/Insert",
10396            );
10397            let mut req = request.into_request();
10398            req.extensions_mut()
10399                .insert(
10400                    GrpcMethod::new("google.cloud.sql.v1.SqlSslCertsService", "Insert"),
10401                );
10402            self.inner.unary(req, path, codec).await
10403        }
10404        /// Lists all of the current SSL certificates for the instance.
10405        pub async fn list(
10406            &mut self,
10407            request: impl tonic::IntoRequest<super::SqlSslCertsListRequest>,
10408        ) -> std::result::Result<
10409            tonic::Response<super::SslCertsListResponse>,
10410            tonic::Status,
10411        > {
10412            self.inner
10413                .ready()
10414                .await
10415                .map_err(|e| {
10416                    tonic::Status::unknown(
10417                        format!("Service was not ready: {}", e.into()),
10418                    )
10419                })?;
10420            let codec = tonic_prost::ProstCodec::default();
10421            let path = http::uri::PathAndQuery::from_static(
10422                "/google.cloud.sql.v1.SqlSslCertsService/List",
10423            );
10424            let mut req = request.into_request();
10425            req.extensions_mut()
10426                .insert(
10427                    GrpcMethod::new("google.cloud.sql.v1.SqlSslCertsService", "List"),
10428                );
10429            self.inner.unary(req, path, codec).await
10430        }
10431    }
10432}
10433/// Tiers list request.
10434#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10435pub struct SqlTiersListRequest {
10436    /// Project ID of the project for which to list tiers.
10437    #[prost(string, tag = "1")]
10438    pub project: ::prost::alloc::string::String,
10439}
10440/// Tiers list response.
10441#[derive(Clone, PartialEq, ::prost::Message)]
10442pub struct TiersListResponse {
10443    /// This is always `sql#tiersList`.
10444    #[prost(string, tag = "1")]
10445    pub kind: ::prost::alloc::string::String,
10446    /// List of tiers.
10447    #[prost(message, repeated, tag = "2")]
10448    pub items: ::prost::alloc::vec::Vec<Tier>,
10449}
10450/// A Google Cloud SQL service tier resource.
10451#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10452pub struct Tier {
10453    /// An identifier for the machine type, for example, `db-custom-1-3840`. For
10454    /// related information, see [Pricing](/sql/pricing).
10455    #[prost(string, tag = "1")]
10456    pub tier: ::prost::alloc::string::String,
10457    /// The maximum RAM usage of this tier in bytes.
10458    #[prost(int64, tag = "2")]
10459    pub ram: i64,
10460    /// This is always `sql#tier`.
10461    #[prost(string, tag = "3")]
10462    pub kind: ::prost::alloc::string::String,
10463    /// The maximum disk size of this tier in bytes.
10464    #[prost(int64, tag = "4")]
10465    pub disk_quota: i64,
10466    /// The applicable regions for this tier.
10467    #[prost(string, repeated, tag = "5")]
10468    pub region: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10469}
10470/// Generated client implementations.
10471pub mod sql_tiers_service_client {
10472    #![allow(
10473        unused_variables,
10474        dead_code,
10475        missing_docs,
10476        clippy::wildcard_imports,
10477        clippy::let_unit_value,
10478    )]
10479    use tonic::codegen::*;
10480    use tonic::codegen::http::Uri;
10481    /// Service for providing machine types (tiers) for Cloud SQL instances.
10482    #[derive(Debug, Clone)]
10483    pub struct SqlTiersServiceClient<T> {
10484        inner: tonic::client::Grpc<T>,
10485    }
10486    impl<T> SqlTiersServiceClient<T>
10487    where
10488        T: tonic::client::GrpcService<tonic::body::Body>,
10489        T::Error: Into<StdError>,
10490        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
10491        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
10492    {
10493        pub fn new(inner: T) -> Self {
10494            let inner = tonic::client::Grpc::new(inner);
10495            Self { inner }
10496        }
10497        pub fn with_origin(inner: T, origin: Uri) -> Self {
10498            let inner = tonic::client::Grpc::with_origin(inner, origin);
10499            Self { inner }
10500        }
10501        pub fn with_interceptor<F>(
10502            inner: T,
10503            interceptor: F,
10504        ) -> SqlTiersServiceClient<InterceptedService<T, F>>
10505        where
10506            F: tonic::service::Interceptor,
10507            T::ResponseBody: Default,
10508            T: tonic::codegen::Service<
10509                http::Request<tonic::body::Body>,
10510                Response = http::Response<
10511                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
10512                >,
10513            >,
10514            <T as tonic::codegen::Service<
10515                http::Request<tonic::body::Body>,
10516            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
10517        {
10518            SqlTiersServiceClient::new(InterceptedService::new(inner, interceptor))
10519        }
10520        /// Compress requests with the given encoding.
10521        ///
10522        /// This requires the server to support it otherwise it might respond with an
10523        /// error.
10524        #[must_use]
10525        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10526            self.inner = self.inner.send_compressed(encoding);
10527            self
10528        }
10529        /// Enable decompressing responses.
10530        #[must_use]
10531        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10532            self.inner = self.inner.accept_compressed(encoding);
10533            self
10534        }
10535        /// Limits the maximum size of a decoded message.
10536        ///
10537        /// Default: `4MB`
10538        #[must_use]
10539        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
10540            self.inner = self.inner.max_decoding_message_size(limit);
10541            self
10542        }
10543        /// Limits the maximum size of an encoded message.
10544        ///
10545        /// Default: `usize::MAX`
10546        #[must_use]
10547        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
10548            self.inner = self.inner.max_encoding_message_size(limit);
10549            self
10550        }
10551        /// Lists all available machine types (tiers) for Cloud SQL, for example,
10552        /// `db-custom-1-3840`. For more information, see
10553        /// https://cloud.google.com/sql/pricing.
10554        pub async fn list(
10555            &mut self,
10556            request: impl tonic::IntoRequest<super::SqlTiersListRequest>,
10557        ) -> std::result::Result<
10558            tonic::Response<super::TiersListResponse>,
10559            tonic::Status,
10560        > {
10561            self.inner
10562                .ready()
10563                .await
10564                .map_err(|e| {
10565                    tonic::Status::unknown(
10566                        format!("Service was not ready: {}", e.into()),
10567                    )
10568                })?;
10569            let codec = tonic_prost::ProstCodec::default();
10570            let path = http::uri::PathAndQuery::from_static(
10571                "/google.cloud.sql.v1.SqlTiersService/List",
10572            );
10573            let mut req = request.into_request();
10574            req.extensions_mut()
10575                .insert(GrpcMethod::new("google.cloud.sql.v1.SqlTiersService", "List"));
10576            self.inner.unary(req, path, codec).await
10577        }
10578    }
10579}
10580#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10581pub struct SqlUsersDeleteRequest {
10582    /// Host of the user in the instance.
10583    #[prost(string, tag = "1")]
10584    pub host: ::prost::alloc::string::String,
10585    /// Database instance ID. This does not include the project ID.
10586    #[prost(string, tag = "2")]
10587    pub instance: ::prost::alloc::string::String,
10588    /// Name of the user in the instance.
10589    #[prost(string, tag = "3")]
10590    pub name: ::prost::alloc::string::String,
10591    /// Project ID of the project that contains the instance.
10592    #[prost(string, tag = "4")]
10593    pub project: ::prost::alloc::string::String,
10594}
10595/// Request message for Users Get RPC
10596#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10597pub struct SqlUsersGetRequest {
10598    /// Database instance ID. This does not include the project ID.
10599    #[prost(string, tag = "1")]
10600    pub instance: ::prost::alloc::string::String,
10601    /// User of the instance.
10602    #[prost(string, tag = "2")]
10603    pub name: ::prost::alloc::string::String,
10604    /// Project ID of the project that contains the instance.
10605    #[prost(string, tag = "3")]
10606    pub project: ::prost::alloc::string::String,
10607    /// Host of a user of the instance.
10608    #[prost(string, tag = "4")]
10609    pub host: ::prost::alloc::string::String,
10610}
10611#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10612pub struct SqlUsersInsertRequest {
10613    /// Database instance ID. This does not include the project ID.
10614    #[prost(string, tag = "1")]
10615    pub instance: ::prost::alloc::string::String,
10616    /// Project ID of the project that contains the instance.
10617    #[prost(string, tag = "2")]
10618    pub project: ::prost::alloc::string::String,
10619    #[prost(message, optional, tag = "100")]
10620    pub body: ::core::option::Option<User>,
10621}
10622#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10623pub struct SqlUsersListRequest {
10624    /// Database instance ID. This does not include the project ID.
10625    #[prost(string, tag = "1")]
10626    pub instance: ::prost::alloc::string::String,
10627    /// Project ID of the project that contains the instance.
10628    #[prost(string, tag = "2")]
10629    pub project: ::prost::alloc::string::String,
10630}
10631#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10632pub struct SqlUsersUpdateRequest {
10633    /// Optional. Host of the user in the instance.
10634    #[prost(string, tag = "1")]
10635    pub host: ::prost::alloc::string::String,
10636    /// Database instance ID. This does not include the project ID.
10637    #[prost(string, tag = "2")]
10638    pub instance: ::prost::alloc::string::String,
10639    /// Name of the user in the instance.
10640    #[prost(string, tag = "3")]
10641    pub name: ::prost::alloc::string::String,
10642    /// Project ID of the project that contains the instance.
10643    #[prost(string, tag = "4")]
10644    pub project: ::prost::alloc::string::String,
10645    /// Optional. List of database roles to grant to the user. body.database_roles
10646    /// will be ignored for update request.
10647    #[prost(string, repeated, tag = "5")]
10648    pub database_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10649    /// Optional. Specifies whether to revoke existing roles that are not present
10650    /// in the `database_roles` field. If `false` or unset, the database roles
10651    /// specified in `database_roles` are added to the user's existing roles.
10652    #[prost(bool, optional, tag = "6")]
10653    pub revoke_existing_roles: ::core::option::Option<bool>,
10654    #[prost(message, optional, tag = "100")]
10655    pub body: ::core::option::Option<User>,
10656}
10657/// User level password validation policy.
10658#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
10659pub struct UserPasswordValidationPolicy {
10660    /// Number of failed login attempts allowed before user get locked.
10661    #[prost(int32, tag = "1")]
10662    pub allowed_failed_attempts: i32,
10663    /// Expiration duration after password is updated.
10664    #[prost(message, optional, tag = "2")]
10665    pub password_expiration_duration: ::core::option::Option<::prost_types::Duration>,
10666    /// If true, failed login attempts check will be enabled.
10667    #[prost(bool, tag = "3")]
10668    pub enable_failed_attempts_check: bool,
10669    /// Output only. Read-only password status.
10670    #[prost(message, optional, tag = "4")]
10671    pub status: ::core::option::Option<PasswordStatus>,
10672    /// If true, the user must specify the current password before changing the
10673    /// password. This flag is supported only for MySQL.
10674    #[prost(bool, tag = "5")]
10675    pub enable_password_verification: bool,
10676}
10677/// Read-only password status.
10678#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
10679pub struct PasswordStatus {
10680    /// If true, user does not have login privileges.
10681    #[prost(bool, tag = "1")]
10682    pub locked: bool,
10683    /// The expiration time of the current password.
10684    #[prost(message, optional, tag = "2")]
10685    pub password_expiration_time: ::core::option::Option<::prost_types::Timestamp>,
10686}
10687/// A Cloud SQL user resource.
10688#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10689pub struct User {
10690    /// This is always `sql#user`.
10691    #[prost(string, tag = "1")]
10692    pub kind: ::prost::alloc::string::String,
10693    /// The password for the user.
10694    #[prost(string, tag = "2")]
10695    pub password: ::prost::alloc::string::String,
10696    /// This field is deprecated and will be removed from a future version of the
10697    /// API.
10698    #[prost(string, tag = "3")]
10699    pub etag: ::prost::alloc::string::String,
10700    /// The name of the user in the Cloud SQL instance. Can be omitted for
10701    /// `update` because it is already specified in the URL.
10702    #[prost(string, tag = "4")]
10703    pub name: ::prost::alloc::string::String,
10704    /// Optional. The host from which the user can connect. For `insert`
10705    /// operations, host defaults to an empty string. For `update`
10706    /// operations, host is specified as part of the request URL. The host name
10707    /// cannot be updated after insertion.  For a MySQL instance, it's required;
10708    /// for a PostgreSQL or SQL Server instance, it's optional.
10709    #[prost(string, tag = "5")]
10710    pub host: ::prost::alloc::string::String,
10711    /// The name of the Cloud SQL instance. This does not include the project ID.
10712    /// Can be omitted for `update` because it is already specified on the
10713    /// URL.
10714    #[prost(string, tag = "6")]
10715    pub instance: ::prost::alloc::string::String,
10716    /// The project ID of the project containing the Cloud SQL database. The Google
10717    /// apps domain is prefixed if applicable. Can be omitted for `update` because
10718    /// it is already specified on the URL.
10719    #[prost(string, tag = "7")]
10720    pub project: ::prost::alloc::string::String,
10721    /// The user type. It determines the method to authenticate the user during
10722    /// login. The default is the database's built-in user type.
10723    #[prost(enumeration = "user::SqlUserType", tag = "8")]
10724    pub r#type: i32,
10725    /// Optional. The full email for an IAM user. For normal database users, this
10726    /// will not be filled. Only applicable to MySQL database users.
10727    #[prost(string, tag = "11")]
10728    pub iam_email: ::prost::alloc::string::String,
10729    /// User level password validation policy.
10730    #[prost(message, optional, tag = "12")]
10731    pub password_policy: ::core::option::Option<UserPasswordValidationPolicy>,
10732    /// Dual password status for the user.
10733    #[prost(enumeration = "user::DualPasswordType", optional, tag = "13")]
10734    pub dual_password_type: ::core::option::Option<i32>,
10735    /// Indicates if a group is active or inactive for IAM database authentication.
10736    #[prost(enumeration = "user::IamStatus", optional, tag = "14")]
10737    pub iam_status: ::core::option::Option<i32>,
10738    /// Optional. Role memberships of the user
10739    #[prost(string, repeated, tag = "15")]
10740    pub database_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10741    /// User details for specific database type
10742    #[prost(oneof = "user::UserDetails", tags = "9")]
10743    pub user_details: ::core::option::Option<user::UserDetails>,
10744}
10745/// Nested message and enum types in `User`.
10746pub mod user {
10747    /// The user type.
10748    #[derive(
10749        Clone,
10750        Copy,
10751        Debug,
10752        PartialEq,
10753        Eq,
10754        Hash,
10755        PartialOrd,
10756        Ord,
10757        ::prost::Enumeration
10758    )]
10759    #[repr(i32)]
10760    pub enum SqlUserType {
10761        /// The database's built-in user type.
10762        BuiltIn = 0,
10763        /// Cloud IAM user.
10764        CloudIamUser = 1,
10765        /// Cloud IAM service account.
10766        CloudIamServiceAccount = 2,
10767        /// Cloud IAM group. Not used for login.
10768        CloudIamGroup = 3,
10769        /// Read-only. Login for a user that belongs to the Cloud IAM group.
10770        CloudIamGroupUser = 4,
10771        /// Read-only. Login for a service account that belongs to the
10772        /// Cloud IAM group.
10773        CloudIamGroupServiceAccount = 5,
10774        /// Microsoft Entra ID user.
10775        EntraidUser = 7,
10776    }
10777    impl SqlUserType {
10778        /// String value of the enum field names used in the ProtoBuf definition.
10779        ///
10780        /// The values are not transformed in any way and thus are considered stable
10781        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
10782        pub fn as_str_name(&self) -> &'static str {
10783            match self {
10784                Self::BuiltIn => "BUILT_IN",
10785                Self::CloudIamUser => "CLOUD_IAM_USER",
10786                Self::CloudIamServiceAccount => "CLOUD_IAM_SERVICE_ACCOUNT",
10787                Self::CloudIamGroup => "CLOUD_IAM_GROUP",
10788                Self::CloudIamGroupUser => "CLOUD_IAM_GROUP_USER",
10789                Self::CloudIamGroupServiceAccount => "CLOUD_IAM_GROUP_SERVICE_ACCOUNT",
10790                Self::EntraidUser => "ENTRAID_USER",
10791            }
10792        }
10793        /// Creates an enum from field names used in the ProtoBuf definition.
10794        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
10795            match value {
10796                "BUILT_IN" => Some(Self::BuiltIn),
10797                "CLOUD_IAM_USER" => Some(Self::CloudIamUser),
10798                "CLOUD_IAM_SERVICE_ACCOUNT" => Some(Self::CloudIamServiceAccount),
10799                "CLOUD_IAM_GROUP" => Some(Self::CloudIamGroup),
10800                "CLOUD_IAM_GROUP_USER" => Some(Self::CloudIamGroupUser),
10801                "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" => {
10802                    Some(Self::CloudIamGroupServiceAccount)
10803                }
10804                "ENTRAID_USER" => Some(Self::EntraidUser),
10805                _ => None,
10806            }
10807        }
10808    }
10809    /// The type of retained password.
10810    #[derive(
10811        Clone,
10812        Copy,
10813        Debug,
10814        PartialEq,
10815        Eq,
10816        Hash,
10817        PartialOrd,
10818        Ord,
10819        ::prost::Enumeration
10820    )]
10821    #[repr(i32)]
10822    pub enum DualPasswordType {
10823        /// The default value.
10824        Unspecified = 0,
10825        /// Do not update the user's dual password status.
10826        NoModifyDualPassword = 1,
10827        /// No dual password usable for connecting using this user.
10828        NoDualPassword = 2,
10829        /// Dual password usable for connecting using this user.
10830        DualPassword = 3,
10831    }
10832    impl DualPasswordType {
10833        /// String value of the enum field names used in the ProtoBuf definition.
10834        ///
10835        /// The values are not transformed in any way and thus are considered stable
10836        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
10837        pub fn as_str_name(&self) -> &'static str {
10838            match self {
10839                Self::Unspecified => "DUAL_PASSWORD_TYPE_UNSPECIFIED",
10840                Self::NoModifyDualPassword => "NO_MODIFY_DUAL_PASSWORD",
10841                Self::NoDualPassword => "NO_DUAL_PASSWORD",
10842                Self::DualPassword => "DUAL_PASSWORD",
10843            }
10844        }
10845        /// Creates an enum from field names used in the ProtoBuf definition.
10846        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
10847            match value {
10848                "DUAL_PASSWORD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
10849                "NO_MODIFY_DUAL_PASSWORD" => Some(Self::NoModifyDualPassword),
10850                "NO_DUAL_PASSWORD" => Some(Self::NoDualPassword),
10851                "DUAL_PASSWORD" => Some(Self::DualPassword),
10852                _ => None,
10853            }
10854        }
10855    }
10856    /// Indicates if a group is available for IAM database authentication.
10857    #[derive(
10858        Clone,
10859        Copy,
10860        Debug,
10861        PartialEq,
10862        Eq,
10863        Hash,
10864        PartialOrd,
10865        Ord,
10866        ::prost::Enumeration
10867    )]
10868    #[repr(i32)]
10869    pub enum IamStatus {
10870        /// The default value for users that are not of type CLOUD_IAM_GROUP.
10871        /// Only CLOUD_IAM_GROUP users will be inactive or active.
10872        /// Users with an IamStatus of IAM_STATUS_UNSPECIFIED will not
10873        /// display whether they are active or inactive as that is not applicable to
10874        /// them.
10875        Unspecified = 0,
10876        /// INACTIVE indicates a group is not available for IAM database
10877        /// authentication.
10878        Inactive = 1,
10879        /// ACTIVE indicates a group is available for IAM database authentication.
10880        Active = 2,
10881    }
10882    impl IamStatus {
10883        /// String value of the enum field names used in the ProtoBuf definition.
10884        ///
10885        /// The values are not transformed in any way and thus are considered stable
10886        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
10887        pub fn as_str_name(&self) -> &'static str {
10888            match self {
10889                Self::Unspecified => "IAM_STATUS_UNSPECIFIED",
10890                Self::Inactive => "INACTIVE",
10891                Self::Active => "ACTIVE",
10892            }
10893        }
10894        /// Creates an enum from field names used in the ProtoBuf definition.
10895        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
10896            match value {
10897                "IAM_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
10898                "INACTIVE" => Some(Self::Inactive),
10899                "ACTIVE" => Some(Self::Active),
10900                _ => None,
10901            }
10902        }
10903    }
10904    /// User details for specific database type
10905    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
10906    pub enum UserDetails {
10907        #[prost(message, tag = "9")]
10908        SqlserverUserDetails(super::SqlServerUserDetails),
10909    }
10910}
10911/// Represents a Sql Server user on the Cloud SQL instance.
10912#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10913pub struct SqlServerUserDetails {
10914    /// If the user has been disabled
10915    #[prost(bool, tag = "1")]
10916    pub disabled: bool,
10917    /// The server roles for this user
10918    #[prost(string, repeated, tag = "2")]
10919    pub server_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10920}
10921/// User list response.
10922#[derive(Clone, PartialEq, ::prost::Message)]
10923pub struct UsersListResponse {
10924    /// This is always `sql#usersList`.
10925    #[prost(string, tag = "1")]
10926    pub kind: ::prost::alloc::string::String,
10927    /// List of user resources in the instance.
10928    #[prost(message, repeated, tag = "2")]
10929    pub items: ::prost::alloc::vec::Vec<User>,
10930    /// Unused.
10931    #[deprecated]
10932    #[prost(string, tag = "3")]
10933    pub next_page_token: ::prost::alloc::string::String,
10934}
10935/// Generated client implementations.
10936pub mod sql_users_service_client {
10937    #![allow(
10938        unused_variables,
10939        dead_code,
10940        missing_docs,
10941        clippy::wildcard_imports,
10942        clippy::let_unit_value,
10943    )]
10944    use tonic::codegen::*;
10945    use tonic::codegen::http::Uri;
10946    /// Cloud SQL users service.
10947    #[derive(Debug, Clone)]
10948    pub struct SqlUsersServiceClient<T> {
10949        inner: tonic::client::Grpc<T>,
10950    }
10951    impl<T> SqlUsersServiceClient<T>
10952    where
10953        T: tonic::client::GrpcService<tonic::body::Body>,
10954        T::Error: Into<StdError>,
10955        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
10956        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
10957    {
10958        pub fn new(inner: T) -> Self {
10959            let inner = tonic::client::Grpc::new(inner);
10960            Self { inner }
10961        }
10962        pub fn with_origin(inner: T, origin: Uri) -> Self {
10963            let inner = tonic::client::Grpc::with_origin(inner, origin);
10964            Self { inner }
10965        }
10966        pub fn with_interceptor<F>(
10967            inner: T,
10968            interceptor: F,
10969        ) -> SqlUsersServiceClient<InterceptedService<T, F>>
10970        where
10971            F: tonic::service::Interceptor,
10972            T::ResponseBody: Default,
10973            T: tonic::codegen::Service<
10974                http::Request<tonic::body::Body>,
10975                Response = http::Response<
10976                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
10977                >,
10978            >,
10979            <T as tonic::codegen::Service<
10980                http::Request<tonic::body::Body>,
10981            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
10982        {
10983            SqlUsersServiceClient::new(InterceptedService::new(inner, interceptor))
10984        }
10985        /// Compress requests with the given encoding.
10986        ///
10987        /// This requires the server to support it otherwise it might respond with an
10988        /// error.
10989        #[must_use]
10990        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10991            self.inner = self.inner.send_compressed(encoding);
10992            self
10993        }
10994        /// Enable decompressing responses.
10995        #[must_use]
10996        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10997            self.inner = self.inner.accept_compressed(encoding);
10998            self
10999        }
11000        /// Limits the maximum size of a decoded message.
11001        ///
11002        /// Default: `4MB`
11003        #[must_use]
11004        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
11005            self.inner = self.inner.max_decoding_message_size(limit);
11006            self
11007        }
11008        /// Limits the maximum size of an encoded message.
11009        ///
11010        /// Default: `usize::MAX`
11011        #[must_use]
11012        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
11013            self.inner = self.inner.max_encoding_message_size(limit);
11014            self
11015        }
11016        /// Deletes a user from a Cloud SQL instance.
11017        pub async fn delete(
11018            &mut self,
11019            request: impl tonic::IntoRequest<super::SqlUsersDeleteRequest>,
11020        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
11021            self.inner
11022                .ready()
11023                .await
11024                .map_err(|e| {
11025                    tonic::Status::unknown(
11026                        format!("Service was not ready: {}", e.into()),
11027                    )
11028                })?;
11029            let codec = tonic_prost::ProstCodec::default();
11030            let path = http::uri::PathAndQuery::from_static(
11031                "/google.cloud.sql.v1.SqlUsersService/Delete",
11032            );
11033            let mut req = request.into_request();
11034            req.extensions_mut()
11035                .insert(
11036                    GrpcMethod::new("google.cloud.sql.v1.SqlUsersService", "Delete"),
11037                );
11038            self.inner.unary(req, path, codec).await
11039        }
11040        /// Retrieves a resource containing information about a user.
11041        pub async fn get(
11042            &mut self,
11043            request: impl tonic::IntoRequest<super::SqlUsersGetRequest>,
11044        ) -> std::result::Result<tonic::Response<super::User>, tonic::Status> {
11045            self.inner
11046                .ready()
11047                .await
11048                .map_err(|e| {
11049                    tonic::Status::unknown(
11050                        format!("Service was not ready: {}", e.into()),
11051                    )
11052                })?;
11053            let codec = tonic_prost::ProstCodec::default();
11054            let path = http::uri::PathAndQuery::from_static(
11055                "/google.cloud.sql.v1.SqlUsersService/Get",
11056            );
11057            let mut req = request.into_request();
11058            req.extensions_mut()
11059                .insert(GrpcMethod::new("google.cloud.sql.v1.SqlUsersService", "Get"));
11060            self.inner.unary(req, path, codec).await
11061        }
11062        /// Creates a new user in a Cloud SQL instance.
11063        pub async fn insert(
11064            &mut self,
11065            request: impl tonic::IntoRequest<super::SqlUsersInsertRequest>,
11066        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
11067            self.inner
11068                .ready()
11069                .await
11070                .map_err(|e| {
11071                    tonic::Status::unknown(
11072                        format!("Service was not ready: {}", e.into()),
11073                    )
11074                })?;
11075            let codec = tonic_prost::ProstCodec::default();
11076            let path = http::uri::PathAndQuery::from_static(
11077                "/google.cloud.sql.v1.SqlUsersService/Insert",
11078            );
11079            let mut req = request.into_request();
11080            req.extensions_mut()
11081                .insert(
11082                    GrpcMethod::new("google.cloud.sql.v1.SqlUsersService", "Insert"),
11083                );
11084            self.inner.unary(req, path, codec).await
11085        }
11086        /// Lists users in the specified Cloud SQL instance.
11087        pub async fn list(
11088            &mut self,
11089            request: impl tonic::IntoRequest<super::SqlUsersListRequest>,
11090        ) -> std::result::Result<
11091            tonic::Response<super::UsersListResponse>,
11092            tonic::Status,
11093        > {
11094            self.inner
11095                .ready()
11096                .await
11097                .map_err(|e| {
11098                    tonic::Status::unknown(
11099                        format!("Service was not ready: {}", e.into()),
11100                    )
11101                })?;
11102            let codec = tonic_prost::ProstCodec::default();
11103            let path = http::uri::PathAndQuery::from_static(
11104                "/google.cloud.sql.v1.SqlUsersService/List",
11105            );
11106            let mut req = request.into_request();
11107            req.extensions_mut()
11108                .insert(GrpcMethod::new("google.cloud.sql.v1.SqlUsersService", "List"));
11109            self.inner.unary(req, path, codec).await
11110        }
11111        /// Updates an existing user in a Cloud SQL instance.
11112        pub async fn update(
11113            &mut self,
11114            request: impl tonic::IntoRequest<super::SqlUsersUpdateRequest>,
11115        ) -> std::result::Result<tonic::Response<super::Operation>, tonic::Status> {
11116            self.inner
11117                .ready()
11118                .await
11119                .map_err(|e| {
11120                    tonic::Status::unknown(
11121                        format!("Service was not ready: {}", e.into()),
11122                    )
11123                })?;
11124            let codec = tonic_prost::ProstCodec::default();
11125            let path = http::uri::PathAndQuery::from_static(
11126                "/google.cloud.sql.v1.SqlUsersService/Update",
11127            );
11128            let mut req = request.into_request();
11129            req.extensions_mut()
11130                .insert(
11131                    GrpcMethod::new("google.cloud.sql.v1.SqlUsersService", "Update"),
11132                );
11133            self.inner.unary(req, path, codec).await
11134        }
11135    }
11136}