1#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct HelmRelease {
5 #[prost(string, tag = "1")]
7 pub id: ::prost::alloc::string::String,
8 #[prost(string, tag = "2")]
10 pub cluster_id: ::prost::alloc::string::String,
11 #[prost(string, tag = "3")]
13 pub app_name: ::prost::alloc::string::String,
14 #[prost(string, tag = "4")]
16 pub app_namespace: ::prost::alloc::string::String,
17 #[prost(string, tag = "5")]
19 pub product_id: ::prost::alloc::string::String,
20 #[prost(string, tag = "6")]
22 pub product_name: ::prost::alloc::string::String,
23 #[prost(string, tag = "10")]
25 pub product_version: ::prost::alloc::string::String,
26 #[prost(enumeration = "helm_release::Status", tag = "7")]
28 pub status: i32,
29 #[prost(message, optional, tag = "8")]
31 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
32}
33pub mod helm_release {
35 #[derive(
36 Clone,
37 Copy,
38 Debug,
39 PartialEq,
40 Eq,
41 Hash,
42 PartialOrd,
43 Ord,
44 ::prost::Enumeration
45 )]
46 #[repr(i32)]
47 pub enum Status {
48 Unspecified = 0,
49 Unknown = 1,
51 Deployed = 2,
53 Uninstalled = 3,
55 Superseded = 4,
57 Failed = 5,
59 Uninstalling = 6,
61 PendingInstall = 7,
63 PendingUpgrade = 8,
65 PendingRollback = 9,
67 }
68 impl Status {
69 pub fn as_str_name(&self) -> &'static str {
74 match self {
75 Status::Unspecified => "STATUS_UNSPECIFIED",
76 Status::Unknown => "UNKNOWN",
77 Status::Deployed => "DEPLOYED",
78 Status::Uninstalled => "UNINSTALLED",
79 Status::Superseded => "SUPERSEDED",
80 Status::Failed => "FAILED",
81 Status::Uninstalling => "UNINSTALLING",
82 Status::PendingInstall => "PENDING_INSTALL",
83 Status::PendingUpgrade => "PENDING_UPGRADE",
84 Status::PendingRollback => "PENDING_ROLLBACK",
85 }
86 }
87 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
89 match value {
90 "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
91 "UNKNOWN" => Some(Self::Unknown),
92 "DEPLOYED" => Some(Self::Deployed),
93 "UNINSTALLED" => Some(Self::Uninstalled),
94 "SUPERSEDED" => Some(Self::Superseded),
95 "FAILED" => Some(Self::Failed),
96 "UNINSTALLING" => Some(Self::Uninstalling),
97 "PENDING_INSTALL" => Some(Self::PendingInstall),
98 "PENDING_UPGRADE" => Some(Self::PendingUpgrade),
99 "PENDING_ROLLBACK" => Some(Self::PendingRollback),
100 _ => None,
101 }
102 }
103 }
104}
105#[allow(clippy::derive_partial_eq_without_eq)]
106#[derive(Clone, PartialEq, ::prost::Message)]
107pub struct ListHelmReleasesRequest {
108 #[prost(string, tag = "1")]
110 pub cluster_id: ::prost::alloc::string::String,
111 #[prost(int64, tag = "2")]
113 pub page_size: i64,
114 #[prost(string, tag = "3")]
116 pub page_token: ::prost::alloc::string::String,
117}
118#[allow(clippy::derive_partial_eq_without_eq)]
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct ListHelmReleasesResponse {
121 #[prost(message, repeated, tag = "1")]
123 pub helm_releases: ::prost::alloc::vec::Vec<HelmRelease>,
124 #[prost(string, tag = "2")]
126 pub next_page_token: ::prost::alloc::string::String,
127}
128#[allow(clippy::derive_partial_eq_without_eq)]
129#[derive(Clone, PartialEq, ::prost::Message)]
130pub struct GetHelmReleaseRequest {
131 #[prost(string, tag = "1")]
133 pub id: ::prost::alloc::string::String,
134}
135#[allow(clippy::derive_partial_eq_without_eq)]
136#[derive(Clone, PartialEq, ::prost::Message)]
137pub struct InstallHelmReleaseRequest {
138 #[prost(string, tag = "1")]
140 pub cluster_id: ::prost::alloc::string::String,
141 #[prost(string, tag = "2")]
143 pub product_version_id: ::prost::alloc::string::String,
144 #[prost(message, repeated, tag = "3")]
146 pub user_values: ::prost::alloc::vec::Vec<ValueWithKey>,
147}
148#[allow(clippy::derive_partial_eq_without_eq)]
149#[derive(Clone, PartialEq, ::prost::Message)]
150pub struct InstallHelmReleaseMetadata {
151 #[prost(string, tag = "1")]
153 pub cluster_id: ::prost::alloc::string::String,
154 #[prost(string, tag = "2")]
156 pub helm_release_id: ::prost::alloc::string::String,
157 #[prost(string, tag = "3")]
159 pub product_version_id: ::prost::alloc::string::String,
160}
161#[allow(clippy::derive_partial_eq_without_eq)]
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct UpdateHelmReleaseRequest {
164 #[prost(string, tag = "1")]
166 pub id: ::prost::alloc::string::String,
167 #[prost(string, tag = "2")]
169 pub product_version_id: ::prost::alloc::string::String,
170 #[prost(message, repeated, tag = "3")]
172 pub user_values: ::prost::alloc::vec::Vec<ValueWithKey>,
173}
174#[allow(clippy::derive_partial_eq_without_eq)]
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct UpdateHelmReleaseMetadata {
177 #[prost(string, tag = "1")]
179 pub cluster_id: ::prost::alloc::string::String,
180 #[prost(string, tag = "2")]
182 pub helm_release_id: ::prost::alloc::string::String,
183 #[prost(string, tag = "3")]
185 pub product_version_id: ::prost::alloc::string::String,
186}
187#[allow(clippy::derive_partial_eq_without_eq)]
188#[derive(Clone, PartialEq, ::prost::Message)]
189pub struct UninstallHelmReleaseRequest {
190 #[prost(string, tag = "1")]
192 pub id: ::prost::alloc::string::String,
193}
194#[allow(clippy::derive_partial_eq_without_eq)]
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct UninstallHelmReleaseMetadata {
197 #[prost(string, tag = "1")]
199 pub cluster_id: ::prost::alloc::string::String,
200 #[prost(string, tag = "2")]
202 pub helm_release_id: ::prost::alloc::string::String,
203}
204#[allow(clippy::derive_partial_eq_without_eq)]
205#[derive(Clone, PartialEq, ::prost::Message)]
206pub struct ValueWithKey {
207 #[prost(string, tag = "1")]
209 pub key: ::prost::alloc::string::String,
210 #[prost(message, optional, tag = "2")]
212 pub value: ::core::option::Option<Value>,
213}
214#[allow(clippy::derive_partial_eq_without_eq)]
215#[derive(Clone, PartialEq, ::prost::Message)]
216pub struct Value {
217 #[prost(oneof = "value::Value", tags = "1")]
218 pub value: ::core::option::Option<value::Value>,
219}
220pub mod value {
222 #[allow(clippy::derive_partial_eq_without_eq)]
223 #[derive(Clone, PartialEq, ::prost::Oneof)]
224 pub enum Value {
225 #[prost(string, tag = "1")]
227 TypedValue(::prost::alloc::string::String),
228 }
229}
230pub mod helm_release_service_client {
232 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
233 use tonic::codegen::*;
234 use tonic::codegen::http::Uri;
235 #[derive(Debug, Clone)]
237 pub struct HelmReleaseServiceClient<T> {
238 inner: tonic::client::Grpc<T>,
239 }
240 impl HelmReleaseServiceClient<tonic::transport::Channel> {
241 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
243 where
244 D: TryInto<tonic::transport::Endpoint>,
245 D::Error: Into<StdError>,
246 {
247 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
248 Ok(Self::new(conn))
249 }
250 }
251 impl<T> HelmReleaseServiceClient<T>
252 where
253 T: tonic::client::GrpcService<tonic::body::BoxBody>,
254 T::Error: Into<StdError>,
255 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
256 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
257 {
258 pub fn new(inner: T) -> Self {
259 let inner = tonic::client::Grpc::new(inner);
260 Self { inner }
261 }
262 pub fn with_origin(inner: T, origin: Uri) -> Self {
263 let inner = tonic::client::Grpc::with_origin(inner, origin);
264 Self { inner }
265 }
266 pub fn with_interceptor<F>(
267 inner: T,
268 interceptor: F,
269 ) -> HelmReleaseServiceClient<InterceptedService<T, F>>
270 where
271 F: tonic::service::Interceptor,
272 T::ResponseBody: Default,
273 T: tonic::codegen::Service<
274 http::Request<tonic::body::BoxBody>,
275 Response = http::Response<
276 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
277 >,
278 >,
279 <T as tonic::codegen::Service<
280 http::Request<tonic::body::BoxBody>,
281 >>::Error: Into<StdError> + Send + Sync,
282 {
283 HelmReleaseServiceClient::new(InterceptedService::new(inner, interceptor))
284 }
285 #[must_use]
290 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
291 self.inner = self.inner.send_compressed(encoding);
292 self
293 }
294 #[must_use]
296 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
297 self.inner = self.inner.accept_compressed(encoding);
298 self
299 }
300 #[must_use]
304 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
305 self.inner = self.inner.max_decoding_message_size(limit);
306 self
307 }
308 #[must_use]
312 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
313 self.inner = self.inner.max_encoding_message_size(limit);
314 self
315 }
316 pub async fn list(
318 &mut self,
319 request: impl tonic::IntoRequest<super::ListHelmReleasesRequest>,
320 ) -> std::result::Result<
321 tonic::Response<super::ListHelmReleasesResponse>,
322 tonic::Status,
323 > {
324 self.inner
325 .ready()
326 .await
327 .map_err(|e| {
328 tonic::Status::new(
329 tonic::Code::Unknown,
330 format!("Service was not ready: {}", e.into()),
331 )
332 })?;
333 let codec = tonic::codec::ProstCodec::default();
334 let path = http::uri::PathAndQuery::from_static(
335 "/yandex.cloud.k8s.marketplace.v1.HelmReleaseService/List",
336 );
337 let mut req = request.into_request();
338 req.extensions_mut()
339 .insert(
340 GrpcMethod::new(
341 "yandex.cloud.k8s.marketplace.v1.HelmReleaseService",
342 "List",
343 ),
344 );
345 self.inner.unary(req, path, codec).await
346 }
347 pub async fn get(
349 &mut self,
350 request: impl tonic::IntoRequest<super::GetHelmReleaseRequest>,
351 ) -> std::result::Result<tonic::Response<super::HelmRelease>, tonic::Status> {
352 self.inner
353 .ready()
354 .await
355 .map_err(|e| {
356 tonic::Status::new(
357 tonic::Code::Unknown,
358 format!("Service was not ready: {}", e.into()),
359 )
360 })?;
361 let codec = tonic::codec::ProstCodec::default();
362 let path = http::uri::PathAndQuery::from_static(
363 "/yandex.cloud.k8s.marketplace.v1.HelmReleaseService/Get",
364 );
365 let mut req = request.into_request();
366 req.extensions_mut()
367 .insert(
368 GrpcMethod::new(
369 "yandex.cloud.k8s.marketplace.v1.HelmReleaseService",
370 "Get",
371 ),
372 );
373 self.inner.unary(req, path, codec).await
374 }
375 pub async fn install(
377 &mut self,
378 request: impl tonic::IntoRequest<super::InstallHelmReleaseRequest>,
379 ) -> std::result::Result<
380 tonic::Response<super::super::super::super::operation::Operation>,
381 tonic::Status,
382 > {
383 self.inner
384 .ready()
385 .await
386 .map_err(|e| {
387 tonic::Status::new(
388 tonic::Code::Unknown,
389 format!("Service was not ready: {}", e.into()),
390 )
391 })?;
392 let codec = tonic::codec::ProstCodec::default();
393 let path = http::uri::PathAndQuery::from_static(
394 "/yandex.cloud.k8s.marketplace.v1.HelmReleaseService/Install",
395 );
396 let mut req = request.into_request();
397 req.extensions_mut()
398 .insert(
399 GrpcMethod::new(
400 "yandex.cloud.k8s.marketplace.v1.HelmReleaseService",
401 "Install",
402 ),
403 );
404 self.inner.unary(req, path, codec).await
405 }
406 pub async fn update(
408 &mut self,
409 request: impl tonic::IntoRequest<super::UpdateHelmReleaseRequest>,
410 ) -> std::result::Result<
411 tonic::Response<super::super::super::super::operation::Operation>,
412 tonic::Status,
413 > {
414 self.inner
415 .ready()
416 .await
417 .map_err(|e| {
418 tonic::Status::new(
419 tonic::Code::Unknown,
420 format!("Service was not ready: {}", e.into()),
421 )
422 })?;
423 let codec = tonic::codec::ProstCodec::default();
424 let path = http::uri::PathAndQuery::from_static(
425 "/yandex.cloud.k8s.marketplace.v1.HelmReleaseService/Update",
426 );
427 let mut req = request.into_request();
428 req.extensions_mut()
429 .insert(
430 GrpcMethod::new(
431 "yandex.cloud.k8s.marketplace.v1.HelmReleaseService",
432 "Update",
433 ),
434 );
435 self.inner.unary(req, path, codec).await
436 }
437 pub async fn uninstall(
439 &mut self,
440 request: impl tonic::IntoRequest<super::UninstallHelmReleaseRequest>,
441 ) -> std::result::Result<
442 tonic::Response<super::super::super::super::operation::Operation>,
443 tonic::Status,
444 > {
445 self.inner
446 .ready()
447 .await
448 .map_err(|e| {
449 tonic::Status::new(
450 tonic::Code::Unknown,
451 format!("Service was not ready: {}", e.into()),
452 )
453 })?;
454 let codec = tonic::codec::ProstCodec::default();
455 let path = http::uri::PathAndQuery::from_static(
456 "/yandex.cloud.k8s.marketplace.v1.HelmReleaseService/Uninstall",
457 );
458 let mut req = request.into_request();
459 req.extensions_mut()
460 .insert(
461 GrpcMethod::new(
462 "yandex.cloud.k8s.marketplace.v1.HelmReleaseService",
463 "Uninstall",
464 ),
465 );
466 self.inner.unary(req, path, codec).await
467 }
468 }
469}