aws_sdk_elasticache/operation/describe_cache_engine_versions/
_describe_cache_engine_versions_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of a <code>DescribeCacheEngineVersions</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeCacheEngineVersionsInput {
7    /// <p>The cache engine to return. Valid values: <code>memcached</code> | <code>redis</code></p>
8    pub engine: ::std::option::Option<::std::string::String>,
9    /// <p>The cache engine version to return.</p>
10    /// <p>Example: <code>1.4.14</code></p>
11    pub engine_version: ::std::option::Option<::std::string::String>,
12    /// <p>The name of a specific cache parameter group family to return details for.</p>
13    /// <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>memcached1.6</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | <code>redis6.x</code> | <code>redis6.2</code> | <code>redis7</code> | <code>valkey7</code></p>
14    /// <p>Constraints:</p>
15    /// <ul>
16    /// <li>
17    /// <p>Must be 1 to 255 alphanumeric characters</p></li>
18    /// <li>
19    /// <p>First character must be a letter</p></li>
20    /// <li>
21    /// <p>Cannot end with a hyphen or contain two consecutive hyphens</p></li>
22    /// </ul>
23    pub cache_parameter_group_family: ::std::option::Option<::std::string::String>,
24    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p>
25    /// <p>Default: 100</p>
26    /// <p>Constraints: minimum 20; maximum 100.</p>
27    pub max_records: ::std::option::Option<i32>,
28    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
29    pub marker: ::std::option::Option<::std::string::String>,
30    /// <p>If <code>true</code>, specifies that only the default version of the specified engine or engine and major version combination is to be returned.</p>
31    pub default_only: ::std::option::Option<bool>,
32}
33impl DescribeCacheEngineVersionsInput {
34    /// <p>The cache engine to return. Valid values: <code>memcached</code> | <code>redis</code></p>
35    pub fn engine(&self) -> ::std::option::Option<&str> {
36        self.engine.as_deref()
37    }
38    /// <p>The cache engine version to return.</p>
39    /// <p>Example: <code>1.4.14</code></p>
40    pub fn engine_version(&self) -> ::std::option::Option<&str> {
41        self.engine_version.as_deref()
42    }
43    /// <p>The name of a specific cache parameter group family to return details for.</p>
44    /// <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>memcached1.6</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | <code>redis6.x</code> | <code>redis6.2</code> | <code>redis7</code> | <code>valkey7</code></p>
45    /// <p>Constraints:</p>
46    /// <ul>
47    /// <li>
48    /// <p>Must be 1 to 255 alphanumeric characters</p></li>
49    /// <li>
50    /// <p>First character must be a letter</p></li>
51    /// <li>
52    /// <p>Cannot end with a hyphen or contain two consecutive hyphens</p></li>
53    /// </ul>
54    pub fn cache_parameter_group_family(&self) -> ::std::option::Option<&str> {
55        self.cache_parameter_group_family.as_deref()
56    }
57    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p>
58    /// <p>Default: 100</p>
59    /// <p>Constraints: minimum 20; maximum 100.</p>
60    pub fn max_records(&self) -> ::std::option::Option<i32> {
61        self.max_records
62    }
63    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
64    pub fn marker(&self) -> ::std::option::Option<&str> {
65        self.marker.as_deref()
66    }
67    /// <p>If <code>true</code>, specifies that only the default version of the specified engine or engine and major version combination is to be returned.</p>
68    pub fn default_only(&self) -> ::std::option::Option<bool> {
69        self.default_only
70    }
71}
72impl DescribeCacheEngineVersionsInput {
73    /// Creates a new builder-style object to manufacture [`DescribeCacheEngineVersionsInput`](crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsInput).
74    pub fn builder() -> crate::operation::describe_cache_engine_versions::builders::DescribeCacheEngineVersionsInputBuilder {
75        crate::operation::describe_cache_engine_versions::builders::DescribeCacheEngineVersionsInputBuilder::default()
76    }
77}
78
79/// A builder for [`DescribeCacheEngineVersionsInput`](crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsInput).
80#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
81#[non_exhaustive]
82pub struct DescribeCacheEngineVersionsInputBuilder {
83    pub(crate) engine: ::std::option::Option<::std::string::String>,
84    pub(crate) engine_version: ::std::option::Option<::std::string::String>,
85    pub(crate) cache_parameter_group_family: ::std::option::Option<::std::string::String>,
86    pub(crate) max_records: ::std::option::Option<i32>,
87    pub(crate) marker: ::std::option::Option<::std::string::String>,
88    pub(crate) default_only: ::std::option::Option<bool>,
89}
90impl DescribeCacheEngineVersionsInputBuilder {
91    /// <p>The cache engine to return. Valid values: <code>memcached</code> | <code>redis</code></p>
92    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.engine = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <p>The cache engine to return. Valid values: <code>memcached</code> | <code>redis</code></p>
97    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98        self.engine = input;
99        self
100    }
101    /// <p>The cache engine to return. Valid values: <code>memcached</code> | <code>redis</code></p>
102    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
103        &self.engine
104    }
105    /// <p>The cache engine version to return.</p>
106    /// <p>Example: <code>1.4.14</code></p>
107    pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.engine_version = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The cache engine version to return.</p>
112    /// <p>Example: <code>1.4.14</code></p>
113    pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.engine_version = input;
115        self
116    }
117    /// <p>The cache engine version to return.</p>
118    /// <p>Example: <code>1.4.14</code></p>
119    pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
120        &self.engine_version
121    }
122    /// <p>The name of a specific cache parameter group family to return details for.</p>
123    /// <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>memcached1.6</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | <code>redis6.x</code> | <code>redis6.2</code> | <code>redis7</code> | <code>valkey7</code></p>
124    /// <p>Constraints:</p>
125    /// <ul>
126    /// <li>
127    /// <p>Must be 1 to 255 alphanumeric characters</p></li>
128    /// <li>
129    /// <p>First character must be a letter</p></li>
130    /// <li>
131    /// <p>Cannot end with a hyphen or contain two consecutive hyphens</p></li>
132    /// </ul>
133    pub fn cache_parameter_group_family(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.cache_parameter_group_family = ::std::option::Option::Some(input.into());
135        self
136    }
137    /// <p>The name of a specific cache parameter group family to return details for.</p>
138    /// <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>memcached1.6</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | <code>redis6.x</code> | <code>redis6.2</code> | <code>redis7</code> | <code>valkey7</code></p>
139    /// <p>Constraints:</p>
140    /// <ul>
141    /// <li>
142    /// <p>Must be 1 to 255 alphanumeric characters</p></li>
143    /// <li>
144    /// <p>First character must be a letter</p></li>
145    /// <li>
146    /// <p>Cannot end with a hyphen or contain two consecutive hyphens</p></li>
147    /// </ul>
148    pub fn set_cache_parameter_group_family(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.cache_parameter_group_family = input;
150        self
151    }
152    /// <p>The name of a specific cache parameter group family to return details for.</p>
153    /// <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>memcached1.6</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | <code>redis6.x</code> | <code>redis6.2</code> | <code>redis7</code> | <code>valkey7</code></p>
154    /// <p>Constraints:</p>
155    /// <ul>
156    /// <li>
157    /// <p>Must be 1 to 255 alphanumeric characters</p></li>
158    /// <li>
159    /// <p>First character must be a letter</p></li>
160    /// <li>
161    /// <p>Cannot end with a hyphen or contain two consecutive hyphens</p></li>
162    /// </ul>
163    pub fn get_cache_parameter_group_family(&self) -> &::std::option::Option<::std::string::String> {
164        &self.cache_parameter_group_family
165    }
166    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p>
167    /// <p>Default: 100</p>
168    /// <p>Constraints: minimum 20; maximum 100.</p>
169    pub fn max_records(mut self, input: i32) -> Self {
170        self.max_records = ::std::option::Option::Some(input);
171        self
172    }
173    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p>
174    /// <p>Default: 100</p>
175    /// <p>Constraints: minimum 20; maximum 100.</p>
176    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
177        self.max_records = input;
178        self
179    }
180    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p>
181    /// <p>Default: 100</p>
182    /// <p>Constraints: minimum 20; maximum 100.</p>
183    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
184        &self.max_records
185    }
186    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
187    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188        self.marker = ::std::option::Option::Some(input.into());
189        self
190    }
191    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
192    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193        self.marker = input;
194        self
195    }
196    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
197    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
198        &self.marker
199    }
200    /// <p>If <code>true</code>, specifies that only the default version of the specified engine or engine and major version combination is to be returned.</p>
201    pub fn default_only(mut self, input: bool) -> Self {
202        self.default_only = ::std::option::Option::Some(input);
203        self
204    }
205    /// <p>If <code>true</code>, specifies that only the default version of the specified engine or engine and major version combination is to be returned.</p>
206    pub fn set_default_only(mut self, input: ::std::option::Option<bool>) -> Self {
207        self.default_only = input;
208        self
209    }
210    /// <p>If <code>true</code>, specifies that only the default version of the specified engine or engine and major version combination is to be returned.</p>
211    pub fn get_default_only(&self) -> &::std::option::Option<bool> {
212        &self.default_only
213    }
214    /// Consumes the builder and constructs a [`DescribeCacheEngineVersionsInput`](crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsInput).
215    pub fn build(
216        self,
217    ) -> ::std::result::Result<
218        crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsInput,
219        ::aws_smithy_types::error::operation::BuildError,
220    > {
221        ::std::result::Result::Ok(crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsInput {
222            engine: self.engine,
223            engine_version: self.engine_version,
224            cache_parameter_group_family: self.cache_parameter_group_family,
225            max_records: self.max_records,
226            marker: self.marker,
227            default_only: self.default_only,
228        })
229    }
230}