aws_sdk_sagemaker/operation/describe_device/
_describe_device_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeDeviceInput {
6    /// <p>Next token of device description.</p>
7    pub next_token: ::std::option::Option<::std::string::String>,
8    /// <p>The unique ID of the device.</p>
9    pub device_name: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the fleet the devices belong to.</p>
11    pub device_fleet_name: ::std::option::Option<::std::string::String>,
12}
13impl DescribeDeviceInput {
14    /// <p>Next token of device description.</p>
15    pub fn next_token(&self) -> ::std::option::Option<&str> {
16        self.next_token.as_deref()
17    }
18    /// <p>The unique ID of the device.</p>
19    pub fn device_name(&self) -> ::std::option::Option<&str> {
20        self.device_name.as_deref()
21    }
22    /// <p>The name of the fleet the devices belong to.</p>
23    pub fn device_fleet_name(&self) -> ::std::option::Option<&str> {
24        self.device_fleet_name.as_deref()
25    }
26}
27impl DescribeDeviceInput {
28    /// Creates a new builder-style object to manufacture [`DescribeDeviceInput`](crate::operation::describe_device::DescribeDeviceInput).
29    pub fn builder() -> crate::operation::describe_device::builders::DescribeDeviceInputBuilder {
30        crate::operation::describe_device::builders::DescribeDeviceInputBuilder::default()
31    }
32}
33
34/// A builder for [`DescribeDeviceInput`](crate::operation::describe_device::DescribeDeviceInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DescribeDeviceInputBuilder {
38    pub(crate) next_token: ::std::option::Option<::std::string::String>,
39    pub(crate) device_name: ::std::option::Option<::std::string::String>,
40    pub(crate) device_fleet_name: ::std::option::Option<::std::string::String>,
41}
42impl DescribeDeviceInputBuilder {
43    /// <p>Next token of device description.</p>
44    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.next_token = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>Next token of device description.</p>
49    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.next_token = input;
51        self
52    }
53    /// <p>Next token of device description.</p>
54    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
55        &self.next_token
56    }
57    /// <p>The unique ID of the device.</p>
58    /// This field is required.
59    pub fn device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.device_name = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The unique ID of the device.</p>
64    pub fn set_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.device_name = input;
66        self
67    }
68    /// <p>The unique ID of the device.</p>
69    pub fn get_device_name(&self) -> &::std::option::Option<::std::string::String> {
70        &self.device_name
71    }
72    /// <p>The name of the fleet the devices belong to.</p>
73    /// This field is required.
74    pub fn device_fleet_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.device_fleet_name = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The name of the fleet the devices belong to.</p>
79    pub fn set_device_fleet_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.device_fleet_name = input;
81        self
82    }
83    /// <p>The name of the fleet the devices belong to.</p>
84    pub fn get_device_fleet_name(&self) -> &::std::option::Option<::std::string::String> {
85        &self.device_fleet_name
86    }
87    /// Consumes the builder and constructs a [`DescribeDeviceInput`](crate::operation::describe_device::DescribeDeviceInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::describe_device::DescribeDeviceInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::describe_device::DescribeDeviceInput {
92            next_token: self.next_token,
93            device_name: self.device_name,
94            device_fleet_name: self.device_fleet_name,
95        })
96    }
97}