aws_sdk_elasticbeanstalk/operation/list_platform_versions/_list_platform_versions_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 ListPlatformVersionsInput {
6 /// <p>Criteria for restricting the resulting list of platform versions. The filter is interpreted as a logical conjunction (AND) of the separate <code>PlatformFilter</code> terms.</p>
7 pub filters: ::std::option::Option<::std::vec::Vec<crate::types::PlatformFilter>>,
8 /// <p>The maximum number of platform version values returned in one call.</p>
9 pub max_records: ::std::option::Option<i32>,
10 /// <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>
11 /// <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>
12 pub next_token: ::std::option::Option<::std::string::String>,
13}
14impl ListPlatformVersionsInput {
15 /// <p>Criteria for restricting the resulting list of platform versions. The filter is interpreted as a logical conjunction (AND) of the separate <code>PlatformFilter</code> terms.</p>
16 ///
17 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
18 pub fn filters(&self) -> &[crate::types::PlatformFilter] {
19 self.filters.as_deref().unwrap_or_default()
20 }
21 /// <p>The maximum number of platform version values returned in one call.</p>
22 pub fn max_records(&self) -> ::std::option::Option<i32> {
23 self.max_records
24 }
25 /// <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>
26 /// <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>
27 pub fn next_token(&self) -> ::std::option::Option<&str> {
28 self.next_token.as_deref()
29 }
30}
31impl ListPlatformVersionsInput {
32 /// Creates a new builder-style object to manufacture [`ListPlatformVersionsInput`](crate::operation::list_platform_versions::ListPlatformVersionsInput).
33 pub fn builder() -> crate::operation::list_platform_versions::builders::ListPlatformVersionsInputBuilder {
34 crate::operation::list_platform_versions::builders::ListPlatformVersionsInputBuilder::default()
35 }
36}
37
38/// A builder for [`ListPlatformVersionsInput`](crate::operation::list_platform_versions::ListPlatformVersionsInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct ListPlatformVersionsInputBuilder {
42 pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::PlatformFilter>>,
43 pub(crate) max_records: ::std::option::Option<i32>,
44 pub(crate) next_token: ::std::option::Option<::std::string::String>,
45}
46impl ListPlatformVersionsInputBuilder {
47 /// Appends an item to `filters`.
48 ///
49 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
50 ///
51 /// <p>Criteria for restricting the resulting list of platform versions. The filter is interpreted as a logical conjunction (AND) of the separate <code>PlatformFilter</code> terms.</p>
52 pub fn filters(mut self, input: crate::types::PlatformFilter) -> Self {
53 let mut v = self.filters.unwrap_or_default();
54 v.push(input);
55 self.filters = ::std::option::Option::Some(v);
56 self
57 }
58 /// <p>Criteria for restricting the resulting list of platform versions. The filter is interpreted as a logical conjunction (AND) of the separate <code>PlatformFilter</code> terms.</p>
59 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlatformFilter>>) -> Self {
60 self.filters = input;
61 self
62 }
63 /// <p>Criteria for restricting the resulting list of platform versions. The filter is interpreted as a logical conjunction (AND) of the separate <code>PlatformFilter</code> terms.</p>
64 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlatformFilter>> {
65 &self.filters
66 }
67 /// <p>The maximum number of platform version values returned in one call.</p>
68 pub fn max_records(mut self, input: i32) -> Self {
69 self.max_records = ::std::option::Option::Some(input);
70 self
71 }
72 /// <p>The maximum number of platform version values returned in one call.</p>
73 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
74 self.max_records = input;
75 self
76 }
77 /// <p>The maximum number of platform version values returned in one call.</p>
78 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
79 &self.max_records
80 }
81 /// <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>
82 /// <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>
83 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84 self.next_token = ::std::option::Option::Some(input.into());
85 self
86 }
87 /// <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>
88 /// <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>
89 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90 self.next_token = input;
91 self
92 }
93 /// <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>
94 /// <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>
95 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
96 &self.next_token
97 }
98 /// Consumes the builder and constructs a [`ListPlatformVersionsInput`](crate::operation::list_platform_versions::ListPlatformVersionsInput).
99 pub fn build(
100 self,
101 ) -> ::std::result::Result<crate::operation::list_platform_versions::ListPlatformVersionsInput, ::aws_smithy_types::error::operation::BuildError>
102 {
103 ::std::result::Result::Ok(crate::operation::list_platform_versions::ListPlatformVersionsInput {
104 filters: self.filters,
105 max_records: self.max_records,
106 next_token: self.next_token,
107 })
108 }
109}