aws_sdk_elasticache/operation/describe_cache_engine_versions/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_cache_engine_versions::_describe_cache_engine_versions_output::DescribeCacheEngineVersionsOutputBuilder;
3
4pub use crate::operation::describe_cache_engine_versions::_describe_cache_engine_versions_input::DescribeCacheEngineVersionsInputBuilder;
5
6impl crate::operation::describe_cache_engine_versions::builders::DescribeCacheEngineVersionsInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.describe_cache_engine_versions();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `DescribeCacheEngineVersions`.
24///
25/// <p>Returns a list of the available cache engines and their versions.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeCacheEngineVersionsFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::describe_cache_engine_versions::builders::DescribeCacheEngineVersionsInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsOutput,
35 crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsError,
36 > for DescribeCacheEngineVersionsFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsOutput,
44 crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl DescribeCacheEngineVersionsFluentBuilder {
51 /// Creates a new `DescribeCacheEngineVersionsFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the DescribeCacheEngineVersions as a reference.
60 pub fn as_input(&self) -> &crate::operation::describe_cache_engine_versions::builders::DescribeCacheEngineVersionsInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersions::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersions::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsOutput,
97 crate::operation::describe_cache_engine_versions::DescribeCacheEngineVersionsError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 /// Create a paginator for this request
112 ///
113 /// Paginators are used by calling [`send().await`](crate::operation::describe_cache_engine_versions::paginator::DescribeCacheEngineVersionsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114 pub fn into_paginator(self) -> crate::operation::describe_cache_engine_versions::paginator::DescribeCacheEngineVersionsPaginator {
115 crate::operation::describe_cache_engine_versions::paginator::DescribeCacheEngineVersionsPaginator::new(self.handle, self.inner)
116 }
117 /// <p>The cache engine to return. Valid values: <code>memcached</code> | <code>redis</code></p>
118 pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.inner = self.inner.engine(input.into());
120 self
121 }
122 /// <p>The cache engine to return. Valid values: <code>memcached</code> | <code>redis</code></p>
123 pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.inner = self.inner.set_engine(input);
125 self
126 }
127 /// <p>The cache engine to return. Valid values: <code>memcached</code> | <code>redis</code></p>
128 pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
129 self.inner.get_engine()
130 }
131 /// <p>The cache engine version to return.</p>
132 /// <p>Example: <code>1.4.14</code></p>
133 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.inner = self.inner.engine_version(input.into());
135 self
136 }
137 /// <p>The cache engine version to return.</p>
138 /// <p>Example: <code>1.4.14</code></p>
139 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.inner = self.inner.set_engine_version(input);
141 self
142 }
143 /// <p>The cache engine version to return.</p>
144 /// <p>Example: <code>1.4.14</code></p>
145 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
146 self.inner.get_engine_version()
147 }
148 /// <p>The name of a specific cache parameter group family to return details for.</p>
149 /// <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>
150 /// <p>Constraints:</p>
151 /// <ul>
152 /// <li>
153 /// <p>Must be 1 to 255 alphanumeric characters</p></li>
154 /// <li>
155 /// <p>First character must be a letter</p></li>
156 /// <li>
157 /// <p>Cannot end with a hyphen or contain two consecutive hyphens</p></li>
158 /// </ul>
159 pub fn cache_parameter_group_family(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160 self.inner = self.inner.cache_parameter_group_family(input.into());
161 self
162 }
163 /// <p>The name of a specific cache parameter group family to return details for.</p>
164 /// <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>
165 /// <p>Constraints:</p>
166 /// <ul>
167 /// <li>
168 /// <p>Must be 1 to 255 alphanumeric characters</p></li>
169 /// <li>
170 /// <p>First character must be a letter</p></li>
171 /// <li>
172 /// <p>Cannot end with a hyphen or contain two consecutive hyphens</p></li>
173 /// </ul>
174 pub fn set_cache_parameter_group_family(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
175 self.inner = self.inner.set_cache_parameter_group_family(input);
176 self
177 }
178 /// <p>The name of a specific cache parameter group family to return details for.</p>
179 /// <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>
180 /// <p>Constraints:</p>
181 /// <ul>
182 /// <li>
183 /// <p>Must be 1 to 255 alphanumeric characters</p></li>
184 /// <li>
185 /// <p>First character must be a letter</p></li>
186 /// <li>
187 /// <p>Cannot end with a hyphen or contain two consecutive hyphens</p></li>
188 /// </ul>
189 pub fn get_cache_parameter_group_family(&self) -> &::std::option::Option<::std::string::String> {
190 self.inner.get_cache_parameter_group_family()
191 }
192 /// <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>
193 /// <p>Default: 100</p>
194 /// <p>Constraints: minimum 20; maximum 100.</p>
195 pub fn max_records(mut self, input: i32) -> Self {
196 self.inner = self.inner.max_records(input);
197 self
198 }
199 /// <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>
200 /// <p>Default: 100</p>
201 /// <p>Constraints: minimum 20; maximum 100.</p>
202 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
203 self.inner = self.inner.set_max_records(input);
204 self
205 }
206 /// <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>
207 /// <p>Default: 100</p>
208 /// <p>Constraints: minimum 20; maximum 100.</p>
209 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
210 self.inner.get_max_records()
211 }
212 /// <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>
213 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214 self.inner = self.inner.marker(input.into());
215 self
216 }
217 /// <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>
218 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219 self.inner = self.inner.set_marker(input);
220 self
221 }
222 /// <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>
223 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
224 self.inner.get_marker()
225 }
226 /// <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>
227 pub fn default_only(mut self, input: bool) -> Self {
228 self.inner = self.inner.default_only(input);
229 self
230 }
231 /// <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>
232 pub fn set_default_only(mut self, input: ::std::option::Option<bool>) -> Self {
233 self.inner = self.inner.set_default_only(input);
234 self
235 }
236 /// <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>
237 pub fn get_default_only(&self) -> &::std::option::Option<bool> {
238 self.inner.get_default_only()
239 }
240}