aws_sdk_acm/operation/get_certificate/
_get_certificate_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetCertificateInput {
6    /// <p>String that contains a certificate ARN in the following format:</p>
7    /// <p><code>arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012</code></p>
8    /// <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
9    pub certificate_arn: ::std::option::Option<::std::string::String>,
10}
11impl GetCertificateInput {
12    /// <p>String that contains a certificate ARN in the following format:</p>
13    /// <p><code>arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012</code></p>
14    /// <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
15    pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
16        self.certificate_arn.as_deref()
17    }
18}
19impl GetCertificateInput {
20    /// Creates a new builder-style object to manufacture [`GetCertificateInput`](crate::operation::get_certificate::GetCertificateInput).
21    pub fn builder() -> crate::operation::get_certificate::builders::GetCertificateInputBuilder {
22        crate::operation::get_certificate::builders::GetCertificateInputBuilder::default()
23    }
24}
25
26/// A builder for [`GetCertificateInput`](crate::operation::get_certificate::GetCertificateInput).
27#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
28#[non_exhaustive]
29pub struct GetCertificateInputBuilder {
30    pub(crate) certificate_arn: ::std::option::Option<::std::string::String>,
31}
32impl GetCertificateInputBuilder {
33    /// <p>String that contains a certificate ARN in the following format:</p>
34    /// <p><code>arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012</code></p>
35    /// <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
36    /// This field is required.
37    pub fn certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38        self.certificate_arn = ::std::option::Option::Some(input.into());
39        self
40    }
41    /// <p>String that contains a certificate ARN in the following format:</p>
42    /// <p><code>arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012</code></p>
43    /// <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
44    pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.certificate_arn = input;
46        self
47    }
48    /// <p>String that contains a certificate ARN in the following format:</p>
49    /// <p><code>arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012</code></p>
50    /// <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
51    pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
52        &self.certificate_arn
53    }
54    /// Consumes the builder and constructs a [`GetCertificateInput`](crate::operation::get_certificate::GetCertificateInput).
55    pub fn build(
56        self,
57    ) -> ::std::result::Result<crate::operation::get_certificate::GetCertificateInput, ::aws_smithy_types::error::operation::BuildError> {
58        ::std::result::Result::Ok(crate::operation::get_certificate::GetCertificateInput {
59            certificate_arn: self.certificate_arn,
60        })
61    }
62}