aws_sdk_elasticsearch/operation/describe_packages/
_describe_packages_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribePackagesInput {
7 pub filters: ::std::option::Option<::std::vec::Vec<crate::types::DescribePackagesFilter>>,
9 pub max_results: ::std::option::Option<i32>,
11 pub next_token: ::std::option::Option<::std::string::String>,
13}
14impl DescribePackagesInput {
15 pub fn filters(&self) -> &[crate::types::DescribePackagesFilter] {
19 self.filters.as_deref().unwrap_or_default()
20 }
21 pub fn max_results(&self) -> ::std::option::Option<i32> {
23 self.max_results
24 }
25 pub fn next_token(&self) -> ::std::option::Option<&str> {
27 self.next_token.as_deref()
28 }
29}
30impl DescribePackagesInput {
31 pub fn builder() -> crate::operation::describe_packages::builders::DescribePackagesInputBuilder {
33 crate::operation::describe_packages::builders::DescribePackagesInputBuilder::default()
34 }
35}
36
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct DescribePackagesInputBuilder {
41 pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::DescribePackagesFilter>>,
42 pub(crate) max_results: ::std::option::Option<i32>,
43 pub(crate) next_token: ::std::option::Option<::std::string::String>,
44}
45impl DescribePackagesInputBuilder {
46 pub fn filters(mut self, input: crate::types::DescribePackagesFilter) -> Self {
52 let mut v = self.filters.unwrap_or_default();
53 v.push(input);
54 self.filters = ::std::option::Option::Some(v);
55 self
56 }
57 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DescribePackagesFilter>>) -> Self {
59 self.filters = input;
60 self
61 }
62 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DescribePackagesFilter>> {
64 &self.filters
65 }
66 pub fn max_results(mut self, input: i32) -> Self {
68 self.max_results = ::std::option::Option::Some(input);
69 self
70 }
71 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
73 self.max_results = input;
74 self
75 }
76 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
78 &self.max_results
79 }
80 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 self.next_token = ::std::option::Option::Some(input.into());
83 self
84 }
85 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87 self.next_token = input;
88 self
89 }
90 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
92 &self.next_token
93 }
94 pub fn build(
96 self,
97 ) -> ::std::result::Result<crate::operation::describe_packages::DescribePackagesInput, ::aws_smithy_types::error::operation::BuildError> {
98 ::std::result::Result::Ok(crate::operation::describe_packages::DescribePackagesInput {
99 filters: self.filters,
100 max_results: self.max_results,
101 next_token: self.next_token,
102 })
103 }
104}