aws-sdk-sagemaker 1.196.0

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

/// <p>Information of a particular device.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Device {
    /// <p>The name of the device.</p>
    pub device_name: ::std::option::Option<::std::string::String>,
    /// <p>Description of the device.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Amazon Web Services Internet of Things (IoT) object name.</p>
    pub iot_thing_name: ::std::option::Option<::std::string::String>,
}
impl Device {
    /// <p>The name of the device.</p>
    pub fn device_name(&self) -> ::std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>Description of the device.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Amazon Web Services Internet of Things (IoT) object name.</p>
    pub fn iot_thing_name(&self) -> ::std::option::Option<&str> {
        self.iot_thing_name.as_deref()
    }
}
impl Device {
    /// Creates a new builder-style object to manufacture [`Device`](crate::types::Device).
    pub fn builder() -> crate::types::builders::DeviceBuilder {
        crate::types::builders::DeviceBuilder::default()
    }
}

/// A builder for [`Device`](crate::types::Device).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeviceBuilder {
    pub(crate) device_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) iot_thing_name: ::std::option::Option<::std::string::String>,
}
impl DeviceBuilder {
    /// <p>The name of the device.</p>
    /// This field is required.
    pub fn device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the device.</p>
    pub fn set_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_name = input;
        self
    }
    /// <p>The name of the device.</p>
    pub fn get_device_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_name
    }
    /// <p>Description of the device.</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>Description of the device.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>Description of the device.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Amazon Web Services Internet of Things (IoT) object name.</p>
    pub fn iot_thing_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.iot_thing_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Amazon Web Services Internet of Things (IoT) object name.</p>
    pub fn set_iot_thing_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.iot_thing_name = input;
        self
    }
    /// <p>Amazon Web Services Internet of Things (IoT) object name.</p>
    pub fn get_iot_thing_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.iot_thing_name
    }
    /// Consumes the builder and constructs a [`Device`](crate::types::Device).
    pub fn build(self) -> crate::types::Device {
        crate::types::Device {
            device_name: self.device_name,
            description: self.description,
            iot_thing_name: self.iot_thing_name,
        }
    }
}