1#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Backup {
7 #[prost(string, tag = "1")]
9 pub id: ::prost::alloc::string::String,
10 #[prost(string, tag = "2")]
12 pub folder_id: ::prost::alloc::string::String,
13 #[prost(message, optional, tag = "3")]
15 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
16 #[prost(string, tag = "4")]
18 pub source_cluster_id: ::prost::alloc::string::String,
19 #[prost(message, optional, tag = "5")]
21 pub started_at: ::core::option::Option<::prost_types::Timestamp>,
22 #[prost(string, repeated, tag = "6")]
24 pub databases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
25}
26#[allow(clippy::derive_partial_eq_without_eq)]
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct GetBackupRequest {
29 #[prost(string, tag = "1")]
33 pub backup_id: ::prost::alloc::string::String,
34}
35#[allow(clippy::derive_partial_eq_without_eq)]
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct ListBackupsRequest {
38 #[prost(string, tag = "1")]
42 pub folder_id: ::prost::alloc::string::String,
43 #[prost(int64, tag = "2")]
47 pub page_size: i64,
48 #[prost(string, tag = "3")]
50 pub page_token: ::prost::alloc::string::String,
51}
52#[allow(clippy::derive_partial_eq_without_eq)]
53#[derive(Clone, PartialEq, ::prost::Message)]
54pub struct ListBackupsResponse {
55 #[prost(message, repeated, tag = "1")]
57 pub backups: ::prost::alloc::vec::Vec<Backup>,
58 #[prost(string, tag = "2")]
64 pub next_page_token: ::prost::alloc::string::String,
65}
66pub mod backup_service_client {
68 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
69 use tonic::codegen::*;
70 use tonic::codegen::http::Uri;
71 #[derive(Debug, Clone)]
73 pub struct BackupServiceClient<T> {
74 inner: tonic::client::Grpc<T>,
75 }
76 impl BackupServiceClient<tonic::transport::Channel> {
77 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
79 where
80 D: TryInto<tonic::transport::Endpoint>,
81 D::Error: Into<StdError>,
82 {
83 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
84 Ok(Self::new(conn))
85 }
86 }
87 impl<T> BackupServiceClient<T>
88 where
89 T: tonic::client::GrpcService<tonic::body::BoxBody>,
90 T::Error: Into<StdError>,
91 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
92 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
93 {
94 pub fn new(inner: T) -> Self {
95 let inner = tonic::client::Grpc::new(inner);
96 Self { inner }
97 }
98 pub fn with_origin(inner: T, origin: Uri) -> Self {
99 let inner = tonic::client::Grpc::with_origin(inner, origin);
100 Self { inner }
101 }
102 pub fn with_interceptor<F>(
103 inner: T,
104 interceptor: F,
105 ) -> BackupServiceClient<InterceptedService<T, F>>
106 where
107 F: tonic::service::Interceptor,
108 T::ResponseBody: Default,
109 T: tonic::codegen::Service<
110 http::Request<tonic::body::BoxBody>,
111 Response = http::Response<
112 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
113 >,
114 >,
115 <T as tonic::codegen::Service<
116 http::Request<tonic::body::BoxBody>,
117 >>::Error: Into<StdError> + Send + Sync,
118 {
119 BackupServiceClient::new(InterceptedService::new(inner, interceptor))
120 }
121 #[must_use]
126 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
127 self.inner = self.inner.send_compressed(encoding);
128 self
129 }
130 #[must_use]
132 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
133 self.inner = self.inner.accept_compressed(encoding);
134 self
135 }
136 #[must_use]
140 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
141 self.inner = self.inner.max_decoding_message_size(limit);
142 self
143 }
144 #[must_use]
148 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
149 self.inner = self.inner.max_encoding_message_size(limit);
150 self
151 }
152 pub async fn get(
156 &mut self,
157 request: impl tonic::IntoRequest<super::GetBackupRequest>,
158 ) -> std::result::Result<tonic::Response<super::Backup>, tonic::Status> {
159 self.inner
160 .ready()
161 .await
162 .map_err(|e| {
163 tonic::Status::new(
164 tonic::Code::Unknown,
165 format!("Service was not ready: {}", e.into()),
166 )
167 })?;
168 let codec = tonic::codec::ProstCodec::default();
169 let path = http::uri::PathAndQuery::from_static(
170 "/yandex.cloud.mdb.sqlserver.v1.BackupService/Get",
171 );
172 let mut req = request.into_request();
173 req.extensions_mut()
174 .insert(
175 GrpcMethod::new("yandex.cloud.mdb.sqlserver.v1.BackupService", "Get"),
176 );
177 self.inner.unary(req, path, codec).await
178 }
179 pub async fn list(
181 &mut self,
182 request: impl tonic::IntoRequest<super::ListBackupsRequest>,
183 ) -> std::result::Result<
184 tonic::Response<super::ListBackupsResponse>,
185 tonic::Status,
186 > {
187 self.inner
188 .ready()
189 .await
190 .map_err(|e| {
191 tonic::Status::new(
192 tonic::Code::Unknown,
193 format!("Service was not ready: {}", e.into()),
194 )
195 })?;
196 let codec = tonic::codec::ProstCodec::default();
197 let path = http::uri::PathAndQuery::from_static(
198 "/yandex.cloud.mdb.sqlserver.v1.BackupService/List",
199 );
200 let mut req = request.into_request();
201 req.extensions_mut()
202 .insert(
203 GrpcMethod::new(
204 "yandex.cloud.mdb.sqlserver.v1.BackupService",
205 "List",
206 ),
207 );
208 self.inner.unary(req, path, codec).await
209 }
210 }
211}
212#[allow(clippy::derive_partial_eq_without_eq)]
216#[derive(Clone, PartialEq, ::prost::Message)]
217pub struct Cluster {
218 #[prost(string, tag = "1")]
222 pub id: ::prost::alloc::string::String,
223 #[prost(string, tag = "2")]
225 pub folder_id: ::prost::alloc::string::String,
226 #[prost(message, optional, tag = "3")]
228 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
229 #[prost(string, tag = "4")]
234 pub name: ::prost::alloc::string::String,
235 #[prost(string, tag = "5")]
239 pub description: ::prost::alloc::string::String,
240 #[prost(map = "string, string", tag = "6")]
244 pub labels: ::std::collections::HashMap<
245 ::prost::alloc::string::String,
246 ::prost::alloc::string::String,
247 >,
248 #[prost(enumeration = "cluster::Environment", tag = "7")]
250 pub environment: i32,
251 #[prost(message, repeated, tag = "8")]
253 pub monitoring: ::prost::alloc::vec::Vec<Monitoring>,
254 #[prost(message, optional, tag = "9")]
256 pub config: ::core::option::Option<ClusterConfig>,
257 #[prost(string, tag = "10")]
259 pub network_id: ::prost::alloc::string::String,
260 #[prost(enumeration = "cluster::Health", tag = "11")]
262 pub health: i32,
263 #[prost(enumeration = "cluster::Status", tag = "12")]
265 pub status: i32,
266 #[prost(string, repeated, tag = "13")]
268 pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
269 #[prost(bool, tag = "14")]
271 pub deletion_protection: bool,
272 #[prost(string, tag = "15")]
274 pub sqlcollation: ::prost::alloc::string::String,
275 #[prost(string, repeated, tag = "16")]
277 pub host_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
278 #[prost(string, tag = "17")]
280 pub service_account_id: ::prost::alloc::string::String,
281}
282pub mod cluster {
284 #[derive(
285 Clone,
286 Copy,
287 Debug,
288 PartialEq,
289 Eq,
290 Hash,
291 PartialOrd,
292 Ord,
293 ::prost::Enumeration
294 )]
295 #[repr(i32)]
296 pub enum Environment {
297 Unspecified = 0,
298 Production = 1,
300 Prestable = 2,
302 }
303 impl Environment {
304 pub fn as_str_name(&self) -> &'static str {
309 match self {
310 Environment::Unspecified => "ENVIRONMENT_UNSPECIFIED",
311 Environment::Production => "PRODUCTION",
312 Environment::Prestable => "PRESTABLE",
313 }
314 }
315 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
317 match value {
318 "ENVIRONMENT_UNSPECIFIED" => Some(Self::Unspecified),
319 "PRODUCTION" => Some(Self::Production),
320 "PRESTABLE" => Some(Self::Prestable),
321 _ => None,
322 }
323 }
324 }
325 #[derive(
326 Clone,
327 Copy,
328 Debug,
329 PartialEq,
330 Eq,
331 Hash,
332 PartialOrd,
333 Ord,
334 ::prost::Enumeration
335 )]
336 #[repr(i32)]
337 pub enum Health {
338 Unknown = 0,
340 Alive = 1,
342 Dead = 2,
344 Degraded = 3,
346 }
347 impl Health {
348 pub fn as_str_name(&self) -> &'static str {
353 match self {
354 Health::Unknown => "HEALTH_UNKNOWN",
355 Health::Alive => "ALIVE",
356 Health::Dead => "DEAD",
357 Health::Degraded => "DEGRADED",
358 }
359 }
360 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
362 match value {
363 "HEALTH_UNKNOWN" => Some(Self::Unknown),
364 "ALIVE" => Some(Self::Alive),
365 "DEAD" => Some(Self::Dead),
366 "DEGRADED" => Some(Self::Degraded),
367 _ => None,
368 }
369 }
370 }
371 #[derive(
372 Clone,
373 Copy,
374 Debug,
375 PartialEq,
376 Eq,
377 Hash,
378 PartialOrd,
379 Ord,
380 ::prost::Enumeration
381 )]
382 #[repr(i32)]
383 pub enum Status {
384 Unknown = 0,
386 Creating = 1,
388 Running = 2,
390 Error = 3,
392 Updating = 4,
394 Stopping = 5,
396 Stopped = 6,
398 Starting = 7,
400 }
401 impl Status {
402 pub fn as_str_name(&self) -> &'static str {
407 match self {
408 Status::Unknown => "STATUS_UNKNOWN",
409 Status::Creating => "CREATING",
410 Status::Running => "RUNNING",
411 Status::Error => "ERROR",
412 Status::Updating => "UPDATING",
413 Status::Stopping => "STOPPING",
414 Status::Stopped => "STOPPED",
415 Status::Starting => "STARTING",
416 }
417 }
418 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
420 match value {
421 "STATUS_UNKNOWN" => Some(Self::Unknown),
422 "CREATING" => Some(Self::Creating),
423 "RUNNING" => Some(Self::Running),
424 "ERROR" => Some(Self::Error),
425 "UPDATING" => Some(Self::Updating),
426 "STOPPING" => Some(Self::Stopping),
427 "STOPPED" => Some(Self::Stopped),
428 "STARTING" => Some(Self::Starting),
429 _ => None,
430 }
431 }
432 }
433}
434#[allow(clippy::derive_partial_eq_without_eq)]
435#[derive(Clone, PartialEq, ::prost::Message)]
436pub struct Monitoring {
437 #[prost(string, tag = "1")]
439 pub name: ::prost::alloc::string::String,
440 #[prost(string, tag = "2")]
442 pub description: ::prost::alloc::string::String,
443 #[prost(string, tag = "3")]
445 pub link: ::prost::alloc::string::String,
446}
447#[allow(clippy::derive_partial_eq_without_eq)]
448#[derive(Clone, PartialEq, ::prost::Message)]
449pub struct ClusterConfig {
450 #[prost(string, tag = "1")]
452 pub version: ::prost::alloc::string::String,
453 #[prost(message, optional, tag = "3")]
455 pub resources: ::core::option::Option<Resources>,
456 #[prost(message, optional, tag = "4")]
459 pub backup_window_start: ::core::option::Option<
460 super::super::super::super::super::google::r#type::TimeOfDay,
461 >,
462 #[prost(message, optional, tag = "6")]
464 pub access: ::core::option::Option<Access>,
465 #[prost(enumeration = "cluster_config::SecondaryConnections", tag = "7")]
467 pub secondary_connections: i32,
468 #[prost(oneof = "cluster_config::SqlserverConfig", tags = "2, 5, 8, 9, 10, 11")]
470 pub sqlserver_config: ::core::option::Option<cluster_config::SqlserverConfig>,
471}
472pub mod cluster_config {
474 #[derive(
475 Clone,
476 Copy,
477 Debug,
478 PartialEq,
479 Eq,
480 Hash,
481 PartialOrd,
482 Ord,
483 ::prost::Enumeration
484 )]
485 #[repr(i32)]
486 pub enum SecondaryConnections {
487 Unspecified = 0,
488 Off = 1,
490 ReadOnly = 2,
492 }
493 impl SecondaryConnections {
494 pub fn as_str_name(&self) -> &'static str {
499 match self {
500 SecondaryConnections::Unspecified => "SECONDARY_CONNECTIONS_UNSPECIFIED",
501 SecondaryConnections::Off => "SECONDARY_CONNECTIONS_OFF",
502 SecondaryConnections::ReadOnly => "SECONDARY_CONNECTIONS_READ_ONLY",
503 }
504 }
505 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
507 match value {
508 "SECONDARY_CONNECTIONS_UNSPECIFIED" => Some(Self::Unspecified),
509 "SECONDARY_CONNECTIONS_OFF" => Some(Self::Off),
510 "SECONDARY_CONNECTIONS_READ_ONLY" => Some(Self::ReadOnly),
511 _ => None,
512 }
513 }
514 }
515 #[allow(clippy::derive_partial_eq_without_eq)]
517 #[derive(Clone, PartialEq, ::prost::Oneof)]
518 pub enum SqlserverConfig {
519 #[prost(message, tag = "2")]
521 SqlserverConfig2016sp2std(super::config::SqlServerConfigSet2016sp2std),
522 #[prost(message, tag = "5")]
524 SqlserverConfig2016sp2ent(super::config::SqlServerConfigSet2016sp2ent),
525 #[prost(message, tag = "8")]
527 SqlserverConfig2017std(super::config::SqlServerConfigSet2017std),
528 #[prost(message, tag = "9")]
530 SqlserverConfig2017ent(super::config::SqlServerConfigSet2017ent),
531 #[prost(message, tag = "10")]
533 SqlserverConfig2019std(super::config::SqlServerConfigSet2019std),
534 #[prost(message, tag = "11")]
536 SqlserverConfig2019ent(super::config::SqlServerConfigSet2019ent),
537 }
538}
539#[allow(clippy::derive_partial_eq_without_eq)]
540#[derive(Clone, PartialEq, ::prost::Message)]
541pub struct Host {
542 #[prost(string, tag = "1")]
548 pub name: ::prost::alloc::string::String,
549 #[prost(string, tag = "2")]
553 pub cluster_id: ::prost::alloc::string::String,
554 #[prost(string, tag = "3")]
556 pub zone_id: ::prost::alloc::string::String,
557 #[prost(message, optional, tag = "4")]
559 pub resources: ::core::option::Option<Resources>,
560 #[prost(enumeration = "host::Role", tag = "5")]
562 pub role: i32,
563 #[prost(enumeration = "host::Health", tag = "6")]
565 pub health: i32,
566 #[prost(message, repeated, tag = "7")]
568 pub services: ::prost::alloc::vec::Vec<Service>,
569 #[prost(string, tag = "8")]
571 pub subnet_id: ::prost::alloc::string::String,
572 #[prost(bool, tag = "9")]
574 pub assign_public_ip: bool,
575}
576pub mod host {
578 #[derive(
579 Clone,
580 Copy,
581 Debug,
582 PartialEq,
583 Eq,
584 Hash,
585 PartialOrd,
586 Ord,
587 ::prost::Enumeration
588 )]
589 #[repr(i32)]
590 pub enum Role {
591 Unknown = 0,
593 Master = 1,
595 Replica = 2,
597 }
598 impl Role {
599 pub fn as_str_name(&self) -> &'static str {
604 match self {
605 Role::Unknown => "ROLE_UNKNOWN",
606 Role::Master => "MASTER",
607 Role::Replica => "REPLICA",
608 }
609 }
610 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
612 match value {
613 "ROLE_UNKNOWN" => Some(Self::Unknown),
614 "MASTER" => Some(Self::Master),
615 "REPLICA" => Some(Self::Replica),
616 _ => None,
617 }
618 }
619 }
620 #[derive(
621 Clone,
622 Copy,
623 Debug,
624 PartialEq,
625 Eq,
626 Hash,
627 PartialOrd,
628 Ord,
629 ::prost::Enumeration
630 )]
631 #[repr(i32)]
632 pub enum Health {
633 Unknown = 0,
635 Alive = 1,
637 Dead = 2,
639 Degraded = 3,
641 }
642 impl Health {
643 pub fn as_str_name(&self) -> &'static str {
648 match self {
649 Health::Unknown => "HEALTH_UNKNOWN",
650 Health::Alive => "ALIVE",
651 Health::Dead => "DEAD",
652 Health::Degraded => "DEGRADED",
653 }
654 }
655 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
657 match value {
658 "HEALTH_UNKNOWN" => Some(Self::Unknown),
659 "ALIVE" => Some(Self::Alive),
660 "DEAD" => Some(Self::Dead),
661 "DEGRADED" => Some(Self::Degraded),
662 _ => None,
663 }
664 }
665 }
666}
667#[allow(clippy::derive_partial_eq_without_eq)]
668#[derive(Clone, PartialEq, ::prost::Message)]
669pub struct Service {
670 #[prost(enumeration = "service::Type", tag = "1")]
672 pub r#type: i32,
673 #[prost(enumeration = "service::Health", tag = "2")]
675 pub health: i32,
676}
677pub mod service {
679 #[derive(
680 Clone,
681 Copy,
682 Debug,
683 PartialEq,
684 Eq,
685 Hash,
686 PartialOrd,
687 Ord,
688 ::prost::Enumeration
689 )]
690 #[repr(i32)]
691 pub enum Type {
692 Unspecified = 0,
693 Sqlserver = 1,
695 }
696 impl Type {
697 pub fn as_str_name(&self) -> &'static str {
702 match self {
703 Type::Unspecified => "TYPE_UNSPECIFIED",
704 Type::Sqlserver => "SQLSERVER",
705 }
706 }
707 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
709 match value {
710 "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
711 "SQLSERVER" => Some(Self::Sqlserver),
712 _ => None,
713 }
714 }
715 }
716 #[derive(
717 Clone,
718 Copy,
719 Debug,
720 PartialEq,
721 Eq,
722 Hash,
723 PartialOrd,
724 Ord,
725 ::prost::Enumeration
726 )]
727 #[repr(i32)]
728 pub enum Health {
729 Unknown = 0,
731 Alive = 1,
733 Dead = 2,
735 }
736 impl Health {
737 pub fn as_str_name(&self) -> &'static str {
742 match self {
743 Health::Unknown => "HEALTH_UNKNOWN",
744 Health::Alive => "ALIVE",
745 Health::Dead => "DEAD",
746 }
747 }
748 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
750 match value {
751 "HEALTH_UNKNOWN" => Some(Self::Unknown),
752 "ALIVE" => Some(Self::Alive),
753 "DEAD" => Some(Self::Dead),
754 _ => None,
755 }
756 }
757 }
758}
759#[allow(clippy::derive_partial_eq_without_eq)]
760#[derive(Clone, PartialEq, ::prost::Message)]
761pub struct Resources {
762 #[prost(string, tag = "1")]
766 pub resource_preset_id: ::prost::alloc::string::String,
767 #[prost(int64, tag = "2")]
769 pub disk_size: i64,
770 #[prost(string, tag = "3")]
777 pub disk_type_id: ::prost::alloc::string::String,
778}
779#[allow(clippy::derive_partial_eq_without_eq)]
780#[derive(Clone, PartialEq, ::prost::Message)]
781pub struct Access {
782 #[prost(bool, tag = "1")]
784 pub data_lens: bool,
785 #[prost(bool, tag = "2")]
787 pub web_sql: bool,
788}
789#[allow(clippy::derive_partial_eq_without_eq)]
793#[derive(Clone, PartialEq, ::prost::Message)]
794pub struct Database {
795 #[prost(string, tag = "1")]
797 pub name: ::prost::alloc::string::String,
798 #[prost(string, tag = "2")]
800 pub cluster_id: ::prost::alloc::string::String,
801}
802#[allow(clippy::derive_partial_eq_without_eq)]
803#[derive(Clone, PartialEq, ::prost::Message)]
804pub struct DatabaseSpec {
805 #[prost(string, tag = "1")]
807 pub name: ::prost::alloc::string::String,
808}
809#[allow(clippy::derive_partial_eq_without_eq)]
811#[derive(Clone, PartialEq, ::prost::Message)]
812pub struct User {
813 #[prost(string, tag = "1")]
815 pub name: ::prost::alloc::string::String,
816 #[prost(string, tag = "2")]
818 pub cluster_id: ::prost::alloc::string::String,
819 #[prost(message, repeated, tag = "3")]
821 pub permissions: ::prost::alloc::vec::Vec<Permission>,
822 #[prost(enumeration = "ServerRole", repeated, tag = "4")]
824 pub server_roles: ::prost::alloc::vec::Vec<i32>,
825}
826#[allow(clippy::derive_partial_eq_without_eq)]
827#[derive(Clone, PartialEq, ::prost::Message)]
828pub struct Permission {
829 #[prost(string, tag = "1")]
831 pub database_name: ::prost::alloc::string::String,
832 #[prost(enumeration = "permission::Role", repeated, packed = "false", tag = "2")]
834 pub roles: ::prost::alloc::vec::Vec<i32>,
835}
836pub mod permission {
838 #[derive(
840 Clone,
841 Copy,
842 Debug,
843 PartialEq,
844 Eq,
845 Hash,
846 PartialOrd,
847 Ord,
848 ::prost::Enumeration
849 )]
850 #[repr(i32)]
851 pub enum Role {
852 Unspecified = 0,
853 DbOwner = 1,
855 DbSecurityadmin = 2,
857 DbAccessadmin = 3,
859 DbBackupoperator = 4,
861 DbDdladmin = 5,
863 DbDatawriter = 6,
865 DbDatareader = 7,
867 DbDenydatawriter = 8,
869 DbDenydatareader = 9,
871 }
872 impl Role {
873 pub fn as_str_name(&self) -> &'static str {
878 match self {
879 Role::Unspecified => "ROLE_UNSPECIFIED",
880 Role::DbOwner => "DB_OWNER",
881 Role::DbSecurityadmin => "DB_SECURITYADMIN",
882 Role::DbAccessadmin => "DB_ACCESSADMIN",
883 Role::DbBackupoperator => "DB_BACKUPOPERATOR",
884 Role::DbDdladmin => "DB_DDLADMIN",
885 Role::DbDatawriter => "DB_DATAWRITER",
886 Role::DbDatareader => "DB_DATAREADER",
887 Role::DbDenydatawriter => "DB_DENYDATAWRITER",
888 Role::DbDenydatareader => "DB_DENYDATAREADER",
889 }
890 }
891 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
893 match value {
894 "ROLE_UNSPECIFIED" => Some(Self::Unspecified),
895 "DB_OWNER" => Some(Self::DbOwner),
896 "DB_SECURITYADMIN" => Some(Self::DbSecurityadmin),
897 "DB_ACCESSADMIN" => Some(Self::DbAccessadmin),
898 "DB_BACKUPOPERATOR" => Some(Self::DbBackupoperator),
899 "DB_DDLADMIN" => Some(Self::DbDdladmin),
900 "DB_DATAWRITER" => Some(Self::DbDatawriter),
901 "DB_DATAREADER" => Some(Self::DbDatareader),
902 "DB_DENYDATAWRITER" => Some(Self::DbDenydatawriter),
903 "DB_DENYDATAREADER" => Some(Self::DbDenydatareader),
904 _ => None,
905 }
906 }
907 }
908}
909#[allow(clippy::derive_partial_eq_without_eq)]
910#[derive(Clone, PartialEq, ::prost::Message)]
911pub struct UserSpec {
912 #[prost(string, tag = "1")]
914 pub name: ::prost::alloc::string::String,
915 #[prost(string, tag = "2")]
917 pub password: ::prost::alloc::string::String,
918 #[prost(message, repeated, tag = "3")]
920 pub permissions: ::prost::alloc::vec::Vec<Permission>,
921 #[prost(enumeration = "ServerRole", repeated, tag = "4")]
923 pub server_roles: ::prost::alloc::vec::Vec<i32>,
924}
925#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
927#[repr(i32)]
928pub enum ServerRole {
929 Unspecified = 0,
930 MdbMonitor = 1,
936}
937impl ServerRole {
938 pub fn as_str_name(&self) -> &'static str {
943 match self {
944 ServerRole::Unspecified => "SERVER_ROLE_UNSPECIFIED",
945 ServerRole::MdbMonitor => "MDB_MONITOR",
946 }
947 }
948 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
950 match value {
951 "SERVER_ROLE_UNSPECIFIED" => Some(Self::Unspecified),
952 "MDB_MONITOR" => Some(Self::MdbMonitor),
953 _ => None,
954 }
955 }
956}
957#[allow(clippy::derive_partial_eq_without_eq)]
958#[derive(Clone, PartialEq, ::prost::Message)]
959pub struct GetClusterRequest {
960 #[prost(string, tag = "1")]
964 pub cluster_id: ::prost::alloc::string::String,
965}
966#[allow(clippy::derive_partial_eq_without_eq)]
967#[derive(Clone, PartialEq, ::prost::Message)]
968pub struct ListClustersRequest {
969 #[prost(string, tag = "1")]
973 pub folder_id: ::prost::alloc::string::String,
974 #[prost(int64, tag = "2")]
978 pub page_size: i64,
979 #[prost(string, tag = "3")]
981 pub page_token: ::prost::alloc::string::String,
982 #[prost(string, tag = "4")]
993 pub filter: ::prost::alloc::string::String,
994}
995#[allow(clippy::derive_partial_eq_without_eq)]
996#[derive(Clone, PartialEq, ::prost::Message)]
997pub struct ListClustersResponse {
998 #[prost(message, repeated, tag = "1")]
1000 pub clusters: ::prost::alloc::vec::Vec<Cluster>,
1001 #[prost(string, tag = "2")]
1005 pub next_page_token: ::prost::alloc::string::String,
1006}
1007#[allow(clippy::derive_partial_eq_without_eq)]
1008#[derive(Clone, PartialEq, ::prost::Message)]
1009pub struct CreateClusterRequest {
1010 #[prost(string, tag = "1")]
1014 pub folder_id: ::prost::alloc::string::String,
1015 #[prost(string, tag = "2")]
1017 pub name: ::prost::alloc::string::String,
1018 #[prost(string, tag = "3")]
1020 pub description: ::prost::alloc::string::String,
1021 #[prost(map = "string, string", tag = "4")]
1024 pub labels: ::std::collections::HashMap<
1025 ::prost::alloc::string::String,
1026 ::prost::alloc::string::String,
1027 >,
1028 #[prost(enumeration = "cluster::Environment", tag = "5")]
1030 pub environment: i32,
1031 #[prost(message, optional, tag = "6")]
1033 pub config_spec: ::core::option::Option<ConfigSpec>,
1034 #[prost(message, repeated, tag = "7")]
1036 pub database_specs: ::prost::alloc::vec::Vec<DatabaseSpec>,
1037 #[prost(message, repeated, tag = "8")]
1039 pub user_specs: ::prost::alloc::vec::Vec<UserSpec>,
1040 #[prost(message, repeated, tag = "9")]
1042 pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
1043 #[prost(string, tag = "10")]
1045 pub network_id: ::prost::alloc::string::String,
1046 #[prost(string, repeated, tag = "11")]
1048 pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1049 #[prost(bool, tag = "12")]
1051 pub deletion_protection: bool,
1052 #[prost(string, tag = "13")]
1054 pub sqlcollation: ::prost::alloc::string::String,
1055 #[prost(string, repeated, tag = "14")]
1057 pub host_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1058 #[prost(string, tag = "15")]
1060 pub service_account_id: ::prost::alloc::string::String,
1061}
1062#[allow(clippy::derive_partial_eq_without_eq)]
1063#[derive(Clone, PartialEq, ::prost::Message)]
1064pub struct CreateClusterMetadata {
1065 #[prost(string, tag = "1")]
1067 pub cluster_id: ::prost::alloc::string::String,
1068}
1069#[allow(clippy::derive_partial_eq_without_eq)]
1070#[derive(Clone, PartialEq, ::prost::Message)]
1071pub struct UpdateClusterRequest {
1072 #[prost(string, tag = "1")]
1076 pub cluster_id: ::prost::alloc::string::String,
1077 #[prost(message, optional, tag = "2")]
1079 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
1080 #[prost(string, tag = "3")]
1082 pub description: ::prost::alloc::string::String,
1083 #[prost(map = "string, string", tag = "4")]
1091 pub labels: ::std::collections::HashMap<
1092 ::prost::alloc::string::String,
1093 ::prost::alloc::string::String,
1094 >,
1095 #[prost(message, optional, tag = "5")]
1097 pub config_spec: ::core::option::Option<ConfigSpec>,
1098 #[prost(string, tag = "6")]
1100 pub name: ::prost::alloc::string::String,
1101 #[prost(string, repeated, tag = "7")]
1103 pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1104 #[prost(bool, tag = "8")]
1106 pub deletion_protection: bool,
1107 #[prost(string, tag = "9")]
1109 pub service_account_id: ::prost::alloc::string::String,
1110}
1111#[allow(clippy::derive_partial_eq_without_eq)]
1112#[derive(Clone, PartialEq, ::prost::Message)]
1113pub struct UpdateClusterMetadata {
1114 #[prost(string, tag = "1")]
1116 pub cluster_id: ::prost::alloc::string::String,
1117}
1118#[allow(clippy::derive_partial_eq_without_eq)]
1119#[derive(Clone, PartialEq, ::prost::Message)]
1120pub struct DeleteClusterRequest {
1121 #[prost(string, tag = "1")]
1125 pub cluster_id: ::prost::alloc::string::String,
1126}
1127#[allow(clippy::derive_partial_eq_without_eq)]
1128#[derive(Clone, PartialEq, ::prost::Message)]
1129pub struct DeleteClusterMetadata {
1130 #[prost(string, tag = "1")]
1132 pub cluster_id: ::prost::alloc::string::String,
1133}
1134#[allow(clippy::derive_partial_eq_without_eq)]
1135#[derive(Clone, PartialEq, ::prost::Message)]
1136pub struct BackupClusterRequest {
1137 #[prost(string, tag = "1")]
1141 pub cluster_id: ::prost::alloc::string::String,
1142}
1143#[allow(clippy::derive_partial_eq_without_eq)]
1144#[derive(Clone, PartialEq, ::prost::Message)]
1145pub struct BackupClusterMetadata {
1146 #[prost(string, tag = "1")]
1148 pub cluster_id: ::prost::alloc::string::String,
1149}
1150#[allow(clippy::derive_partial_eq_without_eq)]
1151#[derive(Clone, PartialEq, ::prost::Message)]
1152pub struct RestoreClusterRequest {
1153 #[prost(string, tag = "1")]
1157 pub backup_id: ::prost::alloc::string::String,
1158 #[prost(message, optional, tag = "2")]
1160 pub time: ::core::option::Option<::prost_types::Timestamp>,
1161 #[prost(string, tag = "4")]
1163 pub name: ::prost::alloc::string::String,
1164 #[prost(string, tag = "5")]
1166 pub description: ::prost::alloc::string::String,
1167 #[prost(map = "string, string", tag = "6")]
1171 pub labels: ::std::collections::HashMap<
1172 ::prost::alloc::string::String,
1173 ::prost::alloc::string::String,
1174 >,
1175 #[prost(enumeration = "cluster::Environment", tag = "7")]
1177 pub environment: i32,
1178 #[prost(message, optional, tag = "8")]
1180 pub config_spec: ::core::option::Option<ConfigSpec>,
1181 #[prost(message, repeated, tag = "9")]
1183 pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
1184 #[prost(string, tag = "10")]
1186 pub network_id: ::prost::alloc::string::String,
1187 #[prost(string, tag = "11")]
1191 pub folder_id: ::prost::alloc::string::String,
1192 #[prost(string, repeated, tag = "12")]
1194 pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1195 #[prost(bool, tag = "13")]
1197 pub deletion_protection: bool,
1198 #[prost(string, repeated, tag = "14")]
1200 pub host_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1201 #[prost(string, tag = "15")]
1203 pub service_account_id: ::prost::alloc::string::String,
1204}
1205#[allow(clippy::derive_partial_eq_without_eq)]
1206#[derive(Clone, PartialEq, ::prost::Message)]
1207pub struct RestoreClusterMetadata {
1208 #[prost(string, tag = "1")]
1210 pub cluster_id: ::prost::alloc::string::String,
1211 #[prost(string, tag = "2")]
1213 pub backup_id: ::prost::alloc::string::String,
1214}
1215#[allow(clippy::derive_partial_eq_without_eq)]
1216#[derive(Clone, PartialEq, ::prost::Message)]
1217pub struct StartClusterFailoverRequest {
1218 #[prost(string, tag = "1")]
1220 pub cluster_id: ::prost::alloc::string::String,
1221 #[prost(string, tag = "2")]
1225 pub host_name: ::prost::alloc::string::String,
1226}
1227#[allow(clippy::derive_partial_eq_without_eq)]
1228#[derive(Clone, PartialEq, ::prost::Message)]
1229pub struct StartClusterFailoverMetadata {
1230 #[prost(string, tag = "1")]
1232 pub cluster_id: ::prost::alloc::string::String,
1233}
1234#[allow(clippy::derive_partial_eq_without_eq)]
1235#[derive(Clone, PartialEq, ::prost::Message)]
1236pub struct LogRecord {
1237 #[prost(message, optional, tag = "1")]
1239 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
1240 #[prost(map = "string, string", tag = "2")]
1242 pub message: ::std::collections::HashMap<
1243 ::prost::alloc::string::String,
1244 ::prost::alloc::string::String,
1245 >,
1246}
1247#[allow(clippy::derive_partial_eq_without_eq)]
1248#[derive(Clone, PartialEq, ::prost::Message)]
1249pub struct ListClusterLogsRequest {
1250 #[prost(string, tag = "1")]
1254 pub cluster_id: ::prost::alloc::string::String,
1255 #[prost(string, repeated, tag = "2")]
1259 pub column_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1260 #[prost(enumeration = "list_cluster_logs_request::ServiceType", tag = "3")]
1263 pub service_type: i32,
1264 #[prost(message, optional, tag = "4")]
1266 pub from_time: ::core::option::Option<::prost_types::Timestamp>,
1267 #[prost(message, optional, tag = "5")]
1269 pub to_time: ::core::option::Option<::prost_types::Timestamp>,
1270 #[prost(int64, tag = "6")]
1274 pub page_size: i64,
1275 #[prost(string, tag = "7")]
1277 pub page_token: ::prost::alloc::string::String,
1278 #[prost(bool, tag = "8")]
1280 pub always_next_page_token: bool,
1281 #[prost(string, tag = "9")]
1292 pub filter: ::prost::alloc::string::String,
1293}
1294pub mod list_cluster_logs_request {
1296 #[derive(
1297 Clone,
1298 Copy,
1299 Debug,
1300 PartialEq,
1301 Eq,
1302 Hash,
1303 PartialOrd,
1304 Ord,
1305 ::prost::Enumeration
1306 )]
1307 #[repr(i32)]
1308 pub enum ServiceType {
1309 Unspecified = 0,
1310 SqlserverError = 1,
1312 SqlserverApplication = 2,
1314 }
1315 impl ServiceType {
1316 pub fn as_str_name(&self) -> &'static str {
1321 match self {
1322 ServiceType::Unspecified => "SERVICE_TYPE_UNSPECIFIED",
1323 ServiceType::SqlserverError => "SQLSERVER_ERROR",
1324 ServiceType::SqlserverApplication => "SQLSERVER_APPLICATION",
1325 }
1326 }
1327 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1329 match value {
1330 "SERVICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1331 "SQLSERVER_ERROR" => Some(Self::SqlserverError),
1332 "SQLSERVER_APPLICATION" => Some(Self::SqlserverApplication),
1333 _ => None,
1334 }
1335 }
1336 }
1337}
1338#[allow(clippy::derive_partial_eq_without_eq)]
1339#[derive(Clone, PartialEq, ::prost::Message)]
1340pub struct ListClusterLogsResponse {
1341 #[prost(message, repeated, tag = "1")]
1343 pub logs: ::prost::alloc::vec::Vec<LogRecord>,
1344 #[prost(string, tag = "2")]
1350 pub next_page_token: ::prost::alloc::string::String,
1351}
1352#[allow(clippy::derive_partial_eq_without_eq)]
1353#[derive(Clone, PartialEq, ::prost::Message)]
1354pub struct ListClusterOperationsRequest {
1355 #[prost(string, tag = "1")]
1359 pub cluster_id: ::prost::alloc::string::String,
1360 #[prost(int64, tag = "2")]
1364 pub page_size: i64,
1365 #[prost(string, tag = "3")]
1367 pub page_token: ::prost::alloc::string::String,
1368}
1369#[allow(clippy::derive_partial_eq_without_eq)]
1370#[derive(Clone, PartialEq, ::prost::Message)]
1371pub struct ListClusterOperationsResponse {
1372 #[prost(message, repeated, tag = "1")]
1374 pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
1375 #[prost(string, tag = "2")]
1381 pub next_page_token: ::prost::alloc::string::String,
1382}
1383#[allow(clippy::derive_partial_eq_without_eq)]
1384#[derive(Clone, PartialEq, ::prost::Message)]
1385pub struct ListClusterBackupsRequest {
1386 #[prost(string, tag = "1")]
1390 pub cluster_id: ::prost::alloc::string::String,
1391 #[prost(int64, tag = "2")]
1396 pub page_size: i64,
1397 #[prost(string, tag = "3")]
1400 pub page_token: ::prost::alloc::string::String,
1401}
1402#[allow(clippy::derive_partial_eq_without_eq)]
1403#[derive(Clone, PartialEq, ::prost::Message)]
1404pub struct ListClusterBackupsResponse {
1405 #[prost(message, repeated, tag = "1")]
1407 pub backups: ::prost::alloc::vec::Vec<Backup>,
1408 #[prost(string, tag = "2")]
1414 pub next_page_token: ::prost::alloc::string::String,
1415}
1416#[allow(clippy::derive_partial_eq_without_eq)]
1417#[derive(Clone, PartialEq, ::prost::Message)]
1418pub struct ListClusterHostsRequest {
1419 #[prost(string, tag = "1")]
1423 pub cluster_id: ::prost::alloc::string::String,
1424 #[prost(int64, tag = "2")]
1429 pub page_size: i64,
1430 #[prost(string, tag = "3")]
1433 pub page_token: ::prost::alloc::string::String,
1434}
1435#[allow(clippy::derive_partial_eq_without_eq)]
1436#[derive(Clone, PartialEq, ::prost::Message)]
1437pub struct ListClusterHostsResponse {
1438 #[prost(message, repeated, tag = "1")]
1440 pub hosts: ::prost::alloc::vec::Vec<Host>,
1441 #[prost(string, tag = "2")]
1447 pub next_page_token: ::prost::alloc::string::String,
1448}
1449#[allow(clippy::derive_partial_eq_without_eq)]
1450#[derive(Clone, PartialEq, ::prost::Message)]
1451pub struct StartClusterRequest {
1452 #[prost(string, tag = "1")]
1456 pub cluster_id: ::prost::alloc::string::String,
1457}
1458#[allow(clippy::derive_partial_eq_without_eq)]
1459#[derive(Clone, PartialEq, ::prost::Message)]
1460pub struct StartClusterMetadata {
1461 #[prost(string, tag = "1")]
1463 pub cluster_id: ::prost::alloc::string::String,
1464}
1465#[allow(clippy::derive_partial_eq_without_eq)]
1466#[derive(Clone, PartialEq, ::prost::Message)]
1467pub struct StopClusterRequest {
1468 #[prost(string, tag = "1")]
1472 pub cluster_id: ::prost::alloc::string::String,
1473}
1474#[allow(clippy::derive_partial_eq_without_eq)]
1475#[derive(Clone, PartialEq, ::prost::Message)]
1476pub struct StopClusterMetadata {
1477 #[prost(string, tag = "1")]
1479 pub cluster_id: ::prost::alloc::string::String,
1480}
1481#[allow(clippy::derive_partial_eq_without_eq)]
1482#[derive(Clone, PartialEq, ::prost::Message)]
1483pub struct MoveClusterRequest {
1484 #[prost(string, tag = "1")]
1488 pub cluster_id: ::prost::alloc::string::String,
1489 #[prost(string, tag = "2")]
1493 pub destination_folder_id: ::prost::alloc::string::String,
1494}
1495#[allow(clippy::derive_partial_eq_without_eq)]
1496#[derive(Clone, PartialEq, ::prost::Message)]
1497pub struct MoveClusterMetadata {
1498 #[prost(string, tag = "1")]
1500 pub cluster_id: ::prost::alloc::string::String,
1501 #[prost(string, tag = "2")]
1503 pub source_folder_id: ::prost::alloc::string::String,
1504 #[prost(string, tag = "3")]
1506 pub destination_folder_id: ::prost::alloc::string::String,
1507}
1508#[allow(clippy::derive_partial_eq_without_eq)]
1509#[derive(Clone, PartialEq, ::prost::Message)]
1510pub struct UpdateClusterHostsMetadata {
1511 #[prost(string, tag = "1")]
1513 pub cluster_id: ::prost::alloc::string::String,
1514 #[prost(string, repeated, tag = "2")]
1516 pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1517}
1518#[allow(clippy::derive_partial_eq_without_eq)]
1519#[derive(Clone, PartialEq, ::prost::Message)]
1520pub struct HostSpec {
1521 #[prost(string, tag = "1")]
1526 pub zone_id: ::prost::alloc::string::String,
1527 #[prost(string, tag = "2")]
1531 pub subnet_id: ::prost::alloc::string::String,
1532 #[prost(bool, tag = "3")]
1540 pub assign_public_ip: bool,
1541}
1542#[allow(clippy::derive_partial_eq_without_eq)]
1543#[derive(Clone, PartialEq, ::prost::Message)]
1544pub struct UpdateHostSpec {
1545 #[prost(string, tag = "1")]
1549 pub host_name: ::prost::alloc::string::String,
1550 #[prost(message, optional, tag = "2")]
1552 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
1553 #[prost(bool, tag = "3")]
1555 pub assign_public_ip: bool,
1556}
1557#[allow(clippy::derive_partial_eq_without_eq)]
1558#[derive(Clone, PartialEq, ::prost::Message)]
1559pub struct UpdateClusterHostsRequest {
1560 #[prost(string, tag = "1")]
1563 pub cluster_id: ::prost::alloc::string::String,
1564 #[prost(message, repeated, tag = "2")]
1566 pub update_host_specs: ::prost::alloc::vec::Vec<UpdateHostSpec>,
1567}
1568#[allow(clippy::derive_partial_eq_without_eq)]
1569#[derive(Clone, PartialEq, ::prost::Message)]
1570pub struct ConfigSpec {
1571 #[prost(string, tag = "1")]
1583 pub version: ::prost::alloc::string::String,
1584 #[prost(message, optional, tag = "3")]
1586 pub resources: ::core::option::Option<Resources>,
1587 #[prost(message, optional, tag = "4")]
1590 pub backup_window_start: ::core::option::Option<
1591 super::super::super::super::super::google::r#type::TimeOfDay,
1592 >,
1593 #[prost(message, optional, tag = "6")]
1595 pub access: ::core::option::Option<Access>,
1596 #[prost(enumeration = "cluster_config::SecondaryConnections", tag = "7")]
1598 pub secondary_connections: i32,
1599 #[prost(oneof = "config_spec::SqlserverConfig", tags = "2, 5, 8, 9, 10, 11")]
1601 pub sqlserver_config: ::core::option::Option<config_spec::SqlserverConfig>,
1602}
1603pub mod config_spec {
1605 #[allow(clippy::derive_partial_eq_without_eq)]
1607 #[derive(Clone, PartialEq, ::prost::Oneof)]
1608 pub enum SqlserverConfig {
1609 #[prost(message, tag = "2")]
1611 SqlserverConfig2016sp2std(super::config::SqlServerConfig2016sp2std),
1612 #[prost(message, tag = "5")]
1614 SqlserverConfig2016sp2ent(super::config::SqlServerConfig2016sp2ent),
1615 #[prost(message, tag = "8")]
1617 SqlserverConfig2017std(super::config::SqlServerConfig2017std),
1618 #[prost(message, tag = "9")]
1620 SqlserverConfig2017ent(super::config::SqlServerConfig2017ent),
1621 #[prost(message, tag = "10")]
1623 SqlserverConfig2019std(super::config::SqlServerConfig2019std),
1624 #[prost(message, tag = "11")]
1626 SqlserverConfig2019ent(super::config::SqlServerConfig2019ent),
1627 }
1628}
1629pub mod cluster_service_client {
1631 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1632 use tonic::codegen::*;
1633 use tonic::codegen::http::Uri;
1634 #[derive(Debug, Clone)]
1636 pub struct ClusterServiceClient<T> {
1637 inner: tonic::client::Grpc<T>,
1638 }
1639 impl ClusterServiceClient<tonic::transport::Channel> {
1640 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1642 where
1643 D: TryInto<tonic::transport::Endpoint>,
1644 D::Error: Into<StdError>,
1645 {
1646 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1647 Ok(Self::new(conn))
1648 }
1649 }
1650 impl<T> ClusterServiceClient<T>
1651 where
1652 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1653 T::Error: Into<StdError>,
1654 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1655 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1656 {
1657 pub fn new(inner: T) -> Self {
1658 let inner = tonic::client::Grpc::new(inner);
1659 Self { inner }
1660 }
1661 pub fn with_origin(inner: T, origin: Uri) -> Self {
1662 let inner = tonic::client::Grpc::with_origin(inner, origin);
1663 Self { inner }
1664 }
1665 pub fn with_interceptor<F>(
1666 inner: T,
1667 interceptor: F,
1668 ) -> ClusterServiceClient<InterceptedService<T, F>>
1669 where
1670 F: tonic::service::Interceptor,
1671 T::ResponseBody: Default,
1672 T: tonic::codegen::Service<
1673 http::Request<tonic::body::BoxBody>,
1674 Response = http::Response<
1675 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1676 >,
1677 >,
1678 <T as tonic::codegen::Service<
1679 http::Request<tonic::body::BoxBody>,
1680 >>::Error: Into<StdError> + Send + Sync,
1681 {
1682 ClusterServiceClient::new(InterceptedService::new(inner, interceptor))
1683 }
1684 #[must_use]
1689 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1690 self.inner = self.inner.send_compressed(encoding);
1691 self
1692 }
1693 #[must_use]
1695 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1696 self.inner = self.inner.accept_compressed(encoding);
1697 self
1698 }
1699 #[must_use]
1703 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1704 self.inner = self.inner.max_decoding_message_size(limit);
1705 self
1706 }
1707 #[must_use]
1711 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1712 self.inner = self.inner.max_encoding_message_size(limit);
1713 self
1714 }
1715 pub async fn get(
1719 &mut self,
1720 request: impl tonic::IntoRequest<super::GetClusterRequest>,
1721 ) -> std::result::Result<tonic::Response<super::Cluster>, tonic::Status> {
1722 self.inner
1723 .ready()
1724 .await
1725 .map_err(|e| {
1726 tonic::Status::new(
1727 tonic::Code::Unknown,
1728 format!("Service was not ready: {}", e.into()),
1729 )
1730 })?;
1731 let codec = tonic::codec::ProstCodec::default();
1732 let path = http::uri::PathAndQuery::from_static(
1733 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/Get",
1734 );
1735 let mut req = request.into_request();
1736 req.extensions_mut()
1737 .insert(
1738 GrpcMethod::new(
1739 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
1740 "Get",
1741 ),
1742 );
1743 self.inner.unary(req, path, codec).await
1744 }
1745 pub async fn list(
1747 &mut self,
1748 request: impl tonic::IntoRequest<super::ListClustersRequest>,
1749 ) -> std::result::Result<
1750 tonic::Response<super::ListClustersResponse>,
1751 tonic::Status,
1752 > {
1753 self.inner
1754 .ready()
1755 .await
1756 .map_err(|e| {
1757 tonic::Status::new(
1758 tonic::Code::Unknown,
1759 format!("Service was not ready: {}", e.into()),
1760 )
1761 })?;
1762 let codec = tonic::codec::ProstCodec::default();
1763 let path = http::uri::PathAndQuery::from_static(
1764 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/List",
1765 );
1766 let mut req = request.into_request();
1767 req.extensions_mut()
1768 .insert(
1769 GrpcMethod::new(
1770 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
1771 "List",
1772 ),
1773 );
1774 self.inner.unary(req, path, codec).await
1775 }
1776 pub async fn create(
1778 &mut self,
1779 request: impl tonic::IntoRequest<super::CreateClusterRequest>,
1780 ) -> std::result::Result<
1781 tonic::Response<super::super::super::super::operation::Operation>,
1782 tonic::Status,
1783 > {
1784 self.inner
1785 .ready()
1786 .await
1787 .map_err(|e| {
1788 tonic::Status::new(
1789 tonic::Code::Unknown,
1790 format!("Service was not ready: {}", e.into()),
1791 )
1792 })?;
1793 let codec = tonic::codec::ProstCodec::default();
1794 let path = http::uri::PathAndQuery::from_static(
1795 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/Create",
1796 );
1797 let mut req = request.into_request();
1798 req.extensions_mut()
1799 .insert(
1800 GrpcMethod::new(
1801 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
1802 "Create",
1803 ),
1804 );
1805 self.inner.unary(req, path, codec).await
1806 }
1807 pub async fn update(
1809 &mut self,
1810 request: impl tonic::IntoRequest<super::UpdateClusterRequest>,
1811 ) -> std::result::Result<
1812 tonic::Response<super::super::super::super::operation::Operation>,
1813 tonic::Status,
1814 > {
1815 self.inner
1816 .ready()
1817 .await
1818 .map_err(|e| {
1819 tonic::Status::new(
1820 tonic::Code::Unknown,
1821 format!("Service was not ready: {}", e.into()),
1822 )
1823 })?;
1824 let codec = tonic::codec::ProstCodec::default();
1825 let path = http::uri::PathAndQuery::from_static(
1826 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/Update",
1827 );
1828 let mut req = request.into_request();
1829 req.extensions_mut()
1830 .insert(
1831 GrpcMethod::new(
1832 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
1833 "Update",
1834 ),
1835 );
1836 self.inner.unary(req, path, codec).await
1837 }
1838 pub async fn delete(
1840 &mut self,
1841 request: impl tonic::IntoRequest<super::DeleteClusterRequest>,
1842 ) -> std::result::Result<
1843 tonic::Response<super::super::super::super::operation::Operation>,
1844 tonic::Status,
1845 > {
1846 self.inner
1847 .ready()
1848 .await
1849 .map_err(|e| {
1850 tonic::Status::new(
1851 tonic::Code::Unknown,
1852 format!("Service was not ready: {}", e.into()),
1853 )
1854 })?;
1855 let codec = tonic::codec::ProstCodec::default();
1856 let path = http::uri::PathAndQuery::from_static(
1857 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/Delete",
1858 );
1859 let mut req = request.into_request();
1860 req.extensions_mut()
1861 .insert(
1862 GrpcMethod::new(
1863 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
1864 "Delete",
1865 ),
1866 );
1867 self.inner.unary(req, path, codec).await
1868 }
1869 pub async fn start(
1871 &mut self,
1872 request: impl tonic::IntoRequest<super::StartClusterRequest>,
1873 ) -> std::result::Result<
1874 tonic::Response<super::super::super::super::operation::Operation>,
1875 tonic::Status,
1876 > {
1877 self.inner
1878 .ready()
1879 .await
1880 .map_err(|e| {
1881 tonic::Status::new(
1882 tonic::Code::Unknown,
1883 format!("Service was not ready: {}", e.into()),
1884 )
1885 })?;
1886 let codec = tonic::codec::ProstCodec::default();
1887 let path = http::uri::PathAndQuery::from_static(
1888 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/Start",
1889 );
1890 let mut req = request.into_request();
1891 req.extensions_mut()
1892 .insert(
1893 GrpcMethod::new(
1894 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
1895 "Start",
1896 ),
1897 );
1898 self.inner.unary(req, path, codec).await
1899 }
1900 pub async fn stop(
1902 &mut self,
1903 request: impl tonic::IntoRequest<super::StopClusterRequest>,
1904 ) -> std::result::Result<
1905 tonic::Response<super::super::super::super::operation::Operation>,
1906 tonic::Status,
1907 > {
1908 self.inner
1909 .ready()
1910 .await
1911 .map_err(|e| {
1912 tonic::Status::new(
1913 tonic::Code::Unknown,
1914 format!("Service was not ready: {}", e.into()),
1915 )
1916 })?;
1917 let codec = tonic::codec::ProstCodec::default();
1918 let path = http::uri::PathAndQuery::from_static(
1919 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/Stop",
1920 );
1921 let mut req = request.into_request();
1922 req.extensions_mut()
1923 .insert(
1924 GrpcMethod::new(
1925 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
1926 "Stop",
1927 ),
1928 );
1929 self.inner.unary(req, path, codec).await
1930 }
1931 pub async fn r#move(
1933 &mut self,
1934 request: impl tonic::IntoRequest<super::MoveClusterRequest>,
1935 ) -> std::result::Result<
1936 tonic::Response<super::super::super::super::operation::Operation>,
1937 tonic::Status,
1938 > {
1939 self.inner
1940 .ready()
1941 .await
1942 .map_err(|e| {
1943 tonic::Status::new(
1944 tonic::Code::Unknown,
1945 format!("Service was not ready: {}", e.into()),
1946 )
1947 })?;
1948 let codec = tonic::codec::ProstCodec::default();
1949 let path = http::uri::PathAndQuery::from_static(
1950 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/Move",
1951 );
1952 let mut req = request.into_request();
1953 req.extensions_mut()
1954 .insert(
1955 GrpcMethod::new(
1956 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
1957 "Move",
1958 ),
1959 );
1960 self.inner.unary(req, path, codec).await
1961 }
1962 pub async fn backup(
1964 &mut self,
1965 request: impl tonic::IntoRequest<super::BackupClusterRequest>,
1966 ) -> std::result::Result<
1967 tonic::Response<super::super::super::super::operation::Operation>,
1968 tonic::Status,
1969 > {
1970 self.inner
1971 .ready()
1972 .await
1973 .map_err(|e| {
1974 tonic::Status::new(
1975 tonic::Code::Unknown,
1976 format!("Service was not ready: {}", e.into()),
1977 )
1978 })?;
1979 let codec = tonic::codec::ProstCodec::default();
1980 let path = http::uri::PathAndQuery::from_static(
1981 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/Backup",
1982 );
1983 let mut req = request.into_request();
1984 req.extensions_mut()
1985 .insert(
1986 GrpcMethod::new(
1987 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
1988 "Backup",
1989 ),
1990 );
1991 self.inner.unary(req, path, codec).await
1992 }
1993 pub async fn restore(
1995 &mut self,
1996 request: impl tonic::IntoRequest<super::RestoreClusterRequest>,
1997 ) -> std::result::Result<
1998 tonic::Response<super::super::super::super::operation::Operation>,
1999 tonic::Status,
2000 > {
2001 self.inner
2002 .ready()
2003 .await
2004 .map_err(|e| {
2005 tonic::Status::new(
2006 tonic::Code::Unknown,
2007 format!("Service was not ready: {}", e.into()),
2008 )
2009 })?;
2010 let codec = tonic::codec::ProstCodec::default();
2011 let path = http::uri::PathAndQuery::from_static(
2012 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/Restore",
2013 );
2014 let mut req = request.into_request();
2015 req.extensions_mut()
2016 .insert(
2017 GrpcMethod::new(
2018 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
2019 "Restore",
2020 ),
2021 );
2022 self.inner.unary(req, path, codec).await
2023 }
2024 pub async fn start_failover(
2026 &mut self,
2027 request: impl tonic::IntoRequest<super::StartClusterFailoverRequest>,
2028 ) -> std::result::Result<
2029 tonic::Response<super::super::super::super::operation::Operation>,
2030 tonic::Status,
2031 > {
2032 self.inner
2033 .ready()
2034 .await
2035 .map_err(|e| {
2036 tonic::Status::new(
2037 tonic::Code::Unknown,
2038 format!("Service was not ready: {}", e.into()),
2039 )
2040 })?;
2041 let codec = tonic::codec::ProstCodec::default();
2042 let path = http::uri::PathAndQuery::from_static(
2043 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/StartFailover",
2044 );
2045 let mut req = request.into_request();
2046 req.extensions_mut()
2047 .insert(
2048 GrpcMethod::new(
2049 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
2050 "StartFailover",
2051 ),
2052 );
2053 self.inner.unary(req, path, codec).await
2054 }
2055 pub async fn list_logs(
2059 &mut self,
2060 request: impl tonic::IntoRequest<super::ListClusterLogsRequest>,
2061 ) -> std::result::Result<
2062 tonic::Response<super::ListClusterLogsResponse>,
2063 tonic::Status,
2064 > {
2065 self.inner
2066 .ready()
2067 .await
2068 .map_err(|e| {
2069 tonic::Status::new(
2070 tonic::Code::Unknown,
2071 format!("Service was not ready: {}", e.into()),
2072 )
2073 })?;
2074 let codec = tonic::codec::ProstCodec::default();
2075 let path = http::uri::PathAndQuery::from_static(
2076 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/ListLogs",
2077 );
2078 let mut req = request.into_request();
2079 req.extensions_mut()
2080 .insert(
2081 GrpcMethod::new(
2082 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
2083 "ListLogs",
2084 ),
2085 );
2086 self.inner.unary(req, path, codec).await
2087 }
2088 pub async fn list_operations(
2090 &mut self,
2091 request: impl tonic::IntoRequest<super::ListClusterOperationsRequest>,
2092 ) -> std::result::Result<
2093 tonic::Response<super::ListClusterOperationsResponse>,
2094 tonic::Status,
2095 > {
2096 self.inner
2097 .ready()
2098 .await
2099 .map_err(|e| {
2100 tonic::Status::new(
2101 tonic::Code::Unknown,
2102 format!("Service was not ready: {}", e.into()),
2103 )
2104 })?;
2105 let codec = tonic::codec::ProstCodec::default();
2106 let path = http::uri::PathAndQuery::from_static(
2107 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/ListOperations",
2108 );
2109 let mut req = request.into_request();
2110 req.extensions_mut()
2111 .insert(
2112 GrpcMethod::new(
2113 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
2114 "ListOperations",
2115 ),
2116 );
2117 self.inner.unary(req, path, codec).await
2118 }
2119 pub async fn list_backups(
2121 &mut self,
2122 request: impl tonic::IntoRequest<super::ListClusterBackupsRequest>,
2123 ) -> std::result::Result<
2124 tonic::Response<super::ListClusterBackupsResponse>,
2125 tonic::Status,
2126 > {
2127 self.inner
2128 .ready()
2129 .await
2130 .map_err(|e| {
2131 tonic::Status::new(
2132 tonic::Code::Unknown,
2133 format!("Service was not ready: {}", e.into()),
2134 )
2135 })?;
2136 let codec = tonic::codec::ProstCodec::default();
2137 let path = http::uri::PathAndQuery::from_static(
2138 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/ListBackups",
2139 );
2140 let mut req = request.into_request();
2141 req.extensions_mut()
2142 .insert(
2143 GrpcMethod::new(
2144 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
2145 "ListBackups",
2146 ),
2147 );
2148 self.inner.unary(req, path, codec).await
2149 }
2150 pub async fn list_hosts(
2152 &mut self,
2153 request: impl tonic::IntoRequest<super::ListClusterHostsRequest>,
2154 ) -> std::result::Result<
2155 tonic::Response<super::ListClusterHostsResponse>,
2156 tonic::Status,
2157 > {
2158 self.inner
2159 .ready()
2160 .await
2161 .map_err(|e| {
2162 tonic::Status::new(
2163 tonic::Code::Unknown,
2164 format!("Service was not ready: {}", e.into()),
2165 )
2166 })?;
2167 let codec = tonic::codec::ProstCodec::default();
2168 let path = http::uri::PathAndQuery::from_static(
2169 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/ListHosts",
2170 );
2171 let mut req = request.into_request();
2172 req.extensions_mut()
2173 .insert(
2174 GrpcMethod::new(
2175 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
2176 "ListHosts",
2177 ),
2178 );
2179 self.inner.unary(req, path, codec).await
2180 }
2181 pub async fn update_hosts(
2183 &mut self,
2184 request: impl tonic::IntoRequest<super::UpdateClusterHostsRequest>,
2185 ) -> std::result::Result<
2186 tonic::Response<super::super::super::super::operation::Operation>,
2187 tonic::Status,
2188 > {
2189 self.inner
2190 .ready()
2191 .await
2192 .map_err(|e| {
2193 tonic::Status::new(
2194 tonic::Code::Unknown,
2195 format!("Service was not ready: {}", e.into()),
2196 )
2197 })?;
2198 let codec = tonic::codec::ProstCodec::default();
2199 let path = http::uri::PathAndQuery::from_static(
2200 "/yandex.cloud.mdb.sqlserver.v1.ClusterService/UpdateHosts",
2201 );
2202 let mut req = request.into_request();
2203 req.extensions_mut()
2204 .insert(
2205 GrpcMethod::new(
2206 "yandex.cloud.mdb.sqlserver.v1.ClusterService",
2207 "UpdateHosts",
2208 ),
2209 );
2210 self.inner.unary(req, path, codec).await
2211 }
2212 }
2213}
2214#[allow(clippy::derive_partial_eq_without_eq)]
2215#[derive(Clone, PartialEq, ::prost::Message)]
2216pub struct GetDatabaseRequest {
2217 #[prost(string, tag = "1")]
2221 pub cluster_id: ::prost::alloc::string::String,
2222 #[prost(string, tag = "2")]
2226 pub database_name: ::prost::alloc::string::String,
2227}
2228#[allow(clippy::derive_partial_eq_without_eq)]
2229#[derive(Clone, PartialEq, ::prost::Message)]
2230pub struct ListDatabasesRequest {
2231 #[prost(string, tag = "1")]
2235 pub cluster_id: ::prost::alloc::string::String,
2236 #[prost(int64, tag = "2")]
2240 pub page_size: i64,
2241 #[prost(string, tag = "3")]
2243 pub page_token: ::prost::alloc::string::String,
2244}
2245#[allow(clippy::derive_partial_eq_without_eq)]
2246#[derive(Clone, PartialEq, ::prost::Message)]
2247pub struct ListDatabasesResponse {
2248 #[prost(message, repeated, tag = "1")]
2250 pub databases: ::prost::alloc::vec::Vec<Database>,
2251 #[prost(string, tag = "2")]
2257 pub next_page_token: ::prost::alloc::string::String,
2258}
2259#[allow(clippy::derive_partial_eq_without_eq)]
2260#[derive(Clone, PartialEq, ::prost::Message)]
2261pub struct CreateDatabaseRequest {
2262 #[prost(string, tag = "1")]
2266 pub cluster_id: ::prost::alloc::string::String,
2267 #[prost(message, optional, tag = "2")]
2269 pub database_spec: ::core::option::Option<DatabaseSpec>,
2270}
2271#[allow(clippy::derive_partial_eq_without_eq)]
2272#[derive(Clone, PartialEq, ::prost::Message)]
2273pub struct CreateDatabaseMetadata {
2274 #[prost(string, tag = "1")]
2276 pub cluster_id: ::prost::alloc::string::String,
2277 #[prost(string, tag = "2")]
2279 pub database_name: ::prost::alloc::string::String,
2280}
2281#[allow(clippy::derive_partial_eq_without_eq)]
2282#[derive(Clone, PartialEq, ::prost::Message)]
2283pub struct DeleteDatabaseRequest {
2284 #[prost(string, tag = "1")]
2288 pub cluster_id: ::prost::alloc::string::String,
2289 #[prost(string, tag = "2")]
2293 pub database_name: ::prost::alloc::string::String,
2294}
2295#[allow(clippy::derive_partial_eq_without_eq)]
2296#[derive(Clone, PartialEq, ::prost::Message)]
2297pub struct DeleteDatabaseMetadata {
2298 #[prost(string, tag = "1")]
2300 pub cluster_id: ::prost::alloc::string::String,
2301 #[prost(string, tag = "2")]
2303 pub database_name: ::prost::alloc::string::String,
2304}
2305#[allow(clippy::derive_partial_eq_without_eq)]
2306#[derive(Clone, PartialEq, ::prost::Message)]
2307pub struct RestoreDatabaseRequest {
2308 #[prost(string, tag = "1")]
2312 pub cluster_id: ::prost::alloc::string::String,
2313 #[prost(string, tag = "2")]
2315 pub database_name: ::prost::alloc::string::String,
2316 #[prost(string, tag = "3")]
2318 pub from_database: ::prost::alloc::string::String,
2319 #[prost(string, tag = "4")]
2321 pub backup_id: ::prost::alloc::string::String,
2322 #[prost(message, optional, tag = "6")]
2324 pub time: ::core::option::Option<::prost_types::Timestamp>,
2325}
2326#[allow(clippy::derive_partial_eq_without_eq)]
2327#[derive(Clone, PartialEq, ::prost::Message)]
2328pub struct RestoreDatabaseMetadata {
2329 #[prost(string, tag = "1")]
2331 pub cluster_id: ::prost::alloc::string::String,
2332 #[prost(string, tag = "2")]
2334 pub database_name: ::prost::alloc::string::String,
2335 #[prost(string, tag = "3")]
2337 pub from_database: ::prost::alloc::string::String,
2338 #[prost(string, tag = "4")]
2340 pub backup_id: ::prost::alloc::string::String,
2341}
2342#[allow(clippy::derive_partial_eq_without_eq)]
2343#[derive(Clone, PartialEq, ::prost::Message)]
2344pub struct ImportDatabaseBackupRequest {
2345 #[prost(string, tag = "1")]
2349 pub cluster_id: ::prost::alloc::string::String,
2350 #[prost(string, tag = "2")]
2352 pub database_name: ::prost::alloc::string::String,
2353 #[prost(string, tag = "3")]
2355 pub s3_bucket: ::prost::alloc::string::String,
2356 #[prost(string, tag = "4")]
2358 pub s3_path: ::prost::alloc::string::String,
2359 #[prost(string, repeated, tag = "5")]
2361 pub files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2362}
2363#[allow(clippy::derive_partial_eq_without_eq)]
2364#[derive(Clone, PartialEq, ::prost::Message)]
2365pub struct ImportDatabaseBackupMetadata {
2366 #[prost(string, tag = "1")]
2368 pub cluster_id: ::prost::alloc::string::String,
2369 #[prost(string, tag = "2")]
2371 pub database_name: ::prost::alloc::string::String,
2372 #[prost(string, tag = "3")]
2374 pub s3_bucket: ::prost::alloc::string::String,
2375 #[prost(string, tag = "4")]
2377 pub s3_path: ::prost::alloc::string::String,
2378}
2379#[allow(clippy::derive_partial_eq_without_eq)]
2380#[derive(Clone, PartialEq, ::prost::Message)]
2381pub struct ExportDatabaseBackupRequest {
2382 #[prost(string, tag = "1")]
2386 pub cluster_id: ::prost::alloc::string::String,
2387 #[prost(string, tag = "2")]
2389 pub database_name: ::prost::alloc::string::String,
2390 #[prost(string, tag = "3")]
2392 pub s3_bucket: ::prost::alloc::string::String,
2393 #[prost(string, tag = "4")]
2395 pub s3_path: ::prost::alloc::string::String,
2396 #[prost(string, tag = "5")]
2398 pub prefix: ::prost::alloc::string::String,
2399}
2400#[allow(clippy::derive_partial_eq_without_eq)]
2401#[derive(Clone, PartialEq, ::prost::Message)]
2402pub struct ExportDatabaseBackupMetadata {
2403 #[prost(string, tag = "1")]
2405 pub cluster_id: ::prost::alloc::string::String,
2406 #[prost(string, tag = "2")]
2408 pub database_name: ::prost::alloc::string::String,
2409 #[prost(string, tag = "3")]
2411 pub s3_bucket: ::prost::alloc::string::String,
2412 #[prost(string, tag = "4")]
2414 pub s3_path: ::prost::alloc::string::String,
2415}
2416pub mod database_service_client {
2418 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
2419 use tonic::codegen::*;
2420 use tonic::codegen::http::Uri;
2421 #[derive(Debug, Clone)]
2423 pub struct DatabaseServiceClient<T> {
2424 inner: tonic::client::Grpc<T>,
2425 }
2426 impl DatabaseServiceClient<tonic::transport::Channel> {
2427 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2429 where
2430 D: TryInto<tonic::transport::Endpoint>,
2431 D::Error: Into<StdError>,
2432 {
2433 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2434 Ok(Self::new(conn))
2435 }
2436 }
2437 impl<T> DatabaseServiceClient<T>
2438 where
2439 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2440 T::Error: Into<StdError>,
2441 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
2442 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
2443 {
2444 pub fn new(inner: T) -> Self {
2445 let inner = tonic::client::Grpc::new(inner);
2446 Self { inner }
2447 }
2448 pub fn with_origin(inner: T, origin: Uri) -> Self {
2449 let inner = tonic::client::Grpc::with_origin(inner, origin);
2450 Self { inner }
2451 }
2452 pub fn with_interceptor<F>(
2453 inner: T,
2454 interceptor: F,
2455 ) -> DatabaseServiceClient<InterceptedService<T, F>>
2456 where
2457 F: tonic::service::Interceptor,
2458 T::ResponseBody: Default,
2459 T: tonic::codegen::Service<
2460 http::Request<tonic::body::BoxBody>,
2461 Response = http::Response<
2462 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2463 >,
2464 >,
2465 <T as tonic::codegen::Service<
2466 http::Request<tonic::body::BoxBody>,
2467 >>::Error: Into<StdError> + Send + Sync,
2468 {
2469 DatabaseServiceClient::new(InterceptedService::new(inner, interceptor))
2470 }
2471 #[must_use]
2476 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2477 self.inner = self.inner.send_compressed(encoding);
2478 self
2479 }
2480 #[must_use]
2482 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2483 self.inner = self.inner.accept_compressed(encoding);
2484 self
2485 }
2486 #[must_use]
2490 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2491 self.inner = self.inner.max_decoding_message_size(limit);
2492 self
2493 }
2494 #[must_use]
2498 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2499 self.inner = self.inner.max_encoding_message_size(limit);
2500 self
2501 }
2502 pub async fn get(
2506 &mut self,
2507 request: impl tonic::IntoRequest<super::GetDatabaseRequest>,
2508 ) -> std::result::Result<tonic::Response<super::Database>, tonic::Status> {
2509 self.inner
2510 .ready()
2511 .await
2512 .map_err(|e| {
2513 tonic::Status::new(
2514 tonic::Code::Unknown,
2515 format!("Service was not ready: {}", e.into()),
2516 )
2517 })?;
2518 let codec = tonic::codec::ProstCodec::default();
2519 let path = http::uri::PathAndQuery::from_static(
2520 "/yandex.cloud.mdb.sqlserver.v1.DatabaseService/Get",
2521 );
2522 let mut req = request.into_request();
2523 req.extensions_mut()
2524 .insert(
2525 GrpcMethod::new(
2526 "yandex.cloud.mdb.sqlserver.v1.DatabaseService",
2527 "Get",
2528 ),
2529 );
2530 self.inner.unary(req, path, codec).await
2531 }
2532 pub async fn list(
2534 &mut self,
2535 request: impl tonic::IntoRequest<super::ListDatabasesRequest>,
2536 ) -> std::result::Result<
2537 tonic::Response<super::ListDatabasesResponse>,
2538 tonic::Status,
2539 > {
2540 self.inner
2541 .ready()
2542 .await
2543 .map_err(|e| {
2544 tonic::Status::new(
2545 tonic::Code::Unknown,
2546 format!("Service was not ready: {}", e.into()),
2547 )
2548 })?;
2549 let codec = tonic::codec::ProstCodec::default();
2550 let path = http::uri::PathAndQuery::from_static(
2551 "/yandex.cloud.mdb.sqlserver.v1.DatabaseService/List",
2552 );
2553 let mut req = request.into_request();
2554 req.extensions_mut()
2555 .insert(
2556 GrpcMethod::new(
2557 "yandex.cloud.mdb.sqlserver.v1.DatabaseService",
2558 "List",
2559 ),
2560 );
2561 self.inner.unary(req, path, codec).await
2562 }
2563 pub async fn create(
2565 &mut self,
2566 request: impl tonic::IntoRequest<super::CreateDatabaseRequest>,
2567 ) -> std::result::Result<
2568 tonic::Response<super::super::super::super::operation::Operation>,
2569 tonic::Status,
2570 > {
2571 self.inner
2572 .ready()
2573 .await
2574 .map_err(|e| {
2575 tonic::Status::new(
2576 tonic::Code::Unknown,
2577 format!("Service was not ready: {}", e.into()),
2578 )
2579 })?;
2580 let codec = tonic::codec::ProstCodec::default();
2581 let path = http::uri::PathAndQuery::from_static(
2582 "/yandex.cloud.mdb.sqlserver.v1.DatabaseService/Create",
2583 );
2584 let mut req = request.into_request();
2585 req.extensions_mut()
2586 .insert(
2587 GrpcMethod::new(
2588 "yandex.cloud.mdb.sqlserver.v1.DatabaseService",
2589 "Create",
2590 ),
2591 );
2592 self.inner.unary(req, path, codec).await
2593 }
2594 pub async fn restore(
2596 &mut self,
2597 request: impl tonic::IntoRequest<super::RestoreDatabaseRequest>,
2598 ) -> std::result::Result<
2599 tonic::Response<super::super::super::super::operation::Operation>,
2600 tonic::Status,
2601 > {
2602 self.inner
2603 .ready()
2604 .await
2605 .map_err(|e| {
2606 tonic::Status::new(
2607 tonic::Code::Unknown,
2608 format!("Service was not ready: {}", e.into()),
2609 )
2610 })?;
2611 let codec = tonic::codec::ProstCodec::default();
2612 let path = http::uri::PathAndQuery::from_static(
2613 "/yandex.cloud.mdb.sqlserver.v1.DatabaseService/Restore",
2614 );
2615 let mut req = request.into_request();
2616 req.extensions_mut()
2617 .insert(
2618 GrpcMethod::new(
2619 "yandex.cloud.mdb.sqlserver.v1.DatabaseService",
2620 "Restore",
2621 ),
2622 );
2623 self.inner.unary(req, path, codec).await
2624 }
2625 pub async fn import_backup(
2627 &mut self,
2628 request: impl tonic::IntoRequest<super::ImportDatabaseBackupRequest>,
2629 ) -> std::result::Result<
2630 tonic::Response<super::super::super::super::operation::Operation>,
2631 tonic::Status,
2632 > {
2633 self.inner
2634 .ready()
2635 .await
2636 .map_err(|e| {
2637 tonic::Status::new(
2638 tonic::Code::Unknown,
2639 format!("Service was not ready: {}", e.into()),
2640 )
2641 })?;
2642 let codec = tonic::codec::ProstCodec::default();
2643 let path = http::uri::PathAndQuery::from_static(
2644 "/yandex.cloud.mdb.sqlserver.v1.DatabaseService/ImportBackup",
2645 );
2646 let mut req = request.into_request();
2647 req.extensions_mut()
2648 .insert(
2649 GrpcMethod::new(
2650 "yandex.cloud.mdb.sqlserver.v1.DatabaseService",
2651 "ImportBackup",
2652 ),
2653 );
2654 self.inner.unary(req, path, codec).await
2655 }
2656 pub async fn export_backup(
2658 &mut self,
2659 request: impl tonic::IntoRequest<super::ExportDatabaseBackupRequest>,
2660 ) -> std::result::Result<
2661 tonic::Response<super::super::super::super::operation::Operation>,
2662 tonic::Status,
2663 > {
2664 self.inner
2665 .ready()
2666 .await
2667 .map_err(|e| {
2668 tonic::Status::new(
2669 tonic::Code::Unknown,
2670 format!("Service was not ready: {}", e.into()),
2671 )
2672 })?;
2673 let codec = tonic::codec::ProstCodec::default();
2674 let path = http::uri::PathAndQuery::from_static(
2675 "/yandex.cloud.mdb.sqlserver.v1.DatabaseService/ExportBackup",
2676 );
2677 let mut req = request.into_request();
2678 req.extensions_mut()
2679 .insert(
2680 GrpcMethod::new(
2681 "yandex.cloud.mdb.sqlserver.v1.DatabaseService",
2682 "ExportBackup",
2683 ),
2684 );
2685 self.inner.unary(req, path, codec).await
2686 }
2687 pub async fn delete(
2689 &mut self,
2690 request: impl tonic::IntoRequest<super::DeleteDatabaseRequest>,
2691 ) -> std::result::Result<
2692 tonic::Response<super::super::super::super::operation::Operation>,
2693 tonic::Status,
2694 > {
2695 self.inner
2696 .ready()
2697 .await
2698 .map_err(|e| {
2699 tonic::Status::new(
2700 tonic::Code::Unknown,
2701 format!("Service was not ready: {}", e.into()),
2702 )
2703 })?;
2704 let codec = tonic::codec::ProstCodec::default();
2705 let path = http::uri::PathAndQuery::from_static(
2706 "/yandex.cloud.mdb.sqlserver.v1.DatabaseService/Delete",
2707 );
2708 let mut req = request.into_request();
2709 req.extensions_mut()
2710 .insert(
2711 GrpcMethod::new(
2712 "yandex.cloud.mdb.sqlserver.v1.DatabaseService",
2713 "Delete",
2714 ),
2715 );
2716 self.inner.unary(req, path, codec).await
2717 }
2718 }
2719}
2720#[allow(clippy::derive_partial_eq_without_eq)]
2722#[derive(Clone, PartialEq, ::prost::Message)]
2723pub struct ResourcePreset {
2724 #[prost(string, tag = "1")]
2726 pub id: ::prost::alloc::string::String,
2727 #[prost(string, repeated, tag = "2")]
2729 pub zone_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2730 #[prost(int64, tag = "3")]
2732 pub cores: i64,
2733 #[prost(int64, tag = "4")]
2735 pub memory: i64,
2736}
2737#[allow(clippy::derive_partial_eq_without_eq)]
2738#[derive(Clone, PartialEq, ::prost::Message)]
2739pub struct GetResourcePresetRequest {
2740 #[prost(string, tag = "1")]
2744 pub resource_preset_id: ::prost::alloc::string::String,
2745}
2746#[allow(clippy::derive_partial_eq_without_eq)]
2747#[derive(Clone, PartialEq, ::prost::Message)]
2748pub struct ListResourcePresetsRequest {
2749 #[prost(int64, tag = "2")]
2753 pub page_size: i64,
2754 #[prost(string, tag = "3")]
2756 pub page_token: ::prost::alloc::string::String,
2757}
2758#[allow(clippy::derive_partial_eq_without_eq)]
2759#[derive(Clone, PartialEq, ::prost::Message)]
2760pub struct ListResourcePresetsResponse {
2761 #[prost(message, repeated, tag = "1")]
2763 pub resource_presets: ::prost::alloc::vec::Vec<ResourcePreset>,
2764 #[prost(string, tag = "2")]
2770 pub next_page_token: ::prost::alloc::string::String,
2771}
2772pub mod resource_preset_service_client {
2774 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
2775 use tonic::codegen::*;
2776 use tonic::codegen::http::Uri;
2777 #[derive(Debug, Clone)]
2779 pub struct ResourcePresetServiceClient<T> {
2780 inner: tonic::client::Grpc<T>,
2781 }
2782 impl ResourcePresetServiceClient<tonic::transport::Channel> {
2783 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2785 where
2786 D: TryInto<tonic::transport::Endpoint>,
2787 D::Error: Into<StdError>,
2788 {
2789 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2790 Ok(Self::new(conn))
2791 }
2792 }
2793 impl<T> ResourcePresetServiceClient<T>
2794 where
2795 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2796 T::Error: Into<StdError>,
2797 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
2798 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
2799 {
2800 pub fn new(inner: T) -> Self {
2801 let inner = tonic::client::Grpc::new(inner);
2802 Self { inner }
2803 }
2804 pub fn with_origin(inner: T, origin: Uri) -> Self {
2805 let inner = tonic::client::Grpc::with_origin(inner, origin);
2806 Self { inner }
2807 }
2808 pub fn with_interceptor<F>(
2809 inner: T,
2810 interceptor: F,
2811 ) -> ResourcePresetServiceClient<InterceptedService<T, F>>
2812 where
2813 F: tonic::service::Interceptor,
2814 T::ResponseBody: Default,
2815 T: tonic::codegen::Service<
2816 http::Request<tonic::body::BoxBody>,
2817 Response = http::Response<
2818 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2819 >,
2820 >,
2821 <T as tonic::codegen::Service<
2822 http::Request<tonic::body::BoxBody>,
2823 >>::Error: Into<StdError> + Send + Sync,
2824 {
2825 ResourcePresetServiceClient::new(InterceptedService::new(inner, interceptor))
2826 }
2827 #[must_use]
2832 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2833 self.inner = self.inner.send_compressed(encoding);
2834 self
2835 }
2836 #[must_use]
2838 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2839 self.inner = self.inner.accept_compressed(encoding);
2840 self
2841 }
2842 #[must_use]
2846 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2847 self.inner = self.inner.max_decoding_message_size(limit);
2848 self
2849 }
2850 #[must_use]
2854 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2855 self.inner = self.inner.max_encoding_message_size(limit);
2856 self
2857 }
2858 pub async fn get(
2862 &mut self,
2863 request: impl tonic::IntoRequest<super::GetResourcePresetRequest>,
2864 ) -> std::result::Result<tonic::Response<super::ResourcePreset>, tonic::Status> {
2865 self.inner
2866 .ready()
2867 .await
2868 .map_err(|e| {
2869 tonic::Status::new(
2870 tonic::Code::Unknown,
2871 format!("Service was not ready: {}", e.into()),
2872 )
2873 })?;
2874 let codec = tonic::codec::ProstCodec::default();
2875 let path = http::uri::PathAndQuery::from_static(
2876 "/yandex.cloud.mdb.sqlserver.v1.ResourcePresetService/Get",
2877 );
2878 let mut req = request.into_request();
2879 req.extensions_mut()
2880 .insert(
2881 GrpcMethod::new(
2882 "yandex.cloud.mdb.sqlserver.v1.ResourcePresetService",
2883 "Get",
2884 ),
2885 );
2886 self.inner.unary(req, path, codec).await
2887 }
2888 pub async fn list(
2890 &mut self,
2891 request: impl tonic::IntoRequest<super::ListResourcePresetsRequest>,
2892 ) -> std::result::Result<
2893 tonic::Response<super::ListResourcePresetsResponse>,
2894 tonic::Status,
2895 > {
2896 self.inner
2897 .ready()
2898 .await
2899 .map_err(|e| {
2900 tonic::Status::new(
2901 tonic::Code::Unknown,
2902 format!("Service was not ready: {}", e.into()),
2903 )
2904 })?;
2905 let codec = tonic::codec::ProstCodec::default();
2906 let path = http::uri::PathAndQuery::from_static(
2907 "/yandex.cloud.mdb.sqlserver.v1.ResourcePresetService/List",
2908 );
2909 let mut req = request.into_request();
2910 req.extensions_mut()
2911 .insert(
2912 GrpcMethod::new(
2913 "yandex.cloud.mdb.sqlserver.v1.ResourcePresetService",
2914 "List",
2915 ),
2916 );
2917 self.inner.unary(req, path, codec).await
2918 }
2919 }
2920}
2921#[allow(clippy::derive_partial_eq_without_eq)]
2922#[derive(Clone, PartialEq, ::prost::Message)]
2923pub struct GetUserRequest {
2924 #[prost(string, tag = "1")]
2928 pub cluster_id: ::prost::alloc::string::String,
2929 #[prost(string, tag = "2")]
2933 pub user_name: ::prost::alloc::string::String,
2934}
2935#[allow(clippy::derive_partial_eq_without_eq)]
2936#[derive(Clone, PartialEq, ::prost::Message)]
2937pub struct ListUsersRequest {
2938 #[prost(string, tag = "1")]
2942 pub cluster_id: ::prost::alloc::string::String,
2943 #[prost(int64, tag = "2")]
2947 pub page_size: i64,
2948 #[prost(string, tag = "3")]
2950 pub page_token: ::prost::alloc::string::String,
2951}
2952#[allow(clippy::derive_partial_eq_without_eq)]
2953#[derive(Clone, PartialEq, ::prost::Message)]
2954pub struct ListUsersResponse {
2955 #[prost(message, repeated, tag = "1")]
2957 pub users: ::prost::alloc::vec::Vec<User>,
2958 #[prost(string, tag = "2")]
2964 pub next_page_token: ::prost::alloc::string::String,
2965}
2966#[allow(clippy::derive_partial_eq_without_eq)]
2967#[derive(Clone, PartialEq, ::prost::Message)]
2968pub struct CreateUserRequest {
2969 #[prost(string, tag = "1")]
2973 pub cluster_id: ::prost::alloc::string::String,
2974 #[prost(message, optional, tag = "2")]
2976 pub user_spec: ::core::option::Option<UserSpec>,
2977}
2978#[allow(clippy::derive_partial_eq_without_eq)]
2979#[derive(Clone, PartialEq, ::prost::Message)]
2980pub struct CreateUserMetadata {
2981 #[prost(string, tag = "1")]
2983 pub cluster_id: ::prost::alloc::string::String,
2984 #[prost(string, tag = "2")]
2986 pub user_name: ::prost::alloc::string::String,
2987}
2988#[allow(clippy::derive_partial_eq_without_eq)]
2989#[derive(Clone, PartialEq, ::prost::Message)]
2990pub struct UpdateUserRequest {
2991 #[prost(string, tag = "1")]
2995 pub cluster_id: ::prost::alloc::string::String,
2996 #[prost(string, tag = "2")]
3000 pub user_name: ::prost::alloc::string::String,
3001 #[prost(message, optional, tag = "3")]
3003 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
3004 #[prost(string, tag = "4")]
3006 pub password: ::prost::alloc::string::String,
3007 #[prost(message, repeated, tag = "5")]
3009 pub permissions: ::prost::alloc::vec::Vec<Permission>,
3010 #[prost(enumeration = "ServerRole", repeated, tag = "6")]
3012 pub server_roles: ::prost::alloc::vec::Vec<i32>,
3013}
3014#[allow(clippy::derive_partial_eq_without_eq)]
3015#[derive(Clone, PartialEq, ::prost::Message)]
3016pub struct UpdateUserMetadata {
3017 #[prost(string, tag = "1")]
3019 pub cluster_id: ::prost::alloc::string::String,
3020 #[prost(string, tag = "2")]
3022 pub user_name: ::prost::alloc::string::String,
3023}
3024#[allow(clippy::derive_partial_eq_without_eq)]
3025#[derive(Clone, PartialEq, ::prost::Message)]
3026pub struct DeleteUserRequest {
3027 #[prost(string, tag = "1")]
3031 pub cluster_id: ::prost::alloc::string::String,
3032 #[prost(string, tag = "2")]
3036 pub user_name: ::prost::alloc::string::String,
3037}
3038#[allow(clippy::derive_partial_eq_without_eq)]
3039#[derive(Clone, PartialEq, ::prost::Message)]
3040pub struct DeleteUserMetadata {
3041 #[prost(string, tag = "1")]
3043 pub cluster_id: ::prost::alloc::string::String,
3044 #[prost(string, tag = "2")]
3046 pub user_name: ::prost::alloc::string::String,
3047}
3048#[allow(clippy::derive_partial_eq_without_eq)]
3049#[derive(Clone, PartialEq, ::prost::Message)]
3050pub struct GrantUserPermissionRequest {
3051 #[prost(string, tag = "1")]
3055 pub cluster_id: ::prost::alloc::string::String,
3056 #[prost(string, tag = "2")]
3060 pub user_name: ::prost::alloc::string::String,
3061 #[prost(message, optional, tag = "3")]
3063 pub permission: ::core::option::Option<Permission>,
3064}
3065#[allow(clippy::derive_partial_eq_without_eq)]
3066#[derive(Clone, PartialEq, ::prost::Message)]
3067pub struct GrantUserPermissionMetadata {
3068 #[prost(string, tag = "1")]
3072 pub cluster_id: ::prost::alloc::string::String,
3073 #[prost(string, tag = "2")]
3075 pub user_name: ::prost::alloc::string::String,
3076}
3077#[allow(clippy::derive_partial_eq_without_eq)]
3078#[derive(Clone, PartialEq, ::prost::Message)]
3079pub struct RevokeUserPermissionRequest {
3080 #[prost(string, tag = "1")]
3084 pub cluster_id: ::prost::alloc::string::String,
3085 #[prost(string, tag = "2")]
3089 pub user_name: ::prost::alloc::string::String,
3090 #[prost(message, optional, tag = "3")]
3092 pub permission: ::core::option::Option<Permission>,
3093}
3094#[allow(clippy::derive_partial_eq_without_eq)]
3095#[derive(Clone, PartialEq, ::prost::Message)]
3096pub struct RevokeUserPermissionMetadata {
3097 #[prost(string, tag = "1")]
3099 pub cluster_id: ::prost::alloc::string::String,
3100 #[prost(string, tag = "2")]
3102 pub user_name: ::prost::alloc::string::String,
3103}
3104pub mod user_service_client {
3106 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
3107 use tonic::codegen::*;
3108 use tonic::codegen::http::Uri;
3109 #[derive(Debug, Clone)]
3111 pub struct UserServiceClient<T> {
3112 inner: tonic::client::Grpc<T>,
3113 }
3114 impl UserServiceClient<tonic::transport::Channel> {
3115 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3117 where
3118 D: TryInto<tonic::transport::Endpoint>,
3119 D::Error: Into<StdError>,
3120 {
3121 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3122 Ok(Self::new(conn))
3123 }
3124 }
3125 impl<T> UserServiceClient<T>
3126 where
3127 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3128 T::Error: Into<StdError>,
3129 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
3130 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
3131 {
3132 pub fn new(inner: T) -> Self {
3133 let inner = tonic::client::Grpc::new(inner);
3134 Self { inner }
3135 }
3136 pub fn with_origin(inner: T, origin: Uri) -> Self {
3137 let inner = tonic::client::Grpc::with_origin(inner, origin);
3138 Self { inner }
3139 }
3140 pub fn with_interceptor<F>(
3141 inner: T,
3142 interceptor: F,
3143 ) -> UserServiceClient<InterceptedService<T, F>>
3144 where
3145 F: tonic::service::Interceptor,
3146 T::ResponseBody: Default,
3147 T: tonic::codegen::Service<
3148 http::Request<tonic::body::BoxBody>,
3149 Response = http::Response<
3150 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3151 >,
3152 >,
3153 <T as tonic::codegen::Service<
3154 http::Request<tonic::body::BoxBody>,
3155 >>::Error: Into<StdError> + Send + Sync,
3156 {
3157 UserServiceClient::new(InterceptedService::new(inner, interceptor))
3158 }
3159 #[must_use]
3164 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3165 self.inner = self.inner.send_compressed(encoding);
3166 self
3167 }
3168 #[must_use]
3170 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3171 self.inner = self.inner.accept_compressed(encoding);
3172 self
3173 }
3174 #[must_use]
3178 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3179 self.inner = self.inner.max_decoding_message_size(limit);
3180 self
3181 }
3182 #[must_use]
3186 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3187 self.inner = self.inner.max_encoding_message_size(limit);
3188 self
3189 }
3190 pub async fn get(
3194 &mut self,
3195 request: impl tonic::IntoRequest<super::GetUserRequest>,
3196 ) -> std::result::Result<tonic::Response<super::User>, tonic::Status> {
3197 self.inner
3198 .ready()
3199 .await
3200 .map_err(|e| {
3201 tonic::Status::new(
3202 tonic::Code::Unknown,
3203 format!("Service was not ready: {}", e.into()),
3204 )
3205 })?;
3206 let codec = tonic::codec::ProstCodec::default();
3207 let path = http::uri::PathAndQuery::from_static(
3208 "/yandex.cloud.mdb.sqlserver.v1.UserService/Get",
3209 );
3210 let mut req = request.into_request();
3211 req.extensions_mut()
3212 .insert(
3213 GrpcMethod::new("yandex.cloud.mdb.sqlserver.v1.UserService", "Get"),
3214 );
3215 self.inner.unary(req, path, codec).await
3216 }
3217 pub async fn list(
3219 &mut self,
3220 request: impl tonic::IntoRequest<super::ListUsersRequest>,
3221 ) -> std::result::Result<
3222 tonic::Response<super::ListUsersResponse>,
3223 tonic::Status,
3224 > {
3225 self.inner
3226 .ready()
3227 .await
3228 .map_err(|e| {
3229 tonic::Status::new(
3230 tonic::Code::Unknown,
3231 format!("Service was not ready: {}", e.into()),
3232 )
3233 })?;
3234 let codec = tonic::codec::ProstCodec::default();
3235 let path = http::uri::PathAndQuery::from_static(
3236 "/yandex.cloud.mdb.sqlserver.v1.UserService/List",
3237 );
3238 let mut req = request.into_request();
3239 req.extensions_mut()
3240 .insert(
3241 GrpcMethod::new("yandex.cloud.mdb.sqlserver.v1.UserService", "List"),
3242 );
3243 self.inner.unary(req, path, codec).await
3244 }
3245 pub async fn create(
3247 &mut self,
3248 request: impl tonic::IntoRequest<super::CreateUserRequest>,
3249 ) -> std::result::Result<
3250 tonic::Response<super::super::super::super::operation::Operation>,
3251 tonic::Status,
3252 > {
3253 self.inner
3254 .ready()
3255 .await
3256 .map_err(|e| {
3257 tonic::Status::new(
3258 tonic::Code::Unknown,
3259 format!("Service was not ready: {}", e.into()),
3260 )
3261 })?;
3262 let codec = tonic::codec::ProstCodec::default();
3263 let path = http::uri::PathAndQuery::from_static(
3264 "/yandex.cloud.mdb.sqlserver.v1.UserService/Create",
3265 );
3266 let mut req = request.into_request();
3267 req.extensions_mut()
3268 .insert(
3269 GrpcMethod::new(
3270 "yandex.cloud.mdb.sqlserver.v1.UserService",
3271 "Create",
3272 ),
3273 );
3274 self.inner.unary(req, path, codec).await
3275 }
3276 pub async fn update(
3278 &mut self,
3279 request: impl tonic::IntoRequest<super::UpdateUserRequest>,
3280 ) -> std::result::Result<
3281 tonic::Response<super::super::super::super::operation::Operation>,
3282 tonic::Status,
3283 > {
3284 self.inner
3285 .ready()
3286 .await
3287 .map_err(|e| {
3288 tonic::Status::new(
3289 tonic::Code::Unknown,
3290 format!("Service was not ready: {}", e.into()),
3291 )
3292 })?;
3293 let codec = tonic::codec::ProstCodec::default();
3294 let path = http::uri::PathAndQuery::from_static(
3295 "/yandex.cloud.mdb.sqlserver.v1.UserService/Update",
3296 );
3297 let mut req = request.into_request();
3298 req.extensions_mut()
3299 .insert(
3300 GrpcMethod::new(
3301 "yandex.cloud.mdb.sqlserver.v1.UserService",
3302 "Update",
3303 ),
3304 );
3305 self.inner.unary(req, path, codec).await
3306 }
3307 pub async fn delete(
3309 &mut self,
3310 request: impl tonic::IntoRequest<super::DeleteUserRequest>,
3311 ) -> std::result::Result<
3312 tonic::Response<super::super::super::super::operation::Operation>,
3313 tonic::Status,
3314 > {
3315 self.inner
3316 .ready()
3317 .await
3318 .map_err(|e| {
3319 tonic::Status::new(
3320 tonic::Code::Unknown,
3321 format!("Service was not ready: {}", e.into()),
3322 )
3323 })?;
3324 let codec = tonic::codec::ProstCodec::default();
3325 let path = http::uri::PathAndQuery::from_static(
3326 "/yandex.cloud.mdb.sqlserver.v1.UserService/Delete",
3327 );
3328 let mut req = request.into_request();
3329 req.extensions_mut()
3330 .insert(
3331 GrpcMethod::new(
3332 "yandex.cloud.mdb.sqlserver.v1.UserService",
3333 "Delete",
3334 ),
3335 );
3336 self.inner.unary(req, path, codec).await
3337 }
3338 pub async fn grant_permission(
3340 &mut self,
3341 request: impl tonic::IntoRequest<super::GrantUserPermissionRequest>,
3342 ) -> std::result::Result<
3343 tonic::Response<super::super::super::super::operation::Operation>,
3344 tonic::Status,
3345 > {
3346 self.inner
3347 .ready()
3348 .await
3349 .map_err(|e| {
3350 tonic::Status::new(
3351 tonic::Code::Unknown,
3352 format!("Service was not ready: {}", e.into()),
3353 )
3354 })?;
3355 let codec = tonic::codec::ProstCodec::default();
3356 let path = http::uri::PathAndQuery::from_static(
3357 "/yandex.cloud.mdb.sqlserver.v1.UserService/GrantPermission",
3358 );
3359 let mut req = request.into_request();
3360 req.extensions_mut()
3361 .insert(
3362 GrpcMethod::new(
3363 "yandex.cloud.mdb.sqlserver.v1.UserService",
3364 "GrantPermission",
3365 ),
3366 );
3367 self.inner.unary(req, path, codec).await
3368 }
3369 pub async fn revoke_permission(
3371 &mut self,
3372 request: impl tonic::IntoRequest<super::RevokeUserPermissionRequest>,
3373 ) -> std::result::Result<
3374 tonic::Response<super::super::super::super::operation::Operation>,
3375 tonic::Status,
3376 > {
3377 self.inner
3378 .ready()
3379 .await
3380 .map_err(|e| {
3381 tonic::Status::new(
3382 tonic::Code::Unknown,
3383 format!("Service was not ready: {}", e.into()),
3384 )
3385 })?;
3386 let codec = tonic::codec::ProstCodec::default();
3387 let path = http::uri::PathAndQuery::from_static(
3388 "/yandex.cloud.mdb.sqlserver.v1.UserService/RevokePermission",
3389 );
3390 let mut req = request.into_request();
3391 req.extensions_mut()
3392 .insert(
3393 GrpcMethod::new(
3394 "yandex.cloud.mdb.sqlserver.v1.UserService",
3395 "RevokePermission",
3396 ),
3397 );
3398 self.inner.unary(req, path, codec).await
3399 }
3400 }
3401}