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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateProvisioningTemplateInput {
    /// <p>The name of the provisioning template.</p>
    pub template_name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the provisioning template.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>True to enable the provisioning template, otherwise false.</p>
    pub enabled: ::std::option::Option<bool>,
    /// <p>The ID of the default provisioning template version.</p>
    pub default_version_id: ::std::option::Option<i32>,
    /// <p>The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.</p>
    pub provisioning_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>Updates the pre-provisioning hook template. Only supports template of type <code>FLEET_PROVISIONING</code>. For more information about provisioning template types, see <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type">type</a>.</p>
    pub pre_provisioning_hook: ::std::option::Option<crate::types::ProvisioningHook>,
    /// <p>Removes pre-provisioning hook template.</p>
    pub remove_pre_provisioning_hook: ::std::option::Option<bool>,
}
impl UpdateProvisioningTemplateInput {
    /// <p>The name of the provisioning template.</p>
    pub fn template_name(&self) -> ::std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The description of the provisioning template.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>True to enable the provisioning template, otherwise false.</p>
    pub fn enabled(&self) -> ::std::option::Option<bool> {
        self.enabled
    }
    /// <p>The ID of the default provisioning template version.</p>
    pub fn default_version_id(&self) -> ::std::option::Option<i32> {
        self.default_version_id
    }
    /// <p>The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.</p>
    pub fn provisioning_role_arn(&self) -> ::std::option::Option<&str> {
        self.provisioning_role_arn.as_deref()
    }
    /// <p>Updates the pre-provisioning hook template. Only supports template of type <code>FLEET_PROVISIONING</code>. For more information about provisioning template types, see <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type">type</a>.</p>
    pub fn pre_provisioning_hook(&self) -> ::std::option::Option<&crate::types::ProvisioningHook> {
        self.pre_provisioning_hook.as_ref()
    }
    /// <p>Removes pre-provisioning hook template.</p>
    pub fn remove_pre_provisioning_hook(&self) -> ::std::option::Option<bool> {
        self.remove_pre_provisioning_hook
    }
}
impl UpdateProvisioningTemplateInput {
    /// Creates a new builder-style object to manufacture [`UpdateProvisioningTemplateInput`](crate::operation::update_provisioning_template::UpdateProvisioningTemplateInput).
    pub fn builder() -> crate::operation::update_provisioning_template::builders::UpdateProvisioningTemplateInputBuilder {
        crate::operation::update_provisioning_template::builders::UpdateProvisioningTemplateInputBuilder::default()
    }
}

/// A builder for [`UpdateProvisioningTemplateInput`](crate::operation::update_provisioning_template::UpdateProvisioningTemplateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateProvisioningTemplateInputBuilder {
    pub(crate) template_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) enabled: ::std::option::Option<bool>,
    pub(crate) default_version_id: ::std::option::Option<i32>,
    pub(crate) provisioning_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) pre_provisioning_hook: ::std::option::Option<crate::types::ProvisioningHook>,
    pub(crate) remove_pre_provisioning_hook: ::std::option::Option<bool>,
}
impl UpdateProvisioningTemplateInputBuilder {
    /// <p>The name of the provisioning template.</p>
    /// This field is required.
    pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.template_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the provisioning template.</p>
    pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.template_name = input;
        self
    }
    /// <p>The name of the provisioning template.</p>
    pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.template_name
    }
    /// <p>The description of the provisioning template.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the provisioning template.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the provisioning template.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>True to enable the provisioning template, otherwise false.</p>
    pub fn enabled(mut self, input: bool) -> Self {
        self.enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>True to enable the provisioning template, otherwise false.</p>
    pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enabled = input;
        self
    }
    /// <p>True to enable the provisioning template, otherwise false.</p>
    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
        &self.enabled
    }
    /// <p>The ID of the default provisioning template version.</p>
    pub fn default_version_id(mut self, input: i32) -> Self {
        self.default_version_id = ::std::option::Option::Some(input);
        self
    }
    /// <p>The ID of the default provisioning template version.</p>
    pub fn set_default_version_id(mut self, input: ::std::option::Option<i32>) -> Self {
        self.default_version_id = input;
        self
    }
    /// <p>The ID of the default provisioning template version.</p>
    pub fn get_default_version_id(&self) -> &::std::option::Option<i32> {
        &self.default_version_id
    }
    /// <p>The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.</p>
    pub fn provisioning_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.provisioning_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.</p>
    pub fn set_provisioning_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.provisioning_role_arn = input;
        self
    }
    /// <p>The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.</p>
    pub fn get_provisioning_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.provisioning_role_arn
    }
    /// <p>Updates the pre-provisioning hook template. Only supports template of type <code>FLEET_PROVISIONING</code>. For more information about provisioning template types, see <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type">type</a>.</p>
    pub fn pre_provisioning_hook(mut self, input: crate::types::ProvisioningHook) -> Self {
        self.pre_provisioning_hook = ::std::option::Option::Some(input);
        self
    }
    /// <p>Updates the pre-provisioning hook template. Only supports template of type <code>FLEET_PROVISIONING</code>. For more information about provisioning template types, see <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type">type</a>.</p>
    pub fn set_pre_provisioning_hook(mut self, input: ::std::option::Option<crate::types::ProvisioningHook>) -> Self {
        self.pre_provisioning_hook = input;
        self
    }
    /// <p>Updates the pre-provisioning hook template. Only supports template of type <code>FLEET_PROVISIONING</code>. For more information about provisioning template types, see <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type">type</a>.</p>
    pub fn get_pre_provisioning_hook(&self) -> &::std::option::Option<crate::types::ProvisioningHook> {
        &self.pre_provisioning_hook
    }
    /// <p>Removes pre-provisioning hook template.</p>
    pub fn remove_pre_provisioning_hook(mut self, input: bool) -> Self {
        self.remove_pre_provisioning_hook = ::std::option::Option::Some(input);
        self
    }
    /// <p>Removes pre-provisioning hook template.</p>
    pub fn set_remove_pre_provisioning_hook(mut self, input: ::std::option::Option<bool>) -> Self {
        self.remove_pre_provisioning_hook = input;
        self
    }
    /// <p>Removes pre-provisioning hook template.</p>
    pub fn get_remove_pre_provisioning_hook(&self) -> &::std::option::Option<bool> {
        &self.remove_pre_provisioning_hook
    }
    /// Consumes the builder and constructs a [`UpdateProvisioningTemplateInput`](crate::operation::update_provisioning_template::UpdateProvisioningTemplateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_provisioning_template::UpdateProvisioningTemplateInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_provisioning_template::UpdateProvisioningTemplateInput {
            template_name: self.template_name,
            description: self.description,
            enabled: self.enabled,
            default_version_id: self.default_version_id,
            provisioning_role_arn: self.provisioning_role_arn,
            pre_provisioning_hook: self.pre_provisioning_hook,
            remove_pre_provisioning_hook: self.remove_pre_provisioning_hook,
        })
    }
}