aws_sdk_iot/operation/transfer_certificate/
_transfer_certificate_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The input for the TransferCertificate operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct TransferCertificateInput {
7    /// <p>The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)</p>
8    pub certificate_id: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Web Services account.</p>
10    pub target_aws_account: ::std::option::Option<::std::string::String>,
11    /// <p>The transfer message.</p>
12    pub transfer_message: ::std::option::Option<::std::string::String>,
13}
14impl TransferCertificateInput {
15    /// <p>The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)</p>
16    pub fn certificate_id(&self) -> ::std::option::Option<&str> {
17        self.certificate_id.as_deref()
18    }
19    /// <p>The Amazon Web Services account.</p>
20    pub fn target_aws_account(&self) -> ::std::option::Option<&str> {
21        self.target_aws_account.as_deref()
22    }
23    /// <p>The transfer message.</p>
24    pub fn transfer_message(&self) -> ::std::option::Option<&str> {
25        self.transfer_message.as_deref()
26    }
27}
28impl TransferCertificateInput {
29    /// Creates a new builder-style object to manufacture [`TransferCertificateInput`](crate::operation::transfer_certificate::TransferCertificateInput).
30    pub fn builder() -> crate::operation::transfer_certificate::builders::TransferCertificateInputBuilder {
31        crate::operation::transfer_certificate::builders::TransferCertificateInputBuilder::default()
32    }
33}
34
35/// A builder for [`TransferCertificateInput`](crate::operation::transfer_certificate::TransferCertificateInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct TransferCertificateInputBuilder {
39    pub(crate) certificate_id: ::std::option::Option<::std::string::String>,
40    pub(crate) target_aws_account: ::std::option::Option<::std::string::String>,
41    pub(crate) transfer_message: ::std::option::Option<::std::string::String>,
42}
43impl TransferCertificateInputBuilder {
44    /// <p>The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)</p>
45    /// This field is required.
46    pub fn certificate_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.certificate_id = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)</p>
51    pub fn set_certificate_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.certificate_id = input;
53        self
54    }
55    /// <p>The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)</p>
56    pub fn get_certificate_id(&self) -> &::std::option::Option<::std::string::String> {
57        &self.certificate_id
58    }
59    /// <p>The Amazon Web Services account.</p>
60    /// This field is required.
61    pub fn target_aws_account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.target_aws_account = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>The Amazon Web Services account.</p>
66    pub fn set_target_aws_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.target_aws_account = input;
68        self
69    }
70    /// <p>The Amazon Web Services account.</p>
71    pub fn get_target_aws_account(&self) -> &::std::option::Option<::std::string::String> {
72        &self.target_aws_account
73    }
74    /// <p>The transfer message.</p>
75    pub fn transfer_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.transfer_message = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The transfer message.</p>
80    pub fn set_transfer_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.transfer_message = input;
82        self
83    }
84    /// <p>The transfer message.</p>
85    pub fn get_transfer_message(&self) -> &::std::option::Option<::std::string::String> {
86        &self.transfer_message
87    }
88    /// Consumes the builder and constructs a [`TransferCertificateInput`](crate::operation::transfer_certificate::TransferCertificateInput).
89    pub fn build(
90        self,
91    ) -> ::std::result::Result<crate::operation::transfer_certificate::TransferCertificateInput, ::aws_smithy_types::error::operation::BuildError>
92    {
93        ::std::result::Result::Ok(crate::operation::transfer_certificate::TransferCertificateInput {
94            certificate_id: self.certificate_id,
95            target_aws_account: self.target_aws_account,
96            transfer_message: self.transfer_message,
97        })
98    }
99}