aws_sdk_apigatewayv2/operation/create_integration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_integration::_create_integration_output::CreateIntegrationOutputBuilder;
3
4pub use crate::operation::create_integration::_create_integration_input::CreateIntegrationInputBuilder;
5
6impl crate::operation::create_integration::builders::CreateIntegrationInputBuilder {
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::create_integration::CreateIntegrationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_integration::CreateIntegrationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_integration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateIntegration`.
24///
25/// <p>Creates an Integration.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateIntegrationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_integration::builders::CreateIntegrationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_integration::CreateIntegrationOutput,
35        crate::operation::create_integration::CreateIntegrationError,
36    > for CreateIntegrationFluentBuilder
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::create_integration::CreateIntegrationOutput,
44            crate::operation::create_integration::CreateIntegrationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateIntegrationFluentBuilder {
51    /// Creates a new `CreateIntegrationFluentBuilder`.
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 CreateIntegration as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_integration::builders::CreateIntegrationInputBuilder {
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::create_integration::CreateIntegrationOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_integration::CreateIntegrationError,
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::create_integration::CreateIntegration::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_integration::CreateIntegration::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::create_integration::CreateIntegrationOutput,
97        crate::operation::create_integration::CreateIntegrationError,
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    /// <p>The API identifier.</p>
112    pub fn api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.api_id(input.into());
114        self
115    }
116    /// <p>The API identifier.</p>
117    pub fn set_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_api_id(input);
119        self
120    }
121    /// <p>The API identifier.</p>
122    pub fn get_api_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_api_id()
124    }
125    /// <p>The ID of the VPC link for a private integration. Supported only for HTTP APIs.</p>
126    pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.connection_id(input.into());
128        self
129    }
130    /// <p>The ID of the VPC link for a private integration. Supported only for HTTP APIs.</p>
131    pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_connection_id(input);
133        self
134    }
135    /// <p>The ID of the VPC link for a private integration. Supported only for HTTP APIs.</p>
136    pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_connection_id()
138    }
139    /// <p>The type of the network connection to the integration endpoint. Specify INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and resources in a VPC. The default value is INTERNET.</p>
140    pub fn connection_type(mut self, input: crate::types::ConnectionType) -> Self {
141        self.inner = self.inner.connection_type(input);
142        self
143    }
144    /// <p>The type of the network connection to the integration endpoint. Specify INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and resources in a VPC. The default value is INTERNET.</p>
145    pub fn set_connection_type(mut self, input: ::std::option::Option<crate::types::ConnectionType>) -> Self {
146        self.inner = self.inner.set_connection_type(input);
147        self
148    }
149    /// <p>The type of the network connection to the integration endpoint. Specify INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and resources in a VPC. The default value is INTERNET.</p>
150    pub fn get_connection_type(&self) -> &::std::option::Option<crate::types::ConnectionType> {
151        self.inner.get_connection_type()
152    }
153    /// <p>Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:</p>
154    /// <p>CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.</p>
155    /// <p>CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.</p>
156    /// <p>If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.</p>
157    pub fn content_handling_strategy(mut self, input: crate::types::ContentHandlingStrategy) -> Self {
158        self.inner = self.inner.content_handling_strategy(input);
159        self
160    }
161    /// <p>Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:</p>
162    /// <p>CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.</p>
163    /// <p>CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.</p>
164    /// <p>If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.</p>
165    pub fn set_content_handling_strategy(mut self, input: ::std::option::Option<crate::types::ContentHandlingStrategy>) -> Self {
166        self.inner = self.inner.set_content_handling_strategy(input);
167        self
168    }
169    /// <p>Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:</p>
170    /// <p>CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.</p>
171    /// <p>CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.</p>
172    /// <p>If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.</p>
173    pub fn get_content_handling_strategy(&self) -> &::std::option::Option<crate::types::ContentHandlingStrategy> {
174        self.inner.get_content_handling_strategy()
175    }
176    /// <p>Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, specify null.</p>
177    pub fn credentials_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178        self.inner = self.inner.credentials_arn(input.into());
179        self
180    }
181    /// <p>Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, specify null.</p>
182    pub fn set_credentials_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183        self.inner = self.inner.set_credentials_arn(input);
184        self
185    }
186    /// <p>Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, specify null.</p>
187    pub fn get_credentials_arn(&self) -> &::std::option::Option<::std::string::String> {
188        self.inner.get_credentials_arn()
189    }
190    /// <p>The description of the integration.</p>
191    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
192        self.inner = self.inner.description(input.into());
193        self
194    }
195    /// <p>The description of the integration.</p>
196    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
197        self.inner = self.inner.set_description(input);
198        self
199    }
200    /// <p>The description of the integration.</p>
201    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
202        self.inner.get_description()
203    }
204    /// <p>Specifies the integration's HTTP method type.</p>
205    pub fn integration_method(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206        self.inner = self.inner.integration_method(input.into());
207        self
208    }
209    /// <p>Specifies the integration's HTTP method type.</p>
210    pub fn set_integration_method(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.inner = self.inner.set_integration_method(input);
212        self
213    }
214    /// <p>Specifies the integration's HTTP method type.</p>
215    pub fn get_integration_method(&self) -> &::std::option::Option<::std::string::String> {
216        self.inner.get_integration_method()
217    }
218    /// <p>Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html">Integration subtype reference</a>.</p>
219    pub fn integration_subtype(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
220        self.inner = self.inner.integration_subtype(input.into());
221        self
222    }
223    /// <p>Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html">Integration subtype reference</a>.</p>
224    pub fn set_integration_subtype(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
225        self.inner = self.inner.set_integration_subtype(input);
226        self
227    }
228    /// <p>Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html">Integration subtype reference</a>.</p>
229    pub fn get_integration_subtype(&self) -> &::std::option::Option<::std::string::String> {
230        self.inner.get_integration_subtype()
231    }
232    /// <p>The integration type of an integration. One of the following:</p>
233    /// <p>AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.</p>
234    /// <p>AWS_PROXY: for integrating the route or method request with a Lambda function or other AWS service action. This integration is also referred to as a Lambda proxy integration.</p>
235    /// <p>HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.</p>
236    /// <p>HTTP_PROXY: for integrating the route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration. For HTTP API private integrations, use an HTTP_PROXY integration.</p>
237    /// <p>MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.</p>
238    pub fn integration_type(mut self, input: crate::types::IntegrationType) -> Self {
239        self.inner = self.inner.integration_type(input);
240        self
241    }
242    /// <p>The integration type of an integration. One of the following:</p>
243    /// <p>AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.</p>
244    /// <p>AWS_PROXY: for integrating the route or method request with a Lambda function or other AWS service action. This integration is also referred to as a Lambda proxy integration.</p>
245    /// <p>HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.</p>
246    /// <p>HTTP_PROXY: for integrating the route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration. For HTTP API private integrations, use an HTTP_PROXY integration.</p>
247    /// <p>MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.</p>
248    pub fn set_integration_type(mut self, input: ::std::option::Option<crate::types::IntegrationType>) -> Self {
249        self.inner = self.inner.set_integration_type(input);
250        self
251    }
252    /// <p>The integration type of an integration. One of the following:</p>
253    /// <p>AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.</p>
254    /// <p>AWS_PROXY: for integrating the route or method request with a Lambda function or other AWS service action. This integration is also referred to as a Lambda proxy integration.</p>
255    /// <p>HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.</p>
256    /// <p>HTTP_PROXY: for integrating the route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration. For HTTP API private integrations, use an HTTP_PROXY integration.</p>
257    /// <p>MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.</p>
258    pub fn get_integration_type(&self) -> &::std::option::Option<crate::types::IntegrationType> {
259        self.inner.get_integration_type()
260    }
261    /// <p>For a Lambda integration, specify the URI of a Lambda function.</p>
262    /// <p>For an HTTP integration, specify a fully-qualified URL.</p>
263    /// <p>For an HTTP API private integration, specify the ARN of an Application Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map service. If you specify the ARN of an AWS Cloud Map service, API Gateway uses DiscoverInstances to identify resources. You can use query parameters to target specific resources. To learn more, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html">DiscoverInstances</a>. For private integrations, all resources must be owned by the same AWS account.</p>
264    pub fn integration_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
265        self.inner = self.inner.integration_uri(input.into());
266        self
267    }
268    /// <p>For a Lambda integration, specify the URI of a Lambda function.</p>
269    /// <p>For an HTTP integration, specify a fully-qualified URL.</p>
270    /// <p>For an HTTP API private integration, specify the ARN of an Application Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map service. If you specify the ARN of an AWS Cloud Map service, API Gateway uses DiscoverInstances to identify resources. You can use query parameters to target specific resources. To learn more, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html">DiscoverInstances</a>. For private integrations, all resources must be owned by the same AWS account.</p>
271    pub fn set_integration_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272        self.inner = self.inner.set_integration_uri(input);
273        self
274    }
275    /// <p>For a Lambda integration, specify the URI of a Lambda function.</p>
276    /// <p>For an HTTP integration, specify a fully-qualified URL.</p>
277    /// <p>For an HTTP API private integration, specify the ARN of an Application Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map service. If you specify the ARN of an AWS Cloud Map service, API Gateway uses DiscoverInstances to identify resources. You can use query parameters to target specific resources. To learn more, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html">DiscoverInstances</a>. For private integrations, all resources must be owned by the same AWS account.</p>
278    pub fn get_integration_uri(&self) -> &::std::option::Option<::std::string::String> {
279        self.inner.get_integration_uri()
280    }
281    /// <p>Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.</p>
282    /// <p>WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.</p>
283    /// <p>NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.</p>
284    /// <p>WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.</p>
285    pub fn passthrough_behavior(mut self, input: crate::types::PassthroughBehavior) -> Self {
286        self.inner = self.inner.passthrough_behavior(input);
287        self
288    }
289    /// <p>Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.</p>
290    /// <p>WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.</p>
291    /// <p>NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.</p>
292    /// <p>WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.</p>
293    pub fn set_passthrough_behavior(mut self, input: ::std::option::Option<crate::types::PassthroughBehavior>) -> Self {
294        self.inner = self.inner.set_passthrough_behavior(input);
295        self
296    }
297    /// <p>Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.</p>
298    /// <p>WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.</p>
299    /// <p>NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.</p>
300    /// <p>WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.</p>
301    pub fn get_passthrough_behavior(&self) -> &::std::option::Option<crate::types::PassthroughBehavior> {
302        self.inner.get_passthrough_behavior()
303    }
304    /// <p>Specifies the format of the payload sent to an integration. Required for HTTP APIs. Supported values for Lambda proxy integrations are 1.0 and 2.0. For all other integrations, 1.0 is the only supported value. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html">Working with AWS Lambda proxy integrations for HTTP APIs</a>.</p>
305    pub fn payload_format_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
306        self.inner = self.inner.payload_format_version(input.into());
307        self
308    }
309    /// <p>Specifies the format of the payload sent to an integration. Required for HTTP APIs. Supported values for Lambda proxy integrations are 1.0 and 2.0. For all other integrations, 1.0 is the only supported value. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html">Working with AWS Lambda proxy integrations for HTTP APIs</a>.</p>
310    pub fn set_payload_format_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
311        self.inner = self.inner.set_payload_format_version(input);
312        self
313    }
314    /// <p>Specifies the format of the payload sent to an integration. Required for HTTP APIs. Supported values for Lambda proxy integrations are 1.0 and 2.0. For all other integrations, 1.0 is the only supported value. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html">Working with AWS Lambda proxy integrations for HTTP APIs</a>.</p>
315    pub fn get_payload_format_version(&self) -> &::std::option::Option<::std::string::String> {
316        self.inner.get_payload_format_version()
317    }
318    ///
319    /// Adds a key-value pair to `RequestParameters`.
320    ///
321    /// To override the contents of this collection use [`set_request_parameters`](Self::set_request_parameters).
322    ///
323    /// <p>For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.<replaceable>
324    /// {location}
325    /// </replaceable>.<replaceable>
326    /// {name}
327    /// </replaceable> , where <replaceable>
328    /// {location}
329    /// </replaceable> is querystring, path, or header; and <replaceable>
330    /// {name}
331    /// </replaceable> must be a valid and unique method request parameter name.</p>
332    /// <p>For HTTP API integrations with a specified integrationSubtype, request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html">Working with AWS service integrations for HTTP APIs</a>.</p>
333    /// <p>For HTTP API integrations without a specified integrationSubtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to the backend. The key should follow the pattern &lt;action&gt;:&lt;header|querystring|path&gt;.&lt;location&gt; where action can be append, overwrite or remove. For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
334    pub fn request_parameters(
335        mut self,
336        k: impl ::std::convert::Into<::std::string::String>,
337        v: impl ::std::convert::Into<::std::string::String>,
338    ) -> Self {
339        self.inner = self.inner.request_parameters(k.into(), v.into());
340        self
341    }
342    /// <p>For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.<replaceable>
343    /// {location}
344    /// </replaceable>.<replaceable>
345    /// {name}
346    /// </replaceable> , where <replaceable>
347    /// {location}
348    /// </replaceable> is querystring, path, or header; and <replaceable>
349    /// {name}
350    /// </replaceable> must be a valid and unique method request parameter name.</p>
351    /// <p>For HTTP API integrations with a specified integrationSubtype, request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html">Working with AWS service integrations for HTTP APIs</a>.</p>
352    /// <p>For HTTP API integrations without a specified integrationSubtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to the backend. The key should follow the pattern &lt;action&gt;:&lt;header|querystring|path&gt;.&lt;location&gt; where action can be append, overwrite or remove. For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
353    pub fn set_request_parameters(
354        mut self,
355        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
356    ) -> Self {
357        self.inner = self.inner.set_request_parameters(input);
358        self
359    }
360    /// <p>For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.<replaceable>
361    /// {location}
362    /// </replaceable>.<replaceable>
363    /// {name}
364    /// </replaceable> , where <replaceable>
365    /// {location}
366    /// </replaceable> is querystring, path, or header; and <replaceable>
367    /// {name}
368    /// </replaceable> must be a valid and unique method request parameter name.</p>
369    /// <p>For HTTP API integrations with a specified integrationSubtype, request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html">Working with AWS service integrations for HTTP APIs</a>.</p>
370    /// <p>For HTTP API integrations without a specified integrationSubtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to the backend. The key should follow the pattern &lt;action&gt;:&lt;header|querystring|path&gt;.&lt;location&gt; where action can be append, overwrite or remove. For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
371    pub fn get_request_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
372        self.inner.get_request_parameters()
373    }
374    ///
375    /// Adds a key-value pair to `RequestTemplates`.
376    ///
377    /// To override the contents of this collection use [`set_request_templates`](Self::set_request_templates).
378    ///
379    /// <p>Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.</p>
380    pub fn request_templates(
381        mut self,
382        k: impl ::std::convert::Into<::std::string::String>,
383        v: impl ::std::convert::Into<::std::string::String>,
384    ) -> Self {
385        self.inner = self.inner.request_templates(k.into(), v.into());
386        self
387    }
388    /// <p>Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.</p>
389    pub fn set_request_templates(
390        mut self,
391        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
392    ) -> Self {
393        self.inner = self.inner.set_request_templates(input);
394        self
395    }
396    /// <p>Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.</p>
397    pub fn get_request_templates(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
398        self.inner.get_request_templates()
399    }
400    ///
401    /// Adds a key-value pair to `ResponseParameters`.
402    ///
403    /// To override the contents of this collection use [`set_response_parameters`](Self::set_response_parameters).
404    ///
405    /// <p>Supported only for HTTP APIs. You use response parameters to transform the HTTP response from a backend integration before returning the response to clients. Specify a key-value map from a selection key to response parameters. The selection key must be a valid HTTP status code within the range of 200-599. Response parameters are a key-value map. The key must match pattern &lt;action&gt;:&lt;header&gt;.&lt;location&gt; or overwrite.statuscode. The action can be append, overwrite or remove. The value can be a static value, or map to response data, stage variables, or context variables that are evaluated at runtime. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
406    pub fn response_parameters(
407        mut self,
408        k: impl ::std::convert::Into<::std::string::String>,
409        v: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
410    ) -> Self {
411        self.inner = self.inner.response_parameters(k.into(), v);
412        self
413    }
414    /// <p>Supported only for HTTP APIs. You use response parameters to transform the HTTP response from a backend integration before returning the response to clients. Specify a key-value map from a selection key to response parameters. The selection key must be a valid HTTP status code within the range of 200-599. Response parameters are a key-value map. The key must match pattern &lt;action&gt;:&lt;header&gt;.&lt;location&gt; or overwrite.statuscode. The action can be append, overwrite or remove. The value can be a static value, or map to response data, stage variables, or context variables that are evaluated at runtime. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
415    pub fn set_response_parameters(
416        mut self,
417        input: ::std::option::Option<
418            ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
419        >,
420    ) -> Self {
421        self.inner = self.inner.set_response_parameters(input);
422        self
423    }
424    /// <p>Supported only for HTTP APIs. You use response parameters to transform the HTTP response from a backend integration before returning the response to clients. Specify a key-value map from a selection key to response parameters. The selection key must be a valid HTTP status code within the range of 200-599. Response parameters are a key-value map. The key must match pattern &lt;action&gt;:&lt;header&gt;.&lt;location&gt; or overwrite.statuscode. The action can be append, overwrite or remove. The value can be a static value, or map to response data, stage variables, or context variables that are evaluated at runtime. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
425    pub fn get_response_parameters(
426        &self,
427    ) -> &::std::option::Option<
428        ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
429    > {
430        self.inner.get_response_parameters()
431    }
432    /// <p>The template selection expression for the integration.</p>
433    pub fn template_selection_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
434        self.inner = self.inner.template_selection_expression(input.into());
435        self
436    }
437    /// <p>The template selection expression for the integration.</p>
438    pub fn set_template_selection_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
439        self.inner = self.inner.set_template_selection_expression(input);
440        self
441    }
442    /// <p>The template selection expression for the integration.</p>
443    pub fn get_template_selection_expression(&self) -> &::std::option::Option<::std::string::String> {
444        self.inner.get_template_selection_expression()
445    }
446    /// <p>Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.</p>
447    pub fn timeout_in_millis(mut self, input: i32) -> Self {
448        self.inner = self.inner.timeout_in_millis(input);
449        self
450    }
451    /// <p>Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.</p>
452    pub fn set_timeout_in_millis(mut self, input: ::std::option::Option<i32>) -> Self {
453        self.inner = self.inner.set_timeout_in_millis(input);
454        self
455    }
456    /// <p>Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.</p>
457    pub fn get_timeout_in_millis(&self) -> &::std::option::Option<i32> {
458        self.inner.get_timeout_in_millis()
459    }
460    /// <p>The TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs.</p>
461    pub fn tls_config(mut self, input: crate::types::TlsConfigInput) -> Self {
462        self.inner = self.inner.tls_config(input);
463        self
464    }
465    /// <p>The TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs.</p>
466    pub fn set_tls_config(mut self, input: ::std::option::Option<crate::types::TlsConfigInput>) -> Self {
467        self.inner = self.inner.set_tls_config(input);
468        self
469    }
470    /// <p>The TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs.</p>
471    pub fn get_tls_config(&self) -> &::std::option::Option<crate::types::TlsConfigInput> {
472        self.inner.get_tls_config()
473    }
474}