#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Certificate {
#[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 = "CertificateType", tag = "7")]
pub r#type: i32,
#[prost(string, repeated, tag = "8")]
pub domains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "certificate::Status", tag = "9")]
pub status: i32,
#[prost(string, tag = "10")]
pub issuer: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub subject: ::prost::alloc::string::String,
#[prost(string, tag = "12")]
pub serial: ::prost::alloc::string::String,
#[prost(message, optional, tag = "13")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "14")]
pub issued_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "15")]
pub not_after: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "16")]
pub not_before: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, repeated, tag = "17")]
pub challenges: ::prost::alloc::vec::Vec<Challenge>,
#[prost(bool, tag = "18")]
pub deletion_protection: bool,
#[prost(bool, tag = "19")]
pub incomplete_chain: bool,
}
pub mod certificate {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Validating = 1,
Invalid = 2,
Issued = 3,
Revoked = 4,
Renewing = 5,
RenewalFailed = 6,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Validating => "VALIDATING",
Status::Invalid => "INVALID",
Status::Issued => "ISSUED",
Status::Revoked => "REVOKED",
Status::Renewing => "RENEWING",
Status::RenewalFailed => "RENEWAL_FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"VALIDATING" => Some(Self::Validating),
"INVALID" => Some(Self::Invalid),
"ISSUED" => Some(Self::Issued),
"REVOKED" => Some(Self::Revoked),
"RENEWING" => Some(Self::Renewing),
"RENEWAL_FAILED" => Some(Self::RenewalFailed),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Challenge {
#[prost(string, tag = "1")]
pub domain: ::prost::alloc::string::String,
#[prost(enumeration = "ChallengeType", tag = "2")]
pub r#type: i32,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "challenge::Status", tag = "5")]
pub status: i32,
#[prost(string, tag = "6")]
pub message: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub error: ::prost::alloc::string::String,
#[prost(oneof = "challenge::Challenge", tags = "8, 9")]
pub challenge: ::core::option::Option<challenge::Challenge>,
}
pub mod challenge {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DnsRecord {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub value: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpFile {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub content: ::prost::alloc::string::String,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Pending = 1,
Processing = 2,
Valid = 3,
Invalid = 4,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Pending => "PENDING",
Status::Processing => "PROCESSING",
Status::Valid => "VALID",
Status::Invalid => "INVALID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"PENDING" => Some(Self::Pending),
"PROCESSING" => Some(Self::Processing),
"VALID" => Some(Self::Valid),
"INVALID" => Some(Self::Invalid),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Challenge {
#[prost(message, tag = "8")]
DnsChallenge(DnsRecord),
#[prost(message, tag = "9")]
HttpChallenge(HttpFile),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Version {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub certificate_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CertificateType {
Unspecified = 0,
Imported = 1,
Managed = 2,
}
impl CertificateType {
pub fn as_str_name(&self) -> &'static str {
match self {
CertificateType::Unspecified => "CERTIFICATE_TYPE_UNSPECIFIED",
CertificateType::Imported => "IMPORTED",
CertificateType::Managed => "MANAGED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CERTIFICATE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"IMPORTED" => Some(Self::Imported),
"MANAGED" => Some(Self::Managed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ChallengeType {
Unspecified = 0,
Dns = 1,
Http = 2,
}
impl ChallengeType {
pub fn as_str_name(&self) -> &'static str {
match self {
ChallengeType::Unspecified => "CHALLENGE_TYPE_UNSPECIFIED",
ChallengeType::Dns => "DNS",
ChallengeType::Http => "HTTP",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CHALLENGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"DNS" => Some(Self::Dns),
"HTTP" => Some(Self::Http),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCertificateContentResponse {
#[prost(string, tag = "1")]
pub certificate_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub certificate_chain: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "4")]
pub private_key: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCertificateContentRequest {
#[prost(string, tag = "1")]
pub certificate_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version_id: ::prost::alloc::string::String,
#[prost(enumeration = "PrivateKeyFormat", tag = "3")]
pub private_key_format: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PrivateKeyFormat {
Unspecified = 0,
Pkcs1 = 1,
Pkcs8 = 2,
}
impl PrivateKeyFormat {
pub fn as_str_name(&self) -> &'static str {
match self {
PrivateKeyFormat::Unspecified => "PRIVATE_KEY_FORMAT_UNSPECIFIED",
PrivateKeyFormat::Pkcs1 => "PKCS1",
PrivateKeyFormat::Pkcs8 => "PKCS8",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PRIVATE_KEY_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"PKCS1" => Some(Self::Pkcs1),
"PKCS8" => Some(Self::Pkcs8),
_ => None,
}
}
}
pub mod certificate_content_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 CertificateContentServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl CertificateContentServiceClient<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> CertificateContentServiceClient<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,
) -> CertificateContentServiceClient<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,
{
CertificateContentServiceClient::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::GetCertificateContentRequest>,
) -> std::result::Result<
tonic::Response<super::GetCertificateContentResponse>,
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.certificatemanager.v1.CertificateContentService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateContentService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCertificateRequest {
#[prost(string, tag = "1")]
pub certificate_id: ::prost::alloc::string::String,
#[prost(enumeration = "CertificateView", tag = "2")]
pub view: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificatesRequest {
#[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(enumeration = "CertificateView", tag = "6")]
pub view: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificatesResponse {
#[prost(message, repeated, tag = "1")]
pub certificates: ::prost::alloc::vec::Vec<Certificate>,
#[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 ListVersionsRequest {
#[prost(string, tag = "1")]
pub certificate_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 ListVersionsResponse {
#[prost(message, repeated, tag = "1")]
pub versions: ::prost::alloc::vec::Vec<Version>,
#[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 CreateCertificateRequest {
#[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(string, tag = "5")]
pub certificate: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub chain: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub private_key: ::prost::alloc::string::String,
#[prost(bool, tag = "8")]
pub deletion_protection: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCertificateMetadata {
#[prost(string, tag = "1")]
pub certificate_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCertificateRequest {
#[prost(string, tag = "1")]
pub certificate_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(string, tag = "6")]
pub certificate: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub chain: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub private_key: ::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 UpdateCertificateMetadata {
#[prost(string, tag = "1")]
pub certificate_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCertificateRequest {
#[prost(string, tag = "1")]
pub certificate_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCertificateMetadata {
#[prost(string, tag = "1")]
pub certificate_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestNewCertificateRequest {
#[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(string, repeated, tag = "5")]
pub domains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "ChallengeType", tag = "6")]
pub challenge_type: i32,
#[prost(bool, tag = "7")]
pub deletion_protection: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestNewCertificateMetadata {
#[prost(string, tag = "1")]
pub certificate_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificateOperationsRequest {
#[prost(string, tag = "1")]
pub certificate_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 ListCertificateOperationsResponse {
#[prost(message, repeated, tag = "1")]
pub operations: ::prost::alloc::vec::Vec<super::super::operation::Operation>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CertificateView {
Basic = 0,
Full = 1,
}
impl CertificateView {
pub fn as_str_name(&self) -> &'static str {
match self {
CertificateView::Basic => "BASIC",
CertificateView::Full => "FULL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BASIC" => Some(Self::Basic),
"FULL" => Some(Self::Full),
_ => None,
}
}
}
pub mod certificate_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 CertificateServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl CertificateServiceClient<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> CertificateServiceClient<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,
) -> CertificateServiceClient<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,
{
CertificateServiceClient::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::GetCertificateRequest>,
) -> std::result::Result<tonic::Response<super::Certificate>, 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.certificatemanager.v1.CertificateService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListCertificatesRequest>,
) -> std::result::Result<
tonic::Response<super::ListCertificatesResponse>,
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.certificatemanager.v1.CertificateService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_versions(
&mut self,
request: impl tonic::IntoRequest<super::ListVersionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListVersionsResponse>,
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.certificatemanager.v1.CertificateService/ListVersions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateService",
"ListVersions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateCertificateRequest>,
) -> 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.certificatemanager.v1.CertificateService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCertificateRequest>,
) -> 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.certificatemanager.v1.CertificateService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCertificateRequest>,
) -> 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.certificatemanager.v1.CertificateService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn request_new(
&mut self,
request: impl tonic::IntoRequest<super::RequestNewCertificateRequest>,
) -> 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.certificatemanager.v1.CertificateService/RequestNew",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateService",
"RequestNew",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_operations(
&mut self,
request: impl tonic::IntoRequest<super::ListCertificateOperationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListCertificateOperationsResponse>,
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.certificatemanager.v1.CertificateService/ListOperations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateService",
"ListOperations",
),
);
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.certificatemanager.v1.CertificateService/ListAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateService",
"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.certificatemanager.v1.CertificateService/SetAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateService",
"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.certificatemanager.v1.CertificateService/UpdateAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.certificatemanager.v1.CertificateService",
"UpdateAccessBindings",
),
);
self.inner.unary(req, path, codec).await
}
}
}