aws_sdk_sagemaker/operation/register_devices/
_register_devices_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct RegisterDevicesInput {
6 pub device_fleet_name: ::std::option::Option<::std::string::String>,
8 pub devices: ::std::option::Option<::std::vec::Vec<crate::types::Device>>,
10 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
12}
13impl RegisterDevicesInput {
14 pub fn device_fleet_name(&self) -> ::std::option::Option<&str> {
16 self.device_fleet_name.as_deref()
17 }
18 pub fn devices(&self) -> &[crate::types::Device] {
22 self.devices.as_deref().unwrap_or_default()
23 }
24 pub fn tags(&self) -> &[crate::types::Tag] {
28 self.tags.as_deref().unwrap_or_default()
29 }
30}
31impl RegisterDevicesInput {
32 pub fn builder() -> crate::operation::register_devices::builders::RegisterDevicesInputBuilder {
34 crate::operation::register_devices::builders::RegisterDevicesInputBuilder::default()
35 }
36}
37
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct RegisterDevicesInputBuilder {
42 pub(crate) device_fleet_name: ::std::option::Option<::std::string::String>,
43 pub(crate) devices: ::std::option::Option<::std::vec::Vec<crate::types::Device>>,
44 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
45}
46impl RegisterDevicesInputBuilder {
47 pub fn device_fleet_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
50 self.device_fleet_name = ::std::option::Option::Some(input.into());
51 self
52 }
53 pub fn set_device_fleet_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
55 self.device_fleet_name = input;
56 self
57 }
58 pub fn get_device_fleet_name(&self) -> &::std::option::Option<::std::string::String> {
60 &self.device_fleet_name
61 }
62 pub fn devices(mut self, input: crate::types::Device) -> Self {
68 let mut v = self.devices.unwrap_or_default();
69 v.push(input);
70 self.devices = ::std::option::Option::Some(v);
71 self
72 }
73 pub fn set_devices(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Device>>) -> Self {
75 self.devices = input;
76 self
77 }
78 pub fn get_devices(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Device>> {
80 &self.devices
81 }
82 pub fn tags(mut self, input: crate::types::Tag) -> Self {
88 let mut v = self.tags.unwrap_or_default();
89 v.push(input);
90 self.tags = ::std::option::Option::Some(v);
91 self
92 }
93 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
95 self.tags = input;
96 self
97 }
98 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
100 &self.tags
101 }
102 pub fn build(
104 self,
105 ) -> ::std::result::Result<crate::operation::register_devices::RegisterDevicesInput, ::aws_smithy_types::error::operation::BuildError> {
106 ::std::result::Result::Ok(crate::operation::register_devices::RegisterDevicesInput {
107 device_fleet_name: self.device_fleet_name,
108 devices: self.devices,
109 tags: self.tags,
110 })
111 }
112}