Skip to main content

aws_sdk_iotwireless/operation/start_bulk_disassociate_wireless_device_from_multicast_group/
_start_bulk_disassociate_wireless_device_from_multicast_group_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 StartBulkDisassociateWirelessDeviceFromMulticastGroupInput {
6    /// <p>The ID of the multicast group.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>Query string used to search for wireless devices as part of the bulk associate and disassociate process.</p>
9    pub query_string: ::std::option::Option<::std::string::String>,
10    /// <p>The tag to attach to the specified resource. Tags are metadata that you can use to manage a resource.</p>
11    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
12}
13impl StartBulkDisassociateWirelessDeviceFromMulticastGroupInput {
14    /// <p>The ID of the multicast group.</p>
15    pub fn id(&self) -> ::std::option::Option<&str> {
16        self.id.as_deref()
17    }
18    /// <p>Query string used to search for wireless devices as part of the bulk associate and disassociate process.</p>
19    pub fn query_string(&self) -> ::std::option::Option<&str> {
20        self.query_string.as_deref()
21    }
22    /// <p>The tag to attach to the specified resource. Tags are metadata that you can use to manage a resource.</p>
23    ///
24    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
25    pub fn tags(&self) -> &[crate::types::Tag] {
26        self.tags.as_deref().unwrap_or_default()
27    }
28}
29impl StartBulkDisassociateWirelessDeviceFromMulticastGroupInput {
30    /// Creates a new builder-style object to manufacture [`StartBulkDisassociateWirelessDeviceFromMulticastGroupInput`](crate::operation::start_bulk_disassociate_wireless_device_from_multicast_group::StartBulkDisassociateWirelessDeviceFromMulticastGroupInput).
31    pub fn builder() -> crate::operation::start_bulk_disassociate_wireless_device_from_multicast_group::builders::StartBulkDisassociateWirelessDeviceFromMulticastGroupInputBuilder{
32        crate::operation::start_bulk_disassociate_wireless_device_from_multicast_group::builders::StartBulkDisassociateWirelessDeviceFromMulticastGroupInputBuilder::default()
33    }
34}
35
36/// A builder for [`StartBulkDisassociateWirelessDeviceFromMulticastGroupInput`](crate::operation::start_bulk_disassociate_wireless_device_from_multicast_group::StartBulkDisassociateWirelessDeviceFromMulticastGroupInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct StartBulkDisassociateWirelessDeviceFromMulticastGroupInputBuilder {
40    pub(crate) id: ::std::option::Option<::std::string::String>,
41    pub(crate) query_string: ::std::option::Option<::std::string::String>,
42    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
43}
44impl StartBulkDisassociateWirelessDeviceFromMulticastGroupInputBuilder {
45    /// <p>The ID of the multicast group.</p>
46    /// This field is required.
47    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.id = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>The ID of the multicast group.</p>
52    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.id = input;
54        self
55    }
56    /// <p>The ID of the multicast group.</p>
57    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
58        &self.id
59    }
60    /// <p>Query string used to search for wireless devices as part of the bulk associate and disassociate process.</p>
61    pub fn query_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.query_string = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>Query string used to search for wireless devices as part of the bulk associate and disassociate process.</p>
66    pub fn set_query_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.query_string = input;
68        self
69    }
70    /// <p>Query string used to search for wireless devices as part of the bulk associate and disassociate process.</p>
71    pub fn get_query_string(&self) -> &::std::option::Option<::std::string::String> {
72        &self.query_string
73    }
74    /// Appends an item to `tags`.
75    ///
76    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
77    ///
78    /// <p>The tag to attach to the specified resource. Tags are metadata that you can use to manage a resource.</p>
79    pub fn tags(mut self, input: crate::types::Tag) -> Self {
80        let mut v = self.tags.unwrap_or_default();
81        v.push(input);
82        self.tags = ::std::option::Option::Some(v);
83        self
84    }
85    /// <p>The tag to attach to the specified resource. Tags are metadata that you can use to manage a resource.</p>
86    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
87        self.tags = input;
88        self
89    }
90    /// <p>The tag to attach to the specified resource. Tags are metadata that you can use to manage a resource.</p>
91    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
92        &self.tags
93    }
94    /// Consumes the builder and constructs a [`StartBulkDisassociateWirelessDeviceFromMulticastGroupInput`](crate::operation::start_bulk_disassociate_wireless_device_from_multicast_group::StartBulkDisassociateWirelessDeviceFromMulticastGroupInput).
95    pub fn build(
96        self,
97    ) -> ::std::result::Result<
98        crate::operation::start_bulk_disassociate_wireless_device_from_multicast_group::StartBulkDisassociateWirelessDeviceFromMulticastGroupInput,
99        ::aws_smithy_types::error::operation::BuildError,
100    > {
101        ::std::result::Result::Ok(
102            crate::operation::start_bulk_disassociate_wireless_device_from_multicast_group::StartBulkDisassociateWirelessDeviceFromMulticastGroupInput {
103                id: self.id
104                ,
105                query_string: self.query_string
106                ,
107                tags: self.tags
108                ,
109            }
110        )
111    }
112}