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 UpdateDevicesInput {
6/// <p>The name of the fleet the devices belong to.</p>
7pub device_fleet_name: ::std::option::Option<::std::string::String>,
8/// <p>List of devices to register with Edge Manager agent.</p>
9pub devices: ::std::option::Option<::std::vec::Vec<crate::types::Device>>,
10}
11impl UpdateDevicesInput {
12/// <p>The name of the fleet the devices belong to.</p>
13pub fn device_fleet_name(&self) -> ::std::option::Option<&str> {
14self.device_fleet_name.as_deref()
15 }
16/// <p>List of devices to register with Edge Manager agent.</p>
17 ///
18 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.devices.is_none()`.
19pub fn devices(&self) -> &[crate::types::Device] {
20self.devices.as_deref().unwrap_or_default()
21 }
22}
23impl UpdateDevicesInput {
24/// Creates a new builder-style object to manufacture [`UpdateDevicesInput`](crate::operation::update_devices::UpdateDevicesInput).
25pub fn builder() -> crate::operation::update_devices::builders::UpdateDevicesInputBuilder {
26crate::operation::update_devices::builders::UpdateDevicesInputBuilder::default()
27 }
28}
2930/// A builder for [`UpdateDevicesInput`](crate::operation::update_devices::UpdateDevicesInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct UpdateDevicesInputBuilder {
34pub(crate) device_fleet_name: ::std::option::Option<::std::string::String>,
35pub(crate) devices: ::std::option::Option<::std::vec::Vec<crate::types::Device>>,
36}
37impl UpdateDevicesInputBuilder {
38/// <p>The name of the fleet the devices belong to.</p>
39 /// This field is required.
40pub fn device_fleet_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41self.device_fleet_name = ::std::option::Option::Some(input.into());
42self
43}
44/// <p>The name of the fleet the devices belong to.</p>
45pub fn set_device_fleet_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46self.device_fleet_name = input;
47self
48}
49/// <p>The name of the fleet the devices belong to.</p>
50pub fn get_device_fleet_name(&self) -> &::std::option::Option<::std::string::String> {
51&self.device_fleet_name
52 }
53/// Appends an item to `devices`.
54 ///
55 /// To override the contents of this collection use [`set_devices`](Self::set_devices).
56 ///
57 /// <p>List of devices to register with Edge Manager agent.</p>
58pub fn devices(mut self, input: crate::types::Device) -> Self {
59let mut v = self.devices.unwrap_or_default();
60 v.push(input);
61self.devices = ::std::option::Option::Some(v);
62self
63}
64/// <p>List of devices to register with Edge Manager agent.</p>
65pub fn set_devices(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Device>>) -> Self {
66self.devices = input;
67self
68}
69/// <p>List of devices to register with Edge Manager agent.</p>
70pub fn get_devices(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Device>> {
71&self.devices
72 }
73/// Consumes the builder and constructs a [`UpdateDevicesInput`](crate::operation::update_devices::UpdateDevicesInput).
74pub fn build(
75self,
76 ) -> ::std::result::Result<crate::operation::update_devices::UpdateDevicesInput, ::aws_smithy_types::error::operation::BuildError> {
77 ::std::result::Result::Ok(crate::operation::update_devices::UpdateDevicesInput {
78 device_fleet_name: self.device_fleet_name,
79 devices: self.devices,
80 })
81 }
82}