aws_sdk_dax/operation/describe_clusters/_describe_clusters_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 DescribeClustersInput {
6 /// <p>The names of the DAX clusters being described.</p>
7 pub cluster_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8 /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
9 /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
10 pub max_results: ::std::option::Option<i32>,
11 /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
12 pub next_token: ::std::option::Option<::std::string::String>,
13}
14impl DescribeClustersInput {
15 /// <p>The names of the DAX clusters being described.</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 `.cluster_names.is_none()`.
18 pub fn cluster_names(&self) -> &[::std::string::String] {
19 self.cluster_names.as_deref().unwrap_or_default()
20 }
21 /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
22 /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
23 pub fn max_results(&self) -> ::std::option::Option<i32> {
24 self.max_results
25 }
26 /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
27 pub fn next_token(&self) -> ::std::option::Option<&str> {
28 self.next_token.as_deref()
29 }
30}
31impl DescribeClustersInput {
32 /// Creates a new builder-style object to manufacture [`DescribeClustersInput`](crate::operation::describe_clusters::DescribeClustersInput).
33 pub fn builder() -> crate::operation::describe_clusters::builders::DescribeClustersInputBuilder {
34 crate::operation::describe_clusters::builders::DescribeClustersInputBuilder::default()
35 }
36}
37
38/// A builder for [`DescribeClustersInput`](crate::operation::describe_clusters::DescribeClustersInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct DescribeClustersInputBuilder {
42 pub(crate) cluster_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
43 pub(crate) max_results: ::std::option::Option<i32>,
44 pub(crate) next_token: ::std::option::Option<::std::string::String>,
45}
46impl DescribeClustersInputBuilder {
47 /// Appends an item to `cluster_names`.
48 ///
49 /// To override the contents of this collection use [`set_cluster_names`](Self::set_cluster_names).
50 ///
51 /// <p>The names of the DAX clusters being described.</p>
52 pub fn cluster_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 let mut v = self.cluster_names.unwrap_or_default();
54 v.push(input.into());
55 self.cluster_names = ::std::option::Option::Some(v);
56 self
57 }
58 /// <p>The names of the DAX clusters being described.</p>
59 pub fn set_cluster_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
60 self.cluster_names = input;
61 self
62 }
63 /// <p>The names of the DAX clusters being described.</p>
64 pub fn get_cluster_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
65 &self.cluster_names
66 }
67 /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
68 /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
69 pub fn max_results(mut self, input: i32) -> Self {
70 self.max_results = ::std::option::Option::Some(input);
71 self
72 }
73 /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
74 /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
75 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
76 self.max_results = input;
77 self
78 }
79 /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
80 /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
81 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
82 &self.max_results
83 }
84 /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
85 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.next_token = ::std::option::Option::Some(input.into());
87 self
88 }
89 /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
90 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.next_token = input;
92 self
93 }
94 /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</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 [`DescribeClustersInput`](crate::operation::describe_clusters::DescribeClustersInput).
99 pub fn build(
100 self,
101 ) -> ::std::result::Result<crate::operation::describe_clusters::DescribeClustersInput, ::aws_smithy_types::error::operation::BuildError> {
102 ::std::result::Result::Ok(crate::operation::describe_clusters::DescribeClustersInput {
103 cluster_names: self.cluster_names,
104 max_results: self.max_results,
105 next_token: self.next_token,
106 })
107 }
108}