aws_sdk_ec2/operation/describe_addresses_attribute/_describe_addresses_attribute_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 DescribeAddressesAttributeInput {
6 /// <p>\[EC2-VPC\] The allocation IDs.</p>
7 pub allocation_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8 /// <p>The attribute of the IP address.</p>
9 pub attribute: ::std::option::Option<crate::types::AddressAttributeName>,
10 /// <p>The token for the next page of results.</p>
11 pub next_token: ::std::option::Option<::std::string::String>,
12 /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
13 pub max_results: ::std::option::Option<i32>,
14 /// <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>
15 pub dry_run: ::std::option::Option<bool>,
16}
17impl DescribeAddressesAttributeInput {
18 /// <p>\[EC2-VPC\] The allocation IDs.</p>
19 ///
20 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.allocation_ids.is_none()`.
21 pub fn allocation_ids(&self) -> &[::std::string::String] {
22 self.allocation_ids.as_deref().unwrap_or_default()
23 }
24 /// <p>The attribute of the IP address.</p>
25 pub fn attribute(&self) -> ::std::option::Option<&crate::types::AddressAttributeName> {
26 self.attribute.as_ref()
27 }
28 /// <p>The token for the next page of results.</p>
29 pub fn next_token(&self) -> ::std::option::Option<&str> {
30 self.next_token.as_deref()
31 }
32 /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
33 pub fn max_results(&self) -> ::std::option::Option<i32> {
34 self.max_results
35 }
36 /// <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>
37 pub fn dry_run(&self) -> ::std::option::Option<bool> {
38 self.dry_run
39 }
40}
41impl DescribeAddressesAttributeInput {
42 /// Creates a new builder-style object to manufacture [`DescribeAddressesAttributeInput`](crate::operation::describe_addresses_attribute::DescribeAddressesAttributeInput).
43 pub fn builder() -> crate::operation::describe_addresses_attribute::builders::DescribeAddressesAttributeInputBuilder {
44 crate::operation::describe_addresses_attribute::builders::DescribeAddressesAttributeInputBuilder::default()
45 }
46}
47
48/// A builder for [`DescribeAddressesAttributeInput`](crate::operation::describe_addresses_attribute::DescribeAddressesAttributeInput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct DescribeAddressesAttributeInputBuilder {
52 pub(crate) allocation_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
53 pub(crate) attribute: ::std::option::Option<crate::types::AddressAttributeName>,
54 pub(crate) next_token: ::std::option::Option<::std::string::String>,
55 pub(crate) max_results: ::std::option::Option<i32>,
56 pub(crate) dry_run: ::std::option::Option<bool>,
57}
58impl DescribeAddressesAttributeInputBuilder {
59 /// Appends an item to `allocation_ids`.
60 ///
61 /// To override the contents of this collection use [`set_allocation_ids`](Self::set_allocation_ids).
62 ///
63 /// <p>\[EC2-VPC\] The allocation IDs.</p>
64 pub fn allocation_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65 let mut v = self.allocation_ids.unwrap_or_default();
66 v.push(input.into());
67 self.allocation_ids = ::std::option::Option::Some(v);
68 self
69 }
70 /// <p>\[EC2-VPC\] The allocation IDs.</p>
71 pub fn set_allocation_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
72 self.allocation_ids = input;
73 self
74 }
75 /// <p>\[EC2-VPC\] The allocation IDs.</p>
76 pub fn get_allocation_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
77 &self.allocation_ids
78 }
79 /// <p>The attribute of the IP address.</p>
80 pub fn attribute(mut self, input: crate::types::AddressAttributeName) -> Self {
81 self.attribute = ::std::option::Option::Some(input);
82 self
83 }
84 /// <p>The attribute of the IP address.</p>
85 pub fn set_attribute(mut self, input: ::std::option::Option<crate::types::AddressAttributeName>) -> Self {
86 self.attribute = input;
87 self
88 }
89 /// <p>The attribute of the IP address.</p>
90 pub fn get_attribute(&self) -> &::std::option::Option<crate::types::AddressAttributeName> {
91 &self.attribute
92 }
93 /// <p>The token for the next page of results.</p>
94 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.next_token = ::std::option::Option::Some(input.into());
96 self
97 }
98 /// <p>The token for the next page of results.</p>
99 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.next_token = input;
101 self
102 }
103 /// <p>The token for the next page of results.</p>
104 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
105 &self.next_token
106 }
107 /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
108 pub fn max_results(mut self, input: i32) -> Self {
109 self.max_results = ::std::option::Option::Some(input);
110 self
111 }
112 /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
113 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
114 self.max_results = input;
115 self
116 }
117 /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
118 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
119 &self.max_results
120 }
121 /// <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>
122 pub fn dry_run(mut self, input: bool) -> Self {
123 self.dry_run = ::std::option::Option::Some(input);
124 self
125 }
126 /// <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>
127 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
128 self.dry_run = input;
129 self
130 }
131 /// <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>
132 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
133 &self.dry_run
134 }
135 /// Consumes the builder and constructs a [`DescribeAddressesAttributeInput`](crate::operation::describe_addresses_attribute::DescribeAddressesAttributeInput).
136 pub fn build(
137 self,
138 ) -> ::std::result::Result<
139 crate::operation::describe_addresses_attribute::DescribeAddressesAttributeInput,
140 ::aws_smithy_types::error::operation::BuildError,
141 > {
142 ::std::result::Result::Ok(crate::operation::describe_addresses_attribute::DescribeAddressesAttributeInput {
143 allocation_ids: self.allocation_ids,
144 attribute: self.attribute,
145 next_token: self.next_token,
146 max_results: self.max_results,
147 dry_run: self.dry_run,
148 })
149 }
150}