#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Community {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "5")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "6")]
pub created_by_id: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub organization_id: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub zone_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ResourceType {
Unspecified = 0,
Secret = 2,
DockerImage = 3,
Dataset = 4,
S3 = 5,
Node = 6,
Alias = 8,
}
impl ResourceType {
pub fn as_str_name(&self) -> &'static str {
match self {
ResourceType::Unspecified => "RESOURCE_TYPE_UNSPECIFIED",
ResourceType::Secret => "RESOURCE_TYPE_SECRET",
ResourceType::DockerImage => "RESOURCE_TYPE_DOCKER_IMAGE",
ResourceType::Dataset => "RESOURCE_TYPE_DATASET",
ResourceType::S3 => "RESOURCE_TYPE_S3",
ResourceType::Node => "RESOURCE_TYPE_NODE",
ResourceType::Alias => "RESOURCE_TYPE_ALIAS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESOURCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"RESOURCE_TYPE_SECRET" => Some(Self::Secret),
"RESOURCE_TYPE_DOCKER_IMAGE" => Some(Self::DockerImage),
"RESOURCE_TYPE_DATASET" => Some(Self::Dataset),
"RESOURCE_TYPE_S3" => Some(Self::S3),
"RESOURCE_TYPE_NODE" => Some(Self::Node),
"RESOURCE_TYPE_ALIAS" => Some(Self::Alias),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestrictionMeta {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "restriction_meta::RestrictionValueType", tag = "2")]
pub value_type: i32,
}
pub mod restriction_meta {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RestrictionValueType {
Unspecified = 0,
Boolean = 1,
Long = 2,
String = 3,
}
impl RestrictionValueType {
pub fn as_str_name(&self) -> &'static str {
match self {
RestrictionValueType::Unspecified => "RESTRICTION_VALUE_TYPE_UNSPECIFIED",
RestrictionValueType::Boolean => "BOOLEAN",
RestrictionValueType::Long => "LONG",
RestrictionValueType::String => "STRING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESTRICTION_VALUE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"BOOLEAN" => Some(Self::Boolean),
"LONG" => Some(Self::Long),
"STRING" => Some(Self::String),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Restriction {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bool, repeated, tag = "2")]
pub bool_value: ::prost::alloc::vec::Vec<bool>,
#[prost(int64, repeated, tag = "3")]
pub long_value: ::prost::alloc::vec::Vec<i64>,
#[prost(string, repeated, tag = "4")]
pub string_value: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRestrictionsMetaResponse {
#[prost(message, repeated, tag = "1")]
pub restrictions_meta: ::prost::alloc::vec::Vec<RestrictionMeta>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestrictionsResponse {
#[prost(message, repeated, tag = "1")]
pub restrictions: ::prost::alloc::vec::Vec<Restriction>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCommunityRequest {
#[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 organization_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub billing_account_id: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "5")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "6")]
pub zone_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCommunityMetadata {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCommunityRequest {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCommunityRequest {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "5")]
pub labels: ::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 UpdateCommunityMetadata {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCommunityRequest {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCommunityMetadata {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCommunitiesRequest {
#[prost(int64, tag = "1")]
pub page_size: i64,
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name_or_description_pattern: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub owned_by_id: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub list_public: bool,
#[prost(string, tag = "7")]
pub organization_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCommunitiesResponse {
#[prost(message, repeated, tag = "1")]
pub communities: ::prost::alloc::vec::Vec<Community>,
#[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 SetCommunityAccessBindingsMetadata {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCommunityAccessBindingsMetadata {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddCommunityResourceRequest {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
#[prost(enumeration = "ResourceType", tag = "2")]
pub resource_type: i32,
#[prost(string, tag = "3")]
pub resource_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveCommunityResourceRequest {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
#[prost(enumeration = "ResourceType", tag = "2")]
pub resource_type: i32,
#[prost(string, tag = "3")]
pub resource_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCommunityRestrictionsRequest {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetCommunityRestrictionsRequest {
#[prost(string, tag = "1")]
pub community_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub restrictions: ::prost::alloc::vec::Vec<Restriction>,
}
pub mod community_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 CommunityServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl CommunityServiceClient<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> CommunityServiceClient<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,
) -> CommunityServiceClient<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,
{
CommunityServiceClient::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 create(
&mut self,
request: impl tonic::IntoRequest<super::CreateCommunityRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.CommunityService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetCommunityRequest>,
) -> std::result::Result<tonic::Response<super::Community>, 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.datasphere.v2.CommunityService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.datasphere.v2.CommunityService", "Get"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCommunityRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.CommunityService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCommunityRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.CommunityService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListCommunitiesRequest>,
) -> std::result::Result<
tonic::Response<super::ListCommunitiesResponse>,
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.datasphere.v2.CommunityService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_access_bindings(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::access::ListAccessBindingsRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::access::ListAccessBindingsResponse>,
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.datasphere.v2.CommunityService/ListAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"ListAccessBindings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_access_bindings(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::access::SetAccessBindingsRequest,
>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.CommunityService/SetAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"SetAccessBindings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_access_bindings(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::access::UpdateAccessBindingsRequest,
>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.CommunityService/UpdateAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"UpdateAccessBindings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn add_resource(
&mut self,
request: impl tonic::IntoRequest<super::AddCommunityResourceRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.CommunityService/AddResource",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"AddResource",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn remove_resource(
&mut self,
request: impl tonic::IntoRequest<super::RemoveCommunityResourceRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.CommunityService/RemoveResource",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"RemoveResource",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_restrictions_meta(
&mut self,
request: impl tonic::IntoRequest<()>,
) -> std::result::Result<
tonic::Response<super::GetRestrictionsMetaResponse>,
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.datasphere.v2.CommunityService/GetRestrictionsMeta",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"GetRestrictionsMeta",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_restrictions(
&mut self,
request: impl tonic::IntoRequest<super::GetCommunityRestrictionsRequest>,
) -> std::result::Result<
tonic::Response<super::RestrictionsResponse>,
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.datasphere.v2.CommunityService/GetRestrictions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"GetRestrictions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_restrictions(
&mut self,
request: impl tonic::IntoRequest<super::SetCommunityRestrictionsRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.CommunityService/SetRestrictions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.CommunityService",
"SetRestrictions",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dataset {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub project_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(string, tag = "7")]
pub created_by_id: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub code: ::prost::alloc::string::String,
#[prost(int64, tag = "9")]
pub size_gb: i64,
#[prost(string, repeated, tag = "10")]
pub zone_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "11")]
pub mount_path: ::prost::alloc::string::String,
#[prost(string, tag = "12")]
pub data_capsule_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatasetStatus {
#[prost(oneof = "dataset_status::Status", tags = "1, 2, 3")]
pub status: ::core::option::Option<dataset_status::Status>,
}
pub mod dataset_status {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StatusActive {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StatusInactive {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StatusError {
#[prost(string, tag = "1")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Status {
#[prost(message, tag = "1")]
StatusActive(StatusActive),
#[prost(message, tag = "2")]
StatusInactive(StatusInactive),
#[prost(message, tag = "3")]
StatusError(StatusError),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivateDatasetRequest {
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeactivateDatasetRequest {
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub project_id: ::prost::alloc::string::String,
}
pub mod dataset_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 DatasetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DatasetServiceClient<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> DatasetServiceClient<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,
) -> DatasetServiceClient<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,
{
DatasetServiceClient::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 activate(
&mut self,
request: impl tonic::IntoRequest<super::ActivateDatasetRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.DatasetService/Activate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.DatasetService",
"Activate",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn deactivate(
&mut self,
request: impl tonic::IntoRequest<super::DeactivateDatasetRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.DatasetService/Deactivate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.DatasetService",
"Deactivate",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivateDockerImageRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub docker_id: ::prost::alloc::string::String,
}
pub mod docker_image_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 DockerImageServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DockerImageServiceClient<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> DockerImageServiceClient<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,
) -> DockerImageServiceClient<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,
{
DockerImageServiceClient::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 activate(
&mut self,
request: impl tonic::IntoRequest<super::ActivateDockerImageRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.DockerImageService/Activate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.DockerImageService",
"Activate",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Project {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "5")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "6")]
pub created_by_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub settings: ::core::option::Option<project::Settings>,
#[prost(message, optional, tag = "8")]
pub limits: ::core::option::Option<project::Limits>,
#[prost(string, tag = "11")]
pub community_id: ::prost::alloc::string::String,
}
pub mod project {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Settings {
#[prost(string, tag = "1")]
pub service_account_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subnet_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub data_proc_cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "5")]
pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "6")]
pub early_access: bool,
#[prost(enumeration = "settings::Ide", tag = "7")]
pub ide: i32,
#[prost(string, tag = "8")]
pub default_folder_id: ::prost::alloc::string::String,
#[prost(enumeration = "settings::StaleExecutionTimeoutMode", tag = "9")]
pub stale_exec_timeout_mode: i32,
#[prost(message, optional, tag = "11")]
pub vm_inactivity_timeout: ::core::option::Option<::prost_types::Duration>,
#[prost(string, tag = "12")]
pub default_dedicated_spec: ::prost::alloc::string::String,
}
pub mod settings {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Ide {
Unspecified = 0,
JupyterLab = 1,
}
impl Ide {
pub fn as_str_name(&self) -> &'static str {
match self {
Ide::Unspecified => "IDE_UNSPECIFIED",
Ide::JupyterLab => "JUPYTER_LAB",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"IDE_UNSPECIFIED" => Some(Self::Unspecified),
"JUPYTER_LAB" => Some(Self::JupyterLab),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum StaleExecutionTimeoutMode {
Unspecified = 0,
OneHour = 1,
ThreeHours = 2,
NoTimeout = 3,
}
impl StaleExecutionTimeoutMode {
pub fn as_str_name(&self) -> &'static str {
match self {
StaleExecutionTimeoutMode::Unspecified => {
"STALE_EXECUTION_TIMEOUT_MODE_UNSPECIFIED"
}
StaleExecutionTimeoutMode::OneHour => "ONE_HOUR",
StaleExecutionTimeoutMode::ThreeHours => "THREE_HOURS",
StaleExecutionTimeoutMode::NoTimeout => "NO_TIMEOUT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STALE_EXECUTION_TIMEOUT_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"ONE_HOUR" => Some(Self::OneHour),
"THREE_HOURS" => Some(Self::ThreeHours),
"NO_TIMEOUT" => Some(Self::NoTimeout),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Limits {
#[prost(message, optional, tag = "1")]
pub max_units_per_hour: ::core::option::Option<i64>,
#[prost(message, optional, tag = "2")]
pub max_units_per_execution: ::core::option::Option<i64>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateProjectRequest {
#[prost(string, tag = "1")]
pub community_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(message, optional, tag = "5")]
pub settings: ::core::option::Option<project::Settings>,
#[prost(message, optional, tag = "6")]
pub limits: ::core::option::Option<project::Limits>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateProjectMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateProjectRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "5")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "6")]
pub settings: ::core::option::Option<project::Settings>,
#[prost(message, optional, tag = "7")]
pub limits: ::core::option::Option<project::Limits>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateProjectMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteProjectRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteProjectMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpenProjectRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpenProjectMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(enumeration = "open_project_metadata::OpenProjectStatus", tag = "2")]
pub status: i32,
}
pub mod open_project_metadata {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum OpenProjectStatus {
Unspecified = 0,
ClosingIde = 1,
UnzippingProject = 2,
AllocatingVm = 3,
AllocatingResources = 4,
StartingIde = 5,
Unknown = 7,
}
impl OpenProjectStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
OpenProjectStatus::Unspecified => "OPEN_PROJECT_STATUS_UNSPECIFIED",
OpenProjectStatus::ClosingIde => "OPEN_PROJECT_STATUS_CLOSING_IDE",
OpenProjectStatus::UnzippingProject => {
"OPEN_PROJECT_STATUS_UNZIPPING_PROJECT"
}
OpenProjectStatus::AllocatingVm => "OPEN_PROJECT_STATUS_ALLOCATING_VM",
OpenProjectStatus::AllocatingResources => {
"OPEN_PROJECT_STATUS_ALLOCATING_RESOURCES"
}
OpenProjectStatus::StartingIde => "OPEN_PROJECT_STATUS_STARTING_IDE",
OpenProjectStatus::Unknown => "OPEN_PROJECT_STATUS_UNKNOWN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OPEN_PROJECT_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"OPEN_PROJECT_STATUS_CLOSING_IDE" => Some(Self::ClosingIde),
"OPEN_PROJECT_STATUS_UNZIPPING_PROJECT" => Some(Self::UnzippingProject),
"OPEN_PROJECT_STATUS_ALLOCATING_VM" => Some(Self::AllocatingVm),
"OPEN_PROJECT_STATUS_ALLOCATING_RESOURCES" => {
Some(Self::AllocatingResources)
}
"OPEN_PROJECT_STATUS_STARTING_IDE" => Some(Self::StartingIde),
"OPEN_PROJECT_STATUS_UNKNOWN" => Some(Self::Unknown),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpenProjectResponse {
#[prost(string, tag = "1")]
pub project_url: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub session_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetProjectRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProjectsRequest {
#[prost(string, tag = "1")]
pub community_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 project_name_pattern: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub owned_by_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProjectsResponse {
#[prost(message, repeated, tag = "1")]
pub projects: ::prost::alloc::vec::Vec<Project>,
#[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 GetUnitBalanceRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUnitBalanceResponse {
#[prost(message, optional, tag = "1")]
pub unit_balance: ::core::option::Option<i64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetUnitBalanceRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub unit_balance: ::core::option::Option<i64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetUnitBalanceMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProjectExecutionRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub input_variables: ::core::option::Option<::prost_types::Struct>,
#[prost(string, repeated, tag = "5")]
pub output_variable_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "6")]
pub spec: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub spark_connector_id: ::prost::alloc::string::String,
#[prost(oneof = "project_execution_request::Target", tags = "2, 3")]
pub target: ::core::option::Option<project_execution_request::Target>,
}
pub mod project_execution_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Target {
#[prost(string, tag = "2")]
NotebookId(::prost::alloc::string::String),
#[prost(string, tag = "3")]
CellId(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProjectExecutionMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(oneof = "project_execution_metadata::Target", tags = "2, 3")]
pub target: ::core::option::Option<project_execution_metadata::Target>,
}
pub mod project_execution_metadata {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Target {
#[prost(string, tag = "2")]
NotebookId(::prost::alloc::string::String),
#[prost(string, tag = "3")]
CellId(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProjectExecutionResponse {
#[prost(enumeration = "ExecutionStatus", tag = "3")]
pub execution_status: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetProjectAccessBindingsMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateProjectAccessBindingsMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddResourceToProjectRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(enumeration = "ResourceType", tag = "2")]
pub resource_type: i32,
#[prost(string, tag = "3")]
pub resource_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveResourceFromProjectRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(enumeration = "ResourceType", tag = "2")]
pub resource_type: i32,
#[prost(string, tag = "3")]
pub resource_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetProjectRestrictionsRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetProjectRestrictionsRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub restrictions: ::prost::alloc::vec::Vec<Restriction>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResizeProjectDiskRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub new_disk_size_gb: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResizeProjectDiskMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub old_disk_size_gb: i64,
#[prost(int64, tag = "3")]
pub new_disk_size_gb: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiskInfo {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub disk_size_gb: f64,
#[prost(double, tag = "3")]
pub disk_used_gb: f64,
#[prost(message, optional, tag = "4")]
pub detailed_usage: ::core::option::Option<disk_info::DetailedDiskInfo>,
}
pub mod disk_info {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DetailedDiskInfo {
#[prost(double, tag = "1")]
pub user_data_gb: f64,
#[prost(double, tag = "2")]
pub packages_gb: f64,
#[prost(double, tag = "3")]
pub system_data_gb: f64,
#[prost(double, tag = "4")]
pub free_space_gb: f64,
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExecutionStatus {
Unspecified = 0,
Ok = 1,
Error = 2,
Aborted = 3,
}
impl ExecutionStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
ExecutionStatus::Unspecified => "EXECUTION_STATUS_UNSPECIFIED",
ExecutionStatus::Ok => "OK",
ExecutionStatus::Error => "ERROR",
ExecutionStatus::Aborted => "ABORTED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EXECUTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"OK" => Some(Self::Ok),
"ERROR" => Some(Self::Error),
"ABORTED" => Some(Self::Aborted),
_ => None,
}
}
}
pub mod project_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 ProjectServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ProjectServiceClient<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> ProjectServiceClient<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,
) -> ProjectServiceClient<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,
{
ProjectServiceClient::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 create(
&mut self,
request: impl tonic::IntoRequest<super::CreateProjectRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateProjectRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteProjectRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn open(
&mut self,
request: impl tonic::IntoRequest<super::OpenProjectRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/Open",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.datasphere.v2.ProjectService", "Open"),
);
self.inner.unary(req, path, codec).await
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetProjectRequest>,
) -> std::result::Result<tonic::Response<super::Project>, 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.datasphere.v2.ProjectService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.datasphere.v2.ProjectService", "Get"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListProjectsRequest>,
) -> std::result::Result<
tonic::Response<super::ListProjectsResponse>,
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.datasphere.v2.ProjectService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.datasphere.v2.ProjectService", "List"),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_unit_balance(
&mut self,
request: impl tonic::IntoRequest<super::GetUnitBalanceRequest>,
) -> std::result::Result<
tonic::Response<super::GetUnitBalanceResponse>,
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.datasphere.v2.ProjectService/GetUnitBalance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"GetUnitBalance",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_unit_balance(
&mut self,
request: impl tonic::IntoRequest<super::SetUnitBalanceRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/SetUnitBalance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"SetUnitBalance",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn execute(
&mut self,
request: impl tonic::IntoRequest<super::ProjectExecutionRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/Execute",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"Execute",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_access_bindings(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::access::ListAccessBindingsRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::access::ListAccessBindingsResponse>,
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.datasphere.v2.ProjectService/ListAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"ListAccessBindings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_access_bindings(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::access::SetAccessBindingsRequest,
>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/SetAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"SetAccessBindings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_access_bindings(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::access::UpdateAccessBindingsRequest,
>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/UpdateAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"UpdateAccessBindings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn add_resource(
&mut self,
request: impl tonic::IntoRequest<super::AddResourceToProjectRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/AddResource",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"AddResource",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn remove_resource(
&mut self,
request: impl tonic::IntoRequest<super::RemoveResourceFromProjectRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/RemoveResource",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"RemoveResource",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn resize_disk(
&mut self,
request: impl tonic::IntoRequest<super::ResizeProjectDiskRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/ResizeDisk",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"ResizeDisk",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_restrictions_meta(
&mut self,
request: impl tonic::IntoRequest<()>,
) -> std::result::Result<
tonic::Response<super::GetRestrictionsMetaResponse>,
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.datasphere.v2.ProjectService/GetRestrictionsMeta",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"GetRestrictionsMeta",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_restrictions(
&mut self,
request: impl tonic::IntoRequest<super::GetProjectRestrictionsRequest>,
) -> std::result::Result<
tonic::Response<super::RestrictionsResponse>,
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.datasphere.v2.ProjectService/GetRestrictions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"GetRestrictions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_restrictions(
&mut self,
request: impl tonic::IntoRequest<super::SetProjectRestrictionsRequest>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.ProjectService/SetRestrictions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.ProjectService",
"SetRestrictions",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivateS3Request {
#[prost(string, tag = "1")]
pub s3_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeactivateS3Request {
#[prost(string, tag = "1")]
pub s3_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub project_id: ::prost::alloc::string::String,
}
pub mod s3_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 S3ServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl S3ServiceClient<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> S3ServiceClient<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,
) -> S3ServiceClient<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,
{
S3ServiceClient::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 activate(
&mut self,
request: impl tonic::IntoRequest<super::ActivateS3Request>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.S3Service/Activate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.datasphere.v2.S3Service", "Activate"),
);
self.inner.unary(req, path, codec).await
}
pub async fn deactivate(
&mut self,
request: impl tonic::IntoRequest<super::DeactivateS3Request>,
) -> std::result::Result<
tonic::Response<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.datasphere.v2.S3Service/Deactivate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.datasphere.v2.S3Service", "Deactivate"),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Secret {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub project_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(string, tag = "7")]
pub created_by_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "9")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DecryptedSecret {
#[prost(message, optional, tag = "1")]
pub secret: ::core::option::Option<Secret>,
#[prost(string, tag = "2")]
pub content: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub email: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub picture: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub picture_data: ::prost::alloc::string::String,
}