1#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Backup {
6 #[prost(string, tag = "1")]
8 pub id: ::prost::alloc::string::String,
9 #[prost(string, tag = "2")]
11 pub folder_id: ::prost::alloc::string::String,
12 #[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(int64, tag = "6")]
24 pub size: i64,
25 #[prost(enumeration = "backup::BackupCreationType", tag = "7")]
27 pub r#type: i32,
28 #[prost(enumeration = "backup::BackupMethod", tag = "8")]
30 pub method: i32,
31 #[prost(int64, tag = "9")]
33 pub journal_size: i64,
34 #[prost(enumeration = "backup::BackupStatus", tag = "10")]
36 pub status: i32,
37}
38pub mod backup {
40 #[derive(
41 Clone,
42 Copy,
43 Debug,
44 PartialEq,
45 Eq,
46 Hash,
47 PartialOrd,
48 Ord,
49 ::prost::Enumeration
50 )]
51 #[repr(i32)]
52 pub enum BackupMethod {
53 Unspecified = 0,
54 Base = 1,
56 Incremental = 2,
58 }
59 impl BackupMethod {
60 pub fn as_str_name(&self) -> &'static str {
65 match self {
66 BackupMethod::Unspecified => "BACKUP_METHOD_UNSPECIFIED",
67 BackupMethod::Base => "BASE",
68 BackupMethod::Incremental => "INCREMENTAL",
69 }
70 }
71 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
73 match value {
74 "BACKUP_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
75 "BASE" => Some(Self::Base),
76 "INCREMENTAL" => Some(Self::Incremental),
77 _ => None,
78 }
79 }
80 }
81 #[derive(
82 Clone,
83 Copy,
84 Debug,
85 PartialEq,
86 Eq,
87 Hash,
88 PartialOrd,
89 Ord,
90 ::prost::Enumeration
91 )]
92 #[repr(i32)]
93 pub enum BackupCreationType {
94 Unspecified = 0,
95 Automated = 1,
97 Manual = 2,
99 }
100 impl BackupCreationType {
101 pub fn as_str_name(&self) -> &'static str {
106 match self {
107 BackupCreationType::Unspecified => "BACKUP_CREATION_TYPE_UNSPECIFIED",
108 BackupCreationType::Automated => "AUTOMATED",
109 BackupCreationType::Manual => "MANUAL",
110 }
111 }
112 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
114 match value {
115 "BACKUP_CREATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
116 "AUTOMATED" => Some(Self::Automated),
117 "MANUAL" => Some(Self::Manual),
118 _ => None,
119 }
120 }
121 }
122 #[derive(
123 Clone,
124 Copy,
125 Debug,
126 PartialEq,
127 Eq,
128 Hash,
129 PartialOrd,
130 Ord,
131 ::prost::Enumeration
132 )]
133 #[repr(i32)]
134 pub enum BackupStatus {
135 Unspecified = 0,
136 Done = 1,
138 Creating = 2,
140 }
141 impl BackupStatus {
142 pub fn as_str_name(&self) -> &'static str {
147 match self {
148 BackupStatus::Unspecified => "BACKUP_STATUS_UNSPECIFIED",
149 BackupStatus::Done => "DONE",
150 BackupStatus::Creating => "CREATING",
151 }
152 }
153 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
155 match value {
156 "BACKUP_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
157 "DONE" => Some(Self::Done),
158 "CREATING" => Some(Self::Creating),
159 _ => None,
160 }
161 }
162 }
163}
164#[allow(clippy::derive_partial_eq_without_eq)]
166#[derive(Clone, PartialEq, ::prost::Message)]
167pub struct CronTab {
168 #[prost(string, tag = "3")]
169 pub day_of_month: ::prost::alloc::string::String,
170 #[prost(string, tag = "4")]
171 pub month: ::prost::alloc::string::String,
172 #[prost(string, tag = "5")]
173 pub day_of_week: ::prost::alloc::string::String,
174}
175#[allow(clippy::derive_partial_eq_without_eq)]
177#[derive(Clone, PartialEq, ::prost::Message)]
178pub struct BackupRetentionPolicy {
179 #[prost(string, tag = "1")]
181 pub policy_id: ::prost::alloc::string::String,
182 #[prost(string, tag = "2")]
184 pub cluster_id: ::prost::alloc::string::String,
185 #[prost(string, tag = "3")]
187 pub policy_name: ::prost::alloc::string::String,
188 #[prost(message, optional, tag = "4")]
190 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
191 #[prost(message, optional, tag = "5")]
193 pub cron: ::core::option::Option<CronTab>,
194 #[prost(int64, tag = "6")]
196 pub retain_for_days: i64,
197 #[prost(string, tag = "7")]
199 pub description: ::prost::alloc::string::String,
200}
201#[allow(clippy::derive_partial_eq_without_eq)]
202#[derive(Clone, PartialEq, ::prost::Message)]
203pub struct ListBackupRetentionPoliciesRequest {
204 #[prost(string, tag = "1")]
207 pub cluster_id: ::prost::alloc::string::String,
208 #[prost(int64, tag = "2")]
212 pub page_size: i64,
213 #[prost(string, tag = "3")]
216 pub page_token: ::prost::alloc::string::String,
217}
218#[allow(clippy::derive_partial_eq_without_eq)]
219#[derive(Clone, PartialEq, ::prost::Message)]
220pub struct ListBackupRetentionPoliciesResponse {
221 #[prost(message, repeated, tag = "1")]
223 pub policies: ::prost::alloc::vec::Vec<BackupRetentionPolicy>,
224 #[prost(string, tag = "2")]
229 pub next_page_token: ::prost::alloc::string::String,
230}
231#[allow(clippy::derive_partial_eq_without_eq)]
232#[derive(Clone, PartialEq, ::prost::Message)]
233pub struct CreateBackupRetentionPolicyRequest {
234 #[prost(string, tag = "1")]
237 pub cluster_id: ::prost::alloc::string::String,
238 #[prost(message, optional, tag = "2")]
240 pub cron: ::core::option::Option<CronTab>,
241 #[prost(int64, tag = "3")]
243 pub retain_for_days: i64,
244 #[prost(string, tag = "4")]
246 pub description: ::prost::alloc::string::String,
247 #[prost(string, tag = "5")]
249 pub policy_name: ::prost::alloc::string::String,
250}
251#[allow(clippy::derive_partial_eq_without_eq)]
252#[derive(Clone, PartialEq, ::prost::Message)]
253pub struct CreateBackupRetentionPolicyResponse {
254 #[prost(message, optional, tag = "1")]
256 pub policy: ::core::option::Option<BackupRetentionPolicy>,
257}
258#[allow(clippy::derive_partial_eq_without_eq)]
259#[derive(Clone, PartialEq, ::prost::Message)]
260pub struct DeleteBackupRetentionPolicyRequest {
261 #[prost(string, tag = "1")]
263 pub policy_id: ::prost::alloc::string::String,
264 #[prost(string, tag = "2")]
267 pub cluster_id: ::prost::alloc::string::String,
268}
269#[allow(clippy::derive_partial_eq_without_eq)]
270#[derive(Clone, PartialEq, ::prost::Message)]
271pub struct DeleteBackupRetentionPolicyResponse {}
272pub mod backup_retention_policy_service_client {
274 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
275 use tonic::codegen::*;
276 use tonic::codegen::http::Uri;
277 #[derive(Debug, Clone)]
279 pub struct BackupRetentionPolicyServiceClient<T> {
280 inner: tonic::client::Grpc<T>,
281 }
282 impl BackupRetentionPolicyServiceClient<tonic::transport::Channel> {
283 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
285 where
286 D: TryInto<tonic::transport::Endpoint>,
287 D::Error: Into<StdError>,
288 {
289 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
290 Ok(Self::new(conn))
291 }
292 }
293 impl<T> BackupRetentionPolicyServiceClient<T>
294 where
295 T: tonic::client::GrpcService<tonic::body::BoxBody>,
296 T::Error: Into<StdError>,
297 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
298 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
299 {
300 pub fn new(inner: T) -> Self {
301 let inner = tonic::client::Grpc::new(inner);
302 Self { inner }
303 }
304 pub fn with_origin(inner: T, origin: Uri) -> Self {
305 let inner = tonic::client::Grpc::with_origin(inner, origin);
306 Self { inner }
307 }
308 pub fn with_interceptor<F>(
309 inner: T,
310 interceptor: F,
311 ) -> BackupRetentionPolicyServiceClient<InterceptedService<T, F>>
312 where
313 F: tonic::service::Interceptor,
314 T::ResponseBody: Default,
315 T: tonic::codegen::Service<
316 http::Request<tonic::body::BoxBody>,
317 Response = http::Response<
318 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
319 >,
320 >,
321 <T as tonic::codegen::Service<
322 http::Request<tonic::body::BoxBody>,
323 >>::Error: Into<StdError> + Send + Sync,
324 {
325 BackupRetentionPolicyServiceClient::new(
326 InterceptedService::new(inner, interceptor),
327 )
328 }
329 #[must_use]
334 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
335 self.inner = self.inner.send_compressed(encoding);
336 self
337 }
338 #[must_use]
340 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
341 self.inner = self.inner.accept_compressed(encoding);
342 self
343 }
344 #[must_use]
348 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
349 self.inner = self.inner.max_decoding_message_size(limit);
350 self
351 }
352 #[must_use]
356 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
357 self.inner = self.inner.max_encoding_message_size(limit);
358 self
359 }
360 pub async fn list(
362 &mut self,
363 request: impl tonic::IntoRequest<super::ListBackupRetentionPoliciesRequest>,
364 ) -> std::result::Result<
365 tonic::Response<super::ListBackupRetentionPoliciesResponse>,
366 tonic::Status,
367 > {
368 self.inner
369 .ready()
370 .await
371 .map_err(|e| {
372 tonic::Status::new(
373 tonic::Code::Unknown,
374 format!("Service was not ready: {}", e.into()),
375 )
376 })?;
377 let codec = tonic::codec::ProstCodec::default();
378 let path = http::uri::PathAndQuery::from_static(
379 "/yandex.cloud.mdb.postgresql.v1.BackupRetentionPolicyService/List",
380 );
381 let mut req = request.into_request();
382 req.extensions_mut()
383 .insert(
384 GrpcMethod::new(
385 "yandex.cloud.mdb.postgresql.v1.BackupRetentionPolicyService",
386 "List",
387 ),
388 );
389 self.inner.unary(req, path, codec).await
390 }
391 pub async fn create(
393 &mut self,
394 request: impl tonic::IntoRequest<super::CreateBackupRetentionPolicyRequest>,
395 ) -> std::result::Result<
396 tonic::Response<super::CreateBackupRetentionPolicyResponse>,
397 tonic::Status,
398 > {
399 self.inner
400 .ready()
401 .await
402 .map_err(|e| {
403 tonic::Status::new(
404 tonic::Code::Unknown,
405 format!("Service was not ready: {}", e.into()),
406 )
407 })?;
408 let codec = tonic::codec::ProstCodec::default();
409 let path = http::uri::PathAndQuery::from_static(
410 "/yandex.cloud.mdb.postgresql.v1.BackupRetentionPolicyService/Create",
411 );
412 let mut req = request.into_request();
413 req.extensions_mut()
414 .insert(
415 GrpcMethod::new(
416 "yandex.cloud.mdb.postgresql.v1.BackupRetentionPolicyService",
417 "Create",
418 ),
419 );
420 self.inner.unary(req, path, codec).await
421 }
422 pub async fn delete(
424 &mut self,
425 request: impl tonic::IntoRequest<super::DeleteBackupRetentionPolicyRequest>,
426 ) -> std::result::Result<
427 tonic::Response<super::DeleteBackupRetentionPolicyResponse>,
428 tonic::Status,
429 > {
430 self.inner
431 .ready()
432 .await
433 .map_err(|e| {
434 tonic::Status::new(
435 tonic::Code::Unknown,
436 format!("Service was not ready: {}", e.into()),
437 )
438 })?;
439 let codec = tonic::codec::ProstCodec::default();
440 let path = http::uri::PathAndQuery::from_static(
441 "/yandex.cloud.mdb.postgresql.v1.BackupRetentionPolicyService/Delete",
442 );
443 let mut req = request.into_request();
444 req.extensions_mut()
445 .insert(
446 GrpcMethod::new(
447 "yandex.cloud.mdb.postgresql.v1.BackupRetentionPolicyService",
448 "Delete",
449 ),
450 );
451 self.inner.unary(req, path, codec).await
452 }
453 }
454}
455#[allow(clippy::derive_partial_eq_without_eq)]
456#[derive(Clone, PartialEq, ::prost::Message)]
457pub struct GetBackupRequest {
458 #[prost(string, tag = "1")]
461 pub backup_id: ::prost::alloc::string::String,
462}
463#[allow(clippy::derive_partial_eq_without_eq)]
464#[derive(Clone, PartialEq, ::prost::Message)]
465pub struct ListBackupsRequest {
466 #[prost(string, tag = "1")]
469 pub folder_id: ::prost::alloc::string::String,
470 #[prost(int64, tag = "2")]
474 pub page_size: i64,
475 #[prost(string, tag = "3")]
478 pub page_token: ::prost::alloc::string::String,
479}
480#[allow(clippy::derive_partial_eq_without_eq)]
481#[derive(Clone, PartialEq, ::prost::Message)]
482pub struct ListBackupsResponse {
483 #[prost(message, repeated, tag = "1")]
485 pub backups: ::prost::alloc::vec::Vec<Backup>,
486 #[prost(string, tag = "2")]
491 pub next_page_token: ::prost::alloc::string::String,
492}
493#[allow(clippy::derive_partial_eq_without_eq)]
494#[derive(Clone, PartialEq, ::prost::Message)]
495pub struct DeleteBackupRequest {
496 #[prost(string, tag = "1")]
498 pub backup_id: ::prost::alloc::string::String,
499}
500#[allow(clippy::derive_partial_eq_without_eq)]
501#[derive(Clone, PartialEq, ::prost::Message)]
502pub struct DeleteBackupMetadata {
503 #[prost(string, tag = "1")]
505 pub backup_id: ::prost::alloc::string::String,
506 #[prost(string, tag = "2")]
508 pub cluster_id: ::prost::alloc::string::String,
509}
510pub mod backup_service_client {
512 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
513 use tonic::codegen::*;
514 use tonic::codegen::http::Uri;
515 #[derive(Debug, Clone)]
517 pub struct BackupServiceClient<T> {
518 inner: tonic::client::Grpc<T>,
519 }
520 impl BackupServiceClient<tonic::transport::Channel> {
521 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
523 where
524 D: TryInto<tonic::transport::Endpoint>,
525 D::Error: Into<StdError>,
526 {
527 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
528 Ok(Self::new(conn))
529 }
530 }
531 impl<T> BackupServiceClient<T>
532 where
533 T: tonic::client::GrpcService<tonic::body::BoxBody>,
534 T::Error: Into<StdError>,
535 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
536 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
537 {
538 pub fn new(inner: T) -> Self {
539 let inner = tonic::client::Grpc::new(inner);
540 Self { inner }
541 }
542 pub fn with_origin(inner: T, origin: Uri) -> Self {
543 let inner = tonic::client::Grpc::with_origin(inner, origin);
544 Self { inner }
545 }
546 pub fn with_interceptor<F>(
547 inner: T,
548 interceptor: F,
549 ) -> BackupServiceClient<InterceptedService<T, F>>
550 where
551 F: tonic::service::Interceptor,
552 T::ResponseBody: Default,
553 T: tonic::codegen::Service<
554 http::Request<tonic::body::BoxBody>,
555 Response = http::Response<
556 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
557 >,
558 >,
559 <T as tonic::codegen::Service<
560 http::Request<tonic::body::BoxBody>,
561 >>::Error: Into<StdError> + Send + Sync,
562 {
563 BackupServiceClient::new(InterceptedService::new(inner, interceptor))
564 }
565 #[must_use]
570 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
571 self.inner = self.inner.send_compressed(encoding);
572 self
573 }
574 #[must_use]
576 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
577 self.inner = self.inner.accept_compressed(encoding);
578 self
579 }
580 #[must_use]
584 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
585 self.inner = self.inner.max_decoding_message_size(limit);
586 self
587 }
588 #[must_use]
592 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
593 self.inner = self.inner.max_encoding_message_size(limit);
594 self
595 }
596 pub async fn get(
600 &mut self,
601 request: impl tonic::IntoRequest<super::GetBackupRequest>,
602 ) -> std::result::Result<tonic::Response<super::Backup>, tonic::Status> {
603 self.inner
604 .ready()
605 .await
606 .map_err(|e| {
607 tonic::Status::new(
608 tonic::Code::Unknown,
609 format!("Service was not ready: {}", e.into()),
610 )
611 })?;
612 let codec = tonic::codec::ProstCodec::default();
613 let path = http::uri::PathAndQuery::from_static(
614 "/yandex.cloud.mdb.postgresql.v1.BackupService/Get",
615 );
616 let mut req = request.into_request();
617 req.extensions_mut()
618 .insert(
619 GrpcMethod::new(
620 "yandex.cloud.mdb.postgresql.v1.BackupService",
621 "Get",
622 ),
623 );
624 self.inner.unary(req, path, codec).await
625 }
626 pub async fn list(
628 &mut self,
629 request: impl tonic::IntoRequest<super::ListBackupsRequest>,
630 ) -> std::result::Result<
631 tonic::Response<super::ListBackupsResponse>,
632 tonic::Status,
633 > {
634 self.inner
635 .ready()
636 .await
637 .map_err(|e| {
638 tonic::Status::new(
639 tonic::Code::Unknown,
640 format!("Service was not ready: {}", e.into()),
641 )
642 })?;
643 let codec = tonic::codec::ProstCodec::default();
644 let path = http::uri::PathAndQuery::from_static(
645 "/yandex.cloud.mdb.postgresql.v1.BackupService/List",
646 );
647 let mut req = request.into_request();
648 req.extensions_mut()
649 .insert(
650 GrpcMethod::new(
651 "yandex.cloud.mdb.postgresql.v1.BackupService",
652 "List",
653 ),
654 );
655 self.inner.unary(req, path, codec).await
656 }
657 pub async fn delete(
659 &mut self,
660 request: impl tonic::IntoRequest<super::DeleteBackupRequest>,
661 ) -> std::result::Result<
662 tonic::Response<super::super::super::super::operation::Operation>,
663 tonic::Status,
664 > {
665 self.inner
666 .ready()
667 .await
668 .map_err(|e| {
669 tonic::Status::new(
670 tonic::Code::Unknown,
671 format!("Service was not ready: {}", e.into()),
672 )
673 })?;
674 let codec = tonic::codec::ProstCodec::default();
675 let path = http::uri::PathAndQuery::from_static(
676 "/yandex.cloud.mdb.postgresql.v1.BackupService/Delete",
677 );
678 let mut req = request.into_request();
679 req.extensions_mut()
680 .insert(
681 GrpcMethod::new(
682 "yandex.cloud.mdb.postgresql.v1.BackupService",
683 "Delete",
684 ),
685 );
686 self.inner.unary(req, path, codec).await
687 }
688 }
689}
690#[allow(clippy::derive_partial_eq_without_eq)]
692#[derive(Clone, PartialEq, ::prost::Message)]
693pub struct MaintenanceWindow {
694 #[prost(oneof = "maintenance_window::Policy", tags = "1, 2")]
696 pub policy: ::core::option::Option<maintenance_window::Policy>,
697}
698pub mod maintenance_window {
700 #[allow(clippy::derive_partial_eq_without_eq)]
702 #[derive(Clone, PartialEq, ::prost::Oneof)]
703 pub enum Policy {
704 #[prost(message, tag = "1")]
706 Anytime(super::AnytimeMaintenanceWindow),
707 #[prost(message, tag = "2")]
709 WeeklyMaintenanceWindow(super::WeeklyMaintenanceWindow),
710 }
711}
712#[allow(clippy::derive_partial_eq_without_eq)]
713#[derive(Clone, PartialEq, ::prost::Message)]
714pub struct AnytimeMaintenanceWindow {}
715#[allow(clippy::derive_partial_eq_without_eq)]
717#[derive(Clone, PartialEq, ::prost::Message)]
718pub struct WeeklyMaintenanceWindow {
719 #[prost(enumeration = "weekly_maintenance_window::WeekDay", tag = "1")]
721 pub day: i32,
722 #[prost(int64, tag = "2")]
724 pub hour: i64,
725}
726pub mod weekly_maintenance_window {
728 #[derive(
729 Clone,
730 Copy,
731 Debug,
732 PartialEq,
733 Eq,
734 Hash,
735 PartialOrd,
736 Ord,
737 ::prost::Enumeration
738 )]
739 #[repr(i32)]
740 pub enum WeekDay {
741 Unspecified = 0,
742 Mon = 1,
743 Tue = 2,
744 Wed = 3,
745 Thu = 4,
746 Fri = 5,
747 Sat = 6,
748 Sun = 7,
749 }
750 impl WeekDay {
751 pub fn as_str_name(&self) -> &'static str {
756 match self {
757 WeekDay::Unspecified => "WEEK_DAY_UNSPECIFIED",
758 WeekDay::Mon => "MON",
759 WeekDay::Tue => "TUE",
760 WeekDay::Wed => "WED",
761 WeekDay::Thu => "THU",
762 WeekDay::Fri => "FRI",
763 WeekDay::Sat => "SAT",
764 WeekDay::Sun => "SUN",
765 }
766 }
767 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
769 match value {
770 "WEEK_DAY_UNSPECIFIED" => Some(Self::Unspecified),
771 "MON" => Some(Self::Mon),
772 "TUE" => Some(Self::Tue),
773 "WED" => Some(Self::Wed),
774 "THU" => Some(Self::Thu),
775 "FRI" => Some(Self::Fri),
776 "SAT" => Some(Self::Sat),
777 "SUN" => Some(Self::Sun),
778 _ => None,
779 }
780 }
781 }
782}
783#[allow(clippy::derive_partial_eq_without_eq)]
785#[derive(Clone, PartialEq, ::prost::Message)]
786pub struct MaintenanceOperation {
787 #[prost(string, tag = "1")]
789 pub info: ::prost::alloc::string::String,
790 #[prost(message, optional, tag = "2")]
792 pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
793}
794#[allow(clippy::derive_partial_eq_without_eq)]
797#[derive(Clone, PartialEq, ::prost::Message)]
798pub struct Cluster {
799 #[prost(string, tag = "1")]
802 pub id: ::prost::alloc::string::String,
803 #[prost(string, tag = "2")]
805 pub folder_id: ::prost::alloc::string::String,
806 #[prost(message, optional, tag = "3")]
808 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
809 #[prost(string, tag = "4")]
812 pub name: ::prost::alloc::string::String,
813 #[prost(string, tag = "5")]
815 pub description: ::prost::alloc::string::String,
816 #[prost(map = "string, string", tag = "6")]
819 pub labels: ::std::collections::HashMap<
820 ::prost::alloc::string::String,
821 ::prost::alloc::string::String,
822 >,
823 #[prost(enumeration = "cluster::Environment", tag = "7")]
825 pub environment: i32,
826 #[prost(message, repeated, tag = "8")]
828 pub monitoring: ::prost::alloc::vec::Vec<Monitoring>,
829 #[prost(message, optional, tag = "9")]
831 pub config: ::core::option::Option<ClusterConfig>,
832 #[prost(string, tag = "10")]
834 pub network_id: ::prost::alloc::string::String,
835 #[prost(enumeration = "cluster::Health", tag = "11")]
837 pub health: i32,
838 #[prost(enumeration = "cluster::Status", tag = "12")]
840 pub status: i32,
841 #[prost(message, optional, tag = "13")]
843 pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
844 #[prost(message, optional, tag = "14")]
846 pub planned_operation: ::core::option::Option<MaintenanceOperation>,
847 #[prost(string, repeated, tag = "15")]
849 pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
850 #[prost(bool, tag = "16")]
852 pub deletion_protection: bool,
853 #[prost(string, repeated, tag = "17")]
855 pub host_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
856}
857pub mod cluster {
859 #[derive(
860 Clone,
861 Copy,
862 Debug,
863 PartialEq,
864 Eq,
865 Hash,
866 PartialOrd,
867 Ord,
868 ::prost::Enumeration
869 )]
870 #[repr(i32)]
871 pub enum Environment {
872 Unspecified = 0,
873 Production = 1,
876 Prestable = 2,
879 }
880 impl Environment {
881 pub fn as_str_name(&self) -> &'static str {
886 match self {
887 Environment::Unspecified => "ENVIRONMENT_UNSPECIFIED",
888 Environment::Production => "PRODUCTION",
889 Environment::Prestable => "PRESTABLE",
890 }
891 }
892 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
894 match value {
895 "ENVIRONMENT_UNSPECIFIED" => Some(Self::Unspecified),
896 "PRODUCTION" => Some(Self::Production),
897 "PRESTABLE" => Some(Self::Prestable),
898 _ => None,
899 }
900 }
901 }
902 #[derive(
903 Clone,
904 Copy,
905 Debug,
906 PartialEq,
907 Eq,
908 Hash,
909 PartialOrd,
910 Ord,
911 ::prost::Enumeration
912 )]
913 #[repr(i32)]
914 pub enum Health {
915 Unknown = 0,
917 Alive = 1,
919 Dead = 2,
921 Degraded = 3,
923 }
924 impl Health {
925 pub fn as_str_name(&self) -> &'static str {
930 match self {
931 Health::Unknown => "HEALTH_UNKNOWN",
932 Health::Alive => "ALIVE",
933 Health::Dead => "DEAD",
934 Health::Degraded => "DEGRADED",
935 }
936 }
937 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
939 match value {
940 "HEALTH_UNKNOWN" => Some(Self::Unknown),
941 "ALIVE" => Some(Self::Alive),
942 "DEAD" => Some(Self::Dead),
943 "DEGRADED" => Some(Self::Degraded),
944 _ => None,
945 }
946 }
947 }
948 #[derive(
949 Clone,
950 Copy,
951 Debug,
952 PartialEq,
953 Eq,
954 Hash,
955 PartialOrd,
956 Ord,
957 ::prost::Enumeration
958 )]
959 #[repr(i32)]
960 pub enum Status {
961 Unknown = 0,
963 Creating = 1,
965 Running = 2,
967 Error = 3,
969 Updating = 4,
971 Stopping = 5,
973 Stopped = 6,
975 Starting = 7,
977 }
978 impl Status {
979 pub fn as_str_name(&self) -> &'static str {
984 match self {
985 Status::Unknown => "STATUS_UNKNOWN",
986 Status::Creating => "CREATING",
987 Status::Running => "RUNNING",
988 Status::Error => "ERROR",
989 Status::Updating => "UPDATING",
990 Status::Stopping => "STOPPING",
991 Status::Stopped => "STOPPED",
992 Status::Starting => "STARTING",
993 }
994 }
995 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
997 match value {
998 "STATUS_UNKNOWN" => Some(Self::Unknown),
999 "CREATING" => Some(Self::Creating),
1000 "RUNNING" => Some(Self::Running),
1001 "ERROR" => Some(Self::Error),
1002 "UPDATING" => Some(Self::Updating),
1003 "STOPPING" => Some(Self::Stopping),
1004 "STOPPED" => Some(Self::Stopped),
1005 "STARTING" => Some(Self::Starting),
1006 _ => None,
1007 }
1008 }
1009 }
1010}
1011#[allow(clippy::derive_partial_eq_without_eq)]
1013#[derive(Clone, PartialEq, ::prost::Message)]
1014pub struct Monitoring {
1015 #[prost(string, tag = "1")]
1017 pub name: ::prost::alloc::string::String,
1018 #[prost(string, tag = "2")]
1020 pub description: ::prost::alloc::string::String,
1021 #[prost(string, tag = "3")]
1023 pub link: ::prost::alloc::string::String,
1024}
1025#[allow(clippy::derive_partial_eq_without_eq)]
1026#[derive(Clone, PartialEq, ::prost::Message)]
1027pub struct ClusterConfig {
1028 #[prost(string, tag = "1")]
1030 pub version: ::prost::alloc::string::String,
1031 #[prost(message, optional, tag = "4")]
1033 pub pooler_config: ::core::option::Option<ConnectionPoolerConfig>,
1034 #[prost(message, optional, tag = "5")]
1036 pub resources: ::core::option::Option<Resources>,
1037 #[prost(message, optional, tag = "6")]
1039 pub autofailover: ::core::option::Option<bool>,
1040 #[prost(message, optional, tag = "7")]
1042 pub backup_window_start: ::core::option::Option<
1043 super::super::super::super::super::google::r#type::TimeOfDay,
1044 >,
1045 #[prost(message, optional, tag = "17")]
1047 pub backup_retain_period_days: ::core::option::Option<i64>,
1048 #[prost(message, optional, tag = "9")]
1050 pub access: ::core::option::Option<Access>,
1051 #[prost(message, optional, tag = "12")]
1053 pub performance_diagnostics: ::core::option::Option<PerformanceDiagnostics>,
1054 #[prost(message, optional, tag = "23")]
1056 pub disk_size_autoscaling: ::core::option::Option<DiskSizeAutoscaling>,
1057 #[prost(
1059 oneof = "cluster_config::PostgresqlConfig",
1060 tags = "2, 10, 3, 8, 13, 11, 14, 15, 18, 16, 19, 21, 22, 24, 25, 27, 28"
1061 )]
1062 pub postgresql_config: ::core::option::Option<cluster_config::PostgresqlConfig>,
1063}
1064pub mod cluster_config {
1066 #[allow(clippy::derive_partial_eq_without_eq)]
1068 #[derive(Clone, PartialEq, ::prost::Oneof)]
1069 pub enum PostgresqlConfig {
1070 #[prost(message, tag = "2")]
1072 PostgresqlConfig96(super::config::PostgresqlConfigSet96),
1073 #[prost(message, tag = "10")]
1075 PostgresqlConfig101c(super::config::PostgresqlConfigSet101c),
1076 #[prost(message, tag = "3")]
1078 PostgresqlConfig10(super::config::PostgresqlConfigSet10),
1079 #[prost(message, tag = "8")]
1081 PostgresqlConfig11(super::config::PostgresqlConfigSet11),
1082 #[prost(message, tag = "13")]
1084 PostgresqlConfig111c(super::config::PostgresqlConfigSet111c),
1085 #[prost(message, tag = "11")]
1087 PostgresqlConfig12(super::config::PostgresqlConfigSet12),
1088 #[prost(message, tag = "14")]
1090 PostgresqlConfig121c(super::config::PostgresqlConfigSet121c),
1091 #[prost(message, tag = "15")]
1093 PostgresqlConfig13(super::config::PostgresqlConfigSet13),
1094 #[prost(message, tag = "18")]
1096 PostgresqlConfig131c(super::config::PostgresqlConfigSet131c),
1097 #[prost(message, tag = "16")]
1099 PostgresqlConfig14(super::config::PostgresqlConfigSet14),
1100 #[prost(message, tag = "19")]
1102 PostgresqlConfig141c(super::config::PostgresqlConfigSet141c),
1103 #[prost(message, tag = "21")]
1105 PostgresqlConfig15(super::config::PostgresqlConfigSet15),
1106 #[prost(message, tag = "22")]
1108 PostgresqlConfig151c(super::config::PostgresqlConfigSet151c),
1109 #[prost(message, tag = "24")]
1111 PostgresqlConfig16(super::config::PostgresqlConfigSet16),
1112 #[prost(message, tag = "25")]
1114 PostgresqlConfig161c(super::config::PostgresqlConfigSet161c),
1115 #[prost(message, tag = "27")]
1117 PostgresqlConfig17(super::config::PostgresqlConfigSet17),
1118 #[prost(message, tag = "28")]
1120 PostgresqlConfig171c(super::config::PostgresqlConfigSet171c),
1121 }
1122}
1123#[allow(clippy::derive_partial_eq_without_eq)]
1124#[derive(Clone, PartialEq, ::prost::Message)]
1125pub struct ConnectionPoolerConfig {
1126 #[prost(enumeration = "connection_pooler_config::PoolingMode", tag = "1")]
1129 pub pooling_mode: i32,
1130 #[prost(message, optional, tag = "2")]
1132 pub pool_discard: ::core::option::Option<bool>,
1133}
1134pub mod connection_pooler_config {
1136 #[derive(
1137 Clone,
1138 Copy,
1139 Debug,
1140 PartialEq,
1141 Eq,
1142 Hash,
1143 PartialOrd,
1144 Ord,
1145 ::prost::Enumeration
1146 )]
1147 #[repr(i32)]
1148 pub enum PoolingMode {
1149 Unspecified = 0,
1150 Session = 1,
1152 Transaction = 2,
1154 Statement = 3,
1156 }
1157 impl PoolingMode {
1158 pub fn as_str_name(&self) -> &'static str {
1163 match self {
1164 PoolingMode::Unspecified => "POOLING_MODE_UNSPECIFIED",
1165 PoolingMode::Session => "SESSION",
1166 PoolingMode::Transaction => "TRANSACTION",
1167 PoolingMode::Statement => "STATEMENT",
1168 }
1169 }
1170 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1172 match value {
1173 "POOLING_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1174 "SESSION" => Some(Self::Session),
1175 "TRANSACTION" => Some(Self::Transaction),
1176 "STATEMENT" => Some(Self::Statement),
1177 _ => None,
1178 }
1179 }
1180 }
1181}
1182#[allow(clippy::derive_partial_eq_without_eq)]
1183#[derive(Clone, PartialEq, ::prost::Message)]
1184pub struct Host {
1185 #[prost(string, tag = "1")]
1190 pub name: ::prost::alloc::string::String,
1191 #[prost(string, tag = "2")]
1193 pub cluster_id: ::prost::alloc::string::String,
1194 #[prost(string, tag = "3")]
1196 pub zone_id: ::prost::alloc::string::String,
1197 #[prost(message, optional, tag = "4")]
1199 pub resources: ::core::option::Option<Resources>,
1200 #[prost(enumeration = "host::Role", tag = "5")]
1202 pub role: i32,
1203 #[prost(enumeration = "host::Health", tag = "6")]
1205 pub health: i32,
1206 #[prost(message, repeated, tag = "7")]
1208 pub services: ::prost::alloc::vec::Vec<Service>,
1209 #[prost(string, tag = "8")]
1211 pub subnet_id: ::prost::alloc::string::String,
1212 #[prost(string, tag = "9")]
1214 pub replication_source: ::prost::alloc::string::String,
1215 #[prost(message, optional, tag = "10")]
1222 pub priority: ::core::option::Option<i64>,
1223 #[prost(message, optional, tag = "11")]
1225 pub config: ::core::option::Option<HostConfig>,
1226 #[prost(bool, tag = "12")]
1228 pub assign_public_ip: bool,
1229 #[prost(enumeration = "host::ReplicaType", tag = "13")]
1230 pub replica_type: i32,
1231}
1232pub mod host {
1234 #[derive(
1235 Clone,
1236 Copy,
1237 Debug,
1238 PartialEq,
1239 Eq,
1240 Hash,
1241 PartialOrd,
1242 Ord,
1243 ::prost::Enumeration
1244 )]
1245 #[repr(i32)]
1246 pub enum Role {
1247 Unknown = 0,
1249 Master = 1,
1251 Replica = 2,
1253 }
1254 impl Role {
1255 pub fn as_str_name(&self) -> &'static str {
1260 match self {
1261 Role::Unknown => "ROLE_UNKNOWN",
1262 Role::Master => "MASTER",
1263 Role::Replica => "REPLICA",
1264 }
1265 }
1266 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1268 match value {
1269 "ROLE_UNKNOWN" => Some(Self::Unknown),
1270 "MASTER" => Some(Self::Master),
1271 "REPLICA" => Some(Self::Replica),
1272 _ => None,
1273 }
1274 }
1275 }
1276 #[derive(
1277 Clone,
1278 Copy,
1279 Debug,
1280 PartialEq,
1281 Eq,
1282 Hash,
1283 PartialOrd,
1284 Ord,
1285 ::prost::Enumeration
1286 )]
1287 #[repr(i32)]
1288 pub enum ReplicaType {
1289 Unknown = 0,
1291 Async = 1,
1292 Sync = 2,
1293 Quorum = 3,
1294 }
1295 impl ReplicaType {
1296 pub fn as_str_name(&self) -> &'static str {
1301 match self {
1302 ReplicaType::Unknown => "REPLICA_TYPE_UNKNOWN",
1303 ReplicaType::Async => "ASYNC",
1304 ReplicaType::Sync => "SYNC",
1305 ReplicaType::Quorum => "QUORUM",
1306 }
1307 }
1308 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1310 match value {
1311 "REPLICA_TYPE_UNKNOWN" => Some(Self::Unknown),
1312 "ASYNC" => Some(Self::Async),
1313 "SYNC" => Some(Self::Sync),
1314 "QUORUM" => Some(Self::Quorum),
1315 _ => None,
1316 }
1317 }
1318 }
1319 #[derive(
1320 Clone,
1321 Copy,
1322 Debug,
1323 PartialEq,
1324 Eq,
1325 Hash,
1326 PartialOrd,
1327 Ord,
1328 ::prost::Enumeration
1329 )]
1330 #[repr(i32)]
1331 pub enum Health {
1332 Unknown = 0,
1334 Alive = 1,
1336 Dead = 2,
1338 Degraded = 3,
1340 Readonly = 4,
1342 }
1343 impl Health {
1344 pub fn as_str_name(&self) -> &'static str {
1349 match self {
1350 Health::Unknown => "HEALTH_UNKNOWN",
1351 Health::Alive => "ALIVE",
1352 Health::Dead => "DEAD",
1353 Health::Degraded => "DEGRADED",
1354 Health::Readonly => "READONLY",
1355 }
1356 }
1357 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1359 match value {
1360 "HEALTH_UNKNOWN" => Some(Self::Unknown),
1361 "ALIVE" => Some(Self::Alive),
1362 "DEAD" => Some(Self::Dead),
1363 "DEGRADED" => Some(Self::Degraded),
1364 "READONLY" => Some(Self::Readonly),
1365 _ => None,
1366 }
1367 }
1368 }
1369}
1370#[allow(clippy::derive_partial_eq_without_eq)]
1371#[derive(Clone, PartialEq, ::prost::Message)]
1372pub struct HostConfig {
1373 #[prost(
1375 oneof = "host_config::PostgresqlConfig",
1376 tags = "1, 4, 2, 3, 6, 5, 7, 8, 10, 9, 11, 12, 13, 14, 15, 16, 17"
1377 )]
1378 pub postgresql_config: ::core::option::Option<host_config::PostgresqlConfig>,
1379}
1380pub mod host_config {
1382 #[allow(clippy::derive_partial_eq_without_eq)]
1384 #[derive(Clone, PartialEq, ::prost::Oneof)]
1385 pub enum PostgresqlConfig {
1386 #[prost(message, tag = "1")]
1388 PostgresqlConfig96(super::config::PostgresqlHostConfig96),
1389 #[prost(message, tag = "4")]
1391 PostgresqlConfig101c(super::config::PostgresqlHostConfig101c),
1392 #[prost(message, tag = "2")]
1394 PostgresqlConfig10(super::config::PostgresqlHostConfig10),
1395 #[prost(message, tag = "3")]
1397 PostgresqlConfig11(super::config::PostgresqlHostConfig11),
1398 #[prost(message, tag = "6")]
1400 PostgresqlConfig111c(super::config::PostgresqlHostConfig111c),
1401 #[prost(message, tag = "5")]
1403 PostgresqlConfig12(super::config::PostgresqlHostConfig12),
1404 #[prost(message, tag = "7")]
1406 PostgresqlConfig121c(super::config::PostgresqlHostConfig121c),
1407 #[prost(message, tag = "8")]
1409 PostgresqlConfig13(super::config::PostgresqlHostConfig13),
1410 #[prost(message, tag = "10")]
1412 PostgresqlConfig131c(super::config::PostgresqlHostConfig131c),
1413 #[prost(message, tag = "9")]
1415 PostgresqlConfig14(super::config::PostgresqlHostConfig14),
1416 #[prost(message, tag = "11")]
1418 PostgresqlConfig141c(super::config::PostgresqlHostConfig141c),
1419 #[prost(message, tag = "12")]
1421 PostgresqlConfig15(super::config::PostgresqlHostConfig15),
1422 #[prost(message, tag = "13")]
1424 PostgresqlConfig151c(super::config::PostgresqlHostConfig151c),
1425 #[prost(message, tag = "14")]
1427 PostgresqlConfig16(super::config::PostgresqlHostConfig16),
1428 #[prost(message, tag = "15")]
1430 PostgresqlConfig161c(super::config::PostgresqlHostConfig161c),
1431 #[prost(message, tag = "16")]
1433 PostgresqlConfig17(super::config::PostgresqlHostConfig17),
1434 #[prost(message, tag = "17")]
1436 PostgresqlConfig171c(super::config::PostgresqlHostConfig171c),
1437 }
1438}
1439#[allow(clippy::derive_partial_eq_without_eq)]
1440#[derive(Clone, PartialEq, ::prost::Message)]
1441pub struct Service {
1442 #[prost(enumeration = "service::Type", tag = "1")]
1444 pub r#type: i32,
1445 #[prost(enumeration = "service::Health", tag = "2")]
1447 pub health: i32,
1448}
1449pub mod service {
1451 #[derive(
1452 Clone,
1453 Copy,
1454 Debug,
1455 PartialEq,
1456 Eq,
1457 Hash,
1458 PartialOrd,
1459 Ord,
1460 ::prost::Enumeration
1461 )]
1462 #[repr(i32)]
1463 pub enum Type {
1464 Unspecified = 0,
1466 Postgresql = 1,
1468 Pooler = 2,
1470 }
1471 impl Type {
1472 pub fn as_str_name(&self) -> &'static str {
1477 match self {
1478 Type::Unspecified => "TYPE_UNSPECIFIED",
1479 Type::Postgresql => "POSTGRESQL",
1480 Type::Pooler => "POOLER",
1481 }
1482 }
1483 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1485 match value {
1486 "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1487 "POSTGRESQL" => Some(Self::Postgresql),
1488 "POOLER" => Some(Self::Pooler),
1489 _ => None,
1490 }
1491 }
1492 }
1493 #[derive(
1494 Clone,
1495 Copy,
1496 Debug,
1497 PartialEq,
1498 Eq,
1499 Hash,
1500 PartialOrd,
1501 Ord,
1502 ::prost::Enumeration
1503 )]
1504 #[repr(i32)]
1505 pub enum Health {
1506 Unknown = 0,
1508 Alive = 1,
1510 Dead = 2,
1512 Readonly = 3,
1514 }
1515 impl Health {
1516 pub fn as_str_name(&self) -> &'static str {
1521 match self {
1522 Health::Unknown => "HEALTH_UNKNOWN",
1523 Health::Alive => "ALIVE",
1524 Health::Dead => "DEAD",
1525 Health::Readonly => "READONLY",
1526 }
1527 }
1528 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1530 match value {
1531 "HEALTH_UNKNOWN" => Some(Self::Unknown),
1532 "ALIVE" => Some(Self::Alive),
1533 "DEAD" => Some(Self::Dead),
1534 "READONLY" => Some(Self::Readonly),
1535 _ => None,
1536 }
1537 }
1538 }
1539}
1540#[allow(clippy::derive_partial_eq_without_eq)]
1541#[derive(Clone, PartialEq, ::prost::Message)]
1542pub struct Resources {
1543 #[prost(string, tag = "1")]
1546 pub resource_preset_id: ::prost::alloc::string::String,
1547 #[prost(int64, tag = "2")]
1549 pub disk_size: i64,
1550 #[prost(string, tag = "3")]
1556 pub disk_type_id: ::prost::alloc::string::String,
1557}
1558#[allow(clippy::derive_partial_eq_without_eq)]
1559#[derive(Clone, PartialEq, ::prost::Message)]
1560pub struct Access {
1561 #[prost(bool, tag = "1")]
1563 pub data_lens: bool,
1564 #[prost(bool, tag = "2")]
1568 pub web_sql: bool,
1569 #[prost(bool, tag = "3")]
1571 pub serverless: bool,
1572 #[prost(bool, tag = "4")]
1574 pub data_transfer: bool,
1575 #[prost(bool, tag = "5")]
1577 pub yandex_query: bool,
1578}
1579#[allow(clippy::derive_partial_eq_without_eq)]
1580#[derive(Clone, PartialEq, ::prost::Message)]
1581pub struct PerformanceDiagnostics {
1582 #[prost(bool, tag = "1")]
1584 pub enabled: bool,
1585 #[prost(int64, tag = "2")]
1587 pub sessions_sampling_interval: i64,
1588 #[prost(int64, tag = "3")]
1590 pub statements_sampling_interval: i64,
1591}
1592#[allow(clippy::derive_partial_eq_without_eq)]
1593#[derive(Clone, PartialEq, ::prost::Message)]
1594pub struct DiskSizeAutoscaling {
1595 #[prost(int64, tag = "1")]
1597 pub planned_usage_threshold: i64,
1598 #[prost(int64, tag = "2")]
1600 pub emergency_usage_threshold: i64,
1601 #[prost(int64, tag = "3")]
1603 pub disk_size_limit: i64,
1604}
1605#[allow(clippy::derive_partial_eq_without_eq)]
1608#[derive(Clone, PartialEq, ::prost::Message)]
1609pub struct Database {
1610 #[prost(string, tag = "1")]
1612 pub name: ::prost::alloc::string::String,
1613 #[prost(string, tag = "2")]
1615 pub cluster_id: ::prost::alloc::string::String,
1616 #[prost(string, tag = "3")]
1618 pub owner: ::prost::alloc::string::String,
1619 #[prost(string, tag = "4")]
1622 pub lc_collate: ::prost::alloc::string::String,
1623 #[prost(string, tag = "5")]
1626 pub lc_ctype: ::prost::alloc::string::String,
1627 #[prost(message, repeated, tag = "6")]
1629 pub extensions: ::prost::alloc::vec::Vec<Extension>,
1630 #[prost(string, tag = "7")]
1632 pub template_db: ::prost::alloc::string::String,
1633 #[prost(message, optional, tag = "8")]
1637 pub deletion_protection: ::core::option::Option<bool>,
1638}
1639#[allow(clippy::derive_partial_eq_without_eq)]
1640#[derive(Clone, PartialEq, ::prost::Message)]
1641pub struct Extension {
1642 #[prost(string, tag = "1")]
1645 pub name: ::prost::alloc::string::String,
1646 #[prost(string, tag = "2")]
1648 pub version: ::prost::alloc::string::String,
1649}
1650#[allow(clippy::derive_partial_eq_without_eq)]
1651#[derive(Clone, PartialEq, ::prost::Message)]
1652pub struct DatabaseSpec {
1653 #[prost(string, tag = "1")]
1655 pub name: ::prost::alloc::string::String,
1656 #[prost(string, tag = "2")]
1659 pub owner: ::prost::alloc::string::String,
1660 #[prost(string, tag = "3")]
1663 pub lc_collate: ::prost::alloc::string::String,
1664 #[prost(string, tag = "4")]
1667 pub lc_ctype: ::prost::alloc::string::String,
1668 #[prost(message, repeated, tag = "5")]
1670 pub extensions: ::prost::alloc::vec::Vec<Extension>,
1671 #[prost(string, tag = "6")]
1673 pub template_db: ::prost::alloc::string::String,
1674 #[prost(message, optional, tag = "7")]
1678 pub deletion_protection: ::core::option::Option<bool>,
1679}
1680#[allow(clippy::derive_partial_eq_without_eq)]
1683#[derive(Clone, PartialEq, ::prost::Message)]
1684pub struct User {
1685 #[prost(string, tag = "1")]
1687 pub name: ::prost::alloc::string::String,
1688 #[prost(string, tag = "2")]
1690 pub cluster_id: ::prost::alloc::string::String,
1691 #[prost(message, repeated, tag = "3")]
1693 pub permissions: ::prost::alloc::vec::Vec<Permission>,
1694 #[prost(int64, tag = "4")]
1702 pub conn_limit: i64,
1703 #[prost(message, optional, tag = "5")]
1704 pub settings: ::core::option::Option<UserSettings>,
1705 #[prost(message, optional, tag = "6")]
1709 pub login: ::core::option::Option<bool>,
1710 #[prost(string, repeated, tag = "7")]
1714 pub grants: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1715 #[prost(message, optional, tag = "8")]
1719 pub deletion_protection: ::core::option::Option<bool>,
1720 #[prost(enumeration = "UserPasswordEncryption", tag = "9")]
1724 pub user_password_encryption: i32,
1725 #[prost(message, optional, tag = "10")]
1727 pub connection_manager: ::core::option::Option<ConnectionManager>,
1728}
1729#[allow(clippy::derive_partial_eq_without_eq)]
1730#[derive(Clone, PartialEq, ::prost::Message)]
1731pub struct Permission {
1732 #[prost(string, tag = "1")]
1734 pub database_name: ::prost::alloc::string::String,
1735}
1736#[allow(clippy::derive_partial_eq_without_eq)]
1737#[derive(Clone, PartialEq, ::prost::Message)]
1738pub struct ConnectionManager {
1739 #[prost(string, tag = "1")]
1741 pub connection_id: ::prost::alloc::string::String,
1742}
1743#[allow(clippy::derive_partial_eq_without_eq)]
1744#[derive(Clone, PartialEq, ::prost::Message)]
1745pub struct UserSpec {
1746 #[prost(string, tag = "1")]
1748 pub name: ::prost::alloc::string::String,
1749 #[prost(string, tag = "2")]
1751 pub password: ::prost::alloc::string::String,
1752 #[prost(message, repeated, tag = "3")]
1754 pub permissions: ::prost::alloc::vec::Vec<Permission>,
1755 #[prost(message, optional, tag = "4")]
1763 pub conn_limit: ::core::option::Option<i64>,
1764 #[prost(message, optional, tag = "5")]
1766 pub settings: ::core::option::Option<UserSettings>,
1767 #[prost(message, optional, tag = "6")]
1771 pub login: ::core::option::Option<bool>,
1772 #[prost(string, repeated, tag = "7")]
1776 pub grants: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1777 #[prost(message, optional, tag = "8")]
1781 pub deletion_protection: ::core::option::Option<bool>,
1782 #[prost(enumeration = "UserPasswordEncryption", tag = "9")]
1786 pub user_password_encryption: i32,
1787 #[prost(message, optional, tag = "10")]
1789 pub generate_password: ::core::option::Option<bool>,
1790}
1791#[allow(clippy::derive_partial_eq_without_eq)]
1792#[derive(Clone, PartialEq, ::prost::Message)]
1793pub struct PgAuditSettings {
1794 #[prost(enumeration = "pg_audit_settings::PgAuditSettingsLog", repeated, tag = "1")]
1808 pub log: ::prost::alloc::vec::Vec<i32>,
1809}
1810pub mod pg_audit_settings {
1812 #[derive(
1813 Clone,
1814 Copy,
1815 Debug,
1816 PartialEq,
1817 Eq,
1818 Hash,
1819 PartialOrd,
1820 Ord,
1821 ::prost::Enumeration
1822 )]
1823 #[repr(i32)]
1824 pub enum PgAuditSettingsLog {
1825 Unspecified = 0,
1826 Read = 1,
1827 Write = 2,
1828 Function = 3,
1829 Role = 4,
1830 Ddl = 5,
1831 Misc = 6,
1832 MiscSet = 7,
1833 }
1834 impl PgAuditSettingsLog {
1835 pub fn as_str_name(&self) -> &'static str {
1840 match self {
1841 PgAuditSettingsLog::Unspecified => "PG_AUDIT_SETTINGS_LOG_UNSPECIFIED",
1842 PgAuditSettingsLog::Read => "PG_AUDIT_SETTINGS_LOG_READ",
1843 PgAuditSettingsLog::Write => "PG_AUDIT_SETTINGS_LOG_WRITE",
1844 PgAuditSettingsLog::Function => "PG_AUDIT_SETTINGS_LOG_FUNCTION",
1845 PgAuditSettingsLog::Role => "PG_AUDIT_SETTINGS_LOG_ROLE",
1846 PgAuditSettingsLog::Ddl => "PG_AUDIT_SETTINGS_LOG_DDL",
1847 PgAuditSettingsLog::Misc => "PG_AUDIT_SETTINGS_LOG_MISC",
1848 PgAuditSettingsLog::MiscSet => "PG_AUDIT_SETTINGS_LOG_MISC_SET",
1849 }
1850 }
1851 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1853 match value {
1854 "PG_AUDIT_SETTINGS_LOG_UNSPECIFIED" => Some(Self::Unspecified),
1855 "PG_AUDIT_SETTINGS_LOG_READ" => Some(Self::Read),
1856 "PG_AUDIT_SETTINGS_LOG_WRITE" => Some(Self::Write),
1857 "PG_AUDIT_SETTINGS_LOG_FUNCTION" => Some(Self::Function),
1858 "PG_AUDIT_SETTINGS_LOG_ROLE" => Some(Self::Role),
1859 "PG_AUDIT_SETTINGS_LOG_DDL" => Some(Self::Ddl),
1860 "PG_AUDIT_SETTINGS_LOG_MISC" => Some(Self::Misc),
1861 "PG_AUDIT_SETTINGS_LOG_MISC_SET" => Some(Self::MiscSet),
1862 _ => None,
1863 }
1864 }
1865 }
1866}
1867#[allow(clippy::derive_partial_eq_without_eq)]
1869#[derive(Clone, PartialEq, ::prost::Message)]
1870pub struct UserSettings {
1871 #[prost(enumeration = "user_settings::TransactionIsolation", tag = "1")]
1876 pub default_transaction_isolation: i32,
1877 #[prost(message, optional, tag = "2")]
1882 pub lock_timeout: ::core::option::Option<i64>,
1883 #[prost(message, optional, tag = "3")]
1894 pub log_min_duration_statement: ::core::option::Option<i64>,
1895 #[prost(enumeration = "user_settings::SynchronousCommit", tag = "4")]
1902 pub synchronous_commit: i32,
1903 #[prost(message, optional, tag = "5")]
1908 pub temp_file_limit: ::core::option::Option<i64>,
1909 #[prost(enumeration = "user_settings::LogStatement", tag = "6")]
1913 pub log_statement: i32,
1914 #[prost(enumeration = "user_settings::PoolingMode", tag = "7")]
1918 pub pool_mode: i32,
1919 #[prost(message, optional, tag = "8")]
1923 pub prepared_statements_pooling: ::core::option::Option<bool>,
1924 #[prost(message, optional, tag = "9")]
1932 pub catchup_timeout: ::core::option::Option<i64>,
1933 #[prost(message, optional, tag = "10")]
1942 pub wal_sender_timeout: ::core::option::Option<i64>,
1943 #[prost(message, optional, tag = "11")]
1951 pub idle_in_transaction_session_timeout: ::core::option::Option<i64>,
1952 #[prost(message, optional, tag = "12")]
1961 pub statement_timeout: ::core::option::Option<i64>,
1962 #[prost(message, optional, tag = "13")]
1964 pub pgaudit: ::core::option::Option<PgAuditSettings>,
1965}
1966pub mod user_settings {
1968 #[derive(
1969 Clone,
1970 Copy,
1971 Debug,
1972 PartialEq,
1973 Eq,
1974 Hash,
1975 PartialOrd,
1976 Ord,
1977 ::prost::Enumeration
1978 )]
1979 #[repr(i32)]
1980 pub enum SynchronousCommit {
1981 Unspecified = 0,
1982 On = 1,
1984 Off = 2,
1987 Local = 3,
1990 RemoteWrite = 4,
1993 RemoteApply = 5,
1996 }
1997 impl SynchronousCommit {
1998 pub fn as_str_name(&self) -> &'static str {
2003 match self {
2004 SynchronousCommit::Unspecified => "SYNCHRONOUS_COMMIT_UNSPECIFIED",
2005 SynchronousCommit::On => "SYNCHRONOUS_COMMIT_ON",
2006 SynchronousCommit::Off => "SYNCHRONOUS_COMMIT_OFF",
2007 SynchronousCommit::Local => "SYNCHRONOUS_COMMIT_LOCAL",
2008 SynchronousCommit::RemoteWrite => "SYNCHRONOUS_COMMIT_REMOTE_WRITE",
2009 SynchronousCommit::RemoteApply => "SYNCHRONOUS_COMMIT_REMOTE_APPLY",
2010 }
2011 }
2012 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2014 match value {
2015 "SYNCHRONOUS_COMMIT_UNSPECIFIED" => Some(Self::Unspecified),
2016 "SYNCHRONOUS_COMMIT_ON" => Some(Self::On),
2017 "SYNCHRONOUS_COMMIT_OFF" => Some(Self::Off),
2018 "SYNCHRONOUS_COMMIT_LOCAL" => Some(Self::Local),
2019 "SYNCHRONOUS_COMMIT_REMOTE_WRITE" => Some(Self::RemoteWrite),
2020 "SYNCHRONOUS_COMMIT_REMOTE_APPLY" => Some(Self::RemoteApply),
2021 _ => None,
2022 }
2023 }
2024 }
2025 #[derive(
2026 Clone,
2027 Copy,
2028 Debug,
2029 PartialEq,
2030 Eq,
2031 Hash,
2032 PartialOrd,
2033 Ord,
2034 ::prost::Enumeration
2035 )]
2036 #[repr(i32)]
2037 pub enum LogStatement {
2038 Unspecified = 0,
2039 None = 1,
2041 Ddl = 2,
2043 Mod = 3,
2045 All = 4,
2047 }
2048 impl LogStatement {
2049 pub fn as_str_name(&self) -> &'static str {
2054 match self {
2055 LogStatement::Unspecified => "LOG_STATEMENT_UNSPECIFIED",
2056 LogStatement::None => "LOG_STATEMENT_NONE",
2057 LogStatement::Ddl => "LOG_STATEMENT_DDL",
2058 LogStatement::Mod => "LOG_STATEMENT_MOD",
2059 LogStatement::All => "LOG_STATEMENT_ALL",
2060 }
2061 }
2062 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2064 match value {
2065 "LOG_STATEMENT_UNSPECIFIED" => Some(Self::Unspecified),
2066 "LOG_STATEMENT_NONE" => Some(Self::None),
2067 "LOG_STATEMENT_DDL" => Some(Self::Ddl),
2068 "LOG_STATEMENT_MOD" => Some(Self::Mod),
2069 "LOG_STATEMENT_ALL" => Some(Self::All),
2070 _ => None,
2071 }
2072 }
2073 }
2074 #[derive(
2075 Clone,
2076 Copy,
2077 Debug,
2078 PartialEq,
2079 Eq,
2080 Hash,
2081 PartialOrd,
2082 Ord,
2083 ::prost::Enumeration
2084 )]
2085 #[repr(i32)]
2086 pub enum TransactionIsolation {
2087 Unspecified = 0,
2088 ReadUncommitted = 1,
2090 ReadCommitted = 2,
2092 RepeatableRead = 3,
2094 Serializable = 4,
2098 }
2099 impl TransactionIsolation {
2100 pub fn as_str_name(&self) -> &'static str {
2105 match self {
2106 TransactionIsolation::Unspecified => "TRANSACTION_ISOLATION_UNSPECIFIED",
2107 TransactionIsolation::ReadUncommitted => {
2108 "TRANSACTION_ISOLATION_READ_UNCOMMITTED"
2109 }
2110 TransactionIsolation::ReadCommitted => {
2111 "TRANSACTION_ISOLATION_READ_COMMITTED"
2112 }
2113 TransactionIsolation::RepeatableRead => {
2114 "TRANSACTION_ISOLATION_REPEATABLE_READ"
2115 }
2116 TransactionIsolation::Serializable => {
2117 "TRANSACTION_ISOLATION_SERIALIZABLE"
2118 }
2119 }
2120 }
2121 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2123 match value {
2124 "TRANSACTION_ISOLATION_UNSPECIFIED" => Some(Self::Unspecified),
2125 "TRANSACTION_ISOLATION_READ_UNCOMMITTED" => Some(Self::ReadUncommitted),
2126 "TRANSACTION_ISOLATION_READ_COMMITTED" => Some(Self::ReadCommitted),
2127 "TRANSACTION_ISOLATION_REPEATABLE_READ" => Some(Self::RepeatableRead),
2128 "TRANSACTION_ISOLATION_SERIALIZABLE" => Some(Self::Serializable),
2129 _ => None,
2130 }
2131 }
2132 }
2133 #[derive(
2134 Clone,
2135 Copy,
2136 Debug,
2137 PartialEq,
2138 Eq,
2139 Hash,
2140 PartialOrd,
2141 Ord,
2142 ::prost::Enumeration
2143 )]
2144 #[repr(i32)]
2145 pub enum PoolingMode {
2146 Unspecified = 0,
2147 Session = 1,
2149 Transaction = 2,
2151 Statement = 3,
2153 }
2154 impl PoolingMode {
2155 pub fn as_str_name(&self) -> &'static str {
2160 match self {
2161 PoolingMode::Unspecified => "POOLING_MODE_UNSPECIFIED",
2162 PoolingMode::Session => "SESSION",
2163 PoolingMode::Transaction => "TRANSACTION",
2164 PoolingMode::Statement => "STATEMENT",
2165 }
2166 }
2167 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2169 match value {
2170 "POOLING_MODE_UNSPECIFIED" => Some(Self::Unspecified),
2171 "SESSION" => Some(Self::Session),
2172 "TRANSACTION" => Some(Self::Transaction),
2173 "STATEMENT" => Some(Self::Statement),
2174 _ => None,
2175 }
2176 }
2177 }
2178}
2179#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2180#[repr(i32)]
2181pub enum UserPasswordEncryption {
2182 Unspecified = 0,
2183 Md5 = 1,
2184 ScramSha256 = 2,
2185}
2186impl UserPasswordEncryption {
2187 pub fn as_str_name(&self) -> &'static str {
2192 match self {
2193 UserPasswordEncryption::Unspecified => "USER_PASSWORD_ENCRYPTION_UNSPECIFIED",
2194 UserPasswordEncryption::Md5 => "USER_PASSWORD_ENCRYPTION_MD5",
2195 UserPasswordEncryption::ScramSha256 => {
2196 "USER_PASSWORD_ENCRYPTION_SCRAM_SHA_256"
2197 }
2198 }
2199 }
2200 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2202 match value {
2203 "USER_PASSWORD_ENCRYPTION_UNSPECIFIED" => Some(Self::Unspecified),
2204 "USER_PASSWORD_ENCRYPTION_MD5" => Some(Self::Md5),
2205 "USER_PASSWORD_ENCRYPTION_SCRAM_SHA_256" => Some(Self::ScramSha256),
2206 _ => None,
2207 }
2208 }
2209}
2210#[allow(clippy::derive_partial_eq_without_eq)]
2211#[derive(Clone, PartialEq, ::prost::Message)]
2212pub struct GetClusterRequest {
2213 #[prost(string, tag = "1")]
2216 pub cluster_id: ::prost::alloc::string::String,
2217}
2218#[allow(clippy::derive_partial_eq_without_eq)]
2219#[derive(Clone, PartialEq, ::prost::Message)]
2220pub struct ListClustersRequest {
2221 #[prost(string, tag = "1")]
2224 pub folder_id: ::prost::alloc::string::String,
2225 #[prost(int64, tag = "2")]
2229 pub page_size: i64,
2230 #[prost(string, tag = "3")]
2233 pub page_token: ::prost::alloc::string::String,
2234 #[prost(string, tag = "4")]
2240 pub filter: ::prost::alloc::string::String,
2241}
2242#[allow(clippy::derive_partial_eq_without_eq)]
2243#[derive(Clone, PartialEq, ::prost::Message)]
2244pub struct ListClustersResponse {
2245 #[prost(message, repeated, tag = "1")]
2247 pub clusters: ::prost::alloc::vec::Vec<Cluster>,
2248 #[prost(string, tag = "2")]
2253 pub next_page_token: ::prost::alloc::string::String,
2254}
2255#[allow(clippy::derive_partial_eq_without_eq)]
2257#[derive(Clone, PartialEq, ::prost::Message)]
2258pub struct BackupRetentionPolicySpec {
2259 #[prost(string, tag = "1")]
2261 pub policy_name: ::prost::alloc::string::String,
2262 #[prost(message, optional, tag = "2")]
2264 pub cron: ::core::option::Option<CronTab>,
2265 #[prost(int64, tag = "3")]
2267 pub retain_for_days: i64,
2268 #[prost(string, tag = "4")]
2270 pub description: ::prost::alloc::string::String,
2271}
2272#[allow(clippy::derive_partial_eq_without_eq)]
2273#[derive(Clone, PartialEq, ::prost::Message)]
2274pub struct CreateClusterRequest {
2275 #[prost(string, tag = "1")]
2277 pub folder_id: ::prost::alloc::string::String,
2278 #[prost(string, tag = "2")]
2280 pub name: ::prost::alloc::string::String,
2281 #[prost(string, tag = "3")]
2283 pub description: ::prost::alloc::string::String,
2284 #[prost(map = "string, string", tag = "4")]
2287 pub labels: ::std::collections::HashMap<
2288 ::prost::alloc::string::String,
2289 ::prost::alloc::string::String,
2290 >,
2291 #[prost(enumeration = "cluster::Environment", tag = "5")]
2293 pub environment: i32,
2294 #[prost(message, optional, tag = "6")]
2296 pub config_spec: ::core::option::Option<ConfigSpec>,
2297 #[prost(message, repeated, tag = "7")]
2299 pub database_specs: ::prost::alloc::vec::Vec<DatabaseSpec>,
2300 #[prost(message, repeated, tag = "8")]
2302 pub user_specs: ::prost::alloc::vec::Vec<UserSpec>,
2303 #[prost(message, repeated, tag = "9")]
2305 pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
2306 #[prost(string, tag = "10")]
2308 pub network_id: ::prost::alloc::string::String,
2309 #[prost(string, repeated, tag = "11")]
2311 pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2312 #[prost(bool, tag = "12")]
2314 pub deletion_protection: bool,
2315 #[prost(string, repeated, tag = "13")]
2317 pub host_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2318 #[prost(message, optional, tag = "14")]
2320 pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
2321 #[prost(message, repeated, tag = "15")]
2323 pub retention_policies: ::prost::alloc::vec::Vec<BackupRetentionPolicySpec>,
2324}
2325#[allow(clippy::derive_partial_eq_without_eq)]
2326#[derive(Clone, PartialEq, ::prost::Message)]
2327pub struct CreateClusterMetadata {
2328 #[prost(string, tag = "1")]
2330 pub cluster_id: ::prost::alloc::string::String,
2331}
2332#[allow(clippy::derive_partial_eq_without_eq)]
2333#[derive(Clone, PartialEq, ::prost::Message)]
2334pub struct UpdateClusterRequest {
2335 #[prost(string, tag = "1")]
2338 pub cluster_id: ::prost::alloc::string::String,
2339 #[prost(message, optional, tag = "2")]
2341 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
2342 #[prost(string, tag = "3")]
2344 pub description: ::prost::alloc::string::String,
2345 #[prost(map = "string, string", tag = "4")]
2351 pub labels: ::std::collections::HashMap<
2352 ::prost::alloc::string::String,
2353 ::prost::alloc::string::String,
2354 >,
2355 #[prost(message, optional, tag = "5")]
2357 pub config_spec: ::core::option::Option<ConfigSpec>,
2358 #[prost(string, tag = "6")]
2360 pub name: ::prost::alloc::string::String,
2361 #[prost(message, optional, tag = "7")]
2363 pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
2364 #[prost(string, repeated, tag = "8")]
2366 pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2367 #[prost(bool, tag = "9")]
2369 pub deletion_protection: bool,
2370 #[prost(string, tag = "11")]
2372 pub network_id: ::prost::alloc::string::String,
2373}
2374#[allow(clippy::derive_partial_eq_without_eq)]
2375#[derive(Clone, PartialEq, ::prost::Message)]
2376pub struct UpdateClusterMetadata {
2377 #[prost(string, tag = "1")]
2379 pub cluster_id: ::prost::alloc::string::String,
2380}
2381#[allow(clippy::derive_partial_eq_without_eq)]
2382#[derive(Clone, PartialEq, ::prost::Message)]
2383pub struct DeleteClusterRequest {
2384 #[prost(string, tag = "1")]
2387 pub cluster_id: ::prost::alloc::string::String,
2388}
2389#[allow(clippy::derive_partial_eq_without_eq)]
2390#[derive(Clone, PartialEq, ::prost::Message)]
2391pub struct DeleteClusterMetadata {
2392 #[prost(string, tag = "1")]
2394 pub cluster_id: ::prost::alloc::string::String,
2395}
2396#[allow(clippy::derive_partial_eq_without_eq)]
2397#[derive(Clone, PartialEq, ::prost::Message)]
2398pub struct StartClusterRequest {
2399 #[prost(string, tag = "1")]
2401 pub cluster_id: ::prost::alloc::string::String,
2402}
2403#[allow(clippy::derive_partial_eq_without_eq)]
2404#[derive(Clone, PartialEq, ::prost::Message)]
2405pub struct StartClusterMetadata {
2406 #[prost(string, tag = "1")]
2408 pub cluster_id: ::prost::alloc::string::String,
2409}
2410#[allow(clippy::derive_partial_eq_without_eq)]
2411#[derive(Clone, PartialEq, ::prost::Message)]
2412pub struct StopClusterRequest {
2413 #[prost(string, tag = "1")]
2415 pub cluster_id: ::prost::alloc::string::String,
2416}
2417#[allow(clippy::derive_partial_eq_without_eq)]
2418#[derive(Clone, PartialEq, ::prost::Message)]
2419pub struct StopClusterMetadata {
2420 #[prost(string, tag = "1")]
2422 pub cluster_id: ::prost::alloc::string::String,
2423}
2424#[allow(clippy::derive_partial_eq_without_eq)]
2425#[derive(Clone, PartialEq, ::prost::Message)]
2426pub struct MoveClusterRequest {
2427 #[prost(string, tag = "1")]
2429 pub cluster_id: ::prost::alloc::string::String,
2430 #[prost(string, tag = "2")]
2432 pub destination_folder_id: ::prost::alloc::string::String,
2433}
2434#[allow(clippy::derive_partial_eq_without_eq)]
2435#[derive(Clone, PartialEq, ::prost::Message)]
2436pub struct MoveClusterMetadata {
2437 #[prost(string, tag = "1")]
2439 pub cluster_id: ::prost::alloc::string::String,
2440 #[prost(string, tag = "2")]
2442 pub source_folder_id: ::prost::alloc::string::String,
2443 #[prost(string, tag = "3")]
2445 pub destination_folder_id: ::prost::alloc::string::String,
2446}
2447#[allow(clippy::derive_partial_eq_without_eq)]
2448#[derive(Clone, PartialEq, ::prost::Message)]
2449pub struct BackupClusterRequest {
2450 #[prost(string, tag = "1")]
2453 pub cluster_id: ::prost::alloc::string::String,
2454}
2455#[allow(clippy::derive_partial_eq_without_eq)]
2456#[derive(Clone, PartialEq, ::prost::Message)]
2457pub struct BackupClusterMetadata {
2458 #[prost(string, tag = "1")]
2460 pub cluster_id: ::prost::alloc::string::String,
2461 #[prost(string, tag = "2")]
2463 pub backup_id: ::prost::alloc::string::String,
2464}
2465#[allow(clippy::derive_partial_eq_without_eq)]
2466#[derive(Clone, PartialEq, ::prost::Message)]
2467pub struct RestoreClusterRequest {
2468 #[prost(string, tag = "1")]
2471 pub backup_id: ::prost::alloc::string::String,
2472 #[prost(message, optional, tag = "2")]
2474 pub time: ::core::option::Option<::prost_types::Timestamp>,
2475 #[prost(bool, tag = "3")]
2482 pub time_inclusive: bool,
2483 #[prost(string, tag = "4")]
2485 pub name: ::prost::alloc::string::String,
2486 #[prost(string, tag = "5")]
2488 pub description: ::prost::alloc::string::String,
2489 #[prost(map = "string, string", tag = "6")]
2492 pub labels: ::std::collections::HashMap<
2493 ::prost::alloc::string::String,
2494 ::prost::alloc::string::String,
2495 >,
2496 #[prost(enumeration = "cluster::Environment", tag = "7")]
2498 pub environment: i32,
2499 #[prost(message, optional, tag = "8")]
2501 pub config_spec: ::core::option::Option<ConfigSpec>,
2502 #[prost(message, repeated, tag = "9")]
2505 pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
2506 #[prost(string, tag = "10")]
2508 pub network_id: ::prost::alloc::string::String,
2509 #[prost(string, tag = "11")]
2511 pub folder_id: ::prost::alloc::string::String,
2512 #[prost(string, repeated, tag = "12")]
2514 pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2515 #[prost(bool, tag = "13")]
2517 pub deletion_protection: bool,
2518 #[prost(string, repeated, tag = "14")]
2520 pub host_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2521}
2522#[allow(clippy::derive_partial_eq_without_eq)]
2523#[derive(Clone, PartialEq, ::prost::Message)]
2524pub struct RestoreClusterMetadata {
2525 #[prost(string, tag = "1")]
2527 pub cluster_id: ::prost::alloc::string::String,
2528 #[prost(string, tag = "2")]
2530 pub backup_id: ::prost::alloc::string::String,
2531}
2532#[allow(clippy::derive_partial_eq_without_eq)]
2533#[derive(Clone, PartialEq, ::prost::Message)]
2534pub struct StartClusterFailoverRequest {
2535 #[prost(string, tag = "1")]
2537 pub cluster_id: ::prost::alloc::string::String,
2538 #[prost(string, tag = "2")]
2540 pub host_name: ::prost::alloc::string::String,
2541}
2542#[allow(clippy::derive_partial_eq_without_eq)]
2543#[derive(Clone, PartialEq, ::prost::Message)]
2544pub struct StartClusterFailoverMetadata {
2545 #[prost(string, tag = "1")]
2547 pub cluster_id: ::prost::alloc::string::String,
2548}
2549#[allow(clippy::derive_partial_eq_without_eq)]
2550#[derive(Clone, PartialEq, ::prost::Message)]
2551pub struct RescheduleMaintenanceRequest {
2552 #[prost(string, tag = "1")]
2554 pub cluster_id: ::prost::alloc::string::String,
2555 #[prost(enumeration = "reschedule_maintenance_request::RescheduleType", tag = "2")]
2557 pub reschedule_type: i32,
2558 #[prost(message, optional, tag = "3")]
2560 pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
2561}
2562pub mod reschedule_maintenance_request {
2564 #[derive(
2565 Clone,
2566 Copy,
2567 Debug,
2568 PartialEq,
2569 Eq,
2570 Hash,
2571 PartialOrd,
2572 Ord,
2573 ::prost::Enumeration
2574 )]
2575 #[repr(i32)]
2576 pub enum RescheduleType {
2577 Unspecified = 0,
2578 Immediate = 1,
2580 NextAvailableWindow = 2,
2582 SpecificTime = 3,
2584 }
2585 impl RescheduleType {
2586 pub fn as_str_name(&self) -> &'static str {
2591 match self {
2592 RescheduleType::Unspecified => "RESCHEDULE_TYPE_UNSPECIFIED",
2593 RescheduleType::Immediate => "IMMEDIATE",
2594 RescheduleType::NextAvailableWindow => "NEXT_AVAILABLE_WINDOW",
2595 RescheduleType::SpecificTime => "SPECIFIC_TIME",
2596 }
2597 }
2598 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2600 match value {
2601 "RESCHEDULE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2602 "IMMEDIATE" => Some(Self::Immediate),
2603 "NEXT_AVAILABLE_WINDOW" => Some(Self::NextAvailableWindow),
2604 "SPECIFIC_TIME" => Some(Self::SpecificTime),
2605 _ => None,
2606 }
2607 }
2608 }
2609}
2610#[allow(clippy::derive_partial_eq_without_eq)]
2612#[derive(Clone, PartialEq, ::prost::Message)]
2613pub struct RescheduleMaintenanceMetadata {
2614 #[prost(string, tag = "1")]
2616 pub cluster_id: ::prost::alloc::string::String,
2617 #[prost(message, optional, tag = "4")]
2619 pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
2620}
2621#[allow(clippy::derive_partial_eq_without_eq)]
2622#[derive(Clone, PartialEq, ::prost::Message)]
2623pub struct LogRecord {
2624 #[prost(message, optional, tag = "1")]
2626 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
2627 #[prost(map = "string, string", tag = "2")]
2629 pub message: ::std::collections::HashMap<
2630 ::prost::alloc::string::String,
2631 ::prost::alloc::string::String,
2632 >,
2633}
2634#[allow(clippy::derive_partial_eq_without_eq)]
2635#[derive(Clone, PartialEq, ::prost::Message)]
2636pub struct ListClusterLogsRequest {
2637 #[prost(string, tag = "1")]
2640 pub cluster_id: ::prost::alloc::string::String,
2641 #[prost(string, repeated, tag = "2")]
2644 pub column_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2645 #[prost(enumeration = "list_cluster_logs_request::ServiceType", tag = "3")]
2647 pub service_type: i32,
2648 #[prost(message, optional, tag = "4")]
2650 pub from_time: ::core::option::Option<::prost_types::Timestamp>,
2651 #[prost(message, optional, tag = "5")]
2653 pub to_time: ::core::option::Option<::prost_types::Timestamp>,
2654 #[prost(int64, tag = "6")]
2658 pub page_size: i64,
2659 #[prost(string, tag = "7")]
2662 pub page_token: ::prost::alloc::string::String,
2663 #[prost(bool, tag = "8")]
2665 pub always_next_page_token: bool,
2666}
2667pub mod list_cluster_logs_request {
2669 #[derive(
2670 Clone,
2671 Copy,
2672 Debug,
2673 PartialEq,
2674 Eq,
2675 Hash,
2676 PartialOrd,
2677 Ord,
2678 ::prost::Enumeration
2679 )]
2680 #[repr(i32)]
2681 pub enum ServiceType {
2682 Unspecified = 0,
2683 Postgresql = 1,
2685 Pooler = 2,
2687 }
2688 impl ServiceType {
2689 pub fn as_str_name(&self) -> &'static str {
2694 match self {
2695 ServiceType::Unspecified => "SERVICE_TYPE_UNSPECIFIED",
2696 ServiceType::Postgresql => "POSTGRESQL",
2697 ServiceType::Pooler => "POOLER",
2698 }
2699 }
2700 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2702 match value {
2703 "SERVICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2704 "POSTGRESQL" => Some(Self::Postgresql),
2705 "POOLER" => Some(Self::Pooler),
2706 _ => None,
2707 }
2708 }
2709 }
2710}
2711#[allow(clippy::derive_partial_eq_without_eq)]
2712#[derive(Clone, PartialEq, ::prost::Message)]
2713pub struct ListClusterLogsResponse {
2714 #[prost(message, repeated, tag = "1")]
2716 pub logs: ::prost::alloc::vec::Vec<LogRecord>,
2717 #[prost(string, tag = "2")]
2723 pub next_page_token: ::prost::alloc::string::String,
2724}
2725#[allow(clippy::derive_partial_eq_without_eq)]
2726#[derive(Clone, PartialEq, ::prost::Message)]
2727pub struct StreamLogRecord {
2728 #[prost(message, optional, tag = "1")]
2730 pub record: ::core::option::Option<LogRecord>,
2731 #[prost(string, tag = "2")]
2736 pub next_record_token: ::prost::alloc::string::String,
2737}
2738#[allow(clippy::derive_partial_eq_without_eq)]
2739#[derive(Clone, PartialEq, ::prost::Message)]
2740pub struct StreamClusterLogsRequest {
2741 #[prost(string, tag = "1")]
2743 pub cluster_id: ::prost::alloc::string::String,
2744 #[prost(string, repeated, tag = "2")]
2746 pub column_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2747 #[prost(enumeration = "stream_cluster_logs_request::ServiceType", tag = "3")]
2748 pub service_type: i32,
2749 #[prost(message, optional, tag = "4")]
2751 pub from_time: ::core::option::Option<::prost_types::Timestamp>,
2752 #[prost(message, optional, tag = "5")]
2756 pub to_time: ::core::option::Option<::prost_types::Timestamp>,
2757 #[prost(string, tag = "6")]
2760 pub record_token: ::prost::alloc::string::String,
2761 #[prost(string, tag = "7")]
2771 pub filter: ::prost::alloc::string::String,
2772}
2773pub mod stream_cluster_logs_request {
2775 #[derive(
2776 Clone,
2777 Copy,
2778 Debug,
2779 PartialEq,
2780 Eq,
2781 Hash,
2782 PartialOrd,
2783 Ord,
2784 ::prost::Enumeration
2785 )]
2786 #[repr(i32)]
2787 pub enum ServiceType {
2788 Unspecified = 0,
2789 Postgresql = 1,
2791 Pooler = 2,
2793 }
2794 impl ServiceType {
2795 pub fn as_str_name(&self) -> &'static str {
2800 match self {
2801 ServiceType::Unspecified => "SERVICE_TYPE_UNSPECIFIED",
2802 ServiceType::Postgresql => "POSTGRESQL",
2803 ServiceType::Pooler => "POOLER",
2804 }
2805 }
2806 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2808 match value {
2809 "SERVICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2810 "POSTGRESQL" => Some(Self::Postgresql),
2811 "POOLER" => Some(Self::Pooler),
2812 _ => None,
2813 }
2814 }
2815 }
2816}
2817#[allow(clippy::derive_partial_eq_without_eq)]
2818#[derive(Clone, PartialEq, ::prost::Message)]
2819pub struct ListClusterOperationsRequest {
2820 #[prost(string, tag = "1")]
2822 pub cluster_id: ::prost::alloc::string::String,
2823 #[prost(int64, tag = "2")]
2827 pub page_size: i64,
2828 #[prost(string, tag = "3")]
2831 pub page_token: ::prost::alloc::string::String,
2832}
2833#[allow(clippy::derive_partial_eq_without_eq)]
2834#[derive(Clone, PartialEq, ::prost::Message)]
2835pub struct ListClusterOperationsResponse {
2836 #[prost(message, repeated, tag = "1")]
2838 pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
2839 #[prost(string, tag = "2")]
2844 pub next_page_token: ::prost::alloc::string::String,
2845}
2846#[allow(clippy::derive_partial_eq_without_eq)]
2847#[derive(Clone, PartialEq, ::prost::Message)]
2848pub struct ListClusterBackupsRequest {
2849 #[prost(string, tag = "1")]
2852 pub cluster_id: ::prost::alloc::string::String,
2853 #[prost(int64, tag = "2")]
2857 pub page_size: i64,
2858 #[prost(string, tag = "3")]
2861 pub page_token: ::prost::alloc::string::String,
2862}
2863#[allow(clippy::derive_partial_eq_without_eq)]
2864#[derive(Clone, PartialEq, ::prost::Message)]
2865pub struct ListClusterBackupsResponse {
2866 #[prost(message, repeated, tag = "1")]
2868 pub backups: ::prost::alloc::vec::Vec<Backup>,
2869 #[prost(string, tag = "2")]
2874 pub next_page_token: ::prost::alloc::string::String,
2875}
2876#[allow(clippy::derive_partial_eq_without_eq)]
2877#[derive(Clone, PartialEq, ::prost::Message)]
2878pub struct ListClusterHostsRequest {
2879 #[prost(string, tag = "1")]
2882 pub cluster_id: ::prost::alloc::string::String,
2883 #[prost(int64, tag = "2")]
2887 pub page_size: i64,
2888 #[prost(string, tag = "3")]
2891 pub page_token: ::prost::alloc::string::String,
2892}
2893#[allow(clippy::derive_partial_eq_without_eq)]
2894#[derive(Clone, PartialEq, ::prost::Message)]
2895pub struct ListClusterHostsResponse {
2896 #[prost(message, repeated, tag = "1")]
2898 pub hosts: ::prost::alloc::vec::Vec<Host>,
2899 #[prost(string, tag = "2")]
2904 pub next_page_token: ::prost::alloc::string::String,
2905}
2906#[allow(clippy::derive_partial_eq_without_eq)]
2907#[derive(Clone, PartialEq, ::prost::Message)]
2908pub struct AddClusterHostsRequest {
2909 #[prost(string, tag = "1")]
2912 pub cluster_id: ::prost::alloc::string::String,
2913 #[prost(message, repeated, tag = "2")]
2915 pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
2916}
2917#[allow(clippy::derive_partial_eq_without_eq)]
2918#[derive(Clone, PartialEq, ::prost::Message)]
2919pub struct AddClusterHostsMetadata {
2920 #[prost(string, tag = "1")]
2922 pub cluster_id: ::prost::alloc::string::String,
2923 #[prost(string, repeated, tag = "2")]
2925 pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2926}
2927#[allow(clippy::derive_partial_eq_without_eq)]
2928#[derive(Clone, PartialEq, ::prost::Message)]
2929pub struct DeleteClusterHostsRequest {
2930 #[prost(string, tag = "1")]
2933 pub cluster_id: ::prost::alloc::string::String,
2934 #[prost(string, repeated, tag = "2")]
2936 pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2937}
2938#[allow(clippy::derive_partial_eq_without_eq)]
2939#[derive(Clone, PartialEq, ::prost::Message)]
2940pub struct DeleteClusterHostsMetadata {
2941 #[prost(string, tag = "1")]
2943 pub cluster_id: ::prost::alloc::string::String,
2944 #[prost(string, repeated, tag = "2")]
2946 pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2947}
2948#[allow(clippy::derive_partial_eq_without_eq)]
2949#[derive(Clone, PartialEq, ::prost::Message)]
2950pub struct UpdateClusterHostsRequest {
2951 #[prost(string, tag = "1")]
2954 pub cluster_id: ::prost::alloc::string::String,
2955 #[prost(message, repeated, tag = "2")]
2957 pub update_host_specs: ::prost::alloc::vec::Vec<UpdateHostSpec>,
2958}
2959#[allow(clippy::derive_partial_eq_without_eq)]
2960#[derive(Clone, PartialEq, ::prost::Message)]
2961pub struct UpdateClusterHostsMetadata {
2962 #[prost(string, tag = "1")]
2964 pub cluster_id: ::prost::alloc::string::String,
2965 #[prost(string, repeated, tag = "2")]
2967 pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2968}
2969#[allow(clippy::derive_partial_eq_without_eq)]
2970#[derive(Clone, PartialEq, ::prost::Message)]
2971pub struct UpdateHostSpec {
2972 #[prost(string, tag = "1")]
2975 pub host_name: ::prost::alloc::string::String,
2976 #[prost(string, tag = "2")]
2979 pub replication_source: ::prost::alloc::string::String,
2980 #[prost(message, optional, tag = "3")]
2985 pub priority: ::core::option::Option<i64>,
2986 #[prost(message, optional, tag = "4")]
2988 pub config_spec: ::core::option::Option<ConfigHostSpec>,
2989 #[prost(message, optional, tag = "5")]
2991 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
2992 #[prost(bool, tag = "6")]
2994 pub assign_public_ip: bool,
2995}
2996#[allow(clippy::derive_partial_eq_without_eq)]
2997#[derive(Clone, PartialEq, ::prost::Message)]
2998pub struct HostSpec {
2999 #[prost(string, tag = "1")]
3002 pub zone_id: ::prost::alloc::string::String,
3003 #[prost(string, tag = "2")]
3007 pub subnet_id: ::prost::alloc::string::String,
3008 #[prost(bool, tag = "3")]
3017 pub assign_public_ip: bool,
3018 #[prost(string, tag = "4")]
3020 pub replication_source: ::prost::alloc::string::String,
3021 #[prost(message, optional, tag = "5")]
3028 pub priority: ::core::option::Option<i64>,
3029 #[prost(message, optional, tag = "6")]
3031 pub config_spec: ::core::option::Option<ConfigHostSpec>,
3032}
3033#[allow(clippy::derive_partial_eq_without_eq)]
3034#[derive(Clone, PartialEq, ::prost::Message)]
3035pub struct ConfigSpec {
3036 #[prost(string, tag = "1")]
3039 pub version: ::prost::alloc::string::String,
3040 #[prost(message, optional, tag = "4")]
3042 pub pooler_config: ::core::option::Option<ConnectionPoolerConfig>,
3043 #[prost(message, optional, tag = "5")]
3045 pub resources: ::core::option::Option<Resources>,
3046 #[prost(message, optional, tag = "6")]
3048 pub autofailover: ::core::option::Option<bool>,
3049 #[prost(message, optional, tag = "8")]
3051 pub backup_window_start: ::core::option::Option<
3052 super::super::super::super::super::google::r#type::TimeOfDay,
3053 >,
3054 #[prost(message, optional, tag = "17")]
3056 pub backup_retain_period_days: ::core::option::Option<i64>,
3057 #[prost(message, optional, tag = "9")]
3059 pub access: ::core::option::Option<Access>,
3060 #[prost(message, optional, tag = "12")]
3062 pub performance_diagnostics: ::core::option::Option<PerformanceDiagnostics>,
3063 #[prost(message, optional, tag = "23")]
3065 pub disk_size_autoscaling: ::core::option::Option<DiskSizeAutoscaling>,
3066 #[prost(
3068 oneof = "config_spec::PostgresqlConfig",
3069 tags = "2, 10, 3, 7, 13, 11, 14, 15, 18, 16, 19, 21, 22, 24, 25, 27, 28"
3070 )]
3071 pub postgresql_config: ::core::option::Option<config_spec::PostgresqlConfig>,
3072}
3073pub mod config_spec {
3075 #[allow(clippy::derive_partial_eq_without_eq)]
3077 #[derive(Clone, PartialEq, ::prost::Oneof)]
3078 pub enum PostgresqlConfig {
3079 #[prost(message, tag = "2")]
3081 PostgresqlConfig96(super::config::PostgresqlConfig96),
3082 #[prost(message, tag = "10")]
3084 PostgresqlConfig101c(super::config::PostgresqlConfig101c),
3085 #[prost(message, tag = "3")]
3087 PostgresqlConfig10(super::config::PostgresqlConfig10),
3088 #[prost(message, tag = "7")]
3090 PostgresqlConfig11(super::config::PostgresqlConfig11),
3091 #[prost(message, tag = "13")]
3093 PostgresqlConfig111c(super::config::PostgresqlConfig111c),
3094 #[prost(message, tag = "11")]
3096 PostgresqlConfig12(super::config::PostgresqlConfig12),
3097 #[prost(message, tag = "14")]
3099 PostgresqlConfig121c(super::config::PostgresqlConfig121c),
3100 #[prost(message, tag = "15")]
3102 PostgresqlConfig13(super::config::PostgresqlConfig13),
3103 #[prost(message, tag = "18")]
3105 PostgresqlConfig131c(super::config::PostgresqlConfig131c),
3106 #[prost(message, tag = "16")]
3108 PostgresqlConfig14(super::config::PostgresqlConfig14),
3109 #[prost(message, tag = "19")]
3111 PostgresqlConfig141c(super::config::PostgresqlConfig141c),
3112 #[prost(message, tag = "21")]
3114 PostgresqlConfig15(super::config::PostgresqlConfig15),
3115 #[prost(message, tag = "22")]
3117 PostgresqlConfig151c(super::config::PostgresqlConfig151c),
3118 #[prost(message, tag = "24")]
3120 PostgresqlConfig16(super::config::PostgresqlConfig16),
3121 #[prost(message, tag = "25")]
3123 PostgresqlConfig161c(super::config::PostgresqlConfig161c),
3124 #[prost(message, tag = "27")]
3126 PostgresqlConfig17(super::config::PostgresqlConfig17),
3127 #[prost(message, tag = "28")]
3129 PostgresqlConfig171c(super::config::PostgresqlConfig171c),
3130 }
3131}
3132#[allow(clippy::derive_partial_eq_without_eq)]
3133#[derive(Clone, PartialEq, ::prost::Message)]
3134pub struct ConfigHostSpec {
3135 #[prost(
3136 oneof = "config_host_spec::PostgresqlConfig",
3137 tags = "1, 4, 2, 3, 6, 5, 7, 8, 10, 9, 11, 12, 13, 14, 15, 16, 17"
3138 )]
3139 pub postgresql_config: ::core::option::Option<config_host_spec::PostgresqlConfig>,
3140}
3141pub mod config_host_spec {
3143 #[allow(clippy::derive_partial_eq_without_eq)]
3144 #[derive(Clone, PartialEq, ::prost::Oneof)]
3145 pub enum PostgresqlConfig {
3146 #[prost(message, tag = "1")]
3148 PostgresqlConfig96(super::config::PostgresqlHostConfig96),
3149 #[prost(message, tag = "4")]
3151 PostgresqlConfig101c(super::config::PostgresqlHostConfig101c),
3152 #[prost(message, tag = "2")]
3154 PostgresqlConfig10(super::config::PostgresqlHostConfig10),
3155 #[prost(message, tag = "3")]
3157 PostgresqlConfig11(super::config::PostgresqlHostConfig11),
3158 #[prost(message, tag = "6")]
3160 PostgresqlConfig111c(super::config::PostgresqlHostConfig111c),
3161 #[prost(message, tag = "5")]
3163 PostgresqlConfig12(super::config::PostgresqlHostConfig12),
3164 #[prost(message, tag = "7")]
3166 PostgresqlConfig121c(super::config::PostgresqlHostConfig121c),
3167 #[prost(message, tag = "8")]
3169 PostgresqlConfig13(super::config::PostgresqlHostConfig13),
3170 #[prost(message, tag = "10")]
3172 PostgresqlConfig131c(super::config::PostgresqlHostConfig131c),
3173 #[prost(message, tag = "9")]
3175 PostgresqlConfig14(super::config::PostgresqlHostConfig14),
3176 #[prost(message, tag = "11")]
3178 PostgresqlConfig141c(super::config::PostgresqlHostConfig141c),
3179 #[prost(message, tag = "12")]
3181 PostgresqlConfig15(super::config::PostgresqlHostConfig15),
3182 #[prost(message, tag = "13")]
3184 PostgresqlConfig151c(super::config::PostgresqlHostConfig151c),
3185 #[prost(message, tag = "14")]
3187 PostgresqlConfig16(super::config::PostgresqlHostConfig16),
3188 #[prost(message, tag = "15")]
3190 PostgresqlConfig161c(super::config::PostgresqlHostConfig161c),
3191 #[prost(message, tag = "16")]
3193 PostgresqlConfig17(super::config::PostgresqlHostConfig17),
3194 #[prost(message, tag = "17")]
3196 PostgresqlConfig171c(super::config::PostgresqlHostConfig171c),
3197 }
3198}
3199pub mod cluster_service_client {
3201 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
3202 use tonic::codegen::*;
3203 use tonic::codegen::http::Uri;
3204 #[derive(Debug, Clone)]
3206 pub struct ClusterServiceClient<T> {
3207 inner: tonic::client::Grpc<T>,
3208 }
3209 impl ClusterServiceClient<tonic::transport::Channel> {
3210 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3212 where
3213 D: TryInto<tonic::transport::Endpoint>,
3214 D::Error: Into<StdError>,
3215 {
3216 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3217 Ok(Self::new(conn))
3218 }
3219 }
3220 impl<T> ClusterServiceClient<T>
3221 where
3222 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3223 T::Error: Into<StdError>,
3224 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
3225 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
3226 {
3227 pub fn new(inner: T) -> Self {
3228 let inner = tonic::client::Grpc::new(inner);
3229 Self { inner }
3230 }
3231 pub fn with_origin(inner: T, origin: Uri) -> Self {
3232 let inner = tonic::client::Grpc::with_origin(inner, origin);
3233 Self { inner }
3234 }
3235 pub fn with_interceptor<F>(
3236 inner: T,
3237 interceptor: F,
3238 ) -> ClusterServiceClient<InterceptedService<T, F>>
3239 where
3240 F: tonic::service::Interceptor,
3241 T::ResponseBody: Default,
3242 T: tonic::codegen::Service<
3243 http::Request<tonic::body::BoxBody>,
3244 Response = http::Response<
3245 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3246 >,
3247 >,
3248 <T as tonic::codegen::Service<
3249 http::Request<tonic::body::BoxBody>,
3250 >>::Error: Into<StdError> + Send + Sync,
3251 {
3252 ClusterServiceClient::new(InterceptedService::new(inner, interceptor))
3253 }
3254 #[must_use]
3259 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3260 self.inner = self.inner.send_compressed(encoding);
3261 self
3262 }
3263 #[must_use]
3265 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3266 self.inner = self.inner.accept_compressed(encoding);
3267 self
3268 }
3269 #[must_use]
3273 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3274 self.inner = self.inner.max_decoding_message_size(limit);
3275 self
3276 }
3277 #[must_use]
3281 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3282 self.inner = self.inner.max_encoding_message_size(limit);
3283 self
3284 }
3285 pub async fn get(
3289 &mut self,
3290 request: impl tonic::IntoRequest<super::GetClusterRequest>,
3291 ) -> std::result::Result<tonic::Response<super::Cluster>, tonic::Status> {
3292 self.inner
3293 .ready()
3294 .await
3295 .map_err(|e| {
3296 tonic::Status::new(
3297 tonic::Code::Unknown,
3298 format!("Service was not ready: {}", e.into()),
3299 )
3300 })?;
3301 let codec = tonic::codec::ProstCodec::default();
3302 let path = http::uri::PathAndQuery::from_static(
3303 "/yandex.cloud.mdb.postgresql.v1.ClusterService/Get",
3304 );
3305 let mut req = request.into_request();
3306 req.extensions_mut()
3307 .insert(
3308 GrpcMethod::new(
3309 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3310 "Get",
3311 ),
3312 );
3313 self.inner.unary(req, path, codec).await
3314 }
3315 pub async fn list(
3318 &mut self,
3319 request: impl tonic::IntoRequest<super::ListClustersRequest>,
3320 ) -> std::result::Result<
3321 tonic::Response<super::ListClustersResponse>,
3322 tonic::Status,
3323 > {
3324 self.inner
3325 .ready()
3326 .await
3327 .map_err(|e| {
3328 tonic::Status::new(
3329 tonic::Code::Unknown,
3330 format!("Service was not ready: {}", e.into()),
3331 )
3332 })?;
3333 let codec = tonic::codec::ProstCodec::default();
3334 let path = http::uri::PathAndQuery::from_static(
3335 "/yandex.cloud.mdb.postgresql.v1.ClusterService/List",
3336 );
3337 let mut req = request.into_request();
3338 req.extensions_mut()
3339 .insert(
3340 GrpcMethod::new(
3341 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3342 "List",
3343 ),
3344 );
3345 self.inner.unary(req, path, codec).await
3346 }
3347 pub async fn create(
3349 &mut self,
3350 request: impl tonic::IntoRequest<super::CreateClusterRequest>,
3351 ) -> std::result::Result<
3352 tonic::Response<super::super::super::super::operation::Operation>,
3353 tonic::Status,
3354 > {
3355 self.inner
3356 .ready()
3357 .await
3358 .map_err(|e| {
3359 tonic::Status::new(
3360 tonic::Code::Unknown,
3361 format!("Service was not ready: {}", e.into()),
3362 )
3363 })?;
3364 let codec = tonic::codec::ProstCodec::default();
3365 let path = http::uri::PathAndQuery::from_static(
3366 "/yandex.cloud.mdb.postgresql.v1.ClusterService/Create",
3367 );
3368 let mut req = request.into_request();
3369 req.extensions_mut()
3370 .insert(
3371 GrpcMethod::new(
3372 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3373 "Create",
3374 ),
3375 );
3376 self.inner.unary(req, path, codec).await
3377 }
3378 pub async fn update(
3380 &mut self,
3381 request: impl tonic::IntoRequest<super::UpdateClusterRequest>,
3382 ) -> std::result::Result<
3383 tonic::Response<super::super::super::super::operation::Operation>,
3384 tonic::Status,
3385 > {
3386 self.inner
3387 .ready()
3388 .await
3389 .map_err(|e| {
3390 tonic::Status::new(
3391 tonic::Code::Unknown,
3392 format!("Service was not ready: {}", e.into()),
3393 )
3394 })?;
3395 let codec = tonic::codec::ProstCodec::default();
3396 let path = http::uri::PathAndQuery::from_static(
3397 "/yandex.cloud.mdb.postgresql.v1.ClusterService/Update",
3398 );
3399 let mut req = request.into_request();
3400 req.extensions_mut()
3401 .insert(
3402 GrpcMethod::new(
3403 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3404 "Update",
3405 ),
3406 );
3407 self.inner.unary(req, path, codec).await
3408 }
3409 pub async fn delete(
3411 &mut self,
3412 request: impl tonic::IntoRequest<super::DeleteClusterRequest>,
3413 ) -> std::result::Result<
3414 tonic::Response<super::super::super::super::operation::Operation>,
3415 tonic::Status,
3416 > {
3417 self.inner
3418 .ready()
3419 .await
3420 .map_err(|e| {
3421 tonic::Status::new(
3422 tonic::Code::Unknown,
3423 format!("Service was not ready: {}", e.into()),
3424 )
3425 })?;
3426 let codec = tonic::codec::ProstCodec::default();
3427 let path = http::uri::PathAndQuery::from_static(
3428 "/yandex.cloud.mdb.postgresql.v1.ClusterService/Delete",
3429 );
3430 let mut req = request.into_request();
3431 req.extensions_mut()
3432 .insert(
3433 GrpcMethod::new(
3434 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3435 "Delete",
3436 ),
3437 );
3438 self.inner.unary(req, path, codec).await
3439 }
3440 pub async fn start(
3442 &mut self,
3443 request: impl tonic::IntoRequest<super::StartClusterRequest>,
3444 ) -> std::result::Result<
3445 tonic::Response<super::super::super::super::operation::Operation>,
3446 tonic::Status,
3447 > {
3448 self.inner
3449 .ready()
3450 .await
3451 .map_err(|e| {
3452 tonic::Status::new(
3453 tonic::Code::Unknown,
3454 format!("Service was not ready: {}", e.into()),
3455 )
3456 })?;
3457 let codec = tonic::codec::ProstCodec::default();
3458 let path = http::uri::PathAndQuery::from_static(
3459 "/yandex.cloud.mdb.postgresql.v1.ClusterService/Start",
3460 );
3461 let mut req = request.into_request();
3462 req.extensions_mut()
3463 .insert(
3464 GrpcMethod::new(
3465 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3466 "Start",
3467 ),
3468 );
3469 self.inner.unary(req, path, codec).await
3470 }
3471 pub async fn stop(
3473 &mut self,
3474 request: impl tonic::IntoRequest<super::StopClusterRequest>,
3475 ) -> std::result::Result<
3476 tonic::Response<super::super::super::super::operation::Operation>,
3477 tonic::Status,
3478 > {
3479 self.inner
3480 .ready()
3481 .await
3482 .map_err(|e| {
3483 tonic::Status::new(
3484 tonic::Code::Unknown,
3485 format!("Service was not ready: {}", e.into()),
3486 )
3487 })?;
3488 let codec = tonic::codec::ProstCodec::default();
3489 let path = http::uri::PathAndQuery::from_static(
3490 "/yandex.cloud.mdb.postgresql.v1.ClusterService/Stop",
3491 );
3492 let mut req = request.into_request();
3493 req.extensions_mut()
3494 .insert(
3495 GrpcMethod::new(
3496 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3497 "Stop",
3498 ),
3499 );
3500 self.inner.unary(req, path, codec).await
3501 }
3502 pub async fn r#move(
3504 &mut self,
3505 request: impl tonic::IntoRequest<super::MoveClusterRequest>,
3506 ) -> std::result::Result<
3507 tonic::Response<super::super::super::super::operation::Operation>,
3508 tonic::Status,
3509 > {
3510 self.inner
3511 .ready()
3512 .await
3513 .map_err(|e| {
3514 tonic::Status::new(
3515 tonic::Code::Unknown,
3516 format!("Service was not ready: {}", e.into()),
3517 )
3518 })?;
3519 let codec = tonic::codec::ProstCodec::default();
3520 let path = http::uri::PathAndQuery::from_static(
3521 "/yandex.cloud.mdb.postgresql.v1.ClusterService/Move",
3522 );
3523 let mut req = request.into_request();
3524 req.extensions_mut()
3525 .insert(
3526 GrpcMethod::new(
3527 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3528 "Move",
3529 ),
3530 );
3531 self.inner.unary(req, path, codec).await
3532 }
3533 pub async fn backup(
3535 &mut self,
3536 request: impl tonic::IntoRequest<super::BackupClusterRequest>,
3537 ) -> std::result::Result<
3538 tonic::Response<super::super::super::super::operation::Operation>,
3539 tonic::Status,
3540 > {
3541 self.inner
3542 .ready()
3543 .await
3544 .map_err(|e| {
3545 tonic::Status::new(
3546 tonic::Code::Unknown,
3547 format!("Service was not ready: {}", e.into()),
3548 )
3549 })?;
3550 let codec = tonic::codec::ProstCodec::default();
3551 let path = http::uri::PathAndQuery::from_static(
3552 "/yandex.cloud.mdb.postgresql.v1.ClusterService/Backup",
3553 );
3554 let mut req = request.into_request();
3555 req.extensions_mut()
3556 .insert(
3557 GrpcMethod::new(
3558 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3559 "Backup",
3560 ),
3561 );
3562 self.inner.unary(req, path, codec).await
3563 }
3564 pub async fn restore(
3566 &mut self,
3567 request: impl tonic::IntoRequest<super::RestoreClusterRequest>,
3568 ) -> std::result::Result<
3569 tonic::Response<super::super::super::super::operation::Operation>,
3570 tonic::Status,
3571 > {
3572 self.inner
3573 .ready()
3574 .await
3575 .map_err(|e| {
3576 tonic::Status::new(
3577 tonic::Code::Unknown,
3578 format!("Service was not ready: {}", e.into()),
3579 )
3580 })?;
3581 let codec = tonic::codec::ProstCodec::default();
3582 let path = http::uri::PathAndQuery::from_static(
3583 "/yandex.cloud.mdb.postgresql.v1.ClusterService/Restore",
3584 );
3585 let mut req = request.into_request();
3586 req.extensions_mut()
3587 .insert(
3588 GrpcMethod::new(
3589 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3590 "Restore",
3591 ),
3592 );
3593 self.inner.unary(req, path, codec).await
3594 }
3595 pub async fn reschedule_maintenance(
3597 &mut self,
3598 request: impl tonic::IntoRequest<super::RescheduleMaintenanceRequest>,
3599 ) -> std::result::Result<
3600 tonic::Response<super::super::super::super::operation::Operation>,
3601 tonic::Status,
3602 > {
3603 self.inner
3604 .ready()
3605 .await
3606 .map_err(|e| {
3607 tonic::Status::new(
3608 tonic::Code::Unknown,
3609 format!("Service was not ready: {}", e.into()),
3610 )
3611 })?;
3612 let codec = tonic::codec::ProstCodec::default();
3613 let path = http::uri::PathAndQuery::from_static(
3614 "/yandex.cloud.mdb.postgresql.v1.ClusterService/RescheduleMaintenance",
3615 );
3616 let mut req = request.into_request();
3617 req.extensions_mut()
3618 .insert(
3619 GrpcMethod::new(
3620 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3621 "RescheduleMaintenance",
3622 ),
3623 );
3624 self.inner.unary(req, path, codec).await
3625 }
3626 pub async fn start_failover(
3628 &mut self,
3629 request: impl tonic::IntoRequest<super::StartClusterFailoverRequest>,
3630 ) -> std::result::Result<
3631 tonic::Response<super::super::super::super::operation::Operation>,
3632 tonic::Status,
3633 > {
3634 self.inner
3635 .ready()
3636 .await
3637 .map_err(|e| {
3638 tonic::Status::new(
3639 tonic::Code::Unknown,
3640 format!("Service was not ready: {}", e.into()),
3641 )
3642 })?;
3643 let codec = tonic::codec::ProstCodec::default();
3644 let path = http::uri::PathAndQuery::from_static(
3645 "/yandex.cloud.mdb.postgresql.v1.ClusterService/StartFailover",
3646 );
3647 let mut req = request.into_request();
3648 req.extensions_mut()
3649 .insert(
3650 GrpcMethod::new(
3651 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3652 "StartFailover",
3653 ),
3654 );
3655 self.inner.unary(req, path, codec).await
3656 }
3657 pub async fn list_logs(
3659 &mut self,
3660 request: impl tonic::IntoRequest<super::ListClusterLogsRequest>,
3661 ) -> std::result::Result<
3662 tonic::Response<super::ListClusterLogsResponse>,
3663 tonic::Status,
3664 > {
3665 self.inner
3666 .ready()
3667 .await
3668 .map_err(|e| {
3669 tonic::Status::new(
3670 tonic::Code::Unknown,
3671 format!("Service was not ready: {}", e.into()),
3672 )
3673 })?;
3674 let codec = tonic::codec::ProstCodec::default();
3675 let path = http::uri::PathAndQuery::from_static(
3676 "/yandex.cloud.mdb.postgresql.v1.ClusterService/ListLogs",
3677 );
3678 let mut req = request.into_request();
3679 req.extensions_mut()
3680 .insert(
3681 GrpcMethod::new(
3682 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3683 "ListLogs",
3684 ),
3685 );
3686 self.inner.unary(req, path, codec).await
3687 }
3688 pub async fn stream_logs(
3690 &mut self,
3691 request: impl tonic::IntoRequest<super::StreamClusterLogsRequest>,
3692 ) -> std::result::Result<
3693 tonic::Response<tonic::codec::Streaming<super::StreamLogRecord>>,
3694 tonic::Status,
3695 > {
3696 self.inner
3697 .ready()
3698 .await
3699 .map_err(|e| {
3700 tonic::Status::new(
3701 tonic::Code::Unknown,
3702 format!("Service was not ready: {}", e.into()),
3703 )
3704 })?;
3705 let codec = tonic::codec::ProstCodec::default();
3706 let path = http::uri::PathAndQuery::from_static(
3707 "/yandex.cloud.mdb.postgresql.v1.ClusterService/StreamLogs",
3708 );
3709 let mut req = request.into_request();
3710 req.extensions_mut()
3711 .insert(
3712 GrpcMethod::new(
3713 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3714 "StreamLogs",
3715 ),
3716 );
3717 self.inner.server_streaming(req, path, codec).await
3718 }
3719 pub async fn list_operations(
3721 &mut self,
3722 request: impl tonic::IntoRequest<super::ListClusterOperationsRequest>,
3723 ) -> std::result::Result<
3724 tonic::Response<super::ListClusterOperationsResponse>,
3725 tonic::Status,
3726 > {
3727 self.inner
3728 .ready()
3729 .await
3730 .map_err(|e| {
3731 tonic::Status::new(
3732 tonic::Code::Unknown,
3733 format!("Service was not ready: {}", e.into()),
3734 )
3735 })?;
3736 let codec = tonic::codec::ProstCodec::default();
3737 let path = http::uri::PathAndQuery::from_static(
3738 "/yandex.cloud.mdb.postgresql.v1.ClusterService/ListOperations",
3739 );
3740 let mut req = request.into_request();
3741 req.extensions_mut()
3742 .insert(
3743 GrpcMethod::new(
3744 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3745 "ListOperations",
3746 ),
3747 );
3748 self.inner.unary(req, path, codec).await
3749 }
3750 pub async fn list_backups(
3752 &mut self,
3753 request: impl tonic::IntoRequest<super::ListClusterBackupsRequest>,
3754 ) -> std::result::Result<
3755 tonic::Response<super::ListClusterBackupsResponse>,
3756 tonic::Status,
3757 > {
3758 self.inner
3759 .ready()
3760 .await
3761 .map_err(|e| {
3762 tonic::Status::new(
3763 tonic::Code::Unknown,
3764 format!("Service was not ready: {}", e.into()),
3765 )
3766 })?;
3767 let codec = tonic::codec::ProstCodec::default();
3768 let path = http::uri::PathAndQuery::from_static(
3769 "/yandex.cloud.mdb.postgresql.v1.ClusterService/ListBackups",
3770 );
3771 let mut req = request.into_request();
3772 req.extensions_mut()
3773 .insert(
3774 GrpcMethod::new(
3775 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3776 "ListBackups",
3777 ),
3778 );
3779 self.inner.unary(req, path, codec).await
3780 }
3781 pub async fn list_hosts(
3783 &mut self,
3784 request: impl tonic::IntoRequest<super::ListClusterHostsRequest>,
3785 ) -> std::result::Result<
3786 tonic::Response<super::ListClusterHostsResponse>,
3787 tonic::Status,
3788 > {
3789 self.inner
3790 .ready()
3791 .await
3792 .map_err(|e| {
3793 tonic::Status::new(
3794 tonic::Code::Unknown,
3795 format!("Service was not ready: {}", e.into()),
3796 )
3797 })?;
3798 let codec = tonic::codec::ProstCodec::default();
3799 let path = http::uri::PathAndQuery::from_static(
3800 "/yandex.cloud.mdb.postgresql.v1.ClusterService/ListHosts",
3801 );
3802 let mut req = request.into_request();
3803 req.extensions_mut()
3804 .insert(
3805 GrpcMethod::new(
3806 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3807 "ListHosts",
3808 ),
3809 );
3810 self.inner.unary(req, path, codec).await
3811 }
3812 pub async fn add_hosts(
3814 &mut self,
3815 request: impl tonic::IntoRequest<super::AddClusterHostsRequest>,
3816 ) -> std::result::Result<
3817 tonic::Response<super::super::super::super::operation::Operation>,
3818 tonic::Status,
3819 > {
3820 self.inner
3821 .ready()
3822 .await
3823 .map_err(|e| {
3824 tonic::Status::new(
3825 tonic::Code::Unknown,
3826 format!("Service was not ready: {}", e.into()),
3827 )
3828 })?;
3829 let codec = tonic::codec::ProstCodec::default();
3830 let path = http::uri::PathAndQuery::from_static(
3831 "/yandex.cloud.mdb.postgresql.v1.ClusterService/AddHosts",
3832 );
3833 let mut req = request.into_request();
3834 req.extensions_mut()
3835 .insert(
3836 GrpcMethod::new(
3837 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3838 "AddHosts",
3839 ),
3840 );
3841 self.inner.unary(req, path, codec).await
3842 }
3843 pub async fn delete_hosts(
3845 &mut self,
3846 request: impl tonic::IntoRequest<super::DeleteClusterHostsRequest>,
3847 ) -> std::result::Result<
3848 tonic::Response<super::super::super::super::operation::Operation>,
3849 tonic::Status,
3850 > {
3851 self.inner
3852 .ready()
3853 .await
3854 .map_err(|e| {
3855 tonic::Status::new(
3856 tonic::Code::Unknown,
3857 format!("Service was not ready: {}", e.into()),
3858 )
3859 })?;
3860 let codec = tonic::codec::ProstCodec::default();
3861 let path = http::uri::PathAndQuery::from_static(
3862 "/yandex.cloud.mdb.postgresql.v1.ClusterService/DeleteHosts",
3863 );
3864 let mut req = request.into_request();
3865 req.extensions_mut()
3866 .insert(
3867 GrpcMethod::new(
3868 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3869 "DeleteHosts",
3870 ),
3871 );
3872 self.inner.unary(req, path, codec).await
3873 }
3874 pub async fn update_hosts(
3876 &mut self,
3877 request: impl tonic::IntoRequest<super::UpdateClusterHostsRequest>,
3878 ) -> std::result::Result<
3879 tonic::Response<super::super::super::super::operation::Operation>,
3880 tonic::Status,
3881 > {
3882 self.inner
3883 .ready()
3884 .await
3885 .map_err(|e| {
3886 tonic::Status::new(
3887 tonic::Code::Unknown,
3888 format!("Service was not ready: {}", e.into()),
3889 )
3890 })?;
3891 let codec = tonic::codec::ProstCodec::default();
3892 let path = http::uri::PathAndQuery::from_static(
3893 "/yandex.cloud.mdb.postgresql.v1.ClusterService/UpdateHosts",
3894 );
3895 let mut req = request.into_request();
3896 req.extensions_mut()
3897 .insert(
3898 GrpcMethod::new(
3899 "yandex.cloud.mdb.postgresql.v1.ClusterService",
3900 "UpdateHosts",
3901 ),
3902 );
3903 self.inner.unary(req, path, codec).await
3904 }
3905 }
3906}
3907#[allow(clippy::derive_partial_eq_without_eq)]
3908#[derive(Clone, PartialEq, ::prost::Message)]
3909pub struct GetDatabaseRequest {
3910 #[prost(string, tag = "1")]
3913 pub cluster_id: ::prost::alloc::string::String,
3914 #[prost(string, tag = "2")]
3917 pub database_name: ::prost::alloc::string::String,
3918}
3919#[allow(clippy::derive_partial_eq_without_eq)]
3920#[derive(Clone, PartialEq, ::prost::Message)]
3921pub struct ListDatabasesRequest {
3922 #[prost(string, tag = "1")]
3925 pub cluster_id: ::prost::alloc::string::String,
3926 #[prost(int64, tag = "2")]
3930 pub page_size: i64,
3931 #[prost(string, tag = "3")]
3934 pub page_token: ::prost::alloc::string::String,
3935}
3936#[allow(clippy::derive_partial_eq_without_eq)]
3937#[derive(Clone, PartialEq, ::prost::Message)]
3938pub struct ListDatabasesResponse {
3939 #[prost(message, repeated, tag = "1")]
3941 pub databases: ::prost::alloc::vec::Vec<Database>,
3942 #[prost(string, tag = "2")]
3947 pub next_page_token: ::prost::alloc::string::String,
3948}
3949#[allow(clippy::derive_partial_eq_without_eq)]
3950#[derive(Clone, PartialEq, ::prost::Message)]
3951pub struct CreateDatabaseRequest {
3952 #[prost(string, tag = "1")]
3955 pub cluster_id: ::prost::alloc::string::String,
3956 #[prost(message, optional, tag = "2")]
3958 pub database_spec: ::core::option::Option<DatabaseSpec>,
3959}
3960#[allow(clippy::derive_partial_eq_without_eq)]
3961#[derive(Clone, PartialEq, ::prost::Message)]
3962pub struct CreateDatabaseMetadata {
3963 #[prost(string, tag = "1")]
3965 pub cluster_id: ::prost::alloc::string::String,
3966 #[prost(string, tag = "2")]
3968 pub database_name: ::prost::alloc::string::String,
3969}
3970#[allow(clippy::derive_partial_eq_without_eq)]
3971#[derive(Clone, PartialEq, ::prost::Message)]
3972pub struct UpdateDatabaseRequest {
3973 #[prost(string, tag = "1")]
3976 pub cluster_id: ::prost::alloc::string::String,
3977 #[prost(string, tag = "2")]
3980 pub database_name: ::prost::alloc::string::String,
3981 #[prost(string, tag = "5")]
3983 pub new_database_name: ::prost::alloc::string::String,
3984 #[prost(message, optional, tag = "3")]
3986 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
3987 #[prost(message, repeated, tag = "4")]
3992 pub extensions: ::prost::alloc::vec::Vec<Extension>,
3993 #[prost(message, optional, tag = "6")]
3997 pub deletion_protection: ::core::option::Option<bool>,
3998}
3999#[allow(clippy::derive_partial_eq_without_eq)]
4000#[derive(Clone, PartialEq, ::prost::Message)]
4001pub struct UpdateDatabaseMetadata {
4002 #[prost(string, tag = "1")]
4004 pub cluster_id: ::prost::alloc::string::String,
4005 #[prost(string, tag = "2")]
4007 pub database_name: ::prost::alloc::string::String,
4008}
4009#[allow(clippy::derive_partial_eq_without_eq)]
4010#[derive(Clone, PartialEq, ::prost::Message)]
4011pub struct DeleteDatabaseRequest {
4012 #[prost(string, tag = "1")]
4015 pub cluster_id: ::prost::alloc::string::String,
4016 #[prost(string, tag = "2")]
4019 pub database_name: ::prost::alloc::string::String,
4020}
4021#[allow(clippy::derive_partial_eq_without_eq)]
4022#[derive(Clone, PartialEq, ::prost::Message)]
4023pub struct DeleteDatabaseMetadata {
4024 #[prost(string, tag = "1")]
4026 pub cluster_id: ::prost::alloc::string::String,
4027 #[prost(string, tag = "2")]
4029 pub database_name: ::prost::alloc::string::String,
4030}
4031pub mod database_service_client {
4033 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
4034 use tonic::codegen::*;
4035 use tonic::codegen::http::Uri;
4036 #[derive(Debug, Clone)]
4038 pub struct DatabaseServiceClient<T> {
4039 inner: tonic::client::Grpc<T>,
4040 }
4041 impl DatabaseServiceClient<tonic::transport::Channel> {
4042 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
4044 where
4045 D: TryInto<tonic::transport::Endpoint>,
4046 D::Error: Into<StdError>,
4047 {
4048 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
4049 Ok(Self::new(conn))
4050 }
4051 }
4052 impl<T> DatabaseServiceClient<T>
4053 where
4054 T: tonic::client::GrpcService<tonic::body::BoxBody>,
4055 T::Error: Into<StdError>,
4056 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
4057 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
4058 {
4059 pub fn new(inner: T) -> Self {
4060 let inner = tonic::client::Grpc::new(inner);
4061 Self { inner }
4062 }
4063 pub fn with_origin(inner: T, origin: Uri) -> Self {
4064 let inner = tonic::client::Grpc::with_origin(inner, origin);
4065 Self { inner }
4066 }
4067 pub fn with_interceptor<F>(
4068 inner: T,
4069 interceptor: F,
4070 ) -> DatabaseServiceClient<InterceptedService<T, F>>
4071 where
4072 F: tonic::service::Interceptor,
4073 T::ResponseBody: Default,
4074 T: tonic::codegen::Service<
4075 http::Request<tonic::body::BoxBody>,
4076 Response = http::Response<
4077 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
4078 >,
4079 >,
4080 <T as tonic::codegen::Service<
4081 http::Request<tonic::body::BoxBody>,
4082 >>::Error: Into<StdError> + Send + Sync,
4083 {
4084 DatabaseServiceClient::new(InterceptedService::new(inner, interceptor))
4085 }
4086 #[must_use]
4091 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4092 self.inner = self.inner.send_compressed(encoding);
4093 self
4094 }
4095 #[must_use]
4097 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4098 self.inner = self.inner.accept_compressed(encoding);
4099 self
4100 }
4101 #[must_use]
4105 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4106 self.inner = self.inner.max_decoding_message_size(limit);
4107 self
4108 }
4109 #[must_use]
4113 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4114 self.inner = self.inner.max_encoding_message_size(limit);
4115 self
4116 }
4117 pub async fn get(
4121 &mut self,
4122 request: impl tonic::IntoRequest<super::GetDatabaseRequest>,
4123 ) -> std::result::Result<tonic::Response<super::Database>, tonic::Status> {
4124 self.inner
4125 .ready()
4126 .await
4127 .map_err(|e| {
4128 tonic::Status::new(
4129 tonic::Code::Unknown,
4130 format!("Service was not ready: {}", e.into()),
4131 )
4132 })?;
4133 let codec = tonic::codec::ProstCodec::default();
4134 let path = http::uri::PathAndQuery::from_static(
4135 "/yandex.cloud.mdb.postgresql.v1.DatabaseService/Get",
4136 );
4137 let mut req = request.into_request();
4138 req.extensions_mut()
4139 .insert(
4140 GrpcMethod::new(
4141 "yandex.cloud.mdb.postgresql.v1.DatabaseService",
4142 "Get",
4143 ),
4144 );
4145 self.inner.unary(req, path, codec).await
4146 }
4147 pub async fn list(
4149 &mut self,
4150 request: impl tonic::IntoRequest<super::ListDatabasesRequest>,
4151 ) -> std::result::Result<
4152 tonic::Response<super::ListDatabasesResponse>,
4153 tonic::Status,
4154 > {
4155 self.inner
4156 .ready()
4157 .await
4158 .map_err(|e| {
4159 tonic::Status::new(
4160 tonic::Code::Unknown,
4161 format!("Service was not ready: {}", e.into()),
4162 )
4163 })?;
4164 let codec = tonic::codec::ProstCodec::default();
4165 let path = http::uri::PathAndQuery::from_static(
4166 "/yandex.cloud.mdb.postgresql.v1.DatabaseService/List",
4167 );
4168 let mut req = request.into_request();
4169 req.extensions_mut()
4170 .insert(
4171 GrpcMethod::new(
4172 "yandex.cloud.mdb.postgresql.v1.DatabaseService",
4173 "List",
4174 ),
4175 );
4176 self.inner.unary(req, path, codec).await
4177 }
4178 pub async fn create(
4180 &mut self,
4181 request: impl tonic::IntoRequest<super::CreateDatabaseRequest>,
4182 ) -> std::result::Result<
4183 tonic::Response<super::super::super::super::operation::Operation>,
4184 tonic::Status,
4185 > {
4186 self.inner
4187 .ready()
4188 .await
4189 .map_err(|e| {
4190 tonic::Status::new(
4191 tonic::Code::Unknown,
4192 format!("Service was not ready: {}", e.into()),
4193 )
4194 })?;
4195 let codec = tonic::codec::ProstCodec::default();
4196 let path = http::uri::PathAndQuery::from_static(
4197 "/yandex.cloud.mdb.postgresql.v1.DatabaseService/Create",
4198 );
4199 let mut req = request.into_request();
4200 req.extensions_mut()
4201 .insert(
4202 GrpcMethod::new(
4203 "yandex.cloud.mdb.postgresql.v1.DatabaseService",
4204 "Create",
4205 ),
4206 );
4207 self.inner.unary(req, path, codec).await
4208 }
4209 pub async fn update(
4211 &mut self,
4212 request: impl tonic::IntoRequest<super::UpdateDatabaseRequest>,
4213 ) -> std::result::Result<
4214 tonic::Response<super::super::super::super::operation::Operation>,
4215 tonic::Status,
4216 > {
4217 self.inner
4218 .ready()
4219 .await
4220 .map_err(|e| {
4221 tonic::Status::new(
4222 tonic::Code::Unknown,
4223 format!("Service was not ready: {}", e.into()),
4224 )
4225 })?;
4226 let codec = tonic::codec::ProstCodec::default();
4227 let path = http::uri::PathAndQuery::from_static(
4228 "/yandex.cloud.mdb.postgresql.v1.DatabaseService/Update",
4229 );
4230 let mut req = request.into_request();
4231 req.extensions_mut()
4232 .insert(
4233 GrpcMethod::new(
4234 "yandex.cloud.mdb.postgresql.v1.DatabaseService",
4235 "Update",
4236 ),
4237 );
4238 self.inner.unary(req, path, codec).await
4239 }
4240 pub async fn delete(
4242 &mut self,
4243 request: impl tonic::IntoRequest<super::DeleteDatabaseRequest>,
4244 ) -> std::result::Result<
4245 tonic::Response<super::super::super::super::operation::Operation>,
4246 tonic::Status,
4247 > {
4248 self.inner
4249 .ready()
4250 .await
4251 .map_err(|e| {
4252 tonic::Status::new(
4253 tonic::Code::Unknown,
4254 format!("Service was not ready: {}", e.into()),
4255 )
4256 })?;
4257 let codec = tonic::codec::ProstCodec::default();
4258 let path = http::uri::PathAndQuery::from_static(
4259 "/yandex.cloud.mdb.postgresql.v1.DatabaseService/Delete",
4260 );
4261 let mut req = request.into_request();
4262 req.extensions_mut()
4263 .insert(
4264 GrpcMethod::new(
4265 "yandex.cloud.mdb.postgresql.v1.DatabaseService",
4266 "Delete",
4267 ),
4268 );
4269 self.inner.unary(req, path, codec).await
4270 }
4271 }
4272}
4273#[allow(clippy::derive_partial_eq_without_eq)]
4274#[derive(Clone, PartialEq, ::prost::Message)]
4275pub struct SessionState {
4276 #[prost(message, optional, tag = "1")]
4278 pub time: ::core::option::Option<::prost_types::Timestamp>,
4279 #[prost(string, tag = "2")]
4281 pub host: ::prost::alloc::string::String,
4282 #[prost(int64, tag = "3")]
4284 pub pid: i64,
4285 #[prost(string, tag = "4")]
4287 pub database: ::prost::alloc::string::String,
4288 #[prost(string, tag = "5")]
4290 pub user: ::prost::alloc::string::String,
4291 #[prost(string, tag = "6")]
4293 pub application_name: ::prost::alloc::string::String,
4294 #[prost(message, optional, tag = "7")]
4296 pub backend_start: ::core::option::Option<::prost_types::Timestamp>,
4297 #[prost(message, optional, tag = "8")]
4301 pub xact_start: ::core::option::Option<::prost_types::Timestamp>,
4302 #[prost(message, optional, tag = "9")]
4306 pub query_start: ::core::option::Option<::prost_types::Timestamp>,
4307 #[prost(message, optional, tag = "10")]
4309 pub state_change: ::core::option::Option<::prost_types::Timestamp>,
4310 #[prost(string, tag = "11")]
4314 pub wait_event_type: ::prost::alloc::string::String,
4315 #[prost(string, tag = "12")]
4319 pub wait_event: ::prost::alloc::string::String,
4320 #[prost(string, tag = "13")]
4322 pub state: ::prost::alloc::string::String,
4323 #[prost(string, tag = "14")]
4327 pub query: ::prost::alloc::string::String,
4328 #[prost(string, tag = "15")]
4330 pub backend_type: ::prost::alloc::string::String,
4331 #[prost(string, tag = "16")]
4337 pub client_addr: ::prost::alloc::string::String,
4338 #[prost(string, tag = "17")]
4340 pub client_hostname: ::prost::alloc::string::String,
4341 #[prost(int64, tag = "18")]
4345 pub client_port: i64,
4346 #[prost(int64, tag = "19")]
4348 pub backend_xid: i64,
4349 #[prost(int64, tag = "20")]
4351 pub backend_xmin: i64,
4352 #[prost(string, tag = "22")]
4354 pub blocking_pids: ::prost::alloc::string::String,
4355 #[prost(string, tag = "23")]
4357 pub query_id: ::prost::alloc::string::String,
4358}
4359#[allow(clippy::derive_partial_eq_without_eq)]
4360#[derive(Clone, PartialEq, ::prost::Message)]
4361pub struct PrimaryKey {
4362 #[prost(string, tag = "1")]
4364 pub host: ::prost::alloc::string::String,
4365 #[prost(string, tag = "2")]
4367 pub user: ::prost::alloc::string::String,
4368 #[prost(string, tag = "4")]
4370 pub database: ::prost::alloc::string::String,
4371 #[prost(bool, tag = "5")]
4373 pub toplevel: bool,
4374 #[prost(string, tag = "6")]
4376 pub query_id: ::prost::alloc::string::String,
4377 #[prost(string, tag = "7")]
4379 pub plan_id: ::prost::alloc::string::String,
4380}
4381#[allow(clippy::derive_partial_eq_without_eq)]
4382#[derive(Clone, PartialEq, ::prost::Message)]
4383pub struct QueryStats {
4384 #[prost(message, optional, tag = "1")]
4386 pub time: ::core::option::Option<::prost_types::Timestamp>,
4387 #[prost(string, tag = "2")]
4389 pub query: ::prost::alloc::string::String,
4390 #[prost(string, tag = "3")]
4392 pub normalized_plan: ::prost::alloc::string::String,
4393 #[prost(string, tag = "4")]
4395 pub example_plan: ::prost::alloc::string::String,
4396 #[prost(int64, tag = "5")]
4400 pub plans: i64,
4401 #[prost(double, tag = "6")]
4405 pub total_plan_time: f64,
4406 #[prost(double, tag = "7")]
4410 pub min_plan_time: f64,
4411 #[prost(double, tag = "8")]
4415 pub max_plan_time: f64,
4416 #[prost(double, tag = "9")]
4420 pub mean_plan_time: f64,
4421 #[prost(double, tag = "10")]
4425 pub stddev_plan_time: f64,
4426 #[prost(int64, tag = "11")]
4428 pub calls: i64,
4429 #[prost(double, tag = "12")]
4433 pub total_time: f64,
4434 #[prost(double, tag = "13")]
4438 pub min_time: f64,
4439 #[prost(double, tag = "14")]
4443 pub max_time: f64,
4444 #[prost(double, tag = "15")]
4448 pub mean_time: f64,
4449 #[prost(double, tag = "16")]
4453 pub stddev_time: f64,
4454 #[prost(int64, tag = "17")]
4456 pub rows: i64,
4457 #[prost(int64, tag = "18")]
4459 pub shared_blks_hit: i64,
4460 #[prost(int64, tag = "19")]
4462 pub shared_blks_read: i64,
4463 #[prost(int64, tag = "20")]
4465 pub shared_blks_dirtied: i64,
4466 #[prost(int64, tag = "21")]
4468 pub shared_blks_written: i64,
4469 #[prost(int64, tag = "22")]
4471 pub local_blks_hit: i64,
4472 #[prost(int64, tag = "23")]
4474 pub local_blks_read: i64,
4475 #[prost(int64, tag = "24")]
4477 pub local_blks_dirtied: i64,
4478 #[prost(int64, tag = "25")]
4480 pub local_blks_written: i64,
4481 #[prost(int64, tag = "26")]
4483 pub temp_blks_read: i64,
4484 #[prost(int64, tag = "27")]
4486 pub temp_blks_written: i64,
4487 #[prost(double, tag = "28")]
4491 pub blk_read_time: f64,
4492 #[prost(double, tag = "29")]
4496 pub blk_write_time: f64,
4497 #[prost(double, tag = "30")]
4501 pub temp_blk_read_time: f64,
4502 #[prost(double, tag = "31")]
4506 pub temp_blk_write_time: f64,
4507 #[prost(int64, tag = "32")]
4509 pub wal_records: i64,
4510 #[prost(int64, tag = "33")]
4512 pub wal_fpi: i64,
4513 #[prost(int64, tag = "34")]
4515 pub wal_bytes: i64,
4516 #[prost(int64, tag = "35")]
4518 pub jit_functions: i64,
4519 #[prost(double, tag = "36")]
4521 pub jit_generation_time: f64,
4522 #[prost(int64, tag = "37")]
4524 pub jit_inlining_count: i64,
4525 #[prost(double, tag = "38")]
4527 pub jit_inlining_time: f64,
4528 #[prost(int64, tag = "39")]
4530 pub jit_optimization_count: i64,
4531 #[prost(double, tag = "40")]
4533 pub jit_optimization_time: f64,
4534 #[prost(int64, tag = "41")]
4536 pub jit_emission_count: i64,
4537 #[prost(double, tag = "42")]
4539 pub jit_emission_time: f64,
4540 #[prost(int64, tag = "43")]
4542 pub startup_cost: i64,
4543 #[prost(int64, tag = "44")]
4545 pub total_cost: i64,
4546 #[prost(int64, tag = "45")]
4548 pub plan_rows: i64,
4549 #[prost(int64, tag = "46")]
4551 pub plan_width: i64,
4552 #[prost(int64, tag = "47")]
4554 pub reads: i64,
4555 #[prost(int64, tag = "48")]
4557 pub writes: i64,
4558 #[prost(double, tag = "49")]
4560 pub user_time: f64,
4561 #[prost(double, tag = "50")]
4563 pub system_time: f64,
4564}
4565#[allow(clippy::derive_partial_eq_without_eq)]
4566#[derive(Clone, PartialEq, ::prost::Message)]
4567pub struct QueryStatement {
4568 #[prost(message, optional, tag = "1")]
4570 pub key: ::core::option::Option<PrimaryKey>,
4571 #[prost(message, optional, tag = "2")]
4573 pub stats: ::core::option::Option<QueryStats>,
4574}
4575#[allow(clippy::derive_partial_eq_without_eq)]
4576#[derive(Clone, PartialEq, ::prost::Message)]
4577pub struct ListRawStatementsRequest {
4578 #[prost(string, tag = "1")]
4582 pub cluster_id: ::prost::alloc::string::String,
4583 #[prost(message, optional, tag = "2")]
4585 pub from_time: ::core::option::Option<::prost_types::Timestamp>,
4586 #[prost(message, optional, tag = "3")]
4588 pub to_time: ::core::option::Option<::prost_types::Timestamp>,
4589 #[prost(int64, tag = "4")]
4591 pub page_size: i64,
4592 #[prost(string, tag = "5")]
4594 pub page_token: ::prost::alloc::string::String,
4595}
4596#[allow(clippy::derive_partial_eq_without_eq)]
4597#[derive(Clone, PartialEq, ::prost::Message)]
4598pub struct ListRawSessionStatesRequest {
4599 #[prost(string, tag = "1")]
4603 pub cluster_id: ::prost::alloc::string::String,
4604 #[prost(message, optional, tag = "2")]
4606 pub from_time: ::core::option::Option<::prost_types::Timestamp>,
4607 #[prost(message, optional, tag = "3")]
4609 pub to_time: ::core::option::Option<::prost_types::Timestamp>,
4610 #[prost(int64, tag = "4")]
4612 pub page_size: i64,
4613 #[prost(string, tag = "5")]
4615 pub page_token: ::prost::alloc::string::String,
4616}
4617#[allow(clippy::derive_partial_eq_without_eq)]
4618#[derive(Clone, PartialEq, ::prost::Message)]
4619pub struct ListRawSessionStatesResponse {
4620 #[prost(message, repeated, tag = "1")]
4622 pub session_states: ::prost::alloc::vec::Vec<SessionState>,
4623 #[prost(string, tag = "2")]
4625 pub next_page_token: ::prost::alloc::string::String,
4626}
4627#[allow(clippy::derive_partial_eq_without_eq)]
4628#[derive(Clone, PartialEq, ::prost::Message)]
4629pub struct ListRawStatementsResponse {
4630 #[prost(message, repeated, tag = "1")]
4632 pub statements: ::prost::alloc::vec::Vec<QueryStatement>,
4633 #[prost(string, tag = "2")]
4635 pub next_page_token: ::prost::alloc::string::String,
4636}
4637pub mod performance_diagnostics_service_client {
4639 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
4640 use tonic::codegen::*;
4641 use tonic::codegen::http::Uri;
4642 #[derive(Debug, Clone)]
4644 pub struct PerformanceDiagnosticsServiceClient<T> {
4645 inner: tonic::client::Grpc<T>,
4646 }
4647 impl PerformanceDiagnosticsServiceClient<tonic::transport::Channel> {
4648 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
4650 where
4651 D: TryInto<tonic::transport::Endpoint>,
4652 D::Error: Into<StdError>,
4653 {
4654 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
4655 Ok(Self::new(conn))
4656 }
4657 }
4658 impl<T> PerformanceDiagnosticsServiceClient<T>
4659 where
4660 T: tonic::client::GrpcService<tonic::body::BoxBody>,
4661 T::Error: Into<StdError>,
4662 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
4663 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
4664 {
4665 pub fn new(inner: T) -> Self {
4666 let inner = tonic::client::Grpc::new(inner);
4667 Self { inner }
4668 }
4669 pub fn with_origin(inner: T, origin: Uri) -> Self {
4670 let inner = tonic::client::Grpc::with_origin(inner, origin);
4671 Self { inner }
4672 }
4673 pub fn with_interceptor<F>(
4674 inner: T,
4675 interceptor: F,
4676 ) -> PerformanceDiagnosticsServiceClient<InterceptedService<T, F>>
4677 where
4678 F: tonic::service::Interceptor,
4679 T::ResponseBody: Default,
4680 T: tonic::codegen::Service<
4681 http::Request<tonic::body::BoxBody>,
4682 Response = http::Response<
4683 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
4684 >,
4685 >,
4686 <T as tonic::codegen::Service<
4687 http::Request<tonic::body::BoxBody>,
4688 >>::Error: Into<StdError> + Send + Sync,
4689 {
4690 PerformanceDiagnosticsServiceClient::new(
4691 InterceptedService::new(inner, interceptor),
4692 )
4693 }
4694 #[must_use]
4699 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4700 self.inner = self.inner.send_compressed(encoding);
4701 self
4702 }
4703 #[must_use]
4705 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4706 self.inner = self.inner.accept_compressed(encoding);
4707 self
4708 }
4709 #[must_use]
4713 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4714 self.inner = self.inner.max_decoding_message_size(limit);
4715 self
4716 }
4717 #[must_use]
4721 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4722 self.inner = self.inner.max_encoding_message_size(limit);
4723 self
4724 }
4725 pub async fn list_raw_session_states(
4727 &mut self,
4728 request: impl tonic::IntoRequest<super::ListRawSessionStatesRequest>,
4729 ) -> std::result::Result<
4730 tonic::Response<super::ListRawSessionStatesResponse>,
4731 tonic::Status,
4732 > {
4733 self.inner
4734 .ready()
4735 .await
4736 .map_err(|e| {
4737 tonic::Status::new(
4738 tonic::Code::Unknown,
4739 format!("Service was not ready: {}", e.into()),
4740 )
4741 })?;
4742 let codec = tonic::codec::ProstCodec::default();
4743 let path = http::uri::PathAndQuery::from_static(
4744 "/yandex.cloud.mdb.postgresql.v1.PerformanceDiagnosticsService/ListRawSessionStates",
4745 );
4746 let mut req = request.into_request();
4747 req.extensions_mut()
4748 .insert(
4749 GrpcMethod::new(
4750 "yandex.cloud.mdb.postgresql.v1.PerformanceDiagnosticsService",
4751 "ListRawSessionStates",
4752 ),
4753 );
4754 self.inner.unary(req, path, codec).await
4755 }
4756 pub async fn list_raw_statements(
4758 &mut self,
4759 request: impl tonic::IntoRequest<super::ListRawStatementsRequest>,
4760 ) -> std::result::Result<
4761 tonic::Response<super::ListRawStatementsResponse>,
4762 tonic::Status,
4763 > {
4764 self.inner
4765 .ready()
4766 .await
4767 .map_err(|e| {
4768 tonic::Status::new(
4769 tonic::Code::Unknown,
4770 format!("Service was not ready: {}", e.into()),
4771 )
4772 })?;
4773 let codec = tonic::codec::ProstCodec::default();
4774 let path = http::uri::PathAndQuery::from_static(
4775 "/yandex.cloud.mdb.postgresql.v1.PerformanceDiagnosticsService/ListRawStatements",
4776 );
4777 let mut req = request.into_request();
4778 req.extensions_mut()
4779 .insert(
4780 GrpcMethod::new(
4781 "yandex.cloud.mdb.postgresql.v1.PerformanceDiagnosticsService",
4782 "ListRawStatements",
4783 ),
4784 );
4785 self.inner.unary(req, path, codec).await
4786 }
4787 }
4788}
4789#[allow(clippy::derive_partial_eq_without_eq)]
4791#[derive(Clone, PartialEq, ::prost::Message)]
4792pub struct ResourcePreset {
4793 #[prost(string, tag = "1")]
4795 pub id: ::prost::alloc::string::String,
4796 #[prost(string, repeated, tag = "2")]
4798 pub zone_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4799 #[prost(int64, tag = "3")]
4801 pub cores: i64,
4802 #[prost(int64, tag = "4")]
4804 pub memory: i64,
4805}
4806#[allow(clippy::derive_partial_eq_without_eq)]
4807#[derive(Clone, PartialEq, ::prost::Message)]
4808pub struct GetResourcePresetRequest {
4809 #[prost(string, tag = "1")]
4812 pub resource_preset_id: ::prost::alloc::string::String,
4813}
4814#[allow(clippy::derive_partial_eq_without_eq)]
4815#[derive(Clone, PartialEq, ::prost::Message)]
4816pub struct ListResourcePresetsRequest {
4817 #[prost(int64, tag = "2")]
4821 pub page_size: i64,
4822 #[prost(string, tag = "3")]
4825 pub page_token: ::prost::alloc::string::String,
4826}
4827#[allow(clippy::derive_partial_eq_without_eq)]
4828#[derive(Clone, PartialEq, ::prost::Message)]
4829pub struct ListResourcePresetsResponse {
4830 #[prost(message, repeated, tag = "1")]
4832 pub resource_presets: ::prost::alloc::vec::Vec<ResourcePreset>,
4833 #[prost(string, tag = "2")]
4838 pub next_page_token: ::prost::alloc::string::String,
4839}
4840pub mod resource_preset_service_client {
4842 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
4843 use tonic::codegen::*;
4844 use tonic::codegen::http::Uri;
4845 #[derive(Debug, Clone)]
4847 pub struct ResourcePresetServiceClient<T> {
4848 inner: tonic::client::Grpc<T>,
4849 }
4850 impl ResourcePresetServiceClient<tonic::transport::Channel> {
4851 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
4853 where
4854 D: TryInto<tonic::transport::Endpoint>,
4855 D::Error: Into<StdError>,
4856 {
4857 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
4858 Ok(Self::new(conn))
4859 }
4860 }
4861 impl<T> ResourcePresetServiceClient<T>
4862 where
4863 T: tonic::client::GrpcService<tonic::body::BoxBody>,
4864 T::Error: Into<StdError>,
4865 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
4866 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
4867 {
4868 pub fn new(inner: T) -> Self {
4869 let inner = tonic::client::Grpc::new(inner);
4870 Self { inner }
4871 }
4872 pub fn with_origin(inner: T, origin: Uri) -> Self {
4873 let inner = tonic::client::Grpc::with_origin(inner, origin);
4874 Self { inner }
4875 }
4876 pub fn with_interceptor<F>(
4877 inner: T,
4878 interceptor: F,
4879 ) -> ResourcePresetServiceClient<InterceptedService<T, F>>
4880 where
4881 F: tonic::service::Interceptor,
4882 T::ResponseBody: Default,
4883 T: tonic::codegen::Service<
4884 http::Request<tonic::body::BoxBody>,
4885 Response = http::Response<
4886 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
4887 >,
4888 >,
4889 <T as tonic::codegen::Service<
4890 http::Request<tonic::body::BoxBody>,
4891 >>::Error: Into<StdError> + Send + Sync,
4892 {
4893 ResourcePresetServiceClient::new(InterceptedService::new(inner, interceptor))
4894 }
4895 #[must_use]
4900 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4901 self.inner = self.inner.send_compressed(encoding);
4902 self
4903 }
4904 #[must_use]
4906 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4907 self.inner = self.inner.accept_compressed(encoding);
4908 self
4909 }
4910 #[must_use]
4914 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4915 self.inner = self.inner.max_decoding_message_size(limit);
4916 self
4917 }
4918 #[must_use]
4922 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4923 self.inner = self.inner.max_encoding_message_size(limit);
4924 self
4925 }
4926 pub async fn get(
4930 &mut self,
4931 request: impl tonic::IntoRequest<super::GetResourcePresetRequest>,
4932 ) -> std::result::Result<tonic::Response<super::ResourcePreset>, tonic::Status> {
4933 self.inner
4934 .ready()
4935 .await
4936 .map_err(|e| {
4937 tonic::Status::new(
4938 tonic::Code::Unknown,
4939 format!("Service was not ready: {}", e.into()),
4940 )
4941 })?;
4942 let codec = tonic::codec::ProstCodec::default();
4943 let path = http::uri::PathAndQuery::from_static(
4944 "/yandex.cloud.mdb.postgresql.v1.ResourcePresetService/Get",
4945 );
4946 let mut req = request.into_request();
4947 req.extensions_mut()
4948 .insert(
4949 GrpcMethod::new(
4950 "yandex.cloud.mdb.postgresql.v1.ResourcePresetService",
4951 "Get",
4952 ),
4953 );
4954 self.inner.unary(req, path, codec).await
4955 }
4956 pub async fn list(
4958 &mut self,
4959 request: impl tonic::IntoRequest<super::ListResourcePresetsRequest>,
4960 ) -> std::result::Result<
4961 tonic::Response<super::ListResourcePresetsResponse>,
4962 tonic::Status,
4963 > {
4964 self.inner
4965 .ready()
4966 .await
4967 .map_err(|e| {
4968 tonic::Status::new(
4969 tonic::Code::Unknown,
4970 format!("Service was not ready: {}", e.into()),
4971 )
4972 })?;
4973 let codec = tonic::codec::ProstCodec::default();
4974 let path = http::uri::PathAndQuery::from_static(
4975 "/yandex.cloud.mdb.postgresql.v1.ResourcePresetService/List",
4976 );
4977 let mut req = request.into_request();
4978 req.extensions_mut()
4979 .insert(
4980 GrpcMethod::new(
4981 "yandex.cloud.mdb.postgresql.v1.ResourcePresetService",
4982 "List",
4983 ),
4984 );
4985 self.inner.unary(req, path, codec).await
4986 }
4987 }
4988}
4989#[allow(clippy::derive_partial_eq_without_eq)]
4990#[derive(Clone, PartialEq, ::prost::Message)]
4991pub struct GetUserRequest {
4992 #[prost(string, tag = "1")]
4995 pub cluster_id: ::prost::alloc::string::String,
4996 #[prost(string, tag = "2")]
4999 pub user_name: ::prost::alloc::string::String,
5000}
5001#[allow(clippy::derive_partial_eq_without_eq)]
5002#[derive(Clone, PartialEq, ::prost::Message)]
5003pub struct ListUsersRequest {
5004 #[prost(string, tag = "1")]
5007 pub cluster_id: ::prost::alloc::string::String,
5008 #[prost(int64, tag = "2")]
5012 pub page_size: i64,
5013 #[prost(string, tag = "3")]
5016 pub page_token: ::prost::alloc::string::String,
5017}
5018#[allow(clippy::derive_partial_eq_without_eq)]
5019#[derive(Clone, PartialEq, ::prost::Message)]
5020pub struct ListUsersResponse {
5021 #[prost(message, repeated, tag = "1")]
5023 pub users: ::prost::alloc::vec::Vec<User>,
5024 #[prost(string, tag = "2")]
5029 pub next_page_token: ::prost::alloc::string::String,
5030}
5031#[allow(clippy::derive_partial_eq_without_eq)]
5032#[derive(Clone, PartialEq, ::prost::Message)]
5033pub struct CreateUserRequest {
5034 #[prost(string, tag = "1")]
5037 pub cluster_id: ::prost::alloc::string::String,
5038 #[prost(message, optional, tag = "2")]
5040 pub user_spec: ::core::option::Option<UserSpec>,
5041}
5042#[allow(clippy::derive_partial_eq_without_eq)]
5043#[derive(Clone, PartialEq, ::prost::Message)]
5044pub struct CreateUserMetadata {
5045 #[prost(string, tag = "1")]
5047 pub cluster_id: ::prost::alloc::string::String,
5048 #[prost(string, tag = "2")]
5050 pub user_name: ::prost::alloc::string::String,
5051}
5052#[allow(clippy::derive_partial_eq_without_eq)]
5053#[derive(Clone, PartialEq, ::prost::Message)]
5054pub struct UpdateUserRequest {
5055 #[prost(string, tag = "1")]
5058 pub cluster_id: ::prost::alloc::string::String,
5059 #[prost(string, tag = "2")]
5062 pub user_name: ::prost::alloc::string::String,
5063 #[prost(message, optional, tag = "3")]
5065 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
5066 #[prost(string, tag = "4")]
5068 pub password: ::prost::alloc::string::String,
5069 #[prost(message, repeated, tag = "5")]
5071 pub permissions: ::prost::alloc::vec::Vec<Permission>,
5072 #[prost(int64, tag = "6")]
5080 pub conn_limit: i64,
5081 #[prost(message, optional, tag = "7")]
5082 pub settings: ::core::option::Option<UserSettings>,
5083 #[prost(message, optional, tag = "8")]
5087 pub login: ::core::option::Option<bool>,
5088 #[prost(string, repeated, tag = "9")]
5092 pub grants: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
5093 #[prost(message, optional, tag = "10")]
5097 pub deletion_protection: ::core::option::Option<bool>,
5098 #[prost(enumeration = "UserPasswordEncryption", tag = "11")]
5101 pub user_password_encryption: i32,
5102 #[prost(message, optional, tag = "12")]
5104 pub generate_password: ::core::option::Option<bool>,
5105}
5106#[allow(clippy::derive_partial_eq_without_eq)]
5107#[derive(Clone, PartialEq, ::prost::Message)]
5108pub struct UpdateUserMetadata {
5109 #[prost(string, tag = "1")]
5111 pub cluster_id: ::prost::alloc::string::String,
5112 #[prost(string, tag = "2")]
5114 pub user_name: ::prost::alloc::string::String,
5115}
5116#[allow(clippy::derive_partial_eq_without_eq)]
5117#[derive(Clone, PartialEq, ::prost::Message)]
5118pub struct DeleteUserRequest {
5119 #[prost(string, tag = "1")]
5122 pub cluster_id: ::prost::alloc::string::String,
5123 #[prost(string, tag = "2")]
5126 pub user_name: ::prost::alloc::string::String,
5127}
5128#[allow(clippy::derive_partial_eq_without_eq)]
5129#[derive(Clone, PartialEq, ::prost::Message)]
5130pub struct DeleteUserMetadata {
5131 #[prost(string, tag = "1")]
5133 pub cluster_id: ::prost::alloc::string::String,
5134 #[prost(string, tag = "2")]
5136 pub user_name: ::prost::alloc::string::String,
5137}
5138#[allow(clippy::derive_partial_eq_without_eq)]
5139#[derive(Clone, PartialEq, ::prost::Message)]
5140pub struct GrantUserPermissionRequest {
5141 #[prost(string, tag = "1")]
5144 pub cluster_id: ::prost::alloc::string::String,
5145 #[prost(string, tag = "2")]
5148 pub user_name: ::prost::alloc::string::String,
5149 #[prost(message, optional, tag = "3")]
5151 pub permission: ::core::option::Option<Permission>,
5152}
5153#[allow(clippy::derive_partial_eq_without_eq)]
5154#[derive(Clone, PartialEq, ::prost::Message)]
5155pub struct GrantUserPermissionMetadata {
5156 #[prost(string, tag = "1")]
5159 pub cluster_id: ::prost::alloc::string::String,
5160 #[prost(string, tag = "2")]
5162 pub user_name: ::prost::alloc::string::String,
5163}
5164#[allow(clippy::derive_partial_eq_without_eq)]
5165#[derive(Clone, PartialEq, ::prost::Message)]
5166pub struct RevokeUserPermissionRequest {
5167 #[prost(string, tag = "1")]
5170 pub cluster_id: ::prost::alloc::string::String,
5171 #[prost(string, tag = "2")]
5174 pub user_name: ::prost::alloc::string::String,
5175 #[prost(string, tag = "3")]
5177 pub database_name: ::prost::alloc::string::String,
5178}
5179#[allow(clippy::derive_partial_eq_without_eq)]
5180#[derive(Clone, PartialEq, ::prost::Message)]
5181pub struct RevokeUserPermissionMetadata {
5182 #[prost(string, tag = "1")]
5184 pub cluster_id: ::prost::alloc::string::String,
5185 #[prost(string, tag = "2")]
5187 pub user_name: ::prost::alloc::string::String,
5188}
5189pub mod user_service_client {
5191 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
5192 use tonic::codegen::*;
5193 use tonic::codegen::http::Uri;
5194 #[derive(Debug, Clone)]
5196 pub struct UserServiceClient<T> {
5197 inner: tonic::client::Grpc<T>,
5198 }
5199 impl UserServiceClient<tonic::transport::Channel> {
5200 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
5202 where
5203 D: TryInto<tonic::transport::Endpoint>,
5204 D::Error: Into<StdError>,
5205 {
5206 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
5207 Ok(Self::new(conn))
5208 }
5209 }
5210 impl<T> UserServiceClient<T>
5211 where
5212 T: tonic::client::GrpcService<tonic::body::BoxBody>,
5213 T::Error: Into<StdError>,
5214 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
5215 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
5216 {
5217 pub fn new(inner: T) -> Self {
5218 let inner = tonic::client::Grpc::new(inner);
5219 Self { inner }
5220 }
5221 pub fn with_origin(inner: T, origin: Uri) -> Self {
5222 let inner = tonic::client::Grpc::with_origin(inner, origin);
5223 Self { inner }
5224 }
5225 pub fn with_interceptor<F>(
5226 inner: T,
5227 interceptor: F,
5228 ) -> UserServiceClient<InterceptedService<T, F>>
5229 where
5230 F: tonic::service::Interceptor,
5231 T::ResponseBody: Default,
5232 T: tonic::codegen::Service<
5233 http::Request<tonic::body::BoxBody>,
5234 Response = http::Response<
5235 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
5236 >,
5237 >,
5238 <T as tonic::codegen::Service<
5239 http::Request<tonic::body::BoxBody>,
5240 >>::Error: Into<StdError> + Send + Sync,
5241 {
5242 UserServiceClient::new(InterceptedService::new(inner, interceptor))
5243 }
5244 #[must_use]
5249 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5250 self.inner = self.inner.send_compressed(encoding);
5251 self
5252 }
5253 #[must_use]
5255 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5256 self.inner = self.inner.accept_compressed(encoding);
5257 self
5258 }
5259 #[must_use]
5263 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
5264 self.inner = self.inner.max_decoding_message_size(limit);
5265 self
5266 }
5267 #[must_use]
5271 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
5272 self.inner = self.inner.max_encoding_message_size(limit);
5273 self
5274 }
5275 pub async fn get(
5279 &mut self,
5280 request: impl tonic::IntoRequest<super::GetUserRequest>,
5281 ) -> std::result::Result<tonic::Response<super::User>, tonic::Status> {
5282 self.inner
5283 .ready()
5284 .await
5285 .map_err(|e| {
5286 tonic::Status::new(
5287 tonic::Code::Unknown,
5288 format!("Service was not ready: {}", e.into()),
5289 )
5290 })?;
5291 let codec = tonic::codec::ProstCodec::default();
5292 let path = http::uri::PathAndQuery::from_static(
5293 "/yandex.cloud.mdb.postgresql.v1.UserService/Get",
5294 );
5295 let mut req = request.into_request();
5296 req.extensions_mut()
5297 .insert(
5298 GrpcMethod::new("yandex.cloud.mdb.postgresql.v1.UserService", "Get"),
5299 );
5300 self.inner.unary(req, path, codec).await
5301 }
5302 pub async fn list(
5304 &mut self,
5305 request: impl tonic::IntoRequest<super::ListUsersRequest>,
5306 ) -> std::result::Result<
5307 tonic::Response<super::ListUsersResponse>,
5308 tonic::Status,
5309 > {
5310 self.inner
5311 .ready()
5312 .await
5313 .map_err(|e| {
5314 tonic::Status::new(
5315 tonic::Code::Unknown,
5316 format!("Service was not ready: {}", e.into()),
5317 )
5318 })?;
5319 let codec = tonic::codec::ProstCodec::default();
5320 let path = http::uri::PathAndQuery::from_static(
5321 "/yandex.cloud.mdb.postgresql.v1.UserService/List",
5322 );
5323 let mut req = request.into_request();
5324 req.extensions_mut()
5325 .insert(
5326 GrpcMethod::new("yandex.cloud.mdb.postgresql.v1.UserService", "List"),
5327 );
5328 self.inner.unary(req, path, codec).await
5329 }
5330 pub async fn create(
5332 &mut self,
5333 request: impl tonic::IntoRequest<super::CreateUserRequest>,
5334 ) -> std::result::Result<
5335 tonic::Response<super::super::super::super::operation::Operation>,
5336 tonic::Status,
5337 > {
5338 self.inner
5339 .ready()
5340 .await
5341 .map_err(|e| {
5342 tonic::Status::new(
5343 tonic::Code::Unknown,
5344 format!("Service was not ready: {}", e.into()),
5345 )
5346 })?;
5347 let codec = tonic::codec::ProstCodec::default();
5348 let path = http::uri::PathAndQuery::from_static(
5349 "/yandex.cloud.mdb.postgresql.v1.UserService/Create",
5350 );
5351 let mut req = request.into_request();
5352 req.extensions_mut()
5353 .insert(
5354 GrpcMethod::new(
5355 "yandex.cloud.mdb.postgresql.v1.UserService",
5356 "Create",
5357 ),
5358 );
5359 self.inner.unary(req, path, codec).await
5360 }
5361 pub async fn update(
5363 &mut self,
5364 request: impl tonic::IntoRequest<super::UpdateUserRequest>,
5365 ) -> std::result::Result<
5366 tonic::Response<super::super::super::super::operation::Operation>,
5367 tonic::Status,
5368 > {
5369 self.inner
5370 .ready()
5371 .await
5372 .map_err(|e| {
5373 tonic::Status::new(
5374 tonic::Code::Unknown,
5375 format!("Service was not ready: {}", e.into()),
5376 )
5377 })?;
5378 let codec = tonic::codec::ProstCodec::default();
5379 let path = http::uri::PathAndQuery::from_static(
5380 "/yandex.cloud.mdb.postgresql.v1.UserService/Update",
5381 );
5382 let mut req = request.into_request();
5383 req.extensions_mut()
5384 .insert(
5385 GrpcMethod::new(
5386 "yandex.cloud.mdb.postgresql.v1.UserService",
5387 "Update",
5388 ),
5389 );
5390 self.inner.unary(req, path, codec).await
5391 }
5392 pub async fn delete(
5394 &mut self,
5395 request: impl tonic::IntoRequest<super::DeleteUserRequest>,
5396 ) -> std::result::Result<
5397 tonic::Response<super::super::super::super::operation::Operation>,
5398 tonic::Status,
5399 > {
5400 self.inner
5401 .ready()
5402 .await
5403 .map_err(|e| {
5404 tonic::Status::new(
5405 tonic::Code::Unknown,
5406 format!("Service was not ready: {}", e.into()),
5407 )
5408 })?;
5409 let codec = tonic::codec::ProstCodec::default();
5410 let path = http::uri::PathAndQuery::from_static(
5411 "/yandex.cloud.mdb.postgresql.v1.UserService/Delete",
5412 );
5413 let mut req = request.into_request();
5414 req.extensions_mut()
5415 .insert(
5416 GrpcMethod::new(
5417 "yandex.cloud.mdb.postgresql.v1.UserService",
5418 "Delete",
5419 ),
5420 );
5421 self.inner.unary(req, path, codec).await
5422 }
5423 pub async fn grant_permission(
5425 &mut self,
5426 request: impl tonic::IntoRequest<super::GrantUserPermissionRequest>,
5427 ) -> std::result::Result<
5428 tonic::Response<super::super::super::super::operation::Operation>,
5429 tonic::Status,
5430 > {
5431 self.inner
5432 .ready()
5433 .await
5434 .map_err(|e| {
5435 tonic::Status::new(
5436 tonic::Code::Unknown,
5437 format!("Service was not ready: {}", e.into()),
5438 )
5439 })?;
5440 let codec = tonic::codec::ProstCodec::default();
5441 let path = http::uri::PathAndQuery::from_static(
5442 "/yandex.cloud.mdb.postgresql.v1.UserService/GrantPermission",
5443 );
5444 let mut req = request.into_request();
5445 req.extensions_mut()
5446 .insert(
5447 GrpcMethod::new(
5448 "yandex.cloud.mdb.postgresql.v1.UserService",
5449 "GrantPermission",
5450 ),
5451 );
5452 self.inner.unary(req, path, codec).await
5453 }
5454 pub async fn revoke_permission(
5456 &mut self,
5457 request: impl tonic::IntoRequest<super::RevokeUserPermissionRequest>,
5458 ) -> std::result::Result<
5459 tonic::Response<super::super::super::super::operation::Operation>,
5460 tonic::Status,
5461 > {
5462 self.inner
5463 .ready()
5464 .await
5465 .map_err(|e| {
5466 tonic::Status::new(
5467 tonic::Code::Unknown,
5468 format!("Service was not ready: {}", e.into()),
5469 )
5470 })?;
5471 let codec = tonic::codec::ProstCodec::default();
5472 let path = http::uri::PathAndQuery::from_static(
5473 "/yandex.cloud.mdb.postgresql.v1.UserService/RevokePermission",
5474 );
5475 let mut req = request.into_request();
5476 req.extensions_mut()
5477 .insert(
5478 GrpcMethod::new(
5479 "yandex.cloud.mdb.postgresql.v1.UserService",
5480 "RevokePermission",
5481 ),
5482 );
5483 self.inner.unary(req, path, codec).await
5484 }
5485 }
5486}