aws-sdk-iotmanagedintegrations 1.42.0

AWS SDK for Managed integrations for AWS IoT Device Management
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateProvisioningProfileInput {
    /// <p>The type of provisioning workflow the device uses for onboarding to IoT managed integrations.</p>
    pub provisioning_type: ::std::option::Option<crate::types::ProvisioningType>,
    /// <p>The id of the certificate authority (CA) certificate.</p>
    pub ca_certificate: ::std::option::Option<::std::string::String>,
    /// <p>The claim certificate.</p>
    pub claim_certificate: ::std::option::Option<::std::string::String>,
    /// <p>The name of the provisioning template.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>A set of key/value pairs that are used to manage the provisioning profile.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateProvisioningProfileInput {
    /// <p>The type of provisioning workflow the device uses for onboarding to IoT managed integrations.</p>
    pub fn provisioning_type(&self) -> ::std::option::Option<&crate::types::ProvisioningType> {
        self.provisioning_type.as_ref()
    }
    /// <p>The id of the certificate authority (CA) certificate.</p>
    pub fn ca_certificate(&self) -> ::std::option::Option<&str> {
        self.ca_certificate.as_deref()
    }
    /// <p>The claim certificate.</p>
    pub fn claim_certificate(&self) -> ::std::option::Option<&str> {
        self.claim_certificate.as_deref()
    }
    /// <p>The name of the provisioning template.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>A set of key/value pairs that are used to manage the provisioning profile.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ::std::fmt::Debug for CreateProvisioningProfileInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateProvisioningProfileInput");
        formatter.field("provisioning_type", &self.provisioning_type);
        formatter.field("ca_certificate", &"*** Sensitive Data Redacted ***");
        formatter.field("claim_certificate", &"*** Sensitive Data Redacted ***");
        formatter.field("name", &self.name);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl CreateProvisioningProfileInput {
    /// Creates a new builder-style object to manufacture [`CreateProvisioningProfileInput`](crate::operation::create_provisioning_profile::CreateProvisioningProfileInput).
    pub fn builder() -> crate::operation::create_provisioning_profile::builders::CreateProvisioningProfileInputBuilder {
        crate::operation::create_provisioning_profile::builders::CreateProvisioningProfileInputBuilder::default()
    }
}

/// A builder for [`CreateProvisioningProfileInput`](crate::operation::create_provisioning_profile::CreateProvisioningProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateProvisioningProfileInputBuilder {
    pub(crate) provisioning_type: ::std::option::Option<crate::types::ProvisioningType>,
    pub(crate) ca_certificate: ::std::option::Option<::std::string::String>,
    pub(crate) claim_certificate: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateProvisioningProfileInputBuilder {
    /// <p>The type of provisioning workflow the device uses for onboarding to IoT managed integrations.</p>
    /// This field is required.
    pub fn provisioning_type(mut self, input: crate::types::ProvisioningType) -> Self {
        self.provisioning_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of provisioning workflow the device uses for onboarding to IoT managed integrations.</p>
    pub fn set_provisioning_type(mut self, input: ::std::option::Option<crate::types::ProvisioningType>) -> Self {
        self.provisioning_type = input;
        self
    }
    /// <p>The type of provisioning workflow the device uses for onboarding to IoT managed integrations.</p>
    pub fn get_provisioning_type(&self) -> &::std::option::Option<crate::types::ProvisioningType> {
        &self.provisioning_type
    }
    /// <p>The id of the certificate authority (CA) certificate.</p>
    pub fn ca_certificate(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ca_certificate = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The id of the certificate authority (CA) certificate.</p>
    pub fn set_ca_certificate(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ca_certificate = input;
        self
    }
    /// <p>The id of the certificate authority (CA) certificate.</p>
    pub fn get_ca_certificate(&self) -> &::std::option::Option<::std::string::String> {
        &self.ca_certificate
    }
    /// <p>The claim certificate.</p>
    pub fn claim_certificate(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.claim_certificate = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The claim certificate.</p>
    pub fn set_claim_certificate(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.claim_certificate = input;
        self
    }
    /// <p>The claim certificate.</p>
    pub fn get_claim_certificate(&self) -> &::std::option::Option<::std::string::String> {
        &self.claim_certificate
    }
    /// <p>The name of the provisioning template.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the provisioning template.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the provisioning template.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A set of key/value pairs that are used to manage the provisioning profile.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A set of key/value pairs that are used to manage the provisioning profile.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A set of key/value pairs that are used to manage the provisioning profile.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateProvisioningProfileInput`](crate::operation::create_provisioning_profile::CreateProvisioningProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_provisioning_profile::CreateProvisioningProfileInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_provisioning_profile::CreateProvisioningProfileInput {
            provisioning_type: self.provisioning_type,
            ca_certificate: self.ca_certificate,
            claim_certificate: self.claim_certificate,
            name: self.name,
            client_token: self.client_token,
            tags: self.tags,
        })
    }
}
impl ::std::fmt::Debug for CreateProvisioningProfileInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateProvisioningProfileInputBuilder");
        formatter.field("provisioning_type", &self.provisioning_type);
        formatter.field("ca_certificate", &"*** Sensitive Data Redacted ***");
        formatter.field("claim_certificate", &"*** Sensitive Data Redacted ***");
        formatter.field("name", &self.name);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}