aws_sdk_elasticbeanstalk/operation/describe_environments/_describe_environments_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request to describe one or more environments.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeEnvironmentsInput {
7 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.</p>
8 pub application_name: ::std::option::Option<::std::string::String>,
9 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application version.</p>
10 pub version_label: ::std::option::Option<::std::string::String>,
11 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified IDs.</p>
12 pub environment_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
13 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified names.</p>
14 pub environment_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
15 /// <p>Indicates whether to include deleted environments:</p>
16 /// <p><code>true</code>: Environments that have been deleted after <code>IncludedDeletedBackTo</code> are displayed.</p>
17 /// <p><code>false</code>: Do not include deleted environments.</p>
18 pub include_deleted: ::std::option::Option<bool>,
19 /// <p>If specified when <code>IncludeDeleted</code> is set to <code>true</code>, then environments deleted after this date are displayed.</p>
20 pub included_deleted_back_to: ::std::option::Option<::aws_smithy_types::DateTime>,
21 /// <p>For a paginated request. Specify a maximum number of environments to include in each response.</p>
22 /// <p>If no <code>MaxRecords</code> is specified, all available environments are retrieved in a single response.</p>
23 pub max_records: ::std::option::Option<i32>,
24 /// <p>For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.</p>
25 /// <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>
26 pub next_token: ::std::option::Option<::std::string::String>,
27}
28impl DescribeEnvironmentsInput {
29 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.</p>
30 pub fn application_name(&self) -> ::std::option::Option<&str> {
31 self.application_name.as_deref()
32 }
33 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application version.</p>
34 pub fn version_label(&self) -> ::std::option::Option<&str> {
35 self.version_label.as_deref()
36 }
37 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified IDs.</p>
38 ///
39 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.environment_ids.is_none()`.
40 pub fn environment_ids(&self) -> &[::std::string::String] {
41 self.environment_ids.as_deref().unwrap_or_default()
42 }
43 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified names.</p>
44 ///
45 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.environment_names.is_none()`.
46 pub fn environment_names(&self) -> &[::std::string::String] {
47 self.environment_names.as_deref().unwrap_or_default()
48 }
49 /// <p>Indicates whether to include deleted environments:</p>
50 /// <p><code>true</code>: Environments that have been deleted after <code>IncludedDeletedBackTo</code> are displayed.</p>
51 /// <p><code>false</code>: Do not include deleted environments.</p>
52 pub fn include_deleted(&self) -> ::std::option::Option<bool> {
53 self.include_deleted
54 }
55 /// <p>If specified when <code>IncludeDeleted</code> is set to <code>true</code>, then environments deleted after this date are displayed.</p>
56 pub fn included_deleted_back_to(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57 self.included_deleted_back_to.as_ref()
58 }
59 /// <p>For a paginated request. Specify a maximum number of environments to include in each response.</p>
60 /// <p>If no <code>MaxRecords</code> is specified, all available environments are retrieved in a single response.</p>
61 pub fn max_records(&self) -> ::std::option::Option<i32> {
62 self.max_records
63 }
64 /// <p>For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.</p>
65 /// <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>
66 pub fn next_token(&self) -> ::std::option::Option<&str> {
67 self.next_token.as_deref()
68 }
69}
70impl DescribeEnvironmentsInput {
71 /// Creates a new builder-style object to manufacture [`DescribeEnvironmentsInput`](crate::operation::describe_environments::DescribeEnvironmentsInput).
72 pub fn builder() -> crate::operation::describe_environments::builders::DescribeEnvironmentsInputBuilder {
73 crate::operation::describe_environments::builders::DescribeEnvironmentsInputBuilder::default()
74 }
75}
76
77/// A builder for [`DescribeEnvironmentsInput`](crate::operation::describe_environments::DescribeEnvironmentsInput).
78#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
79#[non_exhaustive]
80pub struct DescribeEnvironmentsInputBuilder {
81 pub(crate) application_name: ::std::option::Option<::std::string::String>,
82 pub(crate) version_label: ::std::option::Option<::std::string::String>,
83 pub(crate) environment_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
84 pub(crate) environment_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
85 pub(crate) include_deleted: ::std::option::Option<bool>,
86 pub(crate) included_deleted_back_to: ::std::option::Option<::aws_smithy_types::DateTime>,
87 pub(crate) max_records: ::std::option::Option<i32>,
88 pub(crate) next_token: ::std::option::Option<::std::string::String>,
89}
90impl DescribeEnvironmentsInputBuilder {
91 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.</p>
92 pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93 self.application_name = ::std::option::Option::Some(input.into());
94 self
95 }
96 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.</p>
97 pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98 self.application_name = input;
99 self
100 }
101 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.</p>
102 pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
103 &self.application_name
104 }
105 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application version.</p>
106 pub fn version_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 self.version_label = ::std::option::Option::Some(input.into());
108 self
109 }
110 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application version.</p>
111 pub fn set_version_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112 self.version_label = input;
113 self
114 }
115 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application version.</p>
116 pub fn get_version_label(&self) -> &::std::option::Option<::std::string::String> {
117 &self.version_label
118 }
119 /// Appends an item to `environment_ids`.
120 ///
121 /// To override the contents of this collection use [`set_environment_ids`](Self::set_environment_ids).
122 ///
123 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified IDs.</p>
124 pub fn environment_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125 let mut v = self.environment_ids.unwrap_or_default();
126 v.push(input.into());
127 self.environment_ids = ::std::option::Option::Some(v);
128 self
129 }
130 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified IDs.</p>
131 pub fn set_environment_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
132 self.environment_ids = input;
133 self
134 }
135 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified IDs.</p>
136 pub fn get_environment_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
137 &self.environment_ids
138 }
139 /// Appends an item to `environment_names`.
140 ///
141 /// To override the contents of this collection use [`set_environment_names`](Self::set_environment_names).
142 ///
143 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified names.</p>
144 pub fn environment_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145 let mut v = self.environment_names.unwrap_or_default();
146 v.push(input.into());
147 self.environment_names = ::std::option::Option::Some(v);
148 self
149 }
150 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified names.</p>
151 pub fn set_environment_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
152 self.environment_names = input;
153 self
154 }
155 /// <p>If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified names.</p>
156 pub fn get_environment_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
157 &self.environment_names
158 }
159 /// <p>Indicates whether to include deleted environments:</p>
160 /// <p><code>true</code>: Environments that have been deleted after <code>IncludedDeletedBackTo</code> are displayed.</p>
161 /// <p><code>false</code>: Do not include deleted environments.</p>
162 pub fn include_deleted(mut self, input: bool) -> Self {
163 self.include_deleted = ::std::option::Option::Some(input);
164 self
165 }
166 /// <p>Indicates whether to include deleted environments:</p>
167 /// <p><code>true</code>: Environments that have been deleted after <code>IncludedDeletedBackTo</code> are displayed.</p>
168 /// <p><code>false</code>: Do not include deleted environments.</p>
169 pub fn set_include_deleted(mut self, input: ::std::option::Option<bool>) -> Self {
170 self.include_deleted = input;
171 self
172 }
173 /// <p>Indicates whether to include deleted environments:</p>
174 /// <p><code>true</code>: Environments that have been deleted after <code>IncludedDeletedBackTo</code> are displayed.</p>
175 /// <p><code>false</code>: Do not include deleted environments.</p>
176 pub fn get_include_deleted(&self) -> &::std::option::Option<bool> {
177 &self.include_deleted
178 }
179 /// <p>If specified when <code>IncludeDeleted</code> is set to <code>true</code>, then environments deleted after this date are displayed.</p>
180 pub fn included_deleted_back_to(mut self, input: ::aws_smithy_types::DateTime) -> Self {
181 self.included_deleted_back_to = ::std::option::Option::Some(input);
182 self
183 }
184 /// <p>If specified when <code>IncludeDeleted</code> is set to <code>true</code>, then environments deleted after this date are displayed.</p>
185 pub fn set_included_deleted_back_to(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
186 self.included_deleted_back_to = input;
187 self
188 }
189 /// <p>If specified when <code>IncludeDeleted</code> is set to <code>true</code>, then environments deleted after this date are displayed.</p>
190 pub fn get_included_deleted_back_to(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
191 &self.included_deleted_back_to
192 }
193 /// <p>For a paginated request. Specify a maximum number of environments to include in each response.</p>
194 /// <p>If no <code>MaxRecords</code> is specified, all available environments are retrieved in a single response.</p>
195 pub fn max_records(mut self, input: i32) -> Self {
196 self.max_records = ::std::option::Option::Some(input);
197 self
198 }
199 /// <p>For a paginated request. Specify a maximum number of environments to include in each response.</p>
200 /// <p>If no <code>MaxRecords</code> is specified, all available environments are retrieved in a single response.</p>
201 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
202 self.max_records = input;
203 self
204 }
205 /// <p>For a paginated request. Specify a maximum number of environments to include in each response.</p>
206 /// <p>If no <code>MaxRecords</code> is specified, all available environments are retrieved in a single response.</p>
207 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
208 &self.max_records
209 }
210 /// <p>For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.</p>
211 /// <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>
212 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213 self.next_token = ::std::option::Option::Some(input.into());
214 self
215 }
216 /// <p>For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.</p>
217 /// <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>
218 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219 self.next_token = input;
220 self
221 }
222 /// <p>For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.</p>
223 /// <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>
224 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
225 &self.next_token
226 }
227 /// Consumes the builder and constructs a [`DescribeEnvironmentsInput`](crate::operation::describe_environments::DescribeEnvironmentsInput).
228 pub fn build(
229 self,
230 ) -> ::std::result::Result<crate::operation::describe_environments::DescribeEnvironmentsInput, ::aws_smithy_types::error::operation::BuildError>
231 {
232 ::std::result::Result::Ok(crate::operation::describe_environments::DescribeEnvironmentsInput {
233 application_name: self.application_name,
234 version_label: self.version_label,
235 environment_ids: self.environment_ids,
236 environment_names: self.environment_names,
237 include_deleted: self.include_deleted,
238 included_deleted_back_to: self.included_deleted_back_to,
239 max_records: self.max_records,
240 next_token: self.next_token,
241 })
242 }
243}