1pub 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 #[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 #[must_use]
60 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
61 self.inner = self.inner.send_compressed(encoding);
62 self
63 }
64 #[must_use]
66 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
67 self.inner = self.inner.accept_compressed(encoding);
68 self
69 }
70 #[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 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
90pub struct AclEntry {
91 #[prost(string, tag = "1")]
93 pub value: ::prost::alloc::string::String,
94 #[prost(message, optional, tag = "2")]
98 pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
99 #[prost(string, tag = "3")]
101 pub name: ::prost::alloc::string::String,
102 #[prost(string, tag = "4")]
104 pub kind: ::prost::alloc::string::String,
105}
106#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
108pub struct ApiWarning {
109 #[prost(enumeration = "api_warning::SqlApiWarningCode", tag = "1")]
111 pub code: i32,
112 #[prost(string, tag = "2")]
114 pub message: ::prost::alloc::string::String,
115 #[prost(string, tag = "3")]
117 pub region: ::prost::alloc::string::String,
118}
119pub 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 Unspecified = 0,
136 RegionUnreachable = 1,
139 MaxResultsExceedsLimit = 2,
142 CompromisedCredentials = 3,
145 InternalStateFailure = 4,
148 }
149 impl SqlApiWarningCode {
150 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 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#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
179pub struct BackupRetentionSettings {
180 #[prost(enumeration = "backup_retention_settings::RetentionUnit", tag = "1")]
182 pub retention_unit: i32,
183 #[prost(message, optional, tag = "2")]
187 pub retained_backups: ::core::option::Option<i32>,
188}
189pub mod backup_retention_settings {
191 #[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 Unspecified = 0,
207 Count = 1,
209 }
210 impl RetentionUnit {
211 pub fn as_str_name(&self) -> &'static str {
216 match self {
217 Self::Unspecified => "RETENTION_UNIT_UNSPECIFIED",
218 Self::Count => "COUNT",
219 }
220 }
221 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
233pub struct BackupConfiguration {
234 #[prost(string, tag = "1")]
237 pub start_time: ::prost::alloc::string::String,
238 #[prost(message, optional, tag = "2")]
240 pub enabled: ::core::option::Option<bool>,
241 #[prost(string, tag = "3")]
243 pub kind: ::prost::alloc::string::String,
244 #[prost(message, optional, tag = "4")]
247 pub binary_log_enabled: ::core::option::Option<bool>,
248 #[prost(message, optional, tag = "5")]
250 pub replication_log_archiving_enabled: ::core::option::Option<bool>,
251 #[prost(string, tag = "6")]
253 pub location: ::prost::alloc::string::String,
254 #[prost(message, optional, tag = "7")]
256 pub point_in_time_recovery_enabled: ::core::option::Option<bool>,
257 #[prost(message, optional, tag = "8")]
259 pub backup_retention_settings: ::core::option::Option<BackupRetentionSettings>,
260 #[prost(message, optional, tag = "9")]
263 pub transaction_log_retention_days: ::core::option::Option<i32>,
264 #[prost(
267 enumeration = "backup_configuration::TransactionalLogStorageState",
268 optional,
269 tag = "10"
270 )]
271 pub transactional_log_storage_state: ::core::option::Option<i32>,
272 #[prost(enumeration = "backup_configuration::BackupTier", optional, tag = "11")]
274 pub backup_tier: ::core::option::Option<i32>,
275}
276pub mod backup_configuration {
278 #[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 = 0,
295 Disk = 1,
298 SwitchingToCloudStorage = 2,
302 SwitchedToCloudStorage = 3,
306 CloudStorage = 4,
309 }
310 impl TransactionalLogStorageState {
311 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 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 #[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 = 0,
352 Standard = 1,
354 #[deprecated]
356 Advanced = 2,
357 Enhanced = 3,
359 }
360 impl BackupTier {
361 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 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#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
388pub struct PerformDiskShrinkContext {
389 #[prost(int64, tag = "1")]
391 pub target_size_gb: i64,
392}
393#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
396pub struct PreCheckResponse {
397 #[prost(string, optional, tag = "2")]
399 pub message: ::core::option::Option<::prost::alloc::string::String>,
400 #[prost(enumeration = "pre_check_response::MessageType", optional, tag = "3")]
402 pub message_type: ::core::option::Option<i32>,
403 #[prost(string, repeated, tag = "4")]
406 pub actions_required: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
407}
408pub mod pre_check_response {
410 #[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 Unspecified = 0,
427 Info = 1,
429 Warning = 2,
431 Error = 3,
433 }
434 impl MessageType {
435 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 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#[derive(Clone, PartialEq, ::prost::Message)]
461pub struct PreCheckMajorVersionUpgradeContext {
462 #[prost(enumeration = "SqlDatabaseVersion", tag = "1")]
464 pub target_database_version: i32,
465 #[prost(message, repeated, tag = "2")]
467 pub pre_check_response: ::prost::alloc::vec::Vec<PreCheckResponse>,
468 #[prost(string, tag = "3")]
470 pub kind: ::prost::alloc::string::String,
471}
472#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
474pub struct BackupContext {
475 #[prost(int64, tag = "1")]
477 pub backup_id: i64,
478 #[prost(string, tag = "2")]
480 pub kind: ::prost::alloc::string::String,
481 #[prost(string, tag = "3")]
484 pub name: ::prost::alloc::string::String,
485}
486#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
488pub struct Database {
489 #[prost(string, tag = "1")]
491 pub kind: ::prost::alloc::string::String,
492 #[prost(string, tag = "2")]
494 pub charset: ::prost::alloc::string::String,
495 #[prost(string, tag = "3")]
497 pub collation: ::prost::alloc::string::String,
498 #[prost(string, tag = "4")]
501 pub etag: ::prost::alloc::string::String,
502 #[prost(string, tag = "5")]
505 pub name: ::prost::alloc::string::String,
506 #[prost(string, tag = "6")]
508 pub instance: ::prost::alloc::string::String,
509 #[prost(string, tag = "7")]
511 pub self_link: ::prost::alloc::string::String,
512 #[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}
519pub 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
529pub struct SqlServerDatabaseDetails {
530 #[prost(int32, tag = "1")]
532 pub compatibility_level: i32,
533 #[prost(string, tag = "2")]
535 pub recovery_model: ::prost::alloc::string::String,
536}
537#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
539pub struct DatabaseFlags {
540 #[prost(string, tag = "1")]
546 pub name: ::prost::alloc::string::String,
547 #[prost(string, tag = "2")]
551 pub value: ::prost::alloc::string::String,
552}
553#[derive(Clone, PartialEq, ::prost::Message)]
555pub struct MySqlSyncConfig {
556 #[prost(message, repeated, tag = "1")]
558 pub initial_sync_flags: ::prost::alloc::vec::Vec<SyncFlags>,
559}
560#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
563pub struct SyncFlags {
564 #[prost(string, tag = "1")]
566 pub name: ::prost::alloc::string::String,
567 #[prost(string, tag = "2")]
570 pub value: ::prost::alloc::string::String,
571}
572#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
574pub struct InstanceReference {
575 #[prost(string, tag = "1")]
578 pub name: ::prost::alloc::string::String,
579 #[prost(string, tag = "2")]
581 pub region: ::prost::alloc::string::String,
582 #[prost(string, tag = "3")]
585 pub project: ::prost::alloc::string::String,
586}
587#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
590pub struct DemoteMasterConfiguration {
591 #[prost(string, tag = "1")]
593 pub kind: ::prost::alloc::string::String,
594 #[prost(message, optional, tag = "2")]
601 pub mysql_replica_configuration: ::core::option::Option<
602 DemoteMasterMySqlReplicaConfiguration,
603 >,
604}
605#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
607pub struct DemoteMasterMySqlReplicaConfiguration {
608 #[prost(string, tag = "1")]
610 pub kind: ::prost::alloc::string::String,
611 #[prost(string, tag = "2")]
613 pub username: ::prost::alloc::string::String,
614 #[prost(string, tag = "3")]
616 pub password: ::prost::alloc::string::String,
617 #[prost(string, tag = "4")]
621 pub client_key: ::prost::alloc::string::String,
622 #[prost(string, tag = "5")]
624 pub client_certificate: ::prost::alloc::string::String,
625 #[prost(string, tag = "6")]
627 pub ca_certificate: ::prost::alloc::string::String,
628}
629#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
631pub struct ExportContext {
632 #[prost(string, tag = "1")]
638 pub uri: ::prost::alloc::string::String,
639 #[prost(string, repeated, tag = "2")]
654 pub databases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
655 #[prost(string, tag = "3")]
657 pub kind: ::prost::alloc::string::String,
658 #[prost(message, optional, tag = "4")]
660 pub sql_export_options: ::core::option::Option<export_context::SqlExportOptions>,
661 #[prost(message, optional, tag = "5")]
664 pub csv_export_options: ::core::option::Option<export_context::SqlCsvExportOptions>,
665 #[prost(enumeration = "SqlFileType", tag = "6")]
667 pub file_type: i32,
668 #[prost(message, optional, tag = "8")]
670 pub offload: ::core::option::Option<bool>,
671 #[prost(message, optional, tag = "9")]
673 pub bak_export_options: ::core::option::Option<export_context::SqlBakExportOptions>,
674 #[prost(message, optional, tag = "10")]
676 pub tde_export_options: ::core::option::Option<export_context::SqlTdeExportOptions>,
677}
678pub mod export_context {
680 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
681 pub struct SqlCsvExportOptions {
682 #[prost(string, tag = "1")]
684 pub select_query: ::prost::alloc::string::String,
685 #[prost(string, tag = "2")]
688 pub escape_character: ::prost::alloc::string::String,
689 #[prost(string, tag = "3")]
691 pub quote_character: ::prost::alloc::string::String,
692 #[prost(string, tag = "4")]
695 pub fields_terminated_by: ::prost::alloc::string::String,
696 #[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 #[prost(string, repeated, tag = "1")]
707 pub tables: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
708 #[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 #[prost(message, optional, tag = "4")]
717 pub threads: ::core::option::Option<i32>,
718 #[prost(message, optional, tag = "5")]
720 pub parallel: ::core::option::Option<bool>,
721 #[prost(message, optional, tag = "6")]
723 pub postgres_export_options: ::core::option::Option<
724 sql_export_options::PostgresExportOptions,
725 >,
726 }
727 pub mod sql_export_options {
729 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
731 pub struct MysqlExportOptions {
732 #[prost(message, optional, tag = "1")]
739 pub master_data: ::core::option::Option<i32>,
740 }
741 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
743 pub struct PostgresExportOptions {
744 #[prost(message, optional, tag = "1")]
748 pub clean: ::core::option::Option<bool>,
749 #[prost(message, optional, tag = "2")]
752 pub if_exists: ::core::option::Option<bool>,
753 }
754 }
755 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
757 pub struct SqlBakExportOptions {
758 #[prost(message, optional, tag = "1")]
760 pub striped: ::core::option::Option<bool>,
761 #[prost(message, optional, tag = "2")]
765 pub stripe_count: ::core::option::Option<i32>,
766 #[prost(enumeration = "super::BakType", tag = "4")]
768 pub bak_type: i32,
769 #[deprecated]
771 #[prost(message, optional, tag = "5")]
772 pub copy_only: ::core::option::Option<bool>,
773 #[prost(message, optional, tag = "6")]
776 pub differential_base: ::core::option::Option<bool>,
777 #[prost(message, optional, tag = "7")]
783 pub export_log_start_time: ::core::option::Option<::prost_types::Timestamp>,
784 #[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 #[prost(string, tag = "1")]
799 pub certificate_path: ::prost::alloc::string::String,
800 #[prost(string, tag = "2")]
805 pub private_key_path: ::prost::alloc::string::String,
806 #[prost(string, tag = "3")]
808 pub private_key_password: ::prost::alloc::string::String,
809 #[prost(string, tag = "5")]
812 pub name: ::prost::alloc::string::String,
813 }
814}
815#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
817pub struct ImportContext {
818 #[prost(string, tag = "1")]
823 pub uri: ::prost::alloc::string::String,
824 #[prost(string, tag = "2")]
831 pub database: ::prost::alloc::string::String,
832 #[prost(string, tag = "3")]
834 pub kind: ::prost::alloc::string::String,
835 #[prost(enumeration = "SqlFileType", tag = "4")]
837 pub file_type: i32,
838 #[prost(message, optional, tag = "5")]
840 pub csv_import_options: ::core::option::Option<import_context::SqlCsvImportOptions>,
841 #[prost(string, tag = "6")]
843 pub import_user: ::prost::alloc::string::String,
844 #[prost(message, optional, tag = "7")]
846 pub bak_import_options: ::core::option::Option<import_context::SqlBakImportOptions>,
847 #[prost(message, optional, tag = "8")]
849 pub sql_import_options: ::core::option::Option<import_context::SqlImportOptions>,
850 #[prost(message, optional, tag = "9")]
852 pub tde_import_options: ::core::option::Option<import_context::SqlTdeImportOptions>,
853}
854pub mod import_context {
856 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
857 pub struct SqlImportOptions {
858 #[prost(message, optional, tag = "1")]
860 pub threads: ::core::option::Option<i32>,
861 #[prost(message, optional, tag = "2")]
863 pub parallel: ::core::option::Option<bool>,
864 #[prost(message, optional, tag = "3")]
866 pub postgres_import_options: ::core::option::Option<
867 sql_import_options::PostgresImportOptions,
868 >,
869 }
870 pub mod sql_import_options {
872 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
873 pub struct PostgresImportOptions {
874 #[prost(message, optional, tag = "1")]
877 pub clean: ::core::option::Option<bool>,
878 #[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 #[prost(string, tag = "1")]
888 pub table: ::prost::alloc::string::String,
889 #[prost(string, repeated, tag = "2")]
892 pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
893 #[prost(string, tag = "4")]
896 pub escape_character: ::prost::alloc::string::String,
897 #[prost(string, tag = "5")]
899 pub quote_character: ::prost::alloc::string::String,
900 #[prost(string, tag = "6")]
903 pub fields_terminated_by: ::prost::alloc::string::String,
904 #[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 #[prost(message, optional, tag = "2")]
918 pub striped: ::core::option::Option<bool>,
919 #[prost(message, optional, tag = "4")]
923 pub no_recovery: ::core::option::Option<bool>,
924 #[prost(message, optional, tag = "5")]
929 pub recovery_only: ::core::option::Option<bool>,
930 #[prost(enumeration = "super::BakType", tag = "6")]
932 pub bak_type: i32,
933 #[prost(message, optional, tag = "7")]
938 pub stop_at: ::core::option::Option<::prost_types::Timestamp>,
939 #[prost(string, tag = "8")]
943 pub stop_at_mark: ::prost::alloc::string::String,
944 }
945 pub mod sql_bak_import_options {
947 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
948 pub struct EncryptionOptions {
949 #[prost(string, tag = "1")]
953 pub cert_path: ::prost::alloc::string::String,
954 #[prost(string, tag = "2")]
958 pub pvk_path: ::prost::alloc::string::String,
959 #[prost(string, tag = "3")]
961 pub pvk_password: ::prost::alloc::string::String,
962 #[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 #[prost(string, tag = "1")]
974 pub certificate_path: ::prost::alloc::string::String,
975 #[prost(string, tag = "2")]
980 pub private_key_path: ::prost::alloc::string::String,
981 #[prost(string, tag = "3")]
983 pub private_key_password: ::prost::alloc::string::String,
984 #[prost(string, tag = "5")]
987 pub name: ::prost::alloc::string::String,
988 }
989}
990#[derive(Clone, PartialEq, ::prost::Message)]
992pub struct IpConfiguration {
993 #[prost(message, optional, tag = "1")]
995 pub ipv4_enabled: ::core::option::Option<bool>,
996 #[prost(string, tag = "2")]
1001 pub private_network: ::prost::alloc::string::String,
1002 #[prost(message, optional, tag = "3")]
1012 pub require_ssl: ::core::option::Option<bool>,
1013 #[prost(message, repeated, tag = "4")]
1017 pub authorized_networks: ::prost::alloc::vec::Vec<AclEntry>,
1018 #[prost(string, tag = "6")]
1025 pub allocated_ip_range: ::prost::alloc::string::String,
1026 #[prost(message, optional, tag = "7")]
1029 pub enable_private_path_for_google_cloud_services: ::core::option::Option<bool>,
1030 #[prost(enumeration = "ip_configuration::SslMode", tag = "8")]
1053 pub ssl_mode: i32,
1054 #[prost(message, optional, tag = "9")]
1056 pub psc_config: ::core::option::Option<PscConfig>,
1057 #[prost(enumeration = "ip_configuration::CaMode", optional, tag = "10")]
1059 pub server_ca_mode: ::core::option::Option<i32>,
1060 #[prost(string, repeated, tag = "11")]
1062 pub custom_subject_alternative_names: ::prost::alloc::vec::Vec<
1063 ::prost::alloc::string::String,
1064 >,
1065 #[prost(string, optional, tag = "12")]
1069 pub server_ca_pool: ::core::option::Option<::prost::alloc::string::String>,
1070 #[prost(
1077 enumeration = "ip_configuration::ServerCertificateRotationMode",
1078 optional,
1079 tag = "16"
1080 )]
1081 pub server_certificate_rotation_mode: ::core::option::Option<i32>,
1082}
1083pub mod ip_configuration {
1085 #[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 Unspecified = 0,
1101 AllowUnencryptedAndEncrypted = 1,
1108 EncryptedOnly = 2,
1115 TrustedClientCertificateRequired = 3,
1130 }
1131 impl SslMode {
1132 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 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 #[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 Unspecified = 0,
1178 GoogleManagedInternalCa = 1,
1180 GoogleManagedCasCa = 2,
1183 CustomerManagedCasCa = 3,
1186 }
1187 impl CaMode {
1188 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 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 #[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 = 0,
1227 NoAutomaticRotation = 1,
1232 AutomaticRotationDuringMaintenance = 2,
1237 }
1238 impl ServerCertificateRotationMode {
1239 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 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#[derive(Clone, PartialEq, ::prost::Message)]
1267pub struct PscConfig {
1268 #[prost(bool, optional, tag = "1")]
1270 pub psc_enabled: ::core::option::Option<bool>,
1271 #[prost(string, repeated, tag = "2")]
1278 pub allowed_consumer_projects: ::prost::alloc::vec::Vec<
1279 ::prost::alloc::string::String,
1280 >,
1281 #[prost(message, repeated, tag = "3")]
1284 pub psc_auto_connections: ::prost::alloc::vec::Vec<PscAutoConnectionConfig>,
1285 #[prost(string, tag = "4")]
1290 pub network_attachment_uri: ::prost::alloc::string::String,
1291}
1292#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1295pub struct PscAutoConnectionConfig {
1296 #[prost(string, tag = "1")]
1302 pub consumer_project: ::prost::alloc::string::String,
1303 #[prost(string, tag = "2")]
1311 pub consumer_network: ::prost::alloc::string::String,
1312 #[prost(string, optional, tag = "3")]
1314 pub ip_address: ::core::option::Option<::prost::alloc::string::String>,
1315 #[prost(string, optional, tag = "4")]
1317 pub status: ::core::option::Option<::prost::alloc::string::String>,
1318 #[prost(string, optional, tag = "5")]
1320 pub consumer_network_status: ::core::option::Option<::prost::alloc::string::String>,
1321}
1322#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1327pub struct LocationPreference {
1328 #[deprecated]
1331 #[prost(string, tag = "1")]
1332 pub follow_gae_application: ::prost::alloc::string::String,
1333 #[prost(string, tag = "2")]
1336 pub zone: ::prost::alloc::string::String,
1337 #[prost(string, tag = "4")]
1341 pub secondary_zone: ::prost::alloc::string::String,
1342 #[prost(string, tag = "3")]
1344 pub kind: ::prost::alloc::string::String,
1345}
1346#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1349pub struct MaintenanceWindow {
1350 #[prost(message, optional, tag = "1")]
1352 pub hour: ::core::option::Option<i32>,
1353 #[prost(message, optional, tag = "2")]
1357 pub day: ::core::option::Option<i32>,
1358 #[prost(enumeration = "SqlUpdateTrack", tag = "3")]
1362 pub update_track: i32,
1363 #[prost(string, tag = "4")]
1365 pub kind: ::prost::alloc::string::String,
1366}
1367#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1370pub struct DenyMaintenancePeriod {
1371 #[prost(string, tag = "1")]
1376 pub start_date: ::prost::alloc::string::String,
1377 #[prost(string, tag = "2")]
1382 pub end_date: ::prost::alloc::string::String,
1383 #[prost(string, tag = "3")]
1386 pub time: ::prost::alloc::string::String,
1387}
1388#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1391pub struct InsightsConfig {
1392 #[prost(bool, tag = "1")]
1394 pub query_insights_enabled: bool,
1395 #[prost(bool, tag = "2")]
1397 pub record_client_address: bool,
1398 #[prost(bool, tag = "3")]
1401 pub record_application_tags: bool,
1402 #[prost(message, optional, tag = "4")]
1407 pub query_string_length: ::core::option::Option<i32>,
1408 #[prost(message, optional, tag = "5")]
1411 pub query_plans_per_minute: ::core::option::Option<i32>,
1412 #[prost(message, optional, tag = "8")]
1414 pub enhanced_query_insights_enabled: ::core::option::Option<bool>,
1415}
1416#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1418pub struct MySqlReplicaConfiguration {
1419 #[prost(string, tag = "1")]
1426 pub dump_file_path: ::prost::alloc::string::String,
1427 #[prost(string, tag = "2")]
1429 pub username: ::prost::alloc::string::String,
1430 #[prost(string, tag = "3")]
1432 pub password: ::prost::alloc::string::String,
1433 #[prost(message, optional, tag = "4")]
1435 pub connect_retry_interval: ::core::option::Option<i32>,
1436 #[prost(message, optional, tag = "5")]
1438 pub master_heartbeat_period: ::core::option::Option<i64>,
1439 #[prost(string, tag = "6")]
1441 pub ca_certificate: ::prost::alloc::string::String,
1442 #[prost(string, tag = "7")]
1444 pub client_certificate: ::prost::alloc::string::String,
1445 #[prost(string, tag = "8")]
1448 pub client_key: ::prost::alloc::string::String,
1449 #[prost(string, tag = "9")]
1451 pub ssl_cipher: ::prost::alloc::string::String,
1452 #[prost(message, optional, tag = "10")]
1455 pub verify_server_certificate: ::core::option::Option<bool>,
1456 #[prost(string, tag = "11")]
1458 pub kind: ::prost::alloc::string::String,
1459}
1460#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1462pub struct DiskEncryptionConfiguration {
1463 #[prost(string, tag = "1")]
1465 pub kms_key_name: ::prost::alloc::string::String,
1466 #[prost(string, tag = "2")]
1468 pub kind: ::prost::alloc::string::String,
1469}
1470#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1472pub struct DiskEncryptionStatus {
1473 #[prost(string, tag = "1")]
1475 pub kms_key_version_name: ::prost::alloc::string::String,
1476 #[prost(string, tag = "2")]
1478 pub kind: ::prost::alloc::string::String,
1479}
1480#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1482pub struct IpMapping {
1483 #[prost(enumeration = "SqlIpAddressType", tag = "1")]
1488 pub r#type: i32,
1489 #[prost(string, tag = "2")]
1491 pub ip_address: ::prost::alloc::string::String,
1492 #[prost(message, optional, tag = "3")]
1497 pub time_to_retire: ::core::option::Option<::prost_types::Timestamp>,
1498}
1499#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1501pub struct SqlSubOperationType {
1502 #[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}
1508pub mod sql_sub_operation_type {
1510 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
1512 pub enum SubOperationDetails {
1513 #[prost(enumeration = "super::SqlMaintenanceType", tag = "1")]
1515 MaintenanceType(i32),
1516 }
1517}
1518#[derive(Clone, PartialEq, ::prost::Message)]
1522pub struct Operation {
1523 #[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 #[prost(enumeration = "operation::SqlOperationStatus", tag = "3")]
1530 pub status: i32,
1531 #[prost(string, tag = "4")]
1533 pub user: ::prost::alloc::string::String,
1534 #[prost(message, optional, tag = "5")]
1538 pub insert_time: ::core::option::Option<::prost_types::Timestamp>,
1539 #[prost(message, optional, tag = "6")]
1543 pub start_time: ::core::option::Option<::prost_types::Timestamp>,
1544 #[prost(message, optional, tag = "7")]
1548 pub end_time: ::core::option::Option<::prost_types::Timestamp>,
1549 #[prost(message, optional, tag = "8")]
1552 pub error: ::core::option::Option<OperationErrors>,
1553 #[prost(message, optional, tag = "19")]
1555 pub api_warning: ::core::option::Option<ApiWarning>,
1556 #[prost(enumeration = "operation::SqlOperationType", tag = "9")]
1571 pub operation_type: i32,
1572 #[prost(message, optional, tag = "10")]
1574 pub import_context: ::core::option::Option<ImportContext>,
1575 #[prost(message, optional, tag = "11")]
1577 pub export_context: ::core::option::Option<ExportContext>,
1578 #[prost(message, optional, tag = "17")]
1580 pub backup_context: ::core::option::Option<BackupContext>,
1581 #[prost(message, optional, tag = "50")]
1587 pub pre_check_major_version_upgrade_context: ::core::option::Option<
1588 PreCheckMajorVersionUpgradeContext,
1589 >,
1590 #[prost(string, tag = "12")]
1594 pub name: ::prost::alloc::string::String,
1595 #[prost(string, tag = "13")]
1597 pub target_id: ::prost::alloc::string::String,
1598 #[prost(string, tag = "14")]
1600 pub self_link: ::prost::alloc::string::String,
1601 #[prost(string, tag = "15")]
1603 pub target_project: ::prost::alloc::string::String,
1604 #[prost(message, optional, tag = "20")]
1606 pub acquire_ssrs_lease_context: ::core::option::Option<AcquireSsrsLeaseContext>,
1607 #[prost(message, optional, tag = "48")]
1609 pub sub_operation_type: ::core::option::Option<SqlSubOperationType>,
1610}
1611pub mod operation {
1613 #[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 Unspecified = 0,
1629 Import = 1,
1631 Export = 2,
1634 Create = 3,
1636 Update = 4,
1638 Delete = 5,
1640 Restart = 6,
1642 #[deprecated]
1643 Backup = 7,
1644 #[deprecated]
1645 Snapshot = 8,
1646 BackupVolume = 9,
1648 DeleteVolume = 10,
1650 RestoreVolume = 11,
1652 InjectUser = 12,
1654 Clone = 14,
1656 StopReplica = 15,
1658 StartReplica = 16,
1660 PromoteReplica = 17,
1662 CreateReplica = 18,
1664 CreateUser = 19,
1666 DeleteUser = 20,
1668 UpdateUser = 21,
1671 CreateDatabase = 22,
1673 DeleteDatabase = 23,
1675 UpdateDatabase = 24,
1677 Failover = 25,
1680 DeleteBackup = 26,
1682 RecreateReplica = 27,
1683 TruncateLog = 28,
1685 DemoteMaster = 29,
1688 Maintenance = 30,
1691 #[deprecated]
1693 EnablePrivateIp = 31,
1694 #[deprecated]
1695 DeferMaintenance = 32,
1696 #[deprecated]
1698 CreateClone = 33,
1699 RescheduleMaintenance = 34,
1701 StartExternalSync = 35,
1704 LogCleanup = 36,
1706 AutoRestart = 37,
1709 Reencrypt = 38,
1711 Switchover = 39,
1714 UpdateBackup = 40,
1716 AcquireSsrsLease = 42,
1718 ReleaseSsrsLease = 43,
1720 ReconfigureOldPrimary = 44,
1725 #[deprecated]
1731 ClusterMaintenance = 45,
1732 #[deprecated]
1737 SelfServiceMaintenance = 46,
1738 SwitchoverToReplica = 47,
1741 MajorVersionUpgrade = 48,
1743 #[deprecated]
1745 AdvancedBackup = 49,
1746 ManageBackup = 50,
1748 EnhancedBackup = 51,
1750 RepairReadPool = 52,
1752 CreateReadPool = 53,
1754 }
1755 impl SqlOperationType {
1756 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 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 #[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 Unspecified = 0,
1903 Pending = 1,
1905 Running = 2,
1907 Done = 3,
1909 }
1910 impl SqlOperationStatus {
1911 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1937pub struct OperationError {
1938 #[prost(string, tag = "1")]
1940 pub kind: ::prost::alloc::string::String,
1941 #[prost(string, tag = "2")]
1943 pub code: ::prost::alloc::string::String,
1944 #[prost(string, tag = "3")]
1946 pub message: ::prost::alloc::string::String,
1947}
1948#[derive(Clone, PartialEq, ::prost::Message)]
1950pub struct OperationErrors {
1951 #[prost(string, tag = "1")]
1953 pub kind: ::prost::alloc::string::String,
1954 #[prost(message, repeated, tag = "2")]
1956 pub errors: ::prost::alloc::vec::Vec<OperationError>,
1957}
1958#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1963pub struct PasswordValidationPolicy {
1964 #[prost(message, optional, tag = "1")]
1966 pub min_length: ::core::option::Option<i32>,
1967 #[prost(enumeration = "password_validation_policy::Complexity", tag = "2")]
1969 pub complexity: i32,
1970 #[prost(message, optional, tag = "3")]
1972 pub reuse_interval: ::core::option::Option<i32>,
1973 #[prost(message, optional, tag = "4")]
1975 pub disallow_username_substring: ::core::option::Option<bool>,
1976 #[prost(message, optional, tag = "5")]
1979 pub password_change_interval: ::core::option::Option<::prost_types::Duration>,
1980 #[prost(message, optional, tag = "6")]
1984 pub enable_password_policy: ::core::option::Option<bool>,
1985 #[deprecated]
1988 #[prost(message, optional, tag = "7")]
1989 pub disallow_compromised_credentials: ::core::option::Option<bool>,
1990}
1991pub mod password_validation_policy {
1993 #[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 Unspecified = 0,
2009 Default = 1,
2012 }
2013 impl Complexity {
2014 pub fn as_str_name(&self) -> &'static str {
2019 match self {
2020 Self::Unspecified => "COMPLEXITY_UNSPECIFIED",
2021 Self::Default => "COMPLEXITY_DEFAULT",
2022 }
2023 }
2024 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#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2036pub struct DataCacheConfig {
2037 #[prost(bool, tag = "1")]
2039 pub data_cache_enabled: bool,
2040}
2041#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2043pub struct FinalBackupConfig {
2044 #[prost(bool, optional, tag = "1")]
2046 pub enabled: ::core::option::Option<bool>,
2047 #[prost(int32, optional, tag = "3")]
2051 pub retention_days: ::core::option::Option<i32>,
2052}
2053#[derive(Clone, PartialEq, ::prost::Message)]
2055pub struct Settings {
2056 #[prost(message, optional, tag = "1")]
2061 pub settings_version: ::core::option::Option<i64>,
2062 #[deprecated]
2065 #[prost(string, repeated, tag = "2")]
2066 pub authorized_gae_applications: ::prost::alloc::vec::Vec<
2067 ::prost::alloc::string::String,
2068 >,
2069 #[prost(string, tag = "3")]
2072 pub tier: ::prost::alloc::string::String,
2073 #[prost(string, tag = "4")]
2075 pub kind: ::prost::alloc::string::String,
2076 #[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 #[prost(enumeration = "SqlAvailabilityType", tag = "6")]
2093 pub availability_type: i32,
2094 #[prost(enumeration = "SqlPricingPlan", tag = "7")]
2097 pub pricing_plan: i32,
2098 #[deprecated]
2102 #[prost(enumeration = "SqlReplicationType", tag = "8")]
2103 pub replication_type: i32,
2104 #[prost(message, optional, tag = "9")]
2107 pub storage_auto_resize_limit: ::core::option::Option<i64>,
2108 #[prost(enumeration = "settings::SqlActivationPolicy", tag = "10")]
2116 pub activation_policy: i32,
2117 #[prost(message, optional, tag = "11")]
2121 pub ip_configuration: ::core::option::Option<IpConfiguration>,
2122 #[prost(message, optional, tag = "12")]
2125 pub storage_auto_resize: ::core::option::Option<bool>,
2126 #[prost(message, optional, tag = "13")]
2131 pub location_preference: ::core::option::Option<LocationPreference>,
2132 #[prost(message, repeated, tag = "14")]
2134 pub database_flags: ::prost::alloc::vec::Vec<DatabaseFlags>,
2135 #[prost(enumeration = "SqlDataDiskType", tag = "15")]
2138 pub data_disk_type: i32,
2139 #[prost(message, optional, tag = "16")]
2142 pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
2143 #[prost(message, optional, tag = "17")]
2145 pub backup_configuration: ::core::option::Option<BackupConfiguration>,
2146 #[prost(message, optional, tag = "18")]
2150 pub database_replication_enabled: ::core::option::Option<bool>,
2151 #[deprecated]
2155 #[prost(message, optional, tag = "19")]
2156 pub crash_safe_replication_enabled: ::core::option::Option<bool>,
2157 #[prost(message, optional, tag = "20")]
2159 pub data_disk_size_gb: ::core::option::Option<i64>,
2160 #[prost(message, optional, tag = "22")]
2162 pub active_directory_config: ::core::option::Option<SqlActiveDirectoryConfig>,
2163 #[prost(string, tag = "23")]
2165 pub collation: ::prost::alloc::string::String,
2166 #[prost(message, repeated, tag = "24")]
2168 pub deny_maintenance_periods: ::prost::alloc::vec::Vec<DenyMaintenancePeriod>,
2169 #[prost(message, optional, tag = "25")]
2171 pub insights_config: ::core::option::Option<InsightsConfig>,
2172 #[prost(message, optional, tag = "27")]
2174 pub password_validation_policy: ::core::option::Option<PasswordValidationPolicy>,
2175 #[prost(message, optional, tag = "29")]
2177 pub sql_server_audit_config: ::core::option::Option<SqlServerAuditConfig>,
2178 #[prost(enumeration = "settings::Edition", tag = "38")]
2180 pub edition: i32,
2181 #[prost(enumeration = "settings::ConnectorEnforcement", tag = "32")]
2192 pub connector_enforcement: i32,
2193 #[prost(message, optional, tag = "33")]
2195 pub deletion_protection_enabled: ::core::option::Option<bool>,
2196 #[prost(string, tag = "34")]
2198 pub time_zone: ::prost::alloc::string::String,
2199 #[prost(message, optional, tag = "35")]
2202 pub advanced_machine_features: ::core::option::Option<AdvancedMachineFeatures>,
2203 #[prost(message, optional, tag = "37")]
2205 pub data_cache_config: ::core::option::Option<DataCacheConfig>,
2206 #[prost(message, optional, tag = "39")]
2209 pub replication_lag_max_seconds: ::core::option::Option<i32>,
2210 #[prost(message, optional, tag = "40")]
2215 pub enable_google_ml_integration: ::core::option::Option<bool>,
2216 #[prost(message, optional, tag = "41")]
2220 pub enable_dataplex_integration: ::core::option::Option<bool>,
2221 #[prost(message, optional, tag = "42")]
2226 pub retain_backups_on_delete: ::core::option::Option<bool>,
2227 #[prost(int64, optional, tag = "43")]
2230 pub data_disk_provisioned_iops: ::core::option::Option<i64>,
2231 #[prost(int64, optional, tag = "44")]
2234 pub data_disk_provisioned_throughput: ::core::option::Option<i64>,
2235 #[prost(message, optional, tag = "45")]
2237 pub connection_pool_config: ::core::option::Option<ConnectionPoolConfig>,
2238 #[prost(message, optional, tag = "47")]
2240 pub final_backup_config: ::core::option::Option<FinalBackupConfig>,
2241 #[prost(message, optional, tag = "48")]
2243 pub read_pool_auto_scale_config: ::core::option::Option<ReadPoolAutoScaleConfig>,
2244 #[prost(bool, optional, tag = "50")]
2248 pub auto_upgrade_enabled: ::core::option::Option<bool>,
2249 #[prost(message, optional, tag = "52")]
2251 pub entraid_config: ::core::option::Option<SqlServerEntraIdConfig>,
2252 #[prost(enumeration = "settings::DataApiAccess", optional, tag = "53")]
2255 pub data_api_access: ::core::option::Option<i32>,
2256 #[prost(message, optional, tag = "54")]
2259 pub performance_capture_config: ::core::option::Option<PerformanceCaptureConfig>,
2260}
2261pub mod settings {
2263 #[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 Unspecified = 0,
2279 Always = 1,
2281 Never = 2,
2283 #[deprecated]
2285 OnDemand = 3,
2286 }
2287 impl SqlActivationPolicy {
2288 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 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 #[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 Unspecified = 0,
2328 Enterprise = 2,
2330 EnterprisePlus = 3,
2332 }
2333 impl Edition {
2334 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 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 #[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 Unspecified = 0,
2371 NotRequired = 1,
2373 Required = 2,
2377 }
2378 impl ConnectorEnforcement {
2379 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 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 #[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 = 0,
2416 DisallowDataApi = 1,
2418 AllowDataApi = 2,
2422 }
2423 impl DataApiAccess {
2424 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 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#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2448pub struct PerformanceCaptureConfig {
2449 #[prost(bool, optional, tag = "1")]
2451 pub enabled: ::core::option::Option<bool>,
2452 #[prost(int32, optional, tag = "2")]
2454 pub probing_interval_seconds: ::core::option::Option<i32>,
2455 #[prost(int32, optional, tag = "3")]
2458 pub probe_threshold: ::core::option::Option<i32>,
2459 #[prost(int32, optional, tag = "4")]
2462 pub running_threads_threshold: ::core::option::Option<i32>,
2463 #[prost(int32, optional, tag = "5")]
2466 pub seconds_behind_source_threshold: ::core::option::Option<i32>,
2467 #[prost(int32, optional, tag = "8")]
2470 pub transaction_duration_threshold: ::core::option::Option<i32>,
2471}
2472#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2475pub struct ConnectionPoolFlags {
2476 #[prost(string, tag = "1")]
2478 pub name: ::prost::alloc::string::String,
2479 #[prost(string, tag = "2")]
2483 pub value: ::prost::alloc::string::String,
2484}
2485#[derive(Clone, PartialEq, ::prost::Message)]
2487pub struct ConnectionPoolConfig {
2488 #[prost(bool, optional, tag = "1")]
2490 pub connection_pooling_enabled: ::core::option::Option<bool>,
2491 #[prost(message, repeated, tag = "8")]
2493 pub flags: ::prost::alloc::vec::Vec<ConnectionPoolFlags>,
2494 #[prost(int32, optional, tag = "9")]
2496 pub pooler_count: ::core::option::Option<i32>,
2497}
2498#[derive(Clone, PartialEq, ::prost::Message)]
2500pub struct ReadPoolAutoScaleConfig {
2501 #[prost(bool, optional, tag = "1")]
2503 pub enabled: ::core::option::Option<bool>,
2504 #[prost(int32, optional, tag = "2")]
2506 pub min_node_count: ::core::option::Option<i32>,
2507 #[prost(int32, optional, tag = "3")]
2509 pub max_node_count: ::core::option::Option<i32>,
2510 #[prost(message, repeated, tag = "4")]
2512 pub target_metrics: ::prost::alloc::vec::Vec<
2513 read_pool_auto_scale_config::TargetMetric,
2514 >,
2515 #[prost(bool, optional, tag = "5")]
2518 pub disable_scale_in: ::core::option::Option<bool>,
2519 #[prost(int32, optional, tag = "6")]
2521 pub scale_in_cooldown_seconds: ::core::option::Option<i32>,
2522 #[prost(int32, optional, tag = "7")]
2524 pub scale_out_cooldown_seconds: ::core::option::Option<i32>,
2525}
2526pub mod read_pool_auto_scale_config {
2528 #[derive(Clone, PartialEq, ::prost::Message)]
2530 pub struct TargetMetric {
2531 #[prost(string, optional, tag = "1")]
2533 pub metric: ::core::option::Option<::prost::alloc::string::String>,
2534 #[prost(float, optional, tag = "2")]
2536 pub target_value: ::core::option::Option<f32>,
2537 }
2538}
2539#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2541pub struct AdvancedMachineFeatures {
2542 #[prost(int32, tag = "1")]
2544 pub threads_per_core: i32,
2545}
2546#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2548pub struct SslCert {
2549 #[prost(string, tag = "1")]
2551 pub kind: ::prost::alloc::string::String,
2552 #[prost(string, tag = "2")]
2554 pub cert_serial_number: ::prost::alloc::string::String,
2555 #[prost(string, tag = "3")]
2557 pub cert: ::prost::alloc::string::String,
2558 #[prost(message, optional, tag = "4")]
2562 pub create_time: ::core::option::Option<::prost_types::Timestamp>,
2563 #[prost(string, tag = "5")]
2565 pub common_name: ::prost::alloc::string::String,
2566 #[prost(message, optional, tag = "6")]
2570 pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
2571 #[prost(string, tag = "7")]
2573 pub sha1_fingerprint: ::prost::alloc::string::String,
2574 #[prost(string, tag = "8")]
2576 pub instance: ::prost::alloc::string::String,
2577 #[prost(string, tag = "9")]
2579 pub self_link: ::prost::alloc::string::String,
2580}
2581#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2583pub struct SslCertDetail {
2584 #[prost(message, optional, tag = "1")]
2586 pub cert_info: ::core::option::Option<SslCert>,
2587 #[prost(string, tag = "2")]
2590 pub cert_private_key: ::prost::alloc::string::String,
2591}
2592#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2594pub struct SqlActiveDirectoryConfig {
2595 #[prost(string, tag = "1")]
2597 pub kind: ::prost::alloc::string::String,
2598 #[prost(string, tag = "2")]
2600 pub domain: ::prost::alloc::string::String,
2601 #[prost(enumeration = "sql_active_directory_config::ActiveDirectoryMode", tag = "3")]
2603 pub mode: i32,
2604 #[prost(string, repeated, tag = "4")]
2607 pub dns_servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2608 #[prost(string, tag = "5")]
2611 pub admin_credential_secret_name: ::prost::alloc::string::String,
2612 #[prost(string, tag = "6")]
2615 pub organizational_unit: ::prost::alloc::string::String,
2616}
2617pub mod sql_active_directory_config {
2619 #[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 = 0,
2636 ManagedActiveDirectory = 1,
2638 #[deprecated]
2640 SelfManagedActiveDirectory = 2,
2641 CustomerManagedActiveDirectory = 3,
2643 }
2644 impl ActiveDirectoryMode {
2645 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2678pub struct SqlServerAuditConfig {
2679 #[prost(string, tag = "1")]
2681 pub kind: ::prost::alloc::string::String,
2682 #[prost(string, tag = "2")]
2684 pub bucket: ::prost::alloc::string::String,
2685 #[prost(message, optional, tag = "3")]
2687 pub retention_interval: ::core::option::Option<::prost_types::Duration>,
2688 #[prost(message, optional, tag = "4")]
2690 pub upload_interval: ::core::option::Option<::prost_types::Duration>,
2691}
2692#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2694pub struct SqlServerEntraIdConfig {
2695 #[prost(string, tag = "1")]
2697 pub kind: ::prost::alloc::string::String,
2698 #[prost(string, tag = "2")]
2700 pub tenant_id: ::prost::alloc::string::String,
2701 #[prost(string, tag = "3")]
2703 pub application_id: ::prost::alloc::string::String,
2704}
2705#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2707pub struct AcquireSsrsLeaseContext {
2708 #[prost(string, optional, tag = "1")]
2711 pub setup_login: ::core::option::Option<::prost::alloc::string::String>,
2712 #[prost(string, optional, tag = "2")]
2715 pub service_login: ::core::option::Option<::prost::alloc::string::String>,
2716 #[prost(string, optional, tag = "3")]
2718 pub report_database: ::core::option::Option<::prost::alloc::string::String>,
2719 #[prost(message, optional, tag = "4")]
2721 pub duration: ::core::option::Option<::prost_types::Duration>,
2722}
2723#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2725pub struct DnsNameMapping {
2726 #[prost(string, tag = "1")]
2728 pub name: ::prost::alloc::string::String,
2729 #[prost(enumeration = "dns_name_mapping::ConnectionType", tag = "2")]
2731 pub connection_type: i32,
2732 #[prost(enumeration = "dns_name_mapping::DnsScope", tag = "3")]
2734 pub dns_scope: i32,
2735 #[prost(enumeration = "dns_name_mapping::RecordManager", tag = "4")]
2737 pub record_manager: i32,
2738}
2739pub mod dns_name_mapping {
2741 #[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 Unspecified = 0,
2758 Public = 1,
2760 PrivateServicesAccess = 2,
2762 PrivateServiceConnect = 3,
2764 }
2765 impl ConnectionType {
2766 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 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 #[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 Unspecified = 0,
2805 Instance = 1,
2807 Cluster = 2,
2809 }
2810 impl DnsScope {
2811 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 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 #[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 Unspecified = 0,
2848 Customer = 1,
2851 CloudSqlAutomation = 2,
2855 }
2856 impl RecordManager {
2857 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 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 Unspecified = 0,
2884 Sql = 1,
2886 Csv = 2,
2888 Bak = 4,
2889 Tde = 8,
2891}
2892impl SqlFileType {
2893 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 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 Unspecified = 0,
2923 Full = 1,
2925 Diff = 2,
2927 Tlog = 3,
2929}
2930impl BakType {
2931 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2956#[repr(i32)]
2957pub enum SqlMaintenanceType {
2958 Unspecified = 0,
2960 InstanceMaintenance = 1,
2963 ReplicaIncludedMaintenance = 2,
2967 InstanceSelfServiceMaintenance = 3,
2971 ReplicaIncludedSelfServiceMaintenance = 4,
2975}
2976impl SqlMaintenanceType {
2977 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 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 Unspecified = 0,
3013 #[deprecated]
3015 FirstGen = 1,
3016 SecondGen = 2,
3018 External = 3,
3020}
3021impl SqlBackendType {
3022 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 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 Unspecified = 0,
3051 Primary = 1,
3054 Outgoing = 2,
3059 Private = 3,
3061 Migrated1stGen = 4,
3065}
3066impl SqlIpAddressType {
3067 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3094#[repr(i32)]
3095pub enum SqlDatabaseVersion {
3096 Unspecified = 0,
3098 #[deprecated]
3100 Mysql51 = 2,
3101 #[deprecated]
3103 Mysql55 = 3,
3104 Mysql56 = 5,
3106 Mysql57 = 6,
3108 Mysql80 = 20,
3110 Mysql8018 = 41,
3112 Mysql8026 = 85,
3114 Mysql8027 = 111,
3116 Mysql8028 = 132,
3118 #[deprecated]
3120 Mysql8029 = 148,
3121 Mysql8030 = 174,
3123 Mysql8031 = 197,
3125 Mysql8032 = 213,
3127 Mysql8033 = 238,
3129 Mysql8034 = 239,
3131 Mysql8035 = 240,
3133 Mysql8036 = 241,
3135 Mysql8037 = 355,
3137 Mysql8039 = 357,
3139 Mysql8040 = 358,
3141 Mysql8041 = 488,
3143 Mysql8042 = 489,
3145 Mysql8043 = 553,
3147 Mysql8044 = 554,
3149 Mysql8045 = 555,
3151 Mysql8046 = 556,
3153 Mysql84 = 398,
3155 Mysql97 = 654,
3157 Sqlserver2017Standard = 11,
3159 Sqlserver2017Enterprise = 14,
3161 Sqlserver2017Express = 15,
3163 Sqlserver2017Web = 16,
3165 Postgres96 = 9,
3167 Postgres10 = 18,
3169 Postgres11 = 10,
3171 Postgres12 = 19,
3173 Postgres13 = 23,
3175 Postgres14 = 110,
3177 Postgres15 = 172,
3179 Postgres16 = 272,
3181 Postgres17 = 408,
3183 Postgres18 = 557,
3185 Sqlserver2019Standard = 26,
3187 Sqlserver2019Enterprise = 27,
3189 Sqlserver2019Express = 28,
3191 Sqlserver2019Web = 29,
3193 Sqlserver2022Standard = 199,
3195 Sqlserver2022Enterprise = 200,
3197 Sqlserver2022Express = 201,
3199 Sqlserver2022Web = 202,
3201}
3202impl SqlDatabaseVersion {
3203 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3325#[repr(i32)]
3326pub enum SqlPricingPlan {
3327 Unspecified = 0,
3329 Package = 1,
3331 PerUse = 2,
3333}
3334impl SqlPricingPlan {
3335 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 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 Unspecified = 0,
3361 Synchronous = 1,
3364 Asynchronous = 2,
3369}
3370impl SqlReplicationType {
3371 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3394#[repr(i32)]
3395pub enum SqlDataDiskType {
3396 Unspecified = 0,
3398 PdSsd = 1,
3400 PdHdd = 2,
3402 #[deprecated]
3405 ObsoleteLocalSsd = 3,
3406 HyperdiskBalanced = 4,
3408}
3409impl SqlDataDiskType {
3410 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3438#[repr(i32)]
3439pub enum SqlAvailabilityType {
3440 Unspecified = 0,
3442 Zonal = 1,
3444 Regional = 2,
3446}
3447impl SqlAvailabilityType {
3448 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 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 Unspecified = 0,
3474 Canary = 1,
3479 Stable = 2,
3484 Week5 = 3,
3488}
3489impl SqlUpdateTrack {
3490 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3515pub struct SqlBackupRunsDeleteRequest {
3516 #[prost(int64, tag = "1")]
3520 pub id: i64,
3521 #[prost(string, tag = "2")]
3523 pub instance: ::prost::alloc::string::String,
3524 #[prost(string, tag = "3")]
3526 pub project: ::prost::alloc::string::String,
3527}
3528#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3530pub struct SqlBackupRunsGetRequest {
3531 #[prost(int64, tag = "1")]
3533 pub id: i64,
3534 #[prost(string, tag = "2")]
3536 pub instance: ::prost::alloc::string::String,
3537 #[prost(string, tag = "3")]
3539 pub project: ::prost::alloc::string::String,
3540}
3541#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3543pub struct SqlBackupRunsInsertRequest {
3544 #[prost(string, tag = "1")]
3546 pub instance: ::prost::alloc::string::String,
3547 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3555pub struct SqlBackupRunsListRequest {
3556 #[prost(string, tag = "1")]
3559 pub instance: ::prost::alloc::string::String,
3560 #[prost(int32, tag = "2")]
3562 pub max_results: i32,
3563 #[prost(string, tag = "3")]
3566 pub page_token: ::prost::alloc::string::String,
3567 #[prost(string, tag = "4")]
3569 pub project: ::prost::alloc::string::String,
3570}
3571#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3573pub struct BackupRun {
3574 #[prost(string, tag = "1")]
3576 pub kind: ::prost::alloc::string::String,
3577 #[prost(enumeration = "SqlBackupRunStatus", tag = "2")]
3579 pub status: i32,
3580 #[prost(message, optional, tag = "3")]
3584 pub enqueued_time: ::core::option::Option<::prost_types::Timestamp>,
3585 #[prost(int64, tag = "4")]
3588 pub id: i64,
3589 #[prost(message, optional, tag = "5")]
3593 pub start_time: ::core::option::Option<::prost_types::Timestamp>,
3594 #[prost(message, optional, tag = "6")]
3598 pub end_time: ::core::option::Option<::prost_types::Timestamp>,
3599 #[prost(message, optional, tag = "7")]
3602 pub error: ::core::option::Option<OperationError>,
3603 #[prost(enumeration = "SqlBackupRunType", tag = "8")]
3607 pub r#type: i32,
3608 #[prost(string, tag = "9")]
3610 pub description: ::prost::alloc::string::String,
3611 #[prost(message, optional, tag = "10")]
3615 pub window_start_time: ::core::option::Option<::prost_types::Timestamp>,
3616 #[prost(string, tag = "11")]
3618 pub instance: ::prost::alloc::string::String,
3619 #[prost(string, tag = "12")]
3621 pub self_link: ::prost::alloc::string::String,
3622 #[prost(string, tag = "13")]
3624 pub location: ::prost::alloc::string::String,
3625 #[prost(enumeration = "SqlDatabaseVersion", tag = "15")]
3628 pub database_version: i32,
3629 #[prost(message, optional, tag = "16")]
3631 pub disk_encryption_configuration: ::core::option::Option<
3632 DiskEncryptionConfiguration,
3633 >,
3634 #[prost(message, optional, tag = "17")]
3636 pub disk_encryption_status: ::core::option::Option<DiskEncryptionStatus>,
3637 #[prost(enumeration = "SqlBackupKind", tag = "19")]
3639 pub backup_kind: i32,
3640 #[prost(string, tag = "23")]
3643 pub time_zone: ::prost::alloc::string::String,
3644 #[prost(int64, optional, tag = "24")]
3646 pub max_chargeable_bytes: ::core::option::Option<i64>,
3647}
3648#[derive(Clone, PartialEq, ::prost::Message)]
3650pub struct BackupRunsListResponse {
3651 #[prost(string, tag = "1")]
3653 pub kind: ::prost::alloc::string::String,
3654 #[prost(message, repeated, tag = "2")]
3656 pub items: ::prost::alloc::vec::Vec<BackupRun>,
3657 #[prost(string, tag = "3")]
3660 pub next_page_token: ::prost::alloc::string::String,
3661}
3662#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3664#[repr(i32)]
3665pub enum SqlBackupRunStatus {
3666 Unspecified = 0,
3668 Enqueued = 1,
3670 Overdue = 2,
3674 Running = 3,
3676 Failed = 4,
3678 Successful = 5,
3680 Skipped = 6,
3683 DeletionPending = 7,
3685 DeletionFailed = 8,
3687 Deleted = 9,
3689}
3690impl SqlBackupRunStatus {
3691 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3728#[repr(i32)]
3729pub enum SqlBackupKind {
3730 Unspecified = 0,
3732 Snapshot = 1,
3734 Physical = 2,
3736}
3737impl SqlBackupKind {
3738 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3761#[repr(i32)]
3762pub enum SqlBackupRunType {
3763 Unspecified = 0,
3765 Automated = 1,
3767 OnDemand = 2,
3769}
3770impl SqlBackupRunType {
3771 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 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}
3792pub 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 #[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 #[must_use]
3847 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3848 self.inner = self.inner.send_compressed(encoding);
3849 self
3850 }
3851 #[must_use]
3853 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3854 self.inner = self.inner.accept_compressed(encoding);
3855 self
3856 }
3857 #[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 #[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 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 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 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3978pub struct SqlInstancesAddServerCaRequest {
3979 #[prost(string, tag = "1")]
3981 pub instance: ::prost::alloc::string::String,
3982 #[prost(string, tag = "2")]
3984 pub project: ::prost::alloc::string::String,
3985}
3986#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3988pub struct SqlInstancesAddServerCertificateRequest {
3989 #[prost(string, tag = "1")]
3991 pub instance: ::prost::alloc::string::String,
3992 #[prost(string, tag = "2")]
3994 pub project: ::prost::alloc::string::String,
3995}
3996#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3998pub struct SqlInstancesAddEntraIdCertificateRequest {
3999 #[prost(string, tag = "1")]
4001 pub instance: ::prost::alloc::string::String,
4002 #[prost(string, tag = "2")]
4004 pub project: ::prost::alloc::string::String,
4005}
4006#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4008pub struct SqlInstancesCloneRequest {
4009 #[prost(string, tag = "1")]
4012 pub instance: ::prost::alloc::string::String,
4013 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4021pub struct SqlInstancesDeleteRequest {
4022 #[prost(string, tag = "1")]
4024 pub instance: ::prost::alloc::string::String,
4025 #[prost(string, tag = "2")]
4027 pub project: ::prost::alloc::string::String,
4028 #[prost(bool, optional, tag = "7")]
4030 pub enable_final_backup: ::core::option::Option<bool>,
4031 #[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}
4037pub mod sql_instances_delete_request {
4039 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
4040 pub enum Expiration {
4041 #[prost(int64, tag = "4")]
4043 FinalBackupTtlDays(i64),
4044 #[prost(message, tag = "6")]
4047 FinalBackupExpiryTime(::prost_types::Timestamp),
4048 }
4049}
4050#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4052pub struct SqlInstancesDemoteMasterRequest {
4053 #[prost(string, tag = "1")]
4055 pub instance: ::prost::alloc::string::String,
4056 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4064pub struct SqlInstancesDemoteRequest {
4065 #[prost(string, tag = "1")]
4067 pub instance: ::prost::alloc::string::String,
4068 #[prost(string, tag = "2")]
4070 pub project: ::prost::alloc::string::String,
4071 #[prost(message, optional, tag = "100")]
4073 pub body: ::core::option::Option<InstancesDemoteRequest>,
4074}
4075#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4077pub struct SqlInstancesExportRequest {
4078 #[prost(string, tag = "1")]
4080 pub instance: ::prost::alloc::string::String,
4081 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4089pub struct SqlInstancesFailoverRequest {
4090 #[prost(string, tag = "1")]
4092 pub instance: ::prost::alloc::string::String,
4093 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4101pub struct SqlInstancesGetRequest {
4102 #[prost(string, tag = "1")]
4104 pub instance: ::prost::alloc::string::String,
4105 #[prost(string, tag = "2")]
4107 pub project: ::prost::alloc::string::String,
4108}
4109#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4111pub struct SqlInstancesImportRequest {
4112 #[prost(string, tag = "1")]
4114 pub instance: ::prost::alloc::string::String,
4115 #[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#[derive(Clone, PartialEq, ::prost::Message)]
4123pub struct SqlInstancesInsertRequest {
4124 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4133pub struct SqlInstancesListRequest {
4134 #[prost(string, tag = "1")]
4144 pub filter: ::prost::alloc::string::String,
4145 #[prost(uint32, tag = "2")]
4150 pub max_results: u32,
4151 #[prost(string, tag = "3")]
4154 pub page_token: ::prost::alloc::string::String,
4155 #[prost(string, tag = "4")]
4157 pub project: ::prost::alloc::string::String,
4158}
4159#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4161pub struct SqlInstancesListServerCasRequest {
4162 #[prost(string, tag = "1")]
4164 pub instance: ::prost::alloc::string::String,
4165 #[prost(string, tag = "2")]
4167 pub project: ::prost::alloc::string::String,
4168}
4169#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4171pub struct SqlInstancesListServerCertificatesRequest {
4172 #[prost(string, tag = "1")]
4174 pub instance: ::prost::alloc::string::String,
4175 #[prost(string, tag = "2")]
4177 pub project: ::prost::alloc::string::String,
4178}
4179#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4181pub struct SqlInstancesListEntraIdCertificatesRequest {
4182 #[prost(string, tag = "1")]
4184 pub instance: ::prost::alloc::string::String,
4185 #[prost(string, tag = "2")]
4187 pub project: ::prost::alloc::string::String,
4188}
4189#[derive(Clone, PartialEq, ::prost::Message)]
4191pub struct SqlInstancesPatchRequest {
4192 #[prost(string, tag = "1")]
4194 pub instance: ::prost::alloc::string::String,
4195 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4203pub struct SqlInstancesPromoteReplicaRequest {
4204 #[prost(string, tag = "1")]
4206 pub instance: ::prost::alloc::string::String,
4207 #[prost(string, tag = "2")]
4209 pub project: ::prost::alloc::string::String,
4210 #[prost(bool, tag = "3")]
4217 pub failover: bool,
4218}
4219#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4221pub struct SqlInstancesSwitchoverRequest {
4222 #[prost(string, tag = "1")]
4224 pub instance: ::prost::alloc::string::String,
4225 #[prost(string, tag = "2")]
4227 pub project: ::prost::alloc::string::String,
4228 #[prost(message, optional, tag = "3")]
4232 pub db_timeout: ::core::option::Option<::prost_types::Duration>,
4233}
4234#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4236pub struct SqlInstancesResetSslConfigRequest {
4237 #[prost(string, tag = "1")]
4239 pub instance: ::prost::alloc::string::String,
4240 #[prost(string, tag = "2")]
4242 pub project: ::prost::alloc::string::String,
4243 #[prost(
4245 enumeration = "sql_instances_reset_ssl_config_request::ResetSslMode",
4246 tag = "3"
4247 )]
4248 pub mode: i32,
4249}
4250pub mod sql_instances_reset_ssl_config_request {
4252 #[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 Unspecified = 0,
4268 All = 1,
4270 SyncFromPrimary = 2,
4274 }
4275 impl ResetSslMode {
4276 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4300pub struct SqlInstancesRestartRequest {
4301 #[prost(string, tag = "1")]
4303 pub instance: ::prost::alloc::string::String,
4304 #[prost(string, tag = "2")]
4306 pub project: ::prost::alloc::string::String,
4307}
4308#[derive(Clone, PartialEq, ::prost::Message)]
4310pub struct SqlInstancesRestoreBackupRequest {
4311 #[prost(string, tag = "1")]
4313 pub instance: ::prost::alloc::string::String,
4314 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4322pub struct SqlInstancesRotateServerCaRequest {
4323 #[prost(string, tag = "1")]
4325 pub instance: ::prost::alloc::string::String,
4326 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4334pub struct SqlInstancesRotateServerCertificateRequest {
4335 #[prost(string, tag = "1")]
4337 pub instance: ::prost::alloc::string::String,
4338 #[prost(string, tag = "2")]
4340 pub project: ::prost::alloc::string::String,
4341 #[prost(message, optional, tag = "100")]
4343 pub body: ::core::option::Option<InstancesRotateServerCertificateRequest>,
4344}
4345#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4347pub struct SqlInstancesRotateEntraIdCertificateRequest {
4348 #[prost(string, tag = "1")]
4350 pub instance: ::prost::alloc::string::String,
4351 #[prost(string, tag = "2")]
4353 pub project: ::prost::alloc::string::String,
4354 #[prost(message, optional, tag = "100")]
4356 pub body: ::core::option::Option<InstancesRotateEntraIdCertificateRequest>,
4357}
4358#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4360pub struct SqlInstancesStartReplicaRequest {
4361 #[prost(string, tag = "1")]
4363 pub instance: ::prost::alloc::string::String,
4364 #[prost(string, tag = "2")]
4366 pub project: ::prost::alloc::string::String,
4367}
4368#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4370pub struct SqlInstancesStopReplicaRequest {
4371 #[prost(string, tag = "1")]
4373 pub instance: ::prost::alloc::string::String,
4374 #[prost(string, tag = "2")]
4376 pub project: ::prost::alloc::string::String,
4377}
4378#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4380pub struct SqlInstancesTruncateLogRequest {
4381 #[prost(string, tag = "1")]
4383 pub instance: ::prost::alloc::string::String,
4384 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4392pub struct SqlInstancesPerformDiskShrinkRequest {
4393 #[prost(string, tag = "1")]
4395 pub instance: ::prost::alloc::string::String,
4396 #[prost(string, tag = "2")]
4398 pub project: ::prost::alloc::string::String,
4399 #[prost(message, optional, tag = "100")]
4401 pub body: ::core::option::Option<PerformDiskShrinkContext>,
4402}
4403#[derive(Clone, PartialEq, ::prost::Message)]
4405pub struct SqlInstancesUpdateRequest {
4406 #[prost(string, tag = "1")]
4408 pub instance: ::prost::alloc::string::String,
4409 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4417pub struct SqlInstancesRescheduleMaintenanceRequest {
4418 #[prost(string, tag = "1")]
4420 pub instance: ::prost::alloc::string::String,
4421 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4429pub struct SqlInstancesReencryptRequest {
4430 #[prost(string, tag = "1")]
4432 pub instance: ::prost::alloc::string::String,
4433 #[prost(string, tag = "2")]
4435 pub project: ::prost::alloc::string::String,
4436 #[prost(message, optional, tag = "3")]
4438 pub body: ::core::option::Option<InstancesReencryptRequest>,
4439}
4440#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4442pub struct InstancesReencryptRequest {
4443 #[prost(message, optional, tag = "1")]
4445 pub backup_reencryption_config: ::core::option::Option<BackupReencryptionConfig>,
4446}
4447#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4449pub struct BackupReencryptionConfig {
4450 #[prost(int32, optional, tag = "1")]
4452 pub backup_limit: ::core::option::Option<i32>,
4453 #[prost(enumeration = "backup_reencryption_config::BackupType", optional, tag = "2")]
4455 pub backup_type: ::core::option::Option<i32>,
4456}
4457pub mod backup_reencryption_config {
4459 #[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 Unspecified = 0,
4475 Automated = 1,
4477 OnDemand = 2,
4479 }
4480 impl BackupType {
4481 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4505pub struct ExternalSyncSelectedObject {
4506 #[prost(string, tag = "1")]
4508 pub database: ::prost::alloc::string::String,
4509}
4510#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4512pub struct SqlInstancesGetDiskShrinkConfigRequest {
4513 #[prost(string, tag = "1")]
4515 pub instance: ::prost::alloc::string::String,
4516 #[prost(string, tag = "2")]
4518 pub project: ::prost::alloc::string::String,
4519}
4520#[derive(Clone, PartialEq, ::prost::Message)]
4522pub struct SqlInstancesVerifyExternalSyncSettingsRequest {
4523 #[prost(string, tag = "1")]
4525 pub instance: ::prost::alloc::string::String,
4526 #[prost(string, tag = "2")]
4528 pub project: ::prost::alloc::string::String,
4529 #[prost(bool, tag = "3")]
4531 pub verify_connection_only: bool,
4532 #[prost(
4534 enumeration = "sql_instances_verify_external_sync_settings_request::ExternalSyncMode",
4535 tag = "4"
4536 )]
4537 pub sync_mode: i32,
4538 #[prost(bool, tag = "5")]
4540 pub verify_replication_only: bool,
4541 #[prost(
4545 enumeration = "sql_instances_verify_external_sync_settings_request::MigrationType",
4546 tag = "7"
4547 )]
4548 pub migration_type: i32,
4549 #[prost(enumeration = "ExternalSyncParallelLevel", tag = "8")]
4552 pub sync_parallel_level: i32,
4553 #[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}
4565pub 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 Unspecified = 0,
4582 Online = 1,
4585 Offline = 2,
4588 }
4589 impl ExternalSyncMode {
4590 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 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 #[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 Unspecified = 0,
4628 Logical = 1,
4630 Physical = 2,
4632 }
4633 impl MigrationType {
4634 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 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 #[prost(message, tag = "6")]
4659 MysqlSyncConfig(super::MySqlSyncConfig),
4660 }
4661}
4662#[derive(Clone, PartialEq, ::prost::Message)]
4664pub struct SqlInstancesStartExternalSyncRequest {
4665 #[prost(string, tag = "1")]
4667 pub instance: ::prost::alloc::string::String,
4668 #[prost(string, tag = "2")]
4670 pub project: ::prost::alloc::string::String,
4671 #[prost(
4673 enumeration = "sql_instances_verify_external_sync_settings_request::ExternalSyncMode",
4674 tag = "3"
4675 )]
4676 pub sync_mode: i32,
4677 #[prost(bool, tag = "4")]
4679 pub skip_verification: bool,
4680 #[prost(enumeration = "ExternalSyncParallelLevel", tag = "7")]
4683 pub sync_parallel_level: i32,
4684 #[prost(
4688 enumeration = "sql_instances_verify_external_sync_settings_request::MigrationType",
4689 tag = "8"
4690 )]
4691 pub migration_type: i32,
4692 #[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}
4703pub mod sql_instances_start_external_sync_request {
4705 #[derive(Clone, PartialEq, ::prost::Oneof)]
4706 pub enum SyncConfig {
4707 #[prost(message, tag = "6")]
4709 MysqlSyncConfig(super::MySqlSyncConfig),
4710 }
4711}
4712#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4714pub struct SqlInstancesResetReplicaSizeRequest {
4715 #[prost(string, tag = "1")]
4717 pub instance: ::prost::alloc::string::String,
4718 #[prost(string, tag = "2")]
4720 pub project: ::prost::alloc::string::String,
4721}
4722#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4724pub struct SqlInstancesCreateEphemeralCertRequest {
4725 #[prost(string, tag = "1")]
4727 pub instance: ::prost::alloc::string::String,
4728 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4736pub struct InstancesCloneRequest {
4737 #[prost(message, optional, tag = "1")]
4739 pub clone_context: ::core::option::Option<CloneContext>,
4740}
4741#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4743pub struct InstancesDemoteMasterRequest {
4744 #[prost(message, optional, tag = "1")]
4746 pub demote_master_context: ::core::option::Option<DemoteMasterContext>,
4747}
4748#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4751pub struct InstancesDemoteRequest {
4752 #[prost(message, optional, tag = "1")]
4754 pub demote_context: ::core::option::Option<DemoteContext>,
4755}
4756#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4758pub struct InstancesExportRequest {
4759 #[prost(message, optional, tag = "1")]
4761 pub export_context: ::core::option::Option<ExportContext>,
4762}
4763#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4765pub struct InstancesFailoverRequest {
4766 #[prost(message, optional, tag = "1")]
4768 pub failover_context: ::core::option::Option<FailoverContext>,
4769}
4770#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4772pub struct SslCertsCreateEphemeralRequest {
4773 #[prost(string, tag = "1")]
4775 pub public_key: ::prost::alloc::string::String,
4776 #[prost(string, tag = "2")]
4778 pub access_token: ::prost::alloc::string::String,
4779}
4780#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4782pub struct InstancesImportRequest {
4783 #[prost(message, optional, tag = "1")]
4785 pub import_context: ::core::option::Option<ImportContext>,
4786}
4787#[derive(Clone, PartialEq, ::prost::Message)]
4789pub struct InstancesPreCheckMajorVersionUpgradeRequest {
4790 #[prost(message, optional, tag = "1")]
4793 pub pre_check_major_version_upgrade_context: ::core::option::Option<
4794 PreCheckMajorVersionUpgradeContext,
4795 >,
4796}
4797#[derive(Clone, PartialEq, ::prost::Message)]
4799pub struct InstancesListResponse {
4800 #[prost(string, tag = "1")]
4802 pub kind: ::prost::alloc::string::String,
4803 #[prost(message, repeated, tag = "2")]
4805 pub warnings: ::prost::alloc::vec::Vec<ApiWarning>,
4806 #[prost(message, repeated, tag = "3")]
4808 pub items: ::prost::alloc::vec::Vec<DatabaseInstance>,
4809 #[prost(string, tag = "4")]
4812 pub next_page_token: ::prost::alloc::string::String,
4813}
4814#[derive(Clone, PartialEq, ::prost::Message)]
4816pub struct InstancesListServerCasResponse {
4817 #[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 #[prost(string, tag = "3")]
4824 pub kind: ::prost::alloc::string::String,
4825}
4826#[derive(Clone, PartialEq, ::prost::Message)]
4828pub struct InstancesListServerCertificatesResponse {
4829 #[prost(message, repeated, tag = "1")]
4831 pub ca_certs: ::prost::alloc::vec::Vec<SslCert>,
4832 #[prost(message, repeated, tag = "2")]
4835 pub server_certs: ::prost::alloc::vec::Vec<SslCert>,
4836 #[prost(string, tag = "3")]
4838 pub active_version: ::prost::alloc::string::String,
4839 #[prost(string, tag = "4")]
4841 pub kind: ::prost::alloc::string::String,
4842}
4843#[derive(Clone, PartialEq, ::prost::Message)]
4845pub struct InstancesListEntraIdCertificatesResponse {
4846 #[prost(message, repeated, tag = "1")]
4848 pub certs: ::prost::alloc::vec::Vec<SslCert>,
4849 #[prost(string, tag = "2")]
4851 pub active_version: ::prost::alloc::string::String,
4852 #[prost(string, tag = "3")]
4854 pub kind: ::prost::alloc::string::String,
4855}
4856#[derive(Clone, PartialEq, ::prost::Message)]
4858pub struct InstancesRestoreBackupRequest {
4859 #[prost(message, optional, tag = "1")]
4861 pub restore_backup_context: ::core::option::Option<RestoreBackupContext>,
4862 #[prost(string, tag = "2")]
4866 pub backup: ::prost::alloc::string::String,
4867 #[prost(string, tag = "4")]
4873 pub backupdr_backup: ::prost::alloc::string::String,
4874 #[prost(message, optional, tag = "3")]
4880 pub restore_instance_settings: ::core::option::Option<DatabaseInstance>,
4881 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4891pub struct InstancesRotateServerCaRequest {
4892 #[prost(message, optional, tag = "1")]
4894 pub rotate_server_ca_context: ::core::option::Option<RotateServerCaContext>,
4895}
4896#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4898pub struct InstancesRotateServerCertificateRequest {
4899 #[prost(message, optional, tag = "1")]
4901 pub rotate_server_certificate_context: ::core::option::Option<
4902 RotateServerCertificateContext,
4903 >,
4904}
4905#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4907pub struct InstancesRotateEntraIdCertificateRequest {
4908 #[prost(message, optional, tag = "1")]
4910 pub rotate_entra_id_certificate_context: ::core::option::Option<
4911 RotateEntraIdCertificateContext,
4912 >,
4913}
4914#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4916pub struct InstancesTruncateLogRequest {
4917 #[prost(message, optional, tag = "1")]
4919 pub truncate_log_context: ::core::option::Option<TruncateLogContext>,
4920}
4921#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4923pub struct InstancesAcquireSsrsLeaseRequest {
4924 #[prost(message, optional, tag = "1")]
4926 pub acquire_ssrs_lease_context: ::core::option::Option<AcquireSsrsLeaseContext>,
4927}
4928#[derive(Clone, PartialEq, ::prost::Message)]
4930pub struct SqlInstancesPreCheckMajorVersionUpgradeRequest {
4931 #[prost(string, tag = "1")]
4933 pub instance: ::prost::alloc::string::String,
4934 #[prost(string, tag = "2")]
4936 pub project: ::prost::alloc::string::String,
4937 #[prost(message, optional, tag = "3")]
4940 pub body: ::core::option::Option<InstancesPreCheckMajorVersionUpgradeRequest>,
4941}
4942#[derive(Clone, PartialEq, ::prost::Message)]
4944pub struct SqlInstancesVerifyExternalSyncSettingsResponse {
4945 #[prost(string, tag = "1")]
4947 pub kind: ::prost::alloc::string::String,
4948 #[prost(message, repeated, tag = "2")]
4950 pub errors: ::prost::alloc::vec::Vec<SqlExternalSyncSettingError>,
4951 #[prost(message, repeated, tag = "3")]
4953 pub warnings: ::prost::alloc::vec::Vec<SqlExternalSyncSettingError>,
4954}
4955#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4957pub struct SqlInstancesGetDiskShrinkConfigResponse {
4958 #[prost(string, tag = "1")]
4960 pub kind: ::prost::alloc::string::String,
4961 #[prost(int64, tag = "2")]
4963 pub minimal_target_size_gb: i64,
4964 #[prost(string, tag = "3")]
4966 pub message: ::prost::alloc::string::String,
4967}
4968#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4970pub struct SqlInstancesGetLatestRecoveryTimeRequest {
4971 #[prost(string, tag = "1")]
4973 pub instance: ::prost::alloc::string::String,
4974 #[prost(string, tag = "2")]
4976 pub project: ::prost::alloc::string::String,
4977 #[prost(message, optional, tag = "3")]
4980 pub source_instance_deletion_time: ::core::option::Option<::prost_types::Timestamp>,
4981}
4982#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4984pub struct SqlInstancesGetLatestRecoveryTimeResponse {
4985 #[prost(string, tag = "1")]
4987 pub kind: ::prost::alloc::string::String,
4988 #[prost(message, optional, tag = "2")]
4990 pub latest_recovery_time: ::core::option::Option<::prost_types::Timestamp>,
4991 #[prost(message, optional, tag = "3")]
4993 pub earliest_recovery_time: ::core::option::Option<::prost_types::Timestamp>,
4994}
4995#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4997pub struct CloneContext {
4998 #[prost(string, tag = "1")]
5000 pub kind: ::prost::alloc::string::String,
5001 #[prost(int64, tag = "2")]
5003 pub pitr_timestamp_ms: i64,
5004 #[prost(string, tag = "3")]
5006 pub destination_instance_name: ::prost::alloc::string::String,
5007 #[prost(message, optional, tag = "4")]
5011 pub bin_log_coordinates: ::core::option::Option<BinLogCoordinates>,
5012 #[prost(message, optional, tag = "5")]
5015 pub point_in_time: ::core::option::Option<::prost_types::Timestamp>,
5016 #[prost(string, tag = "6")]
5024 pub allocated_ip_range: ::prost::alloc::string::String,
5025 #[prost(string, repeated, tag = "9")]
5028 pub database_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
5029 #[prost(string, optional, tag = "10")]
5033 pub preferred_zone: ::core::option::Option<::prost::alloc::string::String>,
5034 #[prost(string, optional, tag = "11")]
5039 pub preferred_secondary_zone: ::core::option::Option<::prost::alloc::string::String>,
5040 #[prost(message, optional, tag = "12")]
5043 pub source_instance_deletion_time: ::core::option::Option<::prost_types::Timestamp>,
5044 #[prost(string, optional, tag = "13")]
5049 pub destination_project: ::core::option::Option<::prost::alloc::string::String>,
5050 #[prost(string, optional, tag = "14")]
5055 pub destination_network: ::core::option::Option<::prost::alloc::string::String>,
5056}
5057#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5060pub struct PointInTimeRestoreContext {
5061 #[prost(string, optional, tag = "1")]
5065 pub datasource: ::core::option::Option<::prost::alloc::string::String>,
5066 #[prost(message, optional, tag = "2")]
5068 pub point_in_time: ::core::option::Option<::prost_types::Timestamp>,
5069 #[prost(string, optional, tag = "3")]
5071 pub target_instance: ::core::option::Option<::prost::alloc::string::String>,
5072 #[prost(string, optional, tag = "4")]
5076 pub private_network: ::core::option::Option<::prost::alloc::string::String>,
5077 #[prost(string, optional, tag = "5")]
5085 pub allocated_ip_range: ::core::option::Option<::prost::alloc::string::String>,
5086 #[prost(string, optional, tag = "6")]
5090 pub preferred_zone: ::core::option::Option<::prost::alloc::string::String>,
5091 #[prost(string, optional, tag = "9")]
5095 pub preferred_secondary_zone: ::core::option::Option<::prost::alloc::string::String>,
5096}
5097#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5099pub struct BinLogCoordinates {
5100 #[prost(string, tag = "1")]
5102 pub bin_log_file_name: ::prost::alloc::string::String,
5103 #[prost(int64, tag = "2")]
5105 pub bin_log_position: i64,
5106 #[prost(string, tag = "3")]
5108 pub kind: ::prost::alloc::string::String,
5109}
5110#[derive(Clone, PartialEq, ::prost::Message)]
5112pub struct DatabaseInstance {
5113 #[prost(string, tag = "1")]
5115 pub kind: ::prost::alloc::string::String,
5116 #[prost(enumeration = "database_instance::SqlInstanceState", tag = "2")]
5118 pub state: i32,
5119 #[prost(enumeration = "SqlDatabaseVersion", tag = "3")]
5122 pub database_version: i32,
5123 #[prost(message, optional, tag = "4")]
5125 pub settings: ::core::option::Option<Settings>,
5126 #[prost(string, tag = "5")]
5129 pub etag: ::prost::alloc::string::String,
5130 #[prost(message, optional, tag = "6")]
5132 pub failover_replica: ::core::option::Option<database_instance::SqlFailoverReplica>,
5133 #[prost(string, tag = "7")]
5136 pub master_instance_name: ::prost::alloc::string::String,
5137 #[prost(string, repeated, tag = "8")]
5139 pub replica_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
5140 #[deprecated]
5142 #[prost(message, optional, tag = "9")]
5143 pub max_disk_size: ::core::option::Option<i64>,
5144 #[deprecated]
5151 #[prost(message, optional, tag = "10")]
5152 pub current_disk_size: ::core::option::Option<i64>,
5153 #[prost(message, repeated, tag = "11")]
5155 pub ip_addresses: ::prost::alloc::vec::Vec<IpMapping>,
5156 #[prost(message, optional, tag = "12")]
5158 pub server_ca_cert: ::core::option::Option<SslCert>,
5159 #[prost(enumeration = "SqlInstanceType", tag = "13")]
5161 pub instance_type: i32,
5162 #[prost(string, tag = "14")]
5165 pub project: ::prost::alloc::string::String,
5166 #[deprecated]
5170 #[prost(string, tag = "15")]
5171 pub ipv6_address: ::prost::alloc::string::String,
5172 #[prost(string, tag = "16")]
5175 pub service_account_email_address: ::prost::alloc::string::String,
5176 #[prost(message, optional, tag = "17")]
5178 pub on_premises_configuration: ::core::option::Option<OnPremisesConfiguration>,
5179 #[prost(message, optional, tag = "18")]
5181 pub replica_configuration: ::core::option::Option<ReplicaConfiguration>,
5182 #[prost(enumeration = "SqlBackendType", tag = "19")]
5189 pub backend_type: i32,
5190 #[prost(string, tag = "20")]
5192 pub self_link: ::prost::alloc::string::String,
5193 #[prost(enumeration = "SqlSuspensionReason", repeated, tag = "21")]
5195 pub suspension_reason: ::prost::alloc::vec::Vec<i32>,
5196 #[prost(string, tag = "22")]
5198 pub connection_name: ::prost::alloc::string::String,
5199 #[prost(string, tag = "23")]
5201 pub name: ::prost::alloc::string::String,
5202 #[prost(string, tag = "24")]
5211 pub region: ::prost::alloc::string::String,
5212 #[prost(string, tag = "25")]
5217 pub gce_zone: ::prost::alloc::string::String,
5218 #[prost(string, tag = "34")]
5223 pub secondary_gce_zone: ::prost::alloc::string::String,
5224 #[prost(message, optional, tag = "26")]
5226 pub disk_encryption_configuration: ::core::option::Option<
5227 DiskEncryptionConfiguration,
5228 >,
5229 #[prost(message, optional, tag = "27")]
5231 pub disk_encryption_status: ::core::option::Option<DiskEncryptionStatus>,
5232 #[prost(string, tag = "29")]
5235 pub root_password: ::prost::alloc::string::String,
5236 #[prost(message, optional, tag = "30")]
5238 pub scheduled_maintenance: ::core::option::Option<
5239 database_instance::SqlScheduledMaintenance,
5240 >,
5241 #[prost(message, optional, tag = "35")]
5245 pub satisfies_pzs: ::core::option::Option<bool>,
5246 #[prost(string, tag = "40")]
5249 pub database_installed_version: ::prost::alloc::string::String,
5250 #[prost(message, optional, tag = "38")]
5258 pub out_of_disk_report: ::core::option::Option<
5259 database_instance::SqlOutOfDiskReport,
5260 >,
5261 #[prost(message, optional, tag = "39")]
5265 pub create_time: ::core::option::Option<::prost_types::Timestamp>,
5266 #[prost(string, repeated, tag = "41")]
5268 pub available_maintenance_versions: ::prost::alloc::vec::Vec<
5269 ::prost::alloc::string::String,
5270 >,
5271 #[prost(string, tag = "42")]
5273 pub maintenance_version: ::prost::alloc::string::String,
5274 #[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 #[prost(string, optional, tag = "48")]
5285 pub psc_service_attachment_link: ::core::option::Option<
5286 ::prost::alloc::string::String,
5287 >,
5288 #[prost(string, optional, tag = "49")]
5290 pub dns_name: ::core::option::Option<::prost::alloc::string::String>,
5291 #[deprecated]
5293 #[prost(string, optional, tag = "51")]
5294 pub primary_dns_name: ::core::option::Option<::prost::alloc::string::String>,
5295 #[prost(string, optional, tag = "52")]
5297 pub write_endpoint: ::core::option::Option<::prost::alloc::string::String>,
5298 #[prost(message, optional, tag = "54")]
5304 pub replication_cluster: ::core::option::Option<ReplicationCluster>,
5305 #[prost(message, optional, tag = "55")]
5307 pub gemini_config: ::core::option::Option<GeminiInstanceConfig>,
5308 #[prost(message, optional, tag = "56")]
5312 pub satisfies_pzi: ::core::option::Option<bool>,
5313 #[prost(message, optional, tag = "57")]
5316 pub switch_transaction_logs_to_cloud_storage_enabled: ::core::option::Option<bool>,
5317 #[prost(message, optional, tag = "59")]
5321 pub include_replicas_for_major_version_upgrade: ::core::option::Option<bool>,
5322 #[prost(map = "string, string", tag = "60")]
5336 pub tags: ::std::collections::HashMap<
5337 ::prost::alloc::string::String,
5338 ::prost::alloc::string::String,
5339 >,
5340 #[prost(int32, optional, tag = "63")]
5342 pub node_count: ::core::option::Option<i32>,
5343 #[prost(message, repeated, tag = "64")]
5346 pub nodes: ::prost::alloc::vec::Vec<database_instance::PoolNodeConfig>,
5347 #[prost(message, repeated, tag = "67")]
5349 pub dns_names: ::prost::alloc::vec::Vec<DnsNameMapping>,
5350}
5351pub mod database_instance {
5353 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5354 pub struct SqlFailoverReplica {
5355 #[prost(string, tag = "1")]
5359 pub name: ::prost::alloc::string::String,
5360 #[prost(message, optional, tag = "2")]
5364 pub available: ::core::option::Option<bool>,
5365 }
5366 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5368 pub struct SqlScheduledMaintenance {
5369 #[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 #[prost(bool, tag = "3")]
5377 pub can_reschedule: bool,
5378 #[prost(message, optional, tag = "4")]
5380 pub schedule_deadline_time: ::core::option::Option<::prost_types::Timestamp>,
5381 }
5382 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5384 pub struct SqlOutOfDiskReport {
5385 #[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 #[prost(int32, optional, tag = "2")]
5405 pub sql_min_recommended_increase_size_gb: ::core::option::Option<i32>,
5406 }
5407 pub mod sql_out_of_disk_report {
5409 #[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 = 0,
5425 Normal = 1,
5427 SoftShutdown = 2,
5430 }
5431 impl SqlOutOfDiskState {
5432 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 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 #[derive(Clone, PartialEq, ::prost::Message)]
5456 pub struct PoolNodeConfig {
5457 #[prost(string, optional, tag = "1")]
5460 pub name: ::core::option::Option<::prost::alloc::string::String>,
5461 #[prost(string, optional, tag = "2")]
5463 pub gce_zone: ::core::option::Option<::prost::alloc::string::String>,
5464 #[prost(message, repeated, tag = "3")]
5467 pub ip_addresses: ::prost::alloc::vec::Vec<super::IpMapping>,
5468 #[prost(string, optional, tag = "4")]
5470 pub dns_name: ::core::option::Option<::prost::alloc::string::String>,
5471 #[prost(enumeration = "SqlInstanceState", optional, tag = "5")]
5473 pub state: ::core::option::Option<i32>,
5474 #[prost(message, repeated, tag = "6")]
5476 pub dns_names: ::prost::alloc::vec::Vec<super::DnsNameMapping>,
5477 #[prost(string, optional, tag = "7")]
5480 pub psc_service_attachment_link: ::core::option::Option<
5481 ::prost::alloc::string::String,
5482 >,
5483 #[prost(message, repeated, tag = "8")]
5487 pub psc_auto_connections: ::prost::alloc::vec::Vec<
5488 super::PscAutoConnectionConfig,
5489 >,
5490 }
5491 #[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 Unspecified = 0,
5507 Runnable = 1,
5509 Suspended = 2,
5511 PendingDelete = 3,
5513 PendingCreate = 4,
5515 Maintenance = 5,
5517 Failed = 6,
5520 #[deprecated]
5522 OnlineMaintenance = 7,
5523 Repairing = 8,
5526 }
5527 impl SqlInstanceState {
5528 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 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 #[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 NewNetworkArchitecture = 1,
5581 OldNetworkArchitecture = 2,
5583 }
5584 impl SqlNetworkArchitecture {
5585 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 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#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5609pub struct GeminiInstanceConfig {
5610 #[prost(bool, optional, tag = "1")]
5612 pub entitled: ::core::option::Option<bool>,
5613 #[prost(bool, optional, tag = "2")]
5615 pub google_vacuum_mgmt_enabled: ::core::option::Option<bool>,
5616 #[prost(bool, optional, tag = "3")]
5618 pub oom_session_cancel_enabled: ::core::option::Option<bool>,
5619 #[prost(bool, optional, tag = "4")]
5621 pub active_query_enabled: ::core::option::Option<bool>,
5622 #[prost(bool, optional, tag = "5")]
5624 pub index_advisor_enabled: ::core::option::Option<bool>,
5625 #[prost(bool, optional, tag = "6")]
5627 pub flag_recommender_enabled: ::core::option::Option<bool>,
5628}
5629#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5634pub struct ReplicationCluster {
5635 #[prost(string, tag = "1")]
5644 pub psa_write_endpoint: ::prost::alloc::string::String,
5645 #[prost(string, tag = "2")]
5652 pub failover_dr_replica_name: ::prost::alloc::string::String,
5653 #[prost(bool, tag = "4")]
5656 pub dr_replica: bool,
5657}
5658#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5660pub struct AvailableDatabaseVersion {
5661 #[prost(string, optional, tag = "3")]
5663 pub major_version: ::core::option::Option<::prost::alloc::string::String>,
5664 #[prost(string, optional, tag = "8")]
5667 pub name: ::core::option::Option<::prost::alloc::string::String>,
5668 #[prost(string, optional, tag = "9")]
5670 pub display_name: ::core::option::Option<::prost::alloc::string::String>,
5671}
5672#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5674pub struct SqlInstancesRescheduleMaintenanceRequestBody {
5675 #[prost(message, optional, tag = "3")]
5677 pub reschedule: ::core::option::Option<
5678 sql_instances_reschedule_maintenance_request_body::Reschedule,
5679 >,
5680}
5681pub mod sql_instances_reschedule_maintenance_request_body {
5683 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5684 pub struct Reschedule {
5685 #[prost(enumeration = "RescheduleType", tag = "1")]
5687 pub reschedule_type: i32,
5688 #[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 Immediate = 1,
5711 NextAvailableWindow = 2,
5714 SpecificTime = 3,
5716 }
5717 impl RescheduleType {
5718 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5744pub struct DemoteMasterContext {
5745 #[prost(string, tag = "1")]
5747 pub kind: ::prost::alloc::string::String,
5748 #[prost(message, optional, tag = "2")]
5756 pub verify_gtid_consistency: ::core::option::Option<bool>,
5757 #[prost(string, tag = "3")]
5760 pub master_instance_name: ::prost::alloc::string::String,
5761 #[prost(message, optional, tag = "4")]
5764 pub replica_configuration: ::core::option::Option<DemoteMasterConfiguration>,
5765 #[prost(bool, tag = "5")]
5767 pub skip_replication_setup: bool,
5768}
5769#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5772pub struct DemoteContext {
5773 #[prost(string, tag = "1")]
5775 pub kind: ::prost::alloc::string::String,
5776 #[prost(string, tag = "2")]
5779 pub source_representative_instance_name: ::prost::alloc::string::String,
5780}
5781#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5783pub struct FailoverContext {
5784 #[prost(int64, tag = "1")]
5787 pub settings_version: i64,
5788 #[prost(string, tag = "2")]
5790 pub kind: ::prost::alloc::string::String,
5791}
5792#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5795pub struct RestoreBackupContext {
5796 #[prost(string, tag = "1")]
5798 pub kind: ::prost::alloc::string::String,
5799 #[prost(int64, tag = "2")]
5801 pub backup_run_id: i64,
5802 #[prost(string, tag = "3")]
5804 pub instance_id: ::prost::alloc::string::String,
5805 #[prost(string, tag = "4")]
5807 pub project: ::prost::alloc::string::String,
5808}
5809#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5811pub struct RotateServerCaContext {
5812 #[prost(string, tag = "1")]
5814 pub kind: ::prost::alloc::string::String,
5815 #[prost(string, tag = "2")]
5818 pub next_version: ::prost::alloc::string::String,
5819}
5820#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5822pub struct RotateServerCertificateContext {
5823 #[prost(string, tag = "1")]
5825 pub kind: ::prost::alloc::string::String,
5826 #[prost(string, tag = "2")]
5829 pub next_version: ::prost::alloc::string::String,
5830}
5831#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5833pub struct RotateEntraIdCertificateContext {
5834 #[prost(string, tag = "1")]
5836 pub kind: ::prost::alloc::string::String,
5837 #[prost(string, tag = "2")]
5841 pub next_version: ::prost::alloc::string::String,
5842}
5843#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5845pub struct TruncateLogContext {
5846 #[prost(string, tag = "1")]
5848 pub kind: ::prost::alloc::string::String,
5849 #[prost(string, tag = "2")]
5852 pub log_type: ::prost::alloc::string::String,
5853}
5854#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5856pub struct SqlExternalSyncSettingError {
5857 #[prost(string, tag = "1")]
5860 pub kind: ::prost::alloc::string::String,
5861 #[prost(
5863 enumeration = "sql_external_sync_setting_error::SqlExternalSyncSettingErrorType",
5864 tag = "2"
5865 )]
5866 pub r#type: i32,
5867 #[prost(string, tag = "3")]
5869 pub detail: ::prost::alloc::string::String,
5870}
5871pub 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 InsufficientPrivilege = 5,
5893 UnsupportedMigrationType = 6,
5895 NoPglogicalInstalled = 7,
5897 PglogicalNodeAlreadyExists = 8,
5899 InvalidWalLevel = 9,
5901 InvalidSharedPreloadLibrary = 10,
5904 InsufficientMaxReplicationSlots = 11,
5906 InsufficientMaxWalSenders = 12,
5908 InsufficientMaxWorkerProcesses = 13,
5910 UnsupportedExtensions = 14,
5913 InvalidRdsLogicalReplication = 15,
5915 InvalidLoggingSetup = 16,
5917 InvalidDbParam = 17,
5919 UnsupportedGtidMode = 18,
5921 SqlserverAgentNotRunning = 19,
5923 UnsupportedTableDefinition = 20,
5927 UnsupportedDefiner = 21,
5929 SqlserverServernameMismatch = 22,
5931 PrimaryAlreadySetup = 23,
5933 UnsupportedBinlogFormat = 24,
5935 BinlogRetentionSetting = 25,
5937 UnsupportedStorageEngine = 26,
5939 LimitedSupportTables = 27,
5942 ExistingDataInReplica = 28,
5944 MissingOptionalPrivileges = 29,
5946 RiskyBackupAdminPrivilege = 30,
5949 InsufficientGcsPermissions = 31,
5951 InvalidFileInfo = 32,
5954 UnsupportedDatabaseSettings = 33,
5956 MysqlParallelImportInsufficientPrivilege = 34,
5959 LocalInfileOff = 35,
5961 TurnOnPitrAfterPromote = 36,
5964 IncompatibleDatabaseMinorVersion = 37,
5966 SourceMaxSubscriptions = 38,
5969 UnableToVerifyDefiners = 39,
5971 SubscriptionCalculationStatus = 40,
5974 PgSubscriptionCount = 41,
5977 PgSyncParallelLevel = 42,
5979 InsufficientDiskSize = 43,
5982 InsufficientMachineTier = 44,
5986 UnsupportedExtensionsNotMigrated = 45,
5989 ExtensionsNotMigrated = 46,
5992 PgCronFlagEnabledInReplica = 47,
5995 ExtensionsNotEnabledInReplica = 48,
6000 UnsupportedColumns = 49,
6003 UsersNotCreatedInReplica = 50,
6008 UnsupportedSystemObjects = 51,
6011 UnsupportedTablesWithReplicaIdentity = 52,
6015 SelectedObjectsNotExistOnSource = 53,
6017 PscOnlyInstanceWithNoNetworkAttachmentUri = 54,
6019 SelectedObjectsReferenceUnselectedObjects = 55,
6023 PromptDeleteExisting = 56,
6027 WillDeleteExisting = 57,
6032 PgDdlReplicationInsufficientPrivilege = 58,
6035 }
6036 impl SqlExternalSyncSettingErrorType {
6037 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6234pub struct SelectedObjects {
6235 #[prost(string, tag = "1")]
6237 pub database: ::prost::alloc::string::String,
6238}
6239#[derive(Clone, PartialEq, ::prost::Message)]
6241pub struct OnPremisesConfiguration {
6242 #[prost(string, tag = "1")]
6244 pub host_port: ::prost::alloc::string::String,
6245 #[prost(string, tag = "2")]
6247 pub kind: ::prost::alloc::string::String,
6248 #[prost(string, tag = "3")]
6250 pub username: ::prost::alloc::string::String,
6251 #[prost(string, tag = "4")]
6253 pub password: ::prost::alloc::string::String,
6254 #[prost(string, tag = "5")]
6256 pub ca_certificate: ::prost::alloc::string::String,
6257 #[prost(string, tag = "6")]
6259 pub client_certificate: ::prost::alloc::string::String,
6260 #[prost(string, tag = "7")]
6263 pub client_key: ::prost::alloc::string::String,
6264 #[prost(string, tag = "8")]
6266 pub dump_file_path: ::prost::alloc::string::String,
6267 #[prost(message, optional, tag = "15")]
6269 pub source_instance: ::core::option::Option<InstanceReference>,
6270 #[prost(message, repeated, tag = "16")]
6273 pub selected_objects: ::prost::alloc::vec::Vec<SelectedObjects>,
6274 #[prost(enumeration = "on_premises_configuration::SslOption", tag = "18")]
6276 pub ssl_option: i32,
6277}
6278pub mod on_premises_configuration {
6280 #[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 Unspecified = 0,
6297 Disable = 1,
6299 Require = 2,
6301 VerifyCa = 3,
6303 }
6304 impl SslOption {
6305 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6331pub struct ReplicaConfiguration {
6332 #[prost(string, tag = "1")]
6334 pub kind: ::prost::alloc::string::String,
6335 #[prost(message, optional, tag = "2")]
6342 pub mysql_replica_configuration: ::core::option::Option<MySqlReplicaConfiguration>,
6343 #[prost(message, optional, tag = "3")]
6349 pub failover_target: ::core::option::Option<bool>,
6350 #[prost(message, optional, tag = "5")]
6354 pub cascadable_replica: ::core::option::Option<bool>,
6355}
6356#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6358pub struct SqlInstancesExecuteSqlRequest {
6359 #[prost(string, tag = "1")]
6361 pub instance: ::prost::alloc::string::String,
6362 #[prost(string, tag = "2")]
6364 pub project: ::prost::alloc::string::String,
6365 #[prost(message, optional, tag = "100")]
6367 pub body: ::core::option::Option<ExecuteSqlPayload>,
6368}
6369#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6371pub struct ExecuteSqlPayload {
6372 #[prost(string, tag = "1")]
6376 pub user: ::prost::alloc::string::String,
6377 #[prost(string, tag = "2")]
6380 pub sql_statement: ::prost::alloc::string::String,
6381 #[prost(string, tag = "3")]
6383 pub database: ::prost::alloc::string::String,
6384 #[prost(int64, tag = "10")]
6386 pub row_limit: i64,
6387 #[prost(enumeration = "execute_sql_payload::PartialResultMode", tag = "13")]
6391 pub partial_result_mode: i32,
6392 #[prost(string, tag = "16")]
6396 pub application: ::prost::alloc::string::String,
6397 #[prost(oneof = "execute_sql_payload::UserPassword", tags = "11")]
6399 pub user_password: ::core::option::Option<execute_sql_payload::UserPassword>,
6400}
6401pub mod execute_sql_payload {
6403 #[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 = 0,
6420 FailPartialResult = 1,
6423 AllowPartialResult = 2,
6427 }
6428 impl PartialResultMode {
6429 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 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 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
6452 pub enum UserPassword {
6453 #[prost(bool, tag = "11")]
6457 AutoIamAuthn(bool),
6458 }
6459}
6460#[derive(Clone, PartialEq, ::prost::Message)]
6462pub struct SqlInstancesExecuteSqlResponse {
6463 #[prost(message, repeated, tag = "9")]
6469 pub messages: ::prost::alloc::vec::Vec<sql_instances_execute_sql_response::Message>,
6470 #[prost(message, optional, tag = "6")]
6473 pub metadata: ::core::option::Option<Metadata>,
6474 #[prost(message, repeated, tag = "7")]
6476 pub results: ::prost::alloc::vec::Vec<QueryResult>,
6477 #[prost(message, optional, tag = "8")]
6479 pub status: ::core::option::Option<super::super::super::rpc::Status>,
6480}
6481pub mod sql_instances_execute_sql_response {
6483 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6485 pub struct Message {
6486 #[prost(string, optional, tag = "1")]
6491 pub message: ::core::option::Option<::prost::alloc::string::String>,
6492 #[prost(string, optional, tag = "2")]
6495 pub severity: ::core::option::Option<::prost::alloc::string::String>,
6496 }
6497}
6498#[derive(Clone, PartialEq, ::prost::Message)]
6500pub struct QueryResult {
6501 #[prost(message, repeated, tag = "1")]
6504 pub columns: ::prost::alloc::vec::Vec<Column>,
6505 #[prost(message, repeated, tag = "2")]
6507 pub rows: ::prost::alloc::vec::Vec<Row>,
6508 #[prost(string, tag = "3")]
6510 pub message: ::prost::alloc::string::String,
6511 #[prost(bool, tag = "4")]
6514 pub partial_result: bool,
6515 #[prost(message, optional, tag = "8")]
6517 pub status: ::core::option::Option<super::super::super::rpc::Status>,
6518}
6519#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6521pub struct Column {
6522 #[prost(string, tag = "1")]
6524 pub name: ::prost::alloc::string::String,
6525 #[prost(string, tag = "2")]
6527 pub r#type: ::prost::alloc::string::String,
6528}
6529#[derive(Clone, PartialEq, ::prost::Message)]
6531pub struct Row {
6532 #[prost(message, repeated, tag = "1")]
6534 pub values: ::prost::alloc::vec::Vec<Value>,
6535}
6536#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6538pub struct Value {
6539 #[prost(string, tag = "1")]
6541 pub value: ::prost::alloc::string::String,
6542 #[prost(bool, tag = "2")]
6544 pub null_value: bool,
6545}
6546#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6549pub struct Metadata {
6550 #[prost(message, optional, tag = "1")]
6552 pub sql_statement_execution_time: ::core::option::Option<::prost_types::Duration>,
6553}
6554#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6556pub struct SqlInstancesAcquireSsrsLeaseRequest {
6557 #[prost(string, tag = "1")]
6562 pub instance: ::prost::alloc::string::String,
6563 #[prost(string, tag = "2")]
6566 pub project: ::prost::alloc::string::String,
6567 #[prost(message, optional, tag = "100")]
6569 pub body: ::core::option::Option<InstancesAcquireSsrsLeaseRequest>,
6570}
6571#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6573pub struct SqlInstancesAcquireSsrsLeaseResponse {
6574 #[prost(string, tag = "1")]
6576 pub operation_id: ::prost::alloc::string::String,
6577}
6578#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6580pub struct SqlInstancesReleaseSsrsLeaseRequest {
6581 #[prost(string, tag = "1")]
6586 pub instance: ::prost::alloc::string::String,
6587 #[prost(string, tag = "2")]
6589 pub project: ::prost::alloc::string::String,
6590}
6591#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6593pub struct SqlInstancesReleaseSsrsLeaseResponse {
6594 #[prost(string, tag = "1")]
6596 pub operation_id: ::prost::alloc::string::String,
6597}
6598#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6601pub struct SqlInstancesPointInTimeRestoreRequest {
6602 #[prost(string, tag = "1")]
6605 pub parent: ::prost::alloc::string::String,
6606 #[prost(message, optional, tag = "100")]
6609 pub context: ::core::option::Option<PointInTimeRestoreContext>,
6610}
6611#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6613#[repr(i32)]
6614pub enum ExternalSyncParallelLevel {
6615 Unspecified = 0,
6617 Min = 1,
6619 Optimal = 2,
6621 Max = 3,
6623}
6624impl ExternalSyncParallelLevel {
6625 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 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 Unspecified = 0,
6653 CloudSqlInstance = 1,
6656 OnPremisesInstance = 2,
6659 ReadReplicaInstance = 3,
6661 ReadPoolInstance = 5,
6663}
6664impl SqlInstanceType {
6665 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6692#[repr(i32)]
6693pub enum SqlSuspensionReason {
6694 Unspecified = 0,
6696 BillingIssue = 2,
6699 LegalIssue = 3,
6702 OperationalIssue = 4,
6705 KmsKeyIssue = 5,
6707}
6708impl SqlSuspensionReason {
6709 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 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}
6734pub 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 #[must_use]
6788 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6789 self.inner = self.inner.send_compressed(encoding);
6790 self
6791 }
6792 #[must_use]
6794 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6795 self.inner = self.inner.accept_compressed(encoding);
6796 self
6797 }
6798 #[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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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#[derive(Clone, PartialEq, ::prost::Message)]
8061pub struct CreateBackupRequest {
8062 #[prost(string, tag = "1")]
8065 pub parent: ::prost::alloc::string::String,
8066 #[prost(message, optional, tag = "2")]
8068 pub backup: ::core::option::Option<Backup>,
8069}
8070#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8072pub struct GetBackupRequest {
8073 #[prost(string, tag = "1")]
8076 pub name: ::prost::alloc::string::String,
8077}
8078#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8080pub struct ListBackupsRequest {
8081 #[prost(string, tag = "1")]
8084 pub parent: ::prost::alloc::string::String,
8085 #[prost(int32, tag = "2")]
8091 pub page_size: i32,
8092 #[prost(string, tag = "3")]
8098 pub page_token: ::prost::alloc::string::String,
8099 #[prost(string, tag = "4")]
8104 pub filter: ::prost::alloc::string::String,
8105}
8106#[derive(Clone, PartialEq, ::prost::Message)]
8108pub struct ListBackupsResponse {
8109 #[prost(message, repeated, tag = "1")]
8111 pub backups: ::prost::alloc::vec::Vec<Backup>,
8112 #[prost(string, tag = "2")]
8115 pub next_page_token: ::prost::alloc::string::String,
8116 #[prost(message, repeated, tag = "3")]
8119 pub warnings: ::prost::alloc::vec::Vec<ApiWarning>,
8120}
8121#[derive(Clone, PartialEq, ::prost::Message)]
8123pub struct UpdateBackupRequest {
8124 #[prost(message, optional, tag = "1")]
8128 pub backup: ::core::option::Option<Backup>,
8129 #[prost(message, optional, tag = "2")]
8132 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
8133}
8134#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8136pub struct DeleteBackupRequest {
8137 #[prost(string, tag = "1")]
8140 pub name: ::prost::alloc::string::String,
8141}
8142#[derive(Clone, PartialEq, ::prost::Message)]
8144pub struct Backup {
8145 #[prost(string, tag = "1")]
8148 pub name: ::prost::alloc::string::String,
8149 #[prost(string, tag = "2")]
8151 pub kind: ::prost::alloc::string::String,
8152 #[prost(string, tag = "3")]
8154 pub self_link: ::prost::alloc::string::String,
8155 #[prost(enumeration = "backup::SqlBackupType", tag = "4")]
8158 pub r#type: i32,
8159 #[prost(string, tag = "5")]
8161 pub description: ::prost::alloc::string::String,
8162 #[prost(string, tag = "6")]
8164 pub instance: ::prost::alloc::string::String,
8165 #[prost(string, tag = "7")]
8167 pub location: ::prost::alloc::string::String,
8168 #[prost(message, optional, tag = "8")]
8172 pub backup_interval: ::core::option::Option<super::super::super::r#type::Interval>,
8173 #[prost(enumeration = "backup::SqlBackupState", tag = "9")]
8175 pub state: i32,
8176 #[prost(message, optional, tag = "10")]
8179 pub error: ::core::option::Option<OperationError>,
8180 #[prost(string, tag = "11")]
8183 pub kms_key: ::prost::alloc::string::String,
8184 #[prost(string, tag = "12")]
8187 pub kms_key_version: ::prost::alloc::string::String,
8188 #[prost(enumeration = "SqlBackupKind", tag = "13")]
8190 pub backup_kind: i32,
8191 #[prost(string, tag = "15")]
8195 pub time_zone: ::prost::alloc::string::String,
8196 #[prost(enumeration = "SqlDatabaseVersion", tag = "20")]
8199 pub database_version: i32,
8200 #[prost(int64, optional, tag = "23")]
8202 pub max_chargeable_bytes: ::core::option::Option<i64>,
8203 #[prost(message, optional, tag = "24")]
8206 pub instance_deletion_time: ::core::option::Option<::prost_types::Timestamp>,
8207 #[prost(message, optional, tag = "25")]
8210 pub instance_settings: ::core::option::Option<DatabaseInstance>,
8211 #[prost(string, tag = "26")]
8213 pub backup_run: ::prost::alloc::string::String,
8214 #[prost(message, optional, tag = "27")]
8218 pub satisfies_pzs: ::core::option::Option<bool>,
8219 #[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}
8227pub mod backup {
8229 #[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 Unspecified = 0,
8245 Automated = 1,
8247 OnDemand = 2,
8249 Final = 3,
8251 }
8252 impl SqlBackupType {
8253 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 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 #[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 Unspecified = 0,
8292 Enqueued = 1,
8294 Running = 2,
8296 Failed = 3,
8298 Successful = 4,
8300 Deleting = 5,
8302 DeletionFailed = 6,
8304 }
8305 impl SqlBackupState {
8306 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 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 #[prost(int64, tag = "16")]
8342 TtlDays(i64),
8343 #[prost(message, tag = "17")]
8346 ExpiryTime(::prost_types::Timestamp),
8347 }
8348}
8349pub 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 #[must_use]
8403 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8404 self.inner = self.inner.send_compressed(encoding);
8405 self
8406 }
8407 #[must_use]
8409 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8410 self.inner = self.inner.accept_compressed(encoding);
8411 self
8412 }
8413 #[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 #[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 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 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 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 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8570pub struct GetConnectSettingsRequest {
8571 #[prost(string, tag = "1")]
8573 pub instance: ::prost::alloc::string::String,
8574 #[prost(string, tag = "2")]
8576 pub project: ::prost::alloc::string::String,
8577 #[prost(message, optional, tag = "7")]
8580 pub read_time: ::core::option::Option<::prost_types::Timestamp>,
8581}
8582#[derive(Clone, PartialEq, ::prost::Message)]
8584pub struct ConnectSettings {
8585 #[prost(string, tag = "1")]
8587 pub kind: ::prost::alloc::string::String,
8588 #[prost(message, optional, tag = "2")]
8590 pub server_ca_cert: ::core::option::Option<SslCert>,
8591 #[prost(message, repeated, tag = "3")]
8593 pub ip_addresses: ::prost::alloc::vec::Vec<IpMapping>,
8594 #[prost(string, tag = "4")]
8597 pub region: ::prost::alloc::string::String,
8598 #[prost(enumeration = "SqlDatabaseVersion", tag = "31")]
8610 pub database_version: i32,
8611 #[prost(enumeration = "SqlBackendType", tag = "32")]
8616 pub backend_type: i32,
8617 #[prost(bool, tag = "33")]
8619 pub psc_enabled: bool,
8620 #[prost(string, tag = "34")]
8622 pub dns_name: ::prost::alloc::string::String,
8623 #[prost(enumeration = "connect_settings::CaMode", tag = "35")]
8625 pub server_ca_mode: i32,
8626 #[prost(string, repeated, tag = "37")]
8628 pub custom_subject_alternative_names: ::prost::alloc::vec::Vec<
8629 ::prost::alloc::string::String,
8630 >,
8631 #[prost(message, repeated, tag = "38")]
8633 pub dns_names: ::prost::alloc::vec::Vec<DnsNameMapping>,
8634 #[prost(int32, optional, tag = "63")]
8636 pub node_count: ::core::option::Option<i32>,
8637 #[prost(message, repeated, tag = "64")]
8640 pub nodes: ::prost::alloc::vec::Vec<connect_settings::ConnectPoolNodeConfig>,
8641 #[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}
8654pub mod connect_settings {
8656 #[derive(Clone, PartialEq, ::prost::Message)]
8658 pub struct ConnectPoolNodeConfig {
8659 #[prost(string, optional, tag = "1")]
8662 pub name: ::core::option::Option<::prost::alloc::string::String>,
8663 #[prost(message, repeated, tag = "2")]
8666 pub ip_addresses: ::prost::alloc::vec::Vec<super::IpMapping>,
8667 #[prost(string, optional, tag = "3")]
8669 pub dns_name: ::core::option::Option<::prost::alloc::string::String>,
8670 #[prost(message, repeated, tag = "4")]
8672 pub dns_names: ::prost::alloc::vec::Vec<super::DnsNameMapping>,
8673 }
8674 #[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 Unspecified = 0,
8690 GoogleManagedInternalCa = 1,
8692 GoogleManagedCasCa = 2,
8695 CustomerManagedCasCa = 3,
8698 }
8699 impl CaMode {
8700 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 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 #[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 Unspecified = 0,
8740 ClientProtocolType = 1,
8742 }
8743 impl MdxProtocolSupport {
8744 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8766pub struct GenerateEphemeralCertRequest {
8767 #[prost(string, tag = "1")]
8769 pub instance: ::prost::alloc::string::String,
8770 #[prost(string, tag = "2")]
8772 pub project: ::prost::alloc::string::String,
8773 #[prost(string, tag = "3")]
8775 pub public_key: ::prost::alloc::string::String,
8776 #[prost(string, tag = "4")]
8778 pub access_token: ::prost::alloc::string::String,
8779 #[prost(message, optional, tag = "7")]
8782 pub read_time: ::core::option::Option<::prost_types::Timestamp>,
8783 #[prost(message, optional, tag = "12")]
8785 pub valid_duration: ::core::option::Option<::prost_types::Duration>,
8786}
8787#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8789pub struct GenerateEphemeralCertResponse {
8790 #[prost(message, optional, tag = "1")]
8792 pub ephemeral_cert: ::core::option::Option<SslCert>,
8793}
8794pub 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 #[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 #[must_use]
8849 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8850 self.inner = self.inner.send_compressed(encoding);
8851 self
8852 }
8853 #[must_use]
8855 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8856 self.inner = self.inner.accept_compressed(encoding);
8857 self
8858 }
8859 #[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 #[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 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8942pub struct SqlDatabasesDeleteRequest {
8943 #[prost(string, tag = "1")]
8945 pub database: ::prost::alloc::string::String,
8946 #[prost(string, tag = "2")]
8948 pub instance: ::prost::alloc::string::String,
8949 #[prost(string, tag = "3")]
8951 pub project: ::prost::alloc::string::String,
8952}
8953#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8955pub struct SqlDatabasesGetRequest {
8956 #[prost(string, tag = "1")]
8958 pub database: ::prost::alloc::string::String,
8959 #[prost(string, tag = "2")]
8961 pub instance: ::prost::alloc::string::String,
8962 #[prost(string, tag = "3")]
8964 pub project: ::prost::alloc::string::String,
8965}
8966#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8968pub struct SqlDatabasesInsertRequest {
8969 #[prost(string, tag = "1")]
8971 pub instance: ::prost::alloc::string::String,
8972 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8980pub struct SqlDatabasesListRequest {
8981 #[prost(string, tag = "1")]
8983 pub instance: ::prost::alloc::string::String,
8984 #[prost(string, tag = "2")]
8986 pub project: ::prost::alloc::string::String,
8987}
8988#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8990pub struct SqlDatabasesUpdateRequest {
8991 #[prost(string, tag = "1")]
8993 pub database: ::prost::alloc::string::String,
8994 #[prost(string, tag = "2")]
8996 pub instance: ::prost::alloc::string::String,
8997 #[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#[derive(Clone, PartialEq, ::prost::Message)]
9005pub struct DatabasesListResponse {
9006 #[prost(string, tag = "1")]
9008 pub kind: ::prost::alloc::string::String,
9009 #[prost(message, repeated, tag = "2")]
9011 pub items: ::prost::alloc::vec::Vec<Database>,
9012}
9013pub 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 #[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 #[must_use]
9068 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9069 self.inner = self.inner.send_compressed(encoding);
9070 self
9071 }
9072 #[must_use]
9074 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9075 self.inner = self.inner.accept_compressed(encoding);
9076 self
9077 }
9078 #[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 #[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 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 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 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 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 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 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}
9249pub 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 #[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 #[must_use]
9305 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9306 self.inner = self.inner.send_compressed(encoding);
9307 self
9308 }
9309 #[must_use]
9311 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9312 self.inner = self.inner.accept_compressed(encoding);
9313 self
9314 }
9315 #[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 #[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}
9333pub 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 #[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 #[must_use]
9390 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9391 self.inner = self.inner.send_compressed(encoding);
9392 self
9393 }
9394 #[must_use]
9396 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9397 self.inner = self.inner.accept_compressed(encoding);
9398 self
9399 }
9400 #[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 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9420pub struct SqlFlagsListRequest {
9421 #[prost(string, tag = "1")]
9424 pub database_version: ::prost::alloc::string::String,
9425 #[prost(enumeration = "SqlFlagScope", optional, tag = "3")]
9428 pub flag_scope: ::core::option::Option<i32>,
9429}
9430#[derive(Clone, PartialEq, ::prost::Message)]
9432pub struct FlagsListResponse {
9433 #[prost(string, tag = "1")]
9435 pub kind: ::prost::alloc::string::String,
9436 #[prost(message, repeated, tag = "2")]
9438 pub items: ::prost::alloc::vec::Vec<Flag>,
9439}
9440#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9442pub struct Flag {
9443 #[prost(string, tag = "1")]
9446 pub name: ::prost::alloc::string::String,
9447 #[prost(enumeration = "SqlFlagType", tag = "2")]
9451 pub r#type: i32,
9452 #[prost(enumeration = "SqlDatabaseVersion", repeated, tag = "3")]
9463 pub applies_to: ::prost::alloc::vec::Vec<i32>,
9464 #[prost(string, repeated, tag = "4")]
9466 pub allowed_string_values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
9467 #[prost(message, optional, tag = "5")]
9469 pub min_value: ::core::option::Option<i64>,
9470 #[prost(message, optional, tag = "6")]
9472 pub max_value: ::core::option::Option<i64>,
9473 #[prost(message, optional, tag = "7")]
9476 pub requires_restart: ::core::option::Option<bool>,
9477 #[prost(string, tag = "8")]
9479 pub kind: ::prost::alloc::string::String,
9480 #[prost(message, optional, tag = "9")]
9482 pub in_beta: ::core::option::Option<bool>,
9483 #[prost(int64, repeated, tag = "10")]
9486 pub allowed_int_values: ::prost::alloc::vec::Vec<i64>,
9487 #[prost(enumeration = "SqlFlagScope", tag = "15")]
9489 pub flag_scope: i32,
9490 #[prost(oneof = "flag::RecommendedValue", tags = "16, 17")]
9492 pub recommended_value: ::core::option::Option<flag::RecommendedValue>,
9493}
9494pub mod flag {
9496 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
9498 pub enum RecommendedValue {
9499 #[prost(string, tag = "16")]
9501 RecommendedStringValue(::prost::alloc::string::String),
9502 #[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 Unspecified = 0,
9512 Boolean = 1,
9514 String = 2,
9516 Integer = 3,
9518 None = 4,
9520 MysqlTimezoneOffset = 5,
9523 Float = 6,
9525 RepeatedString = 7,
9527}
9528impl SqlFlagType {
9529 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
9562#[repr(i32)]
9563pub enum SqlFlagScope {
9564 Unspecified = 0,
9566 Database = 1,
9568 ConnectionPool = 2,
9570}
9571impl SqlFlagScope {
9572 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 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}
9593pub 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 #[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 #[must_use]
9648 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9649 self.inner = self.inner.send_compressed(encoding);
9650 self
9651 }
9652 #[must_use]
9654 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9655 self.inner = self.inner.accept_compressed(encoding);
9656 self
9657 }
9658 #[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 #[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 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}
9701pub 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 #[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 #[must_use]
9756 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9757 self.inner = self.inner.send_compressed(encoding);
9758 self
9759 }
9760 #[must_use]
9762 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9763 self.inner = self.inner.accept_compressed(encoding);
9764 self
9765 }
9766 #[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 #[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}
9784pub 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 #[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 #[must_use]
9841 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9842 self.inner = self.inner.send_compressed(encoding);
9843 self
9844 }
9845 #[must_use]
9847 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9848 self.inner = self.inner.accept_compressed(encoding);
9849 self
9850 }
9851 #[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 #[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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9871pub struct SqlOperationsGetRequest {
9872 #[prost(string, tag = "1")]
9874 pub operation: ::prost::alloc::string::String,
9875 #[prost(string, tag = "2")]
9877 pub project: ::prost::alloc::string::String,
9878}
9879#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9881pub struct SqlOperationsListRequest {
9882 #[prost(string, tag = "1")]
9884 pub instance: ::prost::alloc::string::String,
9885 #[prost(uint32, tag = "2")]
9887 pub max_results: u32,
9888 #[prost(string, tag = "3")]
9891 pub page_token: ::prost::alloc::string::String,
9892 #[prost(string, tag = "4")]
9894 pub project: ::prost::alloc::string::String,
9895}
9896#[derive(Clone, PartialEq, ::prost::Message)]
9898pub struct OperationsListResponse {
9899 #[prost(string, tag = "1")]
9901 pub kind: ::prost::alloc::string::String,
9902 #[prost(message, repeated, tag = "2")]
9904 pub items: ::prost::alloc::vec::Vec<Operation>,
9905 #[prost(string, tag = "3")]
9908 pub next_page_token: ::prost::alloc::string::String,
9909}
9910#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9912pub struct SqlOperationsCancelRequest {
9913 #[prost(string, tag = "1")]
9915 pub operation: ::prost::alloc::string::String,
9916 #[prost(string, tag = "2")]
9918 pub project: ::prost::alloc::string::String,
9919}
9920pub 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 #[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 #[must_use]
9975 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9976 self.inner = self.inner.send_compressed(encoding);
9977 self
9978 }
9979 #[must_use]
9981 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9982 self.inner = self.inner.accept_compressed(encoding);
9983 self
9984 }
9985 #[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 #[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 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 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 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}
10079pub 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 #[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 #[must_use]
10135 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10136 self.inner = self.inner.send_compressed(encoding);
10137 self
10138 }
10139 #[must_use]
10141 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10142 self.inner = self.inner.accept_compressed(encoding);
10143 self
10144 }
10145 #[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 #[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 #[prost(string, tag = "1")]
10167 pub instance: ::prost::alloc::string::String,
10168 #[prost(string, tag = "2")]
10170 pub project: ::prost::alloc::string::String,
10171 #[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 #[prost(string, tag = "1")]
10179 pub instance: ::prost::alloc::string::String,
10180 #[prost(string, tag = "2")]
10182 pub project: ::prost::alloc::string::String,
10183 #[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 #[prost(string, tag = "1")]
10191 pub instance: ::prost::alloc::string::String,
10192 #[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 #[prost(string, tag = "1")]
10202 pub instance: ::prost::alloc::string::String,
10203 #[prost(string, tag = "2")]
10205 pub project: ::prost::alloc::string::String,
10206}
10207#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10209pub struct SslCertsInsertRequest {
10210 #[prost(string, tag = "1")]
10213 pub common_name: ::prost::alloc::string::String,
10214}
10215#[derive(Clone, PartialEq, ::prost::Message)]
10217pub struct SslCertsInsertResponse {
10218 #[prost(string, tag = "1")]
10220 pub kind: ::prost::alloc::string::String,
10221 #[prost(message, optional, tag = "2")]
10223 pub operation: ::core::option::Option<Operation>,
10224 #[prost(message, optional, tag = "3")]
10228 pub server_ca_cert: ::core::option::Option<SslCert>,
10229 #[prost(message, optional, tag = "4")]
10231 pub client_cert: ::core::option::Option<SslCertDetail>,
10232}
10233#[derive(Clone, PartialEq, ::prost::Message)]
10235pub struct SslCertsListResponse {
10236 #[prost(string, tag = "1")]
10238 pub kind: ::prost::alloc::string::String,
10239 #[prost(message, repeated, tag = "2")]
10241 pub items: ::prost::alloc::vec::Vec<SslCert>,
10242}
10243pub 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 #[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 #[must_use]
10298 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10299 self.inner = self.inner.send_compressed(encoding);
10300 self
10301 }
10302 #[must_use]
10304 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10305 self.inner = self.inner.accept_compressed(encoding);
10306 self
10307 }
10308 #[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 #[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 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 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 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 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#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10435pub struct SqlTiersListRequest {
10436 #[prost(string, tag = "1")]
10438 pub project: ::prost::alloc::string::String,
10439}
10440#[derive(Clone, PartialEq, ::prost::Message)]
10442pub struct TiersListResponse {
10443 #[prost(string, tag = "1")]
10445 pub kind: ::prost::alloc::string::String,
10446 #[prost(message, repeated, tag = "2")]
10448 pub items: ::prost::alloc::vec::Vec<Tier>,
10449}
10450#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10452pub struct Tier {
10453 #[prost(string, tag = "1")]
10456 pub tier: ::prost::alloc::string::String,
10457 #[prost(int64, tag = "2")]
10459 pub ram: i64,
10460 #[prost(string, tag = "3")]
10462 pub kind: ::prost::alloc::string::String,
10463 #[prost(int64, tag = "4")]
10465 pub disk_quota: i64,
10466 #[prost(string, repeated, tag = "5")]
10468 pub region: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10469}
10470pub 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 #[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 #[must_use]
10525 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10526 self.inner = self.inner.send_compressed(encoding);
10527 self
10528 }
10529 #[must_use]
10531 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10532 self.inner = self.inner.accept_compressed(encoding);
10533 self
10534 }
10535 #[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 #[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 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 #[prost(string, tag = "1")]
10584 pub host: ::prost::alloc::string::String,
10585 #[prost(string, tag = "2")]
10587 pub instance: ::prost::alloc::string::String,
10588 #[prost(string, tag = "3")]
10590 pub name: ::prost::alloc::string::String,
10591 #[prost(string, tag = "4")]
10593 pub project: ::prost::alloc::string::String,
10594}
10595#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10597pub struct SqlUsersGetRequest {
10598 #[prost(string, tag = "1")]
10600 pub instance: ::prost::alloc::string::String,
10601 #[prost(string, tag = "2")]
10603 pub name: ::prost::alloc::string::String,
10604 #[prost(string, tag = "3")]
10606 pub project: ::prost::alloc::string::String,
10607 #[prost(string, tag = "4")]
10609 pub host: ::prost::alloc::string::String,
10610}
10611#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10612pub struct SqlUsersInsertRequest {
10613 #[prost(string, tag = "1")]
10615 pub instance: ::prost::alloc::string::String,
10616 #[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 #[prost(string, tag = "1")]
10626 pub instance: ::prost::alloc::string::String,
10627 #[prost(string, tag = "2")]
10629 pub project: ::prost::alloc::string::String,
10630}
10631#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10632pub struct SqlUsersUpdateRequest {
10633 #[prost(string, tag = "1")]
10635 pub host: ::prost::alloc::string::String,
10636 #[prost(string, tag = "2")]
10638 pub instance: ::prost::alloc::string::String,
10639 #[prost(string, tag = "3")]
10641 pub name: ::prost::alloc::string::String,
10642 #[prost(string, tag = "4")]
10644 pub project: ::prost::alloc::string::String,
10645 #[prost(string, repeated, tag = "5")]
10648 pub database_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10649 #[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#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
10659pub struct UserPasswordValidationPolicy {
10660 #[prost(int32, tag = "1")]
10662 pub allowed_failed_attempts: i32,
10663 #[prost(message, optional, tag = "2")]
10665 pub password_expiration_duration: ::core::option::Option<::prost_types::Duration>,
10666 #[prost(bool, tag = "3")]
10668 pub enable_failed_attempts_check: bool,
10669 #[prost(message, optional, tag = "4")]
10671 pub status: ::core::option::Option<PasswordStatus>,
10672 #[prost(bool, tag = "5")]
10675 pub enable_password_verification: bool,
10676}
10677#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
10679pub struct PasswordStatus {
10680 #[prost(bool, tag = "1")]
10682 pub locked: bool,
10683 #[prost(message, optional, tag = "2")]
10685 pub password_expiration_time: ::core::option::Option<::prost_types::Timestamp>,
10686}
10687#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10689pub struct User {
10690 #[prost(string, tag = "1")]
10692 pub kind: ::prost::alloc::string::String,
10693 #[prost(string, tag = "2")]
10695 pub password: ::prost::alloc::string::String,
10696 #[prost(string, tag = "3")]
10699 pub etag: ::prost::alloc::string::String,
10700 #[prost(string, tag = "4")]
10703 pub name: ::prost::alloc::string::String,
10704 #[prost(string, tag = "5")]
10710 pub host: ::prost::alloc::string::String,
10711 #[prost(string, tag = "6")]
10715 pub instance: ::prost::alloc::string::String,
10716 #[prost(string, tag = "7")]
10720 pub project: ::prost::alloc::string::String,
10721 #[prost(enumeration = "user::SqlUserType", tag = "8")]
10724 pub r#type: i32,
10725 #[prost(string, tag = "11")]
10728 pub iam_email: ::prost::alloc::string::String,
10729 #[prost(message, optional, tag = "12")]
10731 pub password_policy: ::core::option::Option<UserPasswordValidationPolicy>,
10732 #[prost(enumeration = "user::DualPasswordType", optional, tag = "13")]
10734 pub dual_password_type: ::core::option::Option<i32>,
10735 #[prost(enumeration = "user::IamStatus", optional, tag = "14")]
10737 pub iam_status: ::core::option::Option<i32>,
10738 #[prost(string, repeated, tag = "15")]
10740 pub database_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10741 #[prost(oneof = "user::UserDetails", tags = "9")]
10743 pub user_details: ::core::option::Option<user::UserDetails>,
10744}
10745pub mod user {
10747 #[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 BuiltIn = 0,
10763 CloudIamUser = 1,
10765 CloudIamServiceAccount = 2,
10767 CloudIamGroup = 3,
10769 CloudIamGroupUser = 4,
10771 CloudIamGroupServiceAccount = 5,
10774 EntraidUser = 7,
10776 }
10777 impl SqlUserType {
10778 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 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 #[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 Unspecified = 0,
10825 NoModifyDualPassword = 1,
10827 NoDualPassword = 2,
10829 DualPassword = 3,
10831 }
10832 impl DualPasswordType {
10833 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 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 #[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 Unspecified = 0,
10876 Inactive = 1,
10879 Active = 2,
10881 }
10882 impl IamStatus {
10883 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 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 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
10906 pub enum UserDetails {
10907 #[prost(message, tag = "9")]
10908 SqlserverUserDetails(super::SqlServerUserDetails),
10909 }
10910}
10911#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10913pub struct SqlServerUserDetails {
10914 #[prost(bool, tag = "1")]
10916 pub disabled: bool,
10917 #[prost(string, repeated, tag = "2")]
10919 pub server_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10920}
10921#[derive(Clone, PartialEq, ::prost::Message)]
10923pub struct UsersListResponse {
10924 #[prost(string, tag = "1")]
10926 pub kind: ::prost::alloc::string::String,
10927 #[prost(message, repeated, tag = "2")]
10929 pub items: ::prost::alloc::vec::Vec<User>,
10930 #[deprecated]
10932 #[prost(string, tag = "3")]
10933 pub next_page_token: ::prost::alloc::string::String,
10934}
10935pub 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 #[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 #[must_use]
10990 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10991 self.inner = self.inner.send_compressed(encoding);
10992 self
10993 }
10994 #[must_use]
10996 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10997 self.inner = self.inner.accept_compressed(encoding);
10998 self
10999 }
11000 #[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 #[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 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 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 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 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 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}