aws_sdk_iot/operation/register_certificate/
_register_certificate_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The output from the RegisterCertificate operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RegisterCertificateOutput {
7    /// <p>The certificate ARN.</p>
8    pub certificate_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The certificate identifier.</p>
10    pub certificate_id: ::std::option::Option<::std::string::String>,
11    _request_id: Option<String>,
12}
13impl RegisterCertificateOutput {
14    /// <p>The certificate ARN.</p>
15    pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
16        self.certificate_arn.as_deref()
17    }
18    /// <p>The certificate identifier.</p>
19    pub fn certificate_id(&self) -> ::std::option::Option<&str> {
20        self.certificate_id.as_deref()
21    }
22}
23impl ::aws_types::request_id::RequestId for RegisterCertificateOutput {
24    fn request_id(&self) -> Option<&str> {
25        self._request_id.as_deref()
26    }
27}
28impl RegisterCertificateOutput {
29    /// Creates a new builder-style object to manufacture [`RegisterCertificateOutput`](crate::operation::register_certificate::RegisterCertificateOutput).
30    pub fn builder() -> crate::operation::register_certificate::builders::RegisterCertificateOutputBuilder {
31        crate::operation::register_certificate::builders::RegisterCertificateOutputBuilder::default()
32    }
33}
34
35/// A builder for [`RegisterCertificateOutput`](crate::operation::register_certificate::RegisterCertificateOutput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct RegisterCertificateOutputBuilder {
39    pub(crate) certificate_arn: ::std::option::Option<::std::string::String>,
40    pub(crate) certificate_id: ::std::option::Option<::std::string::String>,
41    _request_id: Option<String>,
42}
43impl RegisterCertificateOutputBuilder {
44    /// <p>The certificate ARN.</p>
45    pub fn certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.certificate_arn = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The certificate ARN.</p>
50    pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.certificate_arn = input;
52        self
53    }
54    /// <p>The certificate ARN.</p>
55    pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
56        &self.certificate_arn
57    }
58    /// <p>The certificate identifier.</p>
59    pub fn certificate_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.certificate_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The certificate identifier.</p>
64    pub fn set_certificate_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.certificate_id = input;
66        self
67    }
68    /// <p>The certificate identifier.</p>
69    pub fn get_certificate_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.certificate_id
71    }
72    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
73        self._request_id = Some(request_id.into());
74        self
75    }
76
77    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
78        self._request_id = request_id;
79        self
80    }
81    /// Consumes the builder and constructs a [`RegisterCertificateOutput`](crate::operation::register_certificate::RegisterCertificateOutput).
82    pub fn build(self) -> crate::operation::register_certificate::RegisterCertificateOutput {
83        crate::operation::register_certificate::RegisterCertificateOutput {
84            certificate_arn: self.certificate_arn,
85            certificate_id: self.certificate_id,
86            _request_id: self._request_id,
87        }
88    }
89}