#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Backup {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "4")]
pub source_cluster_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub started_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, repeated, tag = "6")]
pub source_shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, tag = "7")]
pub size: i64,
#[prost(enumeration = "backup::BackupType", tag = "8")]
pub r#type: i32,
}
pub mod backup {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum BackupType {
Unspecified = 0,
Automated = 1,
Manual = 2,
}
impl BackupType {
pub fn as_str_name(&self) -> &'static str {
match self {
BackupType::Unspecified => "BACKUP_TYPE_UNSPECIFIED",
BackupType::Automated => "AUTOMATED",
BackupType::Manual => "MANUAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BACKUP_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"AUTOMATED" => Some(Self::Automated),
"MANUAL" => Some(Self::Manual),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourcePreset {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub zone_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, tag = "3")]
pub cores: i64,
#[prost(int64, tag = "4")]
pub memory: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResourcePresetRequest {
#[prost(string, tag = "1")]
pub resource_preset_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResourcePresetsRequest {
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResourcePresetsResponse {
#[prost(message, repeated, tag = "1")]
pub resource_presets: ::prost::alloc::vec::Vec<ResourcePreset>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
pub mod resource_preset_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct ResourcePresetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ResourcePresetServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ResourcePresetServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ResourcePresetServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
ResourcePresetServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetResourcePresetRequest>,
) -> std::result::Result<tonic::Response<super::ResourcePreset>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ResourcePresetService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ResourcePresetService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListResourcePresetsRequest>,
) -> std::result::Result<
tonic::Response<super::ListResourcePresetsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ResourcePresetService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ResourcePresetService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub permissions: ::prost::alloc::vec::Vec<Permission>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Permission {
#[prost(string, tag = "1")]
pub database_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserSpec {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub password: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub permissions: ::prost::alloc::vec::Vec<Permission>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackupRequest {
#[prost(string, tag = "1")]
pub backup_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsResponse {
#[prost(message, repeated, tag = "1")]
pub backups: ::prost::alloc::vec::Vec<Backup>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBackupRequest {
#[prost(string, tag = "1")]
pub backup_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBackupMetadata {
#[prost(string, tag = "1")]
pub backup_id: ::prost::alloc::string::String,
}
pub mod backup_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct BackupServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl BackupServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> BackupServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> BackupServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
BackupServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetBackupRequest>,
) -> std::result::Result<tonic::Response<super::Backup>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.BackupService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.BackupService", "Get"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListBackupsRequest>,
) -> std::result::Result<
tonic::Response<super::ListBackupsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.BackupService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.BackupService", "List"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteBackupRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.BackupService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.BackupService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUsersRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUsersResponse {
#[prost(message, repeated, tag = "1")]
pub users: ::prost::alloc::vec::Vec<User>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateUserRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub user_spec: ::core::option::Option<UserSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateUserMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateUserRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "4")]
pub password: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub permissions: ::prost::alloc::vec::Vec<Permission>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateUserMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteUserRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteUserMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GrantUserPermissionRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub permission: ::core::option::Option<Permission>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GrantUserPermissionMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokeUserPermissionRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokeUserPermissionMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
pub mod user_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct UserServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl UserServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> UserServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> UserServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
UserServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetUserRequest>,
) -> std::result::Result<tonic::Response<super::User>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.UserService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.UserService", "Get"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListUsersRequest>,
) -> std::result::Result<
tonic::Response<super::ListUsersResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.UserService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.UserService", "List"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateUserRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.UserService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.UserService", "Create"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateUserRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.UserService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.UserService", "Update"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteUserRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.UserService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.UserService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
pub async fn grant_permission(
&mut self,
request: impl tonic::IntoRequest<super::GrantUserPermissionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.UserService/GrantPermission",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.UserService",
"GrantPermission",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn revoke_permission(
&mut self,
request: impl tonic::IntoRequest<super::RevokeUserPermissionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.UserService/RevokePermission",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.UserService",
"RevokePermission",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceWindow {
#[prost(oneof = "maintenance_window::Policy", tags = "1, 2")]
pub policy: ::core::option::Option<maintenance_window::Policy>,
}
pub mod maintenance_window {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Policy {
#[prost(message, tag = "1")]
Anytime(super::AnytimeMaintenanceWindow),
#[prost(message, tag = "2")]
WeeklyMaintenanceWindow(super::WeeklyMaintenanceWindow),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnytimeMaintenanceWindow {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WeeklyMaintenanceWindow {
#[prost(enumeration = "weekly_maintenance_window::WeekDay", tag = "1")]
pub day: i32,
#[prost(int64, tag = "2")]
pub hour: i64,
}
pub mod weekly_maintenance_window {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum WeekDay {
Unspecified = 0,
Mon = 1,
Tue = 2,
Wed = 3,
Thu = 4,
Fri = 5,
Sat = 6,
Sun = 7,
}
impl WeekDay {
pub fn as_str_name(&self) -> &'static str {
match self {
WeekDay::Unspecified => "WEEK_DAY_UNSPECIFIED",
WeekDay::Mon => "MON",
WeekDay::Tue => "TUE",
WeekDay::Wed => "WED",
WeekDay::Thu => "THU",
WeekDay::Fri => "FRI",
WeekDay::Sat => "SAT",
WeekDay::Sun => "SUN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"WEEK_DAY_UNSPECIFIED" => Some(Self::Unspecified),
"MON" => Some(Self::Mon),
"TUE" => Some(Self::Tue),
"WED" => Some(Self::Wed),
"THU" => Some(Self::Thu),
"FRI" => Some(Self::Fri),
"SAT" => Some(Self::Sat),
"SUN" => Some(Self::Sun),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceOperation {
#[prost(string, tag = "1")]
pub info: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cluster {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "6")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(enumeration = "cluster::Environment", tag = "7")]
pub environment: i32,
#[prost(message, repeated, tag = "8")]
pub monitoring: ::prost::alloc::vec::Vec<Monitoring>,
#[prost(message, optional, tag = "9")]
pub config: ::core::option::Option<ClusterConfig>,
#[prost(string, tag = "10")]
pub network_id: ::prost::alloc::string::String,
#[prost(enumeration = "cluster::Health", tag = "11")]
pub health: i32,
#[prost(enumeration = "cluster::Status", tag = "12")]
pub status: i32,
#[prost(bool, tag = "13")]
pub sharded: bool,
#[prost(message, optional, tag = "14")]
pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
#[prost(message, optional, tag = "15")]
pub planned_operation: ::core::option::Option<MaintenanceOperation>,
#[prost(string, repeated, tag = "16")]
pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "17")]
pub deletion_protection: bool,
}
pub mod cluster {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Environment {
Unspecified = 0,
Production = 1,
Prestable = 2,
}
impl Environment {
pub fn as_str_name(&self) -> &'static str {
match self {
Environment::Unspecified => "ENVIRONMENT_UNSPECIFIED",
Environment::Production => "PRODUCTION",
Environment::Prestable => "PRESTABLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENVIRONMENT_UNSPECIFIED" => Some(Self::Unspecified),
"PRODUCTION" => Some(Self::Production),
"PRESTABLE" => Some(Self::Prestable),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Health {
Unknown = 0,
Alive = 1,
Dead = 2,
Degraded = 3,
}
impl Health {
pub fn as_str_name(&self) -> &'static str {
match self {
Health::Unknown => "HEALTH_UNKNOWN",
Health::Alive => "ALIVE",
Health::Dead => "DEAD",
Health::Degraded => "DEGRADED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HEALTH_UNKNOWN" => Some(Self::Unknown),
"ALIVE" => Some(Self::Alive),
"DEAD" => Some(Self::Dead),
"DEGRADED" => Some(Self::Degraded),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unknown = 0,
Creating = 1,
Running = 2,
Error = 3,
Updating = 4,
Stopping = 5,
Stopped = 6,
Starting = 7,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unknown => "STATUS_UNKNOWN",
Status::Creating => "CREATING",
Status::Running => "RUNNING",
Status::Error => "ERROR",
Status::Updating => "UPDATING",
Status::Stopping => "STOPPING",
Status::Stopped => "STOPPED",
Status::Starting => "STARTING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNKNOWN" => Some(Self::Unknown),
"CREATING" => Some(Self::Creating),
"RUNNING" => Some(Self::Running),
"ERROR" => Some(Self::Error),
"UPDATING" => Some(Self::Updating),
"STOPPING" => Some(Self::Stopping),
"STOPPED" => Some(Self::Stopped),
"STARTING" => Some(Self::Starting),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Monitoring {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub link: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterConfig {
#[prost(string, tag = "1")]
pub version: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub feature_compatibility_version: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub backup_window_start: ::core::option::Option<
super::super::super::super::super::google::r#type::TimeOfDay,
>,
#[prost(message, optional, tag = "9")]
pub backup_retain_period_days: ::core::option::Option<i64>,
#[prost(message, optional, tag = "13")]
pub performance_diagnostics: ::core::option::Option<PerformanceDiagnosticsConfig>,
#[prost(message, optional, tag = "6")]
pub access: ::core::option::Option<Access>,
#[prost(oneof = "cluster_config::Mongodb", tags = "2, 4, 7, 8, 10, 14, 11, 12, 15")]
pub mongodb: ::core::option::Option<cluster_config::Mongodb>,
}
pub mod cluster_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Mongodb {
#[prost(message, tag = "2")]
Mongodb36(super::Mongodb36),
#[prost(message, tag = "4")]
Mongodb40(super::Mongodb40),
#[prost(message, tag = "7")]
Mongodb42(super::Mongodb42),
#[prost(message, tag = "8")]
Mongodb44(super::Mongodb44),
#[prost(message, tag = "10")]
Mongodb50(super::Mongodb50),
#[prost(message, tag = "14")]
Mongodb60(super::Mongodb60),
#[prost(message, tag = "11")]
Mongodb44Enterprise(super::Mongodb44Enterprise),
#[prost(message, tag = "12")]
Mongodb50Enterprise(super::Mongodb50Enterprise),
#[prost(message, tag = "15")]
Mongodb60Enterprise(super::Mongodb60Enterprise),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongodb36 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb3_6::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb3_6::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb3_6::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb3_6::MongoInfra>,
}
pub mod mongodb3_6 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfigSet36>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfigSet36>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfigSet36>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfigSet36>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfigSet36>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongodb40 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb4_0::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb4_0::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb4_0::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb4_0::MongoInfra>,
}
pub mod mongodb4_0 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfigSet40>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfigSet40>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfigSet40>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfigSet40>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfigSet40>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongodb42 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb4_2::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb4_2::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb4_2::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb4_2::MongoInfra>,
}
pub mod mongodb4_2 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfigSet42>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfigSet42>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfigSet42>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfigSet42>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfigSet42>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongodb44 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb4_4::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb4_4::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb4_4::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb4_4::MongoInfra>,
}
pub mod mongodb4_4 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfigSet44>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfigSet44>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfigSet44>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfigSet44>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfigSet44>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongodb44Enterprise {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb4_4_enterprise::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb4_4_enterprise::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb4_4_enterprise::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb4_4_enterprise::MongoInfra>,
}
pub mod mongodb4_4_enterprise {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfigSet44Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfigSet44Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfigSet44Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<
super::config::MongosConfigSet44Enterprise,
>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<
super::config::MongoCfgConfigSet44Enterprise,
>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongodb50 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb5_0::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb5_0::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb5_0::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb5_0::MongoInfra>,
}
pub mod mongodb5_0 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfigSet50>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfigSet50>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfigSet50>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfigSet50>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfigSet50>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongodb50Enterprise {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb5_0_enterprise::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb5_0_enterprise::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb5_0_enterprise::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb5_0_enterprise::MongoInfra>,
}
pub mod mongodb5_0_enterprise {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfigSet50Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfigSet50Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfigSet50Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<
super::config::MongosConfigSet50Enterprise,
>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<
super::config::MongoCfgConfigSet50Enterprise,
>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongodb60 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb6_0::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb6_0::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb6_0::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb6_0::MongoInfra>,
}
pub mod mongodb6_0 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfigSet60>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfigSet60>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfigSet60>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfigSet60>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfigSet60>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongodb60Enterprise {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb6_0_enterprise::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb6_0_enterprise::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb6_0_enterprise::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb6_0_enterprise::MongoInfra>,
}
pub mod mongodb6_0_enterprise {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfigSet60Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfigSet60Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfigSet60Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<
super::config::MongosConfigSet60Enterprise,
>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<
super::config::MongoCfgConfigSet60Enterprise,
>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Shard {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Host {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub zone_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub resources: ::core::option::Option<Resources>,
#[prost(enumeration = "host::Role", tag = "5")]
pub role: i32,
#[prost(enumeration = "host::Health", tag = "6")]
pub health: i32,
#[prost(message, repeated, tag = "7")]
pub services: ::prost::alloc::vec::Vec<Service>,
#[prost(string, tag = "8")]
pub subnet_id: ::prost::alloc::string::String,
#[prost(bool, tag = "9")]
pub assign_public_ip: bool,
#[prost(string, tag = "10")]
pub shard_name: ::prost::alloc::string::String,
#[prost(enumeration = "host::Type", tag = "11")]
pub r#type: i32,
}
pub mod host {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Mongod = 1,
Mongos = 2,
Mongocfg = 3,
Mongoinfra = 4,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Mongod => "MONGOD",
Type::Mongos => "MONGOS",
Type::Mongocfg => "MONGOCFG",
Type::Mongoinfra => "MONGOINFRA",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"MONGOD" => Some(Self::Mongod),
"MONGOS" => Some(Self::Mongos),
"MONGOCFG" => Some(Self::Mongocfg),
"MONGOINFRA" => Some(Self::Mongoinfra),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Role {
Unknown = 0,
Primary = 1,
Secondary = 2,
}
impl Role {
pub fn as_str_name(&self) -> &'static str {
match self {
Role::Unknown => "ROLE_UNKNOWN",
Role::Primary => "PRIMARY",
Role::Secondary => "SECONDARY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ROLE_UNKNOWN" => Some(Self::Unknown),
"PRIMARY" => Some(Self::Primary),
"SECONDARY" => Some(Self::Secondary),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Health {
Unknown = 0,
Alive = 1,
Dead = 2,
Degraded = 3,
}
impl Health {
pub fn as_str_name(&self) -> &'static str {
match self {
Health::Unknown => "HEALTH_UNKNOWN",
Health::Alive => "ALIVE",
Health::Dead => "DEAD",
Health::Degraded => "DEGRADED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HEALTH_UNKNOWN" => Some(Self::Unknown),
"ALIVE" => Some(Self::Alive),
"DEAD" => Some(Self::Dead),
"DEGRADED" => Some(Self::Degraded),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Service {
#[prost(enumeration = "service::Type", tag = "1")]
pub r#type: i32,
#[prost(enumeration = "service::Health", tag = "2")]
pub health: i32,
}
pub mod service {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Mongod = 1,
Mongos = 2,
Mongocfg = 3,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Mongod => "MONGOD",
Type::Mongos => "MONGOS",
Type::Mongocfg => "MONGOCFG",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"MONGOD" => Some(Self::Mongod),
"MONGOS" => Some(Self::Mongos),
"MONGOCFG" => Some(Self::Mongocfg),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Health {
Unknown = 0,
Alive = 1,
Dead = 2,
}
impl Health {
pub fn as_str_name(&self) -> &'static str {
match self {
Health::Unknown => "HEALTH_UNKNOWN",
Health::Alive => "ALIVE",
Health::Dead => "DEAD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HEALTH_UNKNOWN" => Some(Self::Unknown),
"ALIVE" => Some(Self::Alive),
"DEAD" => Some(Self::Dead),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resources {
#[prost(string, tag = "1")]
pub resource_preset_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub disk_size: i64,
#[prost(string, tag = "3")]
pub disk_type_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Access {
#[prost(bool, tag = "1")]
pub data_lens: bool,
#[prost(bool, tag = "3")]
pub data_transfer: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformanceDiagnosticsConfig {
#[prost(bool, tag = "1")]
pub profiling_enabled: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Database {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseSpec {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatabaseRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesResponse {
#[prost(message, repeated, tag = "1")]
pub databases: ::prost::alloc::vec::Vec<Database>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub database_spec: ::core::option::Option<DatabaseSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDatabaseRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDatabaseMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub database_name: ::prost::alloc::string::String,
}
pub mod database_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct DatabaseServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DatabaseServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> DatabaseServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DatabaseServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
DatabaseServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetDatabaseRequest>,
) -> std::result::Result<tonic::Response<super::Database>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.DatabaseService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.DatabaseService", "Get"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListDatabasesRequest>,
) -> std::result::Result<
tonic::Response<super::ListDatabasesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.DatabaseService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.DatabaseService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.DatabaseService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.DatabaseService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.DatabaseService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.DatabaseService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersResponse {
#[prost(message, repeated, tag = "1")]
pub clusters: ::prost::alloc::vec::Vec<Cluster>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(enumeration = "cluster::Environment", tag = "5")]
pub environment: i32,
#[prost(message, optional, tag = "6")]
pub config_spec: ::core::option::Option<ConfigSpec>,
#[prost(message, repeated, tag = "7")]
pub database_specs: ::prost::alloc::vec::Vec<DatabaseSpec>,
#[prost(message, repeated, tag = "8")]
pub user_specs: ::prost::alloc::vec::Vec<UserSpec>,
#[prost(message, repeated, tag = "9")]
pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
#[prost(string, tag = "10")]
pub network_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "11")]
pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "12")]
pub deletion_protection: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "5")]
pub config_spec: ::core::option::Option<ConfigSpec>,
#[prost(string, tag = "6")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
#[prost(string, repeated, tag = "8")]
pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "9")]
pub deletion_protection: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartClusterRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartClusterMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopClusterRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopClusterMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveClusterRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub destination_folder_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveClusterMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub source_folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub destination_folder_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupClusterRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupClusterMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreClusterRequest {
#[prost(string, tag = "1")]
pub backup_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(enumeration = "cluster::Environment", tag = "5")]
pub environment: i32,
#[prost(message, optional, tag = "6")]
pub config_spec: ::core::option::Option<ConfigSpec>,
#[prost(message, repeated, tag = "7")]
pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
#[prost(string, tag = "8")]
pub network_id: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub folder_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "10")]
pub recovery_target_spec: ::core::option::Option<
restore_cluster_request::RecoveryTargetSpec,
>,
#[prost(string, repeated, tag = "11")]
pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "12")]
pub deletion_protection: bool,
}
pub mod restore_cluster_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecoveryTargetSpec {
#[prost(int64, tag = "1")]
pub timestamp: i64,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreClusterMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub backup_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RescheduleMaintenanceRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(enumeration = "reschedule_maintenance_request::RescheduleType", tag = "2")]
pub reschedule_type: i32,
#[prost(message, optional, tag = "3")]
pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
}
pub mod reschedule_maintenance_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RescheduleType {
Unspecified = 0,
Immediate = 1,
NextAvailableWindow = 2,
SpecificTime = 3,
}
impl RescheduleType {
pub fn as_str_name(&self) -> &'static str {
match self {
RescheduleType::Unspecified => "RESCHEDULE_TYPE_UNSPECIFIED",
RescheduleType::Immediate => "IMMEDIATE",
RescheduleType::NextAvailableWindow => "NEXT_AVAILABLE_WINDOW",
RescheduleType::SpecificTime => "SPECIFIC_TIME",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESCHEDULE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"IMMEDIATE" => Some(Self::Immediate),
"NEXT_AVAILABLE_WINDOW" => Some(Self::NextAvailableWindow),
"SPECIFIC_TIME" => Some(Self::SpecificTime),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RescheduleMaintenanceMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogRecord {
#[prost(message, optional, tag = "1")]
pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(map = "string, string", tag = "2")]
pub message: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterLogsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub column_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "list_cluster_logs_request::ServiceType", tag = "3")]
pub service_type: i32,
#[prost(message, optional, tag = "4")]
pub from_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub to_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(int64, tag = "6")]
pub page_size: i64,
#[prost(string, tag = "7")]
pub page_token: ::prost::alloc::string::String,
}
pub mod list_cluster_logs_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ServiceType {
Unspecified = 0,
Mongod = 1,
Mongos = 2,
Mongocfg = 3,
Audit = 4,
}
impl ServiceType {
pub fn as_str_name(&self) -> &'static str {
match self {
ServiceType::Unspecified => "SERVICE_TYPE_UNSPECIFIED",
ServiceType::Mongod => "MONGOD",
ServiceType::Mongos => "MONGOS",
ServiceType::Mongocfg => "MONGOCFG",
ServiceType::Audit => "AUDIT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SERVICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"MONGOD" => Some(Self::Mongod),
"MONGOS" => Some(Self::Mongos),
"MONGOCFG" => Some(Self::Mongocfg),
"AUDIT" => Some(Self::Audit),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterLogsResponse {
#[prost(message, repeated, tag = "1")]
pub logs: ::prost::alloc::vec::Vec<LogRecord>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamLogRecord {
#[prost(message, optional, tag = "1")]
pub record: ::core::option::Option<LogRecord>,
#[prost(string, tag = "2")]
pub next_record_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamClusterLogsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub column_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "stream_cluster_logs_request::ServiceType", tag = "3")]
pub service_type: i32,
#[prost(message, optional, tag = "4")]
pub from_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub to_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "6")]
pub record_token: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub filter: ::prost::alloc::string::String,
}
pub mod stream_cluster_logs_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ServiceType {
Unspecified = 0,
Mongod = 1,
Mongos = 2,
Mongocfg = 3,
Audit = 4,
}
impl ServiceType {
pub fn as_str_name(&self) -> &'static str {
match self {
ServiceType::Unspecified => "SERVICE_TYPE_UNSPECIFIED",
ServiceType::Mongod => "MONGOD",
ServiceType::Mongos => "MONGOS",
ServiceType::Mongocfg => "MONGOCFG",
ServiceType::Audit => "AUDIT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SERVICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"MONGOD" => Some(Self::Mongod),
"MONGOS" => Some(Self::Mongos),
"MONGOCFG" => Some(Self::Mongocfg),
"AUDIT" => Some(Self::Audit),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterOperationsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterOperationsResponse {
#[prost(message, repeated, tag = "1")]
pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterBackupsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterBackupsResponse {
#[prost(message, repeated, tag = "1")]
pub backups: ::prost::alloc::vec::Vec<Backup>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterHostsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterHostsResponse {
#[prost(message, repeated, tag = "1")]
pub hosts: ::prost::alloc::vec::Vec<Host>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterHostsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterHostsMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterHostsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterHostsMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnableClusterShardingRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<enable_cluster_sharding_request::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<enable_cluster_sharding_request::Mongos>,
#[prost(message, repeated, tag = "4")]
pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
#[prost(message, optional, tag = "5")]
pub mongoinfra: ::core::option::Option<enable_cluster_sharding_request::MongoInfra>,
}
pub mod enable_cluster_sharding_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnableClusterShardingMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterShardRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterShardsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterShardsResponse {
#[prost(message, repeated, tag = "1")]
pub shards: ::prost::alloc::vec::Vec<Shard>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterShardRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterShardMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetupHostsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetupHostsMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestartHostsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestartHostsMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StepdownHostsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StepdownHostsMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HostSpec {
#[prost(string, tag = "1")]
pub zone_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subnet_id: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub assign_public_ip: bool,
#[prost(enumeration = "host::Type", tag = "4")]
pub r#type: i32,
#[prost(string, tag = "5")]
pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongodbSpec36 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb_spec3_6::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb_spec3_6::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb_spec3_6::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb_spec3_6::MongoInfra>,
}
pub mod mongodb_spec3_6 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfig36>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfig36>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfig36>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfig36>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfig36>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongodbSpec40 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb_spec4_0::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb_spec4_0::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb_spec4_0::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb_spec4_0::MongoInfra>,
}
pub mod mongodb_spec4_0 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfig40>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfig40>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfig40>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfig40>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfig40>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongodbSpec42 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb_spec4_2::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb_spec4_2::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb_spec4_2::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb_spec4_2::MongoInfra>,
}
pub mod mongodb_spec4_2 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfig42>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfig42>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfig42>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfig42>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfig42>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongodbSpec44 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb_spec4_4::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb_spec4_4::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb_spec4_4::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb_spec4_4::MongoInfra>,
}
pub mod mongodb_spec4_4 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfig44>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfig44>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfig44>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfig44>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfig44>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongodbSpec44Enterprise {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb_spec4_4_enterprise::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb_spec4_4_enterprise::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb_spec4_4_enterprise::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb_spec4_4_enterprise::MongoInfra>,
}
pub mod mongodb_spec4_4_enterprise {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfig44Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfig44Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfig44Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<
super::config::MongosConfig44Enterprise,
>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<
super::config::MongoCfgConfig44Enterprise,
>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongodbSpec50 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb_spec5_0::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb_spec5_0::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb_spec5_0::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb_spec5_0::MongoInfra>,
}
pub mod mongodb_spec5_0 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfig50>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfig50>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfig50>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfig50>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfig50>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongodbSpec50Enterprise {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb_spec5_0_enterprise::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb_spec5_0_enterprise::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb_spec5_0_enterprise::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb_spec5_0_enterprise::MongoInfra>,
}
pub mod mongodb_spec5_0_enterprise {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfig50Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfig50Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfig50Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<
super::config::MongosConfig50Enterprise,
>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<
super::config::MongoCfgConfig50Enterprise,
>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongodbSpec60 {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb_spec6_0::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb_spec6_0::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb_spec6_0::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb_spec6_0::MongoInfra>,
}
pub mod mongodb_spec6_0 {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfig60>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfig60>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfig60>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<super::config::MongosConfig60>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<super::config::MongoCfgConfig60>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongodbSpec60Enterprise {
#[prost(message, optional, tag = "1")]
pub mongod: ::core::option::Option<mongodb_spec6_0_enterprise::Mongod>,
#[prost(message, optional, tag = "2")]
pub mongocfg: ::core::option::Option<mongodb_spec6_0_enterprise::MongoCfg>,
#[prost(message, optional, tag = "3")]
pub mongos: ::core::option::Option<mongodb_spec6_0_enterprise::Mongos>,
#[prost(message, optional, tag = "4")]
pub mongoinfra: ::core::option::Option<mongodb_spec6_0_enterprise::MongoInfra>,
}
pub mod mongodb_spec6_0_enterprise {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongod {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongodConfig60Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoCfg {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongoCfgConfig60Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mongos {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::MongosConfig60Enterprise>,
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MongoInfra {
#[prost(message, optional, tag = "1")]
pub config_mongos: ::core::option::Option<
super::config::MongosConfig60Enterprise,
>,
#[prost(message, optional, tag = "2")]
pub config_mongocfg: ::core::option::Option<
super::config::MongoCfgConfig60Enterprise,
>,
#[prost(message, optional, tag = "3")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigSpec {
#[prost(string, tag = "1")]
pub version: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub feature_compatibility_version: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub backup_window_start: ::core::option::Option<
super::super::super::super::super::google::r#type::TimeOfDay,
>,
#[prost(message, optional, tag = "9")]
pub backup_retain_period_days: ::core::option::Option<i64>,
#[prost(message, optional, tag = "13")]
pub performance_diagnostics: ::core::option::Option<PerformanceDiagnosticsConfig>,
#[prost(message, optional, tag = "6")]
pub access: ::core::option::Option<Access>,
#[prost(oneof = "config_spec::MongodbSpec", tags = "2, 4, 7, 8, 10, 14, 11, 12, 15")]
pub mongodb_spec: ::core::option::Option<config_spec::MongodbSpec>,
}
pub mod config_spec {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum MongodbSpec {
#[prost(message, tag = "2")]
MongodbSpec36(super::MongodbSpec36),
#[prost(message, tag = "4")]
MongodbSpec40(super::MongodbSpec40),
#[prost(message, tag = "7")]
MongodbSpec42(super::MongodbSpec42),
#[prost(message, tag = "8")]
MongodbSpec44(super::MongodbSpec44),
#[prost(message, tag = "10")]
MongodbSpec50(super::MongodbSpec50),
#[prost(message, tag = "14")]
MongodbSpec60(super::MongodbSpec60),
#[prost(message, tag = "11")]
MongodbSpec44Enterprise(super::MongodbSpec44Enterprise),
#[prost(message, tag = "12")]
MongodbSpec50Enterprise(super::MongodbSpec50Enterprise),
#[prost(message, tag = "15")]
MongodbSpec60Enterprise(super::MongodbSpec60Enterprise),
}
}
pub mod cluster_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct ClusterServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ClusterServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ClusterServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ClusterServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
ClusterServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetClusterRequest>,
) -> std::result::Result<tonic::Response<super::Cluster>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.ClusterService", "Get"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListClustersRequest>,
) -> std::result::Result<
tonic::Response<super::ListClustersResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.ClusterService", "List"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn start(
&mut self,
request: impl tonic::IntoRequest<super::StartClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/Start",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"Start",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn stop(
&mut self,
request: impl tonic::IntoRequest<super::StopClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/Stop",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.ClusterService", "Stop"),
);
self.inner.unary(req, path, codec).await
}
pub async fn r#move(
&mut self,
request: impl tonic::IntoRequest<super::MoveClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/Move",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.mongodb.v1.ClusterService", "Move"),
);
self.inner.unary(req, path, codec).await
}
pub async fn backup(
&mut self,
request: impl tonic::IntoRequest<super::BackupClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/Backup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"Backup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn restore(
&mut self,
request: impl tonic::IntoRequest<super::RestoreClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/Restore",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"Restore",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn reschedule_maintenance(
&mut self,
request: impl tonic::IntoRequest<super::RescheduleMaintenanceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/RescheduleMaintenance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"RescheduleMaintenance",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_logs(
&mut self,
request: impl tonic::IntoRequest<super::ListClusterLogsRequest>,
) -> std::result::Result<
tonic::Response<super::ListClusterLogsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/ListLogs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"ListLogs",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn stream_logs(
&mut self,
request: impl tonic::IntoRequest<super::StreamClusterLogsRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::StreamLogRecord>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/StreamLogs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"StreamLogs",
),
);
self.inner.server_streaming(req, path, codec).await
}
pub async fn list_operations(
&mut self,
request: impl tonic::IntoRequest<super::ListClusterOperationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListClusterOperationsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/ListOperations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"ListOperations",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_backups(
&mut self,
request: impl tonic::IntoRequest<super::ListClusterBackupsRequest>,
) -> std::result::Result<
tonic::Response<super::ListClusterBackupsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/ListBackups",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"ListBackups",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_hosts(
&mut self,
request: impl tonic::IntoRequest<super::ListClusterHostsRequest>,
) -> std::result::Result<
tonic::Response<super::ListClusterHostsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/ListHosts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"ListHosts",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn add_hosts(
&mut self,
request: impl tonic::IntoRequest<super::AddClusterHostsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/AddHosts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"AddHosts",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_hosts(
&mut self,
request: impl tonic::IntoRequest<super::DeleteClusterHostsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/DeleteHosts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"DeleteHosts",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn enable_sharding(
&mut self,
request: impl tonic::IntoRequest<super::EnableClusterShardingRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/EnableSharding",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"EnableSharding",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_shard(
&mut self,
request: impl tonic::IntoRequest<super::GetClusterShardRequest>,
) -> std::result::Result<tonic::Response<super::Shard>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/GetShard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"GetShard",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_shards(
&mut self,
request: impl tonic::IntoRequest<super::ListClusterShardsRequest>,
) -> std::result::Result<
tonic::Response<super::ListClusterShardsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/ListShards",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"ListShards",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn add_shard(
&mut self,
request: impl tonic::IntoRequest<super::AddClusterShardRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/AddShard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"AddShard",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_shard(
&mut self,
request: impl tonic::IntoRequest<super::DeleteClusterShardRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/DeleteShard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"DeleteShard",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn resetup_hosts(
&mut self,
request: impl tonic::IntoRequest<super::ResetupHostsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/ResetupHosts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"ResetupHosts",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn restart_hosts(
&mut self,
request: impl tonic::IntoRequest<super::RestartHostsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/RestartHosts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"RestartHosts",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn stepdown_hosts(
&mut self,
request: impl tonic::IntoRequest<super::StepdownHostsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.mdb.mongodb.v1.ClusterService/StepdownHosts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.mongodb.v1.ClusterService",
"StepdownHosts",
),
);
self.inner.unary(req, path, codec).await
}
}
}