aws_sdk_ec2/operation/deregister_transit_gateway_multicast_group_members/
_deregister_transit_gateway_multicast_group_members_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 DeregisterTransitGatewayMulticastGroupMembersInput {
6    /// <p>The ID of the transit gateway multicast domain.</p>
7    pub transit_gateway_multicast_domain_id: ::std::option::Option<::std::string::String>,
8    /// <p>The IP address assigned to the transit gateway multicast group.</p>
9    pub group_ip_address: ::std::option::Option<::std::string::String>,
10    /// <p>The IDs of the group members' network interfaces.</p>
11    pub network_interface_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
13    pub dry_run: ::std::option::Option<bool>,
14}
15impl DeregisterTransitGatewayMulticastGroupMembersInput {
16    /// <p>The ID of the transit gateway multicast domain.</p>
17    pub fn transit_gateway_multicast_domain_id(&self) -> ::std::option::Option<&str> {
18        self.transit_gateway_multicast_domain_id.as_deref()
19    }
20    /// <p>The IP address assigned to the transit gateway multicast group.</p>
21    pub fn group_ip_address(&self) -> ::std::option::Option<&str> {
22        self.group_ip_address.as_deref()
23    }
24    /// <p>The IDs of the group members' network interfaces.</p>
25    ///
26    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.network_interface_ids.is_none()`.
27    pub fn network_interface_ids(&self) -> &[::std::string::String] {
28        self.network_interface_ids.as_deref().unwrap_or_default()
29    }
30    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
31    pub fn dry_run(&self) -> ::std::option::Option<bool> {
32        self.dry_run
33    }
34}
35impl DeregisterTransitGatewayMulticastGroupMembersInput {
36    /// Creates a new builder-style object to manufacture [`DeregisterTransitGatewayMulticastGroupMembersInput`](crate::operation::deregister_transit_gateway_multicast_group_members::DeregisterTransitGatewayMulticastGroupMembersInput).
37    pub fn builder(
38    ) -> crate::operation::deregister_transit_gateway_multicast_group_members::builders::DeregisterTransitGatewayMulticastGroupMembersInputBuilder
39    {
40        crate::operation::deregister_transit_gateway_multicast_group_members::builders::DeregisterTransitGatewayMulticastGroupMembersInputBuilder::default()
41    }
42}
43
44/// A builder for [`DeregisterTransitGatewayMulticastGroupMembersInput`](crate::operation::deregister_transit_gateway_multicast_group_members::DeregisterTransitGatewayMulticastGroupMembersInput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct DeregisterTransitGatewayMulticastGroupMembersInputBuilder {
48    pub(crate) transit_gateway_multicast_domain_id: ::std::option::Option<::std::string::String>,
49    pub(crate) group_ip_address: ::std::option::Option<::std::string::String>,
50    pub(crate) network_interface_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
51    pub(crate) dry_run: ::std::option::Option<bool>,
52}
53impl DeregisterTransitGatewayMulticastGroupMembersInputBuilder {
54    /// <p>The ID of the transit gateway multicast domain.</p>
55    pub fn transit_gateway_multicast_domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56        self.transit_gateway_multicast_domain_id = ::std::option::Option::Some(input.into());
57        self
58    }
59    /// <p>The ID of the transit gateway multicast domain.</p>
60    pub fn set_transit_gateway_multicast_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
61        self.transit_gateway_multicast_domain_id = input;
62        self
63    }
64    /// <p>The ID of the transit gateway multicast domain.</p>
65    pub fn get_transit_gateway_multicast_domain_id(&self) -> &::std::option::Option<::std::string::String> {
66        &self.transit_gateway_multicast_domain_id
67    }
68    /// <p>The IP address assigned to the transit gateway multicast group.</p>
69    pub fn group_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.group_ip_address = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p>The IP address assigned to the transit gateway multicast group.</p>
74    pub fn set_group_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.group_ip_address = input;
76        self
77    }
78    /// <p>The IP address assigned to the transit gateway multicast group.</p>
79    pub fn get_group_ip_address(&self) -> &::std::option::Option<::std::string::String> {
80        &self.group_ip_address
81    }
82    /// Appends an item to `network_interface_ids`.
83    ///
84    /// To override the contents of this collection use [`set_network_interface_ids`](Self::set_network_interface_ids).
85    ///
86    /// <p>The IDs of the group members' network interfaces.</p>
87    pub fn network_interface_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        let mut v = self.network_interface_ids.unwrap_or_default();
89        v.push(input.into());
90        self.network_interface_ids = ::std::option::Option::Some(v);
91        self
92    }
93    /// <p>The IDs of the group members' network interfaces.</p>
94    pub fn set_network_interface_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
95        self.network_interface_ids = input;
96        self
97    }
98    /// <p>The IDs of the group members' network interfaces.</p>
99    pub fn get_network_interface_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
100        &self.network_interface_ids
101    }
102    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
103    pub fn dry_run(mut self, input: bool) -> Self {
104        self.dry_run = ::std::option::Option::Some(input);
105        self
106    }
107    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
108    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
109        self.dry_run = input;
110        self
111    }
112    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
113    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
114        &self.dry_run
115    }
116    /// Consumes the builder and constructs a [`DeregisterTransitGatewayMulticastGroupMembersInput`](crate::operation::deregister_transit_gateway_multicast_group_members::DeregisterTransitGatewayMulticastGroupMembersInput).
117    pub fn build(
118        self,
119    ) -> ::std::result::Result<
120        crate::operation::deregister_transit_gateway_multicast_group_members::DeregisterTransitGatewayMulticastGroupMembersInput,
121        ::aws_smithy_types::error::operation::BuildError,
122    > {
123        ::std::result::Result::Ok(
124            crate::operation::deregister_transit_gateway_multicast_group_members::DeregisterTransitGatewayMulticastGroupMembersInput {
125                transit_gateway_multicast_domain_id: self.transit_gateway_multicast_domain_id,
126                group_ip_address: self.group_ip_address,
127                network_interface_ids: self.network_interface_ids,
128                dry_run: self.dry_run,
129            },
130        )
131    }
132}