aws-sdk-iot 1.112.0

AWS SDK for AWS IoT
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The input for the AcceptCertificateTransfer operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AcceptCertificateTransferInput {
    /// <p>The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)</p>
    pub certificate_id: ::std::option::Option<::std::string::String>,
    /// <p>Specifies whether the certificate is active.</p>
    pub set_as_active: ::std::option::Option<bool>,
}
impl AcceptCertificateTransferInput {
    /// <p>The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)</p>
    pub fn certificate_id(&self) -> ::std::option::Option<&str> {
        self.certificate_id.as_deref()
    }
    /// <p>Specifies whether the certificate is active.</p>
    pub fn set_as_active(&self) -> ::std::option::Option<bool> {
        self.set_as_active
    }
}
impl AcceptCertificateTransferInput {
    /// Creates a new builder-style object to manufacture [`AcceptCertificateTransferInput`](crate::operation::accept_certificate_transfer::AcceptCertificateTransferInput).
    pub fn builder() -> crate::operation::accept_certificate_transfer::builders::AcceptCertificateTransferInputBuilder {
        crate::operation::accept_certificate_transfer::builders::AcceptCertificateTransferInputBuilder::default()
    }
}

/// A builder for [`AcceptCertificateTransferInput`](crate::operation::accept_certificate_transfer::AcceptCertificateTransferInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AcceptCertificateTransferInputBuilder {
    pub(crate) certificate_id: ::std::option::Option<::std::string::String>,
    pub(crate) set_as_active: ::std::option::Option<bool>,
}
impl AcceptCertificateTransferInputBuilder {
    /// <p>The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)</p>
    /// This field is required.
    pub fn certificate_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.certificate_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)</p>
    pub fn set_certificate_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.certificate_id = input;
        self
    }
    /// <p>The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)</p>
    pub fn get_certificate_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.certificate_id
    }
    /// <p>Specifies whether the certificate is active.</p>
    pub fn set_as_active(mut self, input: bool) -> Self {
        self.set_as_active = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether the certificate is active.</p>
    pub fn set_set_as_active(mut self, input: ::std::option::Option<bool>) -> Self {
        self.set_as_active = input;
        self
    }
    /// <p>Specifies whether the certificate is active.</p>
    pub fn get_set_as_active(&self) -> &::std::option::Option<bool> {
        &self.set_as_active
    }
    /// Consumes the builder and constructs a [`AcceptCertificateTransferInput`](crate::operation::accept_certificate_transfer::AcceptCertificateTransferInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::accept_certificate_transfer::AcceptCertificateTransferInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::accept_certificate_transfer::AcceptCertificateTransferInput {
            certificate_id: self.certificate_id,
            set_as_active: self.set_as_active,
        })
    }
}