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, ::std::fmt::Debug)]
pub struct UpdateOtaTaskInput {
    /// <p>The over-the-air (OTA) task id.</p>
    pub identifier: ::std::option::Option<::std::string::String>,
    /// <p>The description of the over-the-air (OTA) task.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the over-the-air (OTA) task configuration.</p>
    pub task_configuration_id: ::std::option::Option<::std::string::String>,
}
impl UpdateOtaTaskInput {
    /// <p>The over-the-air (OTA) task id.</p>
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// <p>The description of the over-the-air (OTA) task.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The identifier for the over-the-air (OTA) task configuration.</p>
    pub fn task_configuration_id(&self) -> ::std::option::Option<&str> {
        self.task_configuration_id.as_deref()
    }
}
impl UpdateOtaTaskInput {
    /// Creates a new builder-style object to manufacture [`UpdateOtaTaskInput`](crate::operation::update_ota_task::UpdateOtaTaskInput).
    pub fn builder() -> crate::operation::update_ota_task::builders::UpdateOtaTaskInputBuilder {
        crate::operation::update_ota_task::builders::UpdateOtaTaskInputBuilder::default()
    }
}

/// A builder for [`UpdateOtaTaskInput`](crate::operation::update_ota_task::UpdateOtaTaskInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateOtaTaskInputBuilder {
    pub(crate) identifier: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) task_configuration_id: ::std::option::Option<::std::string::String>,
}
impl UpdateOtaTaskInputBuilder {
    /// <p>The over-the-air (OTA) task id.</p>
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The over-the-air (OTA) task id.</p>
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// <p>The over-the-air (OTA) task id.</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// <p>The description of the over-the-air (OTA) task.</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 over-the-air (OTA) task.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the over-the-air (OTA) task.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The identifier for the over-the-air (OTA) task configuration.</p>
    pub fn task_configuration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_configuration_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the over-the-air (OTA) task configuration.</p>
    pub fn set_task_configuration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_configuration_id = input;
        self
    }
    /// <p>The identifier for the over-the-air (OTA) task configuration.</p>
    pub fn get_task_configuration_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_configuration_id
    }
    /// Consumes the builder and constructs a [`UpdateOtaTaskInput`](crate::operation::update_ota_task::UpdateOtaTaskInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_ota_task::UpdateOtaTaskInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_ota_task::UpdateOtaTaskInput {
            identifier: self.identifier,
            description: self.description,
            task_configuration_id: self.task_configuration_id,
        })
    }
}