#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HelmRelease {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub app_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub app_namespace: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub product_id: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub product_name: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub product_version: ::prost::alloc::string::String,
#[prost(enumeration = "helm_release::Status", tag = "7")]
pub status: i32,
#[prost(message, optional, tag = "8")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
}
pub mod helm_release {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Unknown = 1,
Deployed = 2,
Uninstalled = 3,
Superseded = 4,
Failed = 5,
Uninstalling = 6,
PendingInstall = 7,
PendingUpgrade = 8,
PendingRollback = 9,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Unknown => "UNKNOWN",
Status::Deployed => "DEPLOYED",
Status::Uninstalled => "UNINSTALLED",
Status::Superseded => "SUPERSEDED",
Status::Failed => "FAILED",
Status::Uninstalling => "UNINSTALLING",
Status::PendingInstall => "PENDING_INSTALL",
Status::PendingUpgrade => "PENDING_UPGRADE",
Status::PendingRollback => "PENDING_ROLLBACK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"UNKNOWN" => Some(Self::Unknown),
"DEPLOYED" => Some(Self::Deployed),
"UNINSTALLED" => Some(Self::Uninstalled),
"SUPERSEDED" => Some(Self::Superseded),
"FAILED" => Some(Self::Failed),
"UNINSTALLING" => Some(Self::Uninstalling),
"PENDING_INSTALL" => Some(Self::PendingInstall),
"PENDING_UPGRADE" => Some(Self::PendingUpgrade),
"PENDING_ROLLBACK" => Some(Self::PendingRollback),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListHelmReleasesRequest {
#[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 ListHelmReleasesResponse {
#[prost(message, repeated, tag = "1")]
pub helm_releases: ::prost::alloc::vec::Vec<HelmRelease>,
#[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 GetHelmReleaseRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstallHelmReleaseRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub product_version_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub user_values: ::prost::alloc::vec::Vec<ValueWithKey>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstallHelmReleaseMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub helm_release_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub product_version_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateHelmReleaseRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub product_version_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub user_values: ::prost::alloc::vec::Vec<ValueWithKey>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateHelmReleaseMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub helm_release_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub product_version_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UninstallHelmReleaseRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UninstallHelmReleaseMetadata {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub helm_release_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValueWithKey {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub value: ::core::option::Option<Value>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Value {
#[prost(oneof = "value::Value", tags = "1")]
pub value: ::core::option::Option<value::Value>,
}
pub mod value {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(string, tag = "1")]
TypedValue(::prost::alloc::string::String),
}
}
pub mod helm_release_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 HelmReleaseServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl HelmReleaseServiceClient<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> HelmReleaseServiceClient<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,
) -> HelmReleaseServiceClient<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,
{
HelmReleaseServiceClient::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 list(
&mut self,
request: impl tonic::IntoRequest<super::ListHelmReleasesRequest>,
) -> std::result::Result<
tonic::Response<super::ListHelmReleasesResponse>,
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.k8s.marketplace.v1.HelmReleaseService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.k8s.marketplace.v1.HelmReleaseService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetHelmReleaseRequest>,
) -> std::result::Result<tonic::Response<super::HelmRelease>, 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.k8s.marketplace.v1.HelmReleaseService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.k8s.marketplace.v1.HelmReleaseService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn install(
&mut self,
request: impl tonic::IntoRequest<super::InstallHelmReleaseRequest>,
) -> 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.k8s.marketplace.v1.HelmReleaseService/Install",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.k8s.marketplace.v1.HelmReleaseService",
"Install",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateHelmReleaseRequest>,
) -> 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.k8s.marketplace.v1.HelmReleaseService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.k8s.marketplace.v1.HelmReleaseService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn uninstall(
&mut self,
request: impl tonic::IntoRequest<super::UninstallHelmReleaseRequest>,
) -> 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.k8s.marketplace.v1.HelmReleaseService/Uninstall",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.k8s.marketplace.v1.HelmReleaseService",
"Uninstall",
),
);
self.inner.unary(req, path, codec).await
}
}
}