1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The input for the UpdateCertificate operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateCertificateInput {
    /// <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>The new status.</p>
    /// <p><b>Note:</b> Setting the status to PENDING_TRANSFER or PENDING_ACTIVATION will result in an exception being thrown. PENDING_TRANSFER and PENDING_ACTIVATION are statuses used internally by IoT. They are not intended for developer use.</p>
    /// <p><b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used.</p>
    pub new_status: ::std::option::Option<crate::types::CertificateStatus>,
}
impl UpdateCertificateInput {
    /// <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>The new status.</p>
    /// <p><b>Note:</b> Setting the status to PENDING_TRANSFER or PENDING_ACTIVATION will result in an exception being thrown. PENDING_TRANSFER and PENDING_ACTIVATION are statuses used internally by IoT. They are not intended for developer use.</p>
    /// <p><b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used.</p>
    pub fn new_status(&self) -> ::std::option::Option<&crate::types::CertificateStatus> {
        self.new_status.as_ref()
    }
}
impl UpdateCertificateInput {
    /// Creates a new builder-style object to manufacture [`UpdateCertificateInput`](crate::operation::update_certificate::UpdateCertificateInput).
    pub fn builder() -> crate::operation::update_certificate::builders::UpdateCertificateInputBuilder {
        crate::operation::update_certificate::builders::UpdateCertificateInputBuilder::default()
    }
}

/// A builder for [`UpdateCertificateInput`](crate::operation::update_certificate::UpdateCertificateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCertificateInputBuilder {
    pub(crate) certificate_id: ::std::option::Option<::std::string::String>,
    pub(crate) new_status: ::std::option::Option<crate::types::CertificateStatus>,
}
impl UpdateCertificateInputBuilder {
    /// <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>The new status.</p>
    /// <p><b>Note:</b> Setting the status to PENDING_TRANSFER or PENDING_ACTIVATION will result in an exception being thrown. PENDING_TRANSFER and PENDING_ACTIVATION are statuses used internally by IoT. They are not intended for developer use.</p>
    /// <p><b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used.</p>
    /// This field is required.
    pub fn new_status(mut self, input: crate::types::CertificateStatus) -> Self {
        self.new_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The new status.</p>
    /// <p><b>Note:</b> Setting the status to PENDING_TRANSFER or PENDING_ACTIVATION will result in an exception being thrown. PENDING_TRANSFER and PENDING_ACTIVATION are statuses used internally by IoT. They are not intended for developer use.</p>
    /// <p><b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used.</p>
    pub fn set_new_status(mut self, input: ::std::option::Option<crate::types::CertificateStatus>) -> Self {
        self.new_status = input;
        self
    }
    /// <p>The new status.</p>
    /// <p><b>Note:</b> Setting the status to PENDING_TRANSFER or PENDING_ACTIVATION will result in an exception being thrown. PENDING_TRANSFER and PENDING_ACTIVATION are statuses used internally by IoT. They are not intended for developer use.</p>
    /// <p><b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used.</p>
    pub fn get_new_status(&self) -> &::std::option::Option<crate::types::CertificateStatus> {
        &self.new_status
    }
    /// Consumes the builder and constructs a [`UpdateCertificateInput`](crate::operation::update_certificate::UpdateCertificateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_certificate::UpdateCertificateInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_certificate::UpdateCertificateInput {
            certificate_id: self.certificate_id,
            new_status: self.new_status,
        })
    }
}