aws_sdk_apigateway/operation/put_integration/
_put_integration_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Sets up a method's integration.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PutIntegrationInput {
7    /// <p>The string identifier of the associated RestApi.</p>
8    pub rest_api_id: ::std::option::Option<::std::string::String>,
9    /// <p>Specifies a put integration request's resource ID.</p>
10    pub resource_id: ::std::option::Option<::std::string::String>,
11    /// <p>Specifies the HTTP method for the integration.</p>
12    pub http_method: ::std::option::Option<::std::string::String>,
13    /// <p>Specifies a put integration input's type.</p>
14    pub r#type: ::std::option::Option<crate::types::IntegrationType>,
15    /// <p>The HTTP method for the integration.</p>
16    pub integration_http_method: ::std::option::Option<::std::string::String>,
17    /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where <code>connectionType</code> is not <code>VPC_LINK</code>, or private integration, where <code>connectionType</code> is <code>VPC_LINK</code>. For a private HTTP integration, the URI is not used for routing. For <code>AWS</code> or <code>AWS_PROXY</code> integrations, the URI is of the form <code>arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api</code>}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&amp;{p1}={v1}&amp;p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of <code>GetObject</code>, the <code>uri</code> can be either <code>arn:aws:apigateway:us-west-2:s3:action/GetObject&amp;Bucket={bucket}&amp;Key={key}</code> or <code>arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</code>.</p>
18    pub uri: ::std::option::Option<::std::string::String>,
19    /// <p>The type of the network connection to the integration endpoint. The valid value is <code>INTERNET</code> for connections through the public routable internet or <code>VPC_LINK</code> for private connections between API Gateway and a network load balancer in a VPC. The default value is <code>INTERNET</code>.</p>
20    pub connection_type: ::std::option::Option<crate::types::ConnectionType>,
21    /// <p>The ID of the VpcLink used for the integration. Specify this value only if you specify <code>VPC_LINK</code> as the connection type.</p>
22    pub connection_id: ::std::option::Option<::std::string::String>,
23    /// <p>Specifies whether credentials are required for a put integration.</p>
24    pub credentials: ::std::option::Option<::std::string::String>,
25    /// <p>A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> must be a valid and unique method request parameter name.</p>
26    pub request_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
27    /// <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.</p>
28    pub request_templates: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
29    /// <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 <code>requestTemplates</code> property on the Integration resource. There are three valid values: <code>WHEN_NO_MATCH</code>, <code>WHEN_NO_TEMPLATES</code>, and <code>NEVER</code>.</p>
30    pub passthrough_behavior: ::std::option::Option<::std::string::String>,
31    /// <p>Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the <code>cacheNamespace</code>. You can specify the same <code>cacheNamespace</code> across resources to return the same cached data for requests to different resources.</p>
32    pub cache_namespace: ::std::option::Option<::std::string::String>,
33    /// <p>A list of request parameters whose values API Gateway caches. To be valid values for <code>cacheKeyParameters</code>, these parameters must also be specified for Method <code>requestParameters</code>.</p>
34    pub cache_key_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
35    /// <p>Specifies how to handle request payload content type conversions. Supported values are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following behaviors:</p>
36    /// <p>If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the <code>passthroughBehavior</code> is configured to support payload pass-through.</p>
37    pub content_handling: ::std::option::Option<crate::types::ContentHandlingStrategy>,
38    /// <p>Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.</p>
39    pub timeout_in_millis: ::std::option::Option<i32>,
40    /// <p>Specifies the TLS configuration for an integration.</p>
41    pub tls_config: ::std::option::Option<crate::types::TlsConfig>,
42}
43impl PutIntegrationInput {
44    /// <p>The string identifier of the associated RestApi.</p>
45    pub fn rest_api_id(&self) -> ::std::option::Option<&str> {
46        self.rest_api_id.as_deref()
47    }
48    /// <p>Specifies a put integration request's resource ID.</p>
49    pub fn resource_id(&self) -> ::std::option::Option<&str> {
50        self.resource_id.as_deref()
51    }
52    /// <p>Specifies the HTTP method for the integration.</p>
53    pub fn http_method(&self) -> ::std::option::Option<&str> {
54        self.http_method.as_deref()
55    }
56    /// <p>Specifies a put integration input's type.</p>
57    pub fn r#type(&self) -> ::std::option::Option<&crate::types::IntegrationType> {
58        self.r#type.as_ref()
59    }
60    /// <p>The HTTP method for the integration.</p>
61    pub fn integration_http_method(&self) -> ::std::option::Option<&str> {
62        self.integration_http_method.as_deref()
63    }
64    /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where <code>connectionType</code> is not <code>VPC_LINK</code>, or private integration, where <code>connectionType</code> is <code>VPC_LINK</code>. For a private HTTP integration, the URI is not used for routing. For <code>AWS</code> or <code>AWS_PROXY</code> integrations, the URI is of the form <code>arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api</code>}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&amp;{p1}={v1}&amp;p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of <code>GetObject</code>, the <code>uri</code> can be either <code>arn:aws:apigateway:us-west-2:s3:action/GetObject&amp;Bucket={bucket}&amp;Key={key}</code> or <code>arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</code>.</p>
65    pub fn uri(&self) -> ::std::option::Option<&str> {
66        self.uri.as_deref()
67    }
68    /// <p>The type of the network connection to the integration endpoint. The valid value is <code>INTERNET</code> for connections through the public routable internet or <code>VPC_LINK</code> for private connections between API Gateway and a network load balancer in a VPC. The default value is <code>INTERNET</code>.</p>
69    pub fn connection_type(&self) -> ::std::option::Option<&crate::types::ConnectionType> {
70        self.connection_type.as_ref()
71    }
72    /// <p>The ID of the VpcLink used for the integration. Specify this value only if you specify <code>VPC_LINK</code> as the connection type.</p>
73    pub fn connection_id(&self) -> ::std::option::Option<&str> {
74        self.connection_id.as_deref()
75    }
76    /// <p>Specifies whether credentials are required for a put integration.</p>
77    pub fn credentials(&self) -> ::std::option::Option<&str> {
78        self.credentials.as_deref()
79    }
80    /// <p>A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> must be a valid and unique method request parameter name.</p>
81    pub fn request_parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
82        self.request_parameters.as_ref()
83    }
84    /// <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.</p>
85    pub fn request_templates(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
86        self.request_templates.as_ref()
87    }
88    /// <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 <code>requestTemplates</code> property on the Integration resource. There are three valid values: <code>WHEN_NO_MATCH</code>, <code>WHEN_NO_TEMPLATES</code>, and <code>NEVER</code>.</p>
89    pub fn passthrough_behavior(&self) -> ::std::option::Option<&str> {
90        self.passthrough_behavior.as_deref()
91    }
92    /// <p>Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the <code>cacheNamespace</code>. You can specify the same <code>cacheNamespace</code> across resources to return the same cached data for requests to different resources.</p>
93    pub fn cache_namespace(&self) -> ::std::option::Option<&str> {
94        self.cache_namespace.as_deref()
95    }
96    /// <p>A list of request parameters whose values API Gateway caches. To be valid values for <code>cacheKeyParameters</code>, these parameters must also be specified for Method <code>requestParameters</code>.</p>
97    ///
98    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.cache_key_parameters.is_none()`.
99    pub fn cache_key_parameters(&self) -> &[::std::string::String] {
100        self.cache_key_parameters.as_deref().unwrap_or_default()
101    }
102    /// <p>Specifies how to handle request payload content type conversions. Supported values are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following behaviors:</p>
103    /// <p>If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the <code>passthroughBehavior</code> is configured to support payload pass-through.</p>
104    pub fn content_handling(&self) -> ::std::option::Option<&crate::types::ContentHandlingStrategy> {
105        self.content_handling.as_ref()
106    }
107    /// <p>Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.</p>
108    pub fn timeout_in_millis(&self) -> ::std::option::Option<i32> {
109        self.timeout_in_millis
110    }
111    /// <p>Specifies the TLS configuration for an integration.</p>
112    pub fn tls_config(&self) -> ::std::option::Option<&crate::types::TlsConfig> {
113        self.tls_config.as_ref()
114    }
115}
116impl PutIntegrationInput {
117    /// Creates a new builder-style object to manufacture [`PutIntegrationInput`](crate::operation::put_integration::PutIntegrationInput).
118    pub fn builder() -> crate::operation::put_integration::builders::PutIntegrationInputBuilder {
119        crate::operation::put_integration::builders::PutIntegrationInputBuilder::default()
120    }
121}
122
123/// A builder for [`PutIntegrationInput`](crate::operation::put_integration::PutIntegrationInput).
124#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
125#[non_exhaustive]
126pub struct PutIntegrationInputBuilder {
127    pub(crate) rest_api_id: ::std::option::Option<::std::string::String>,
128    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
129    pub(crate) http_method: ::std::option::Option<::std::string::String>,
130    pub(crate) r#type: ::std::option::Option<crate::types::IntegrationType>,
131    pub(crate) integration_http_method: ::std::option::Option<::std::string::String>,
132    pub(crate) uri: ::std::option::Option<::std::string::String>,
133    pub(crate) connection_type: ::std::option::Option<crate::types::ConnectionType>,
134    pub(crate) connection_id: ::std::option::Option<::std::string::String>,
135    pub(crate) credentials: ::std::option::Option<::std::string::String>,
136    pub(crate) request_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
137    pub(crate) request_templates: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
138    pub(crate) passthrough_behavior: ::std::option::Option<::std::string::String>,
139    pub(crate) cache_namespace: ::std::option::Option<::std::string::String>,
140    pub(crate) cache_key_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
141    pub(crate) content_handling: ::std::option::Option<crate::types::ContentHandlingStrategy>,
142    pub(crate) timeout_in_millis: ::std::option::Option<i32>,
143    pub(crate) tls_config: ::std::option::Option<crate::types::TlsConfig>,
144}
145impl PutIntegrationInputBuilder {
146    /// <p>The string identifier of the associated RestApi.</p>
147    /// This field is required.
148    pub fn rest_api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149        self.rest_api_id = ::std::option::Option::Some(input.into());
150        self
151    }
152    /// <p>The string identifier of the associated RestApi.</p>
153    pub fn set_rest_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154        self.rest_api_id = input;
155        self
156    }
157    /// <p>The string identifier of the associated RestApi.</p>
158    pub fn get_rest_api_id(&self) -> &::std::option::Option<::std::string::String> {
159        &self.rest_api_id
160    }
161    /// <p>Specifies a put integration request's resource ID.</p>
162    /// This field is required.
163    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.resource_id = ::std::option::Option::Some(input.into());
165        self
166    }
167    /// <p>Specifies a put integration request's resource ID.</p>
168    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.resource_id = input;
170        self
171    }
172    /// <p>Specifies a put integration request's resource ID.</p>
173    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
174        &self.resource_id
175    }
176    /// <p>Specifies the HTTP method for the integration.</p>
177    /// This field is required.
178    pub fn http_method(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.http_method = ::std::option::Option::Some(input.into());
180        self
181    }
182    /// <p>Specifies the HTTP method for the integration.</p>
183    pub fn set_http_method(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.http_method = input;
185        self
186    }
187    /// <p>Specifies the HTTP method for the integration.</p>
188    pub fn get_http_method(&self) -> &::std::option::Option<::std::string::String> {
189        &self.http_method
190    }
191    /// <p>Specifies a put integration input's type.</p>
192    /// This field is required.
193    pub fn r#type(mut self, input: crate::types::IntegrationType) -> Self {
194        self.r#type = ::std::option::Option::Some(input);
195        self
196    }
197    /// <p>Specifies a put integration input's type.</p>
198    pub fn set_type(mut self, input: ::std::option::Option<crate::types::IntegrationType>) -> Self {
199        self.r#type = input;
200        self
201    }
202    /// <p>Specifies a put integration input's type.</p>
203    pub fn get_type(&self) -> &::std::option::Option<crate::types::IntegrationType> {
204        &self.r#type
205    }
206    /// <p>The HTTP method for the integration.</p>
207    pub fn integration_http_method(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208        self.integration_http_method = ::std::option::Option::Some(input.into());
209        self
210    }
211    /// <p>The HTTP method for the integration.</p>
212    pub fn set_integration_http_method(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213        self.integration_http_method = input;
214        self
215    }
216    /// <p>The HTTP method for the integration.</p>
217    pub fn get_integration_http_method(&self) -> &::std::option::Option<::std::string::String> {
218        &self.integration_http_method
219    }
220    /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where <code>connectionType</code> is not <code>VPC_LINK</code>, or private integration, where <code>connectionType</code> is <code>VPC_LINK</code>. For a private HTTP integration, the URI is not used for routing. For <code>AWS</code> or <code>AWS_PROXY</code> integrations, the URI is of the form <code>arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api</code>}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&amp;{p1}={v1}&amp;p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of <code>GetObject</code>, the <code>uri</code> can be either <code>arn:aws:apigateway:us-west-2:s3:action/GetObject&amp;Bucket={bucket}&amp;Key={key}</code> or <code>arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</code>.</p>
221    pub fn uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222        self.uri = ::std::option::Option::Some(input.into());
223        self
224    }
225    /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where <code>connectionType</code> is not <code>VPC_LINK</code>, or private integration, where <code>connectionType</code> is <code>VPC_LINK</code>. For a private HTTP integration, the URI is not used for routing. For <code>AWS</code> or <code>AWS_PROXY</code> integrations, the URI is of the form <code>arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api</code>}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&amp;{p1}={v1}&amp;p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of <code>GetObject</code>, the <code>uri</code> can be either <code>arn:aws:apigateway:us-west-2:s3:action/GetObject&amp;Bucket={bucket}&amp;Key={key}</code> or <code>arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</code>.</p>
226    pub fn set_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227        self.uri = input;
228        self
229    }
230    /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where <code>connectionType</code> is not <code>VPC_LINK</code>, or private integration, where <code>connectionType</code> is <code>VPC_LINK</code>. For a private HTTP integration, the URI is not used for routing. For <code>AWS</code> or <code>AWS_PROXY</code> integrations, the URI is of the form <code>arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api</code>}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&amp;{p1}={v1}&amp;p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of <code>GetObject</code>, the <code>uri</code> can be either <code>arn:aws:apigateway:us-west-2:s3:action/GetObject&amp;Bucket={bucket}&amp;Key={key}</code> or <code>arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</code>.</p>
231    pub fn get_uri(&self) -> &::std::option::Option<::std::string::String> {
232        &self.uri
233    }
234    /// <p>The type of the network connection to the integration endpoint. The valid value is <code>INTERNET</code> for connections through the public routable internet or <code>VPC_LINK</code> for private connections between API Gateway and a network load balancer in a VPC. The default value is <code>INTERNET</code>.</p>
235    pub fn connection_type(mut self, input: crate::types::ConnectionType) -> Self {
236        self.connection_type = ::std::option::Option::Some(input);
237        self
238    }
239    /// <p>The type of the network connection to the integration endpoint. The valid value is <code>INTERNET</code> for connections through the public routable internet or <code>VPC_LINK</code> for private connections between API Gateway and a network load balancer in a VPC. The default value is <code>INTERNET</code>.</p>
240    pub fn set_connection_type(mut self, input: ::std::option::Option<crate::types::ConnectionType>) -> Self {
241        self.connection_type = input;
242        self
243    }
244    /// <p>The type of the network connection to the integration endpoint. The valid value is <code>INTERNET</code> for connections through the public routable internet or <code>VPC_LINK</code> for private connections between API Gateway and a network load balancer in a VPC. The default value is <code>INTERNET</code>.</p>
245    pub fn get_connection_type(&self) -> &::std::option::Option<crate::types::ConnectionType> {
246        &self.connection_type
247    }
248    /// <p>The ID of the VpcLink used for the integration. Specify this value only if you specify <code>VPC_LINK</code> as the connection type.</p>
249    pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
250        self.connection_id = ::std::option::Option::Some(input.into());
251        self
252    }
253    /// <p>The ID of the VpcLink used for the integration. Specify this value only if you specify <code>VPC_LINK</code> as the connection type.</p>
254    pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
255        self.connection_id = input;
256        self
257    }
258    /// <p>The ID of the VpcLink used for the integration. Specify this value only if you specify <code>VPC_LINK</code> as the connection type.</p>
259    pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
260        &self.connection_id
261    }
262    /// <p>Specifies whether credentials are required for a put integration.</p>
263    pub fn credentials(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
264        self.credentials = ::std::option::Option::Some(input.into());
265        self
266    }
267    /// <p>Specifies whether credentials are required for a put integration.</p>
268    pub fn set_credentials(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269        self.credentials = input;
270        self
271    }
272    /// <p>Specifies whether credentials are required for a put integration.</p>
273    pub fn get_credentials(&self) -> &::std::option::Option<::std::string::String> {
274        &self.credentials
275    }
276    /// Adds a key-value pair to `request_parameters`.
277    ///
278    /// To override the contents of this collection use [`set_request_parameters`](Self::set_request_parameters).
279    ///
280    /// <p>A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> must be a valid and unique method request parameter name.</p>
281    pub fn request_parameters(
282        mut self,
283        k: impl ::std::convert::Into<::std::string::String>,
284        v: impl ::std::convert::Into<::std::string::String>,
285    ) -> Self {
286        let mut hash_map = self.request_parameters.unwrap_or_default();
287        hash_map.insert(k.into(), v.into());
288        self.request_parameters = ::std::option::Option::Some(hash_map);
289        self
290    }
291    /// <p>A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> must be a valid and unique method request parameter name.</p>
292    pub fn set_request_parameters(
293        mut self,
294        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
295    ) -> Self {
296        self.request_parameters = input;
297        self
298    }
299    /// <p>A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> must be a valid and unique method request parameter name.</p>
300    pub fn get_request_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
301        &self.request_parameters
302    }
303    /// Adds a key-value pair to `request_templates`.
304    ///
305    /// To override the contents of this collection use [`set_request_templates`](Self::set_request_templates).
306    ///
307    /// <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.</p>
308    pub fn request_templates(
309        mut self,
310        k: impl ::std::convert::Into<::std::string::String>,
311        v: impl ::std::convert::Into<::std::string::String>,
312    ) -> Self {
313        let mut hash_map = self.request_templates.unwrap_or_default();
314        hash_map.insert(k.into(), v.into());
315        self.request_templates = ::std::option::Option::Some(hash_map);
316        self
317    }
318    /// <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.</p>
319    pub fn set_request_templates(
320        mut self,
321        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
322    ) -> Self {
323        self.request_templates = input;
324        self
325    }
326    /// <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.</p>
327    pub fn get_request_templates(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
328        &self.request_templates
329    }
330    /// <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 <code>requestTemplates</code> property on the Integration resource. There are three valid values: <code>WHEN_NO_MATCH</code>, <code>WHEN_NO_TEMPLATES</code>, and <code>NEVER</code>.</p>
331    pub fn passthrough_behavior(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
332        self.passthrough_behavior = ::std::option::Option::Some(input.into());
333        self
334    }
335    /// <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 <code>requestTemplates</code> property on the Integration resource. There are three valid values: <code>WHEN_NO_MATCH</code>, <code>WHEN_NO_TEMPLATES</code>, and <code>NEVER</code>.</p>
336    pub fn set_passthrough_behavior(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
337        self.passthrough_behavior = input;
338        self
339    }
340    /// <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 <code>requestTemplates</code> property on the Integration resource. There are three valid values: <code>WHEN_NO_MATCH</code>, <code>WHEN_NO_TEMPLATES</code>, and <code>NEVER</code>.</p>
341    pub fn get_passthrough_behavior(&self) -> &::std::option::Option<::std::string::String> {
342        &self.passthrough_behavior
343    }
344    /// <p>Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the <code>cacheNamespace</code>. You can specify the same <code>cacheNamespace</code> across resources to return the same cached data for requests to different resources.</p>
345    pub fn cache_namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
346        self.cache_namespace = ::std::option::Option::Some(input.into());
347        self
348    }
349    /// <p>Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the <code>cacheNamespace</code>. You can specify the same <code>cacheNamespace</code> across resources to return the same cached data for requests to different resources.</p>
350    pub fn set_cache_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
351        self.cache_namespace = input;
352        self
353    }
354    /// <p>Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the <code>cacheNamespace</code>. You can specify the same <code>cacheNamespace</code> across resources to return the same cached data for requests to different resources.</p>
355    pub fn get_cache_namespace(&self) -> &::std::option::Option<::std::string::String> {
356        &self.cache_namespace
357    }
358    /// Appends an item to `cache_key_parameters`.
359    ///
360    /// To override the contents of this collection use [`set_cache_key_parameters`](Self::set_cache_key_parameters).
361    ///
362    /// <p>A list of request parameters whose values API Gateway caches. To be valid values for <code>cacheKeyParameters</code>, these parameters must also be specified for Method <code>requestParameters</code>.</p>
363    pub fn cache_key_parameters(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
364        let mut v = self.cache_key_parameters.unwrap_or_default();
365        v.push(input.into());
366        self.cache_key_parameters = ::std::option::Option::Some(v);
367        self
368    }
369    /// <p>A list of request parameters whose values API Gateway caches. To be valid values for <code>cacheKeyParameters</code>, these parameters must also be specified for Method <code>requestParameters</code>.</p>
370    pub fn set_cache_key_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
371        self.cache_key_parameters = input;
372        self
373    }
374    /// <p>A list of request parameters whose values API Gateway caches. To be valid values for <code>cacheKeyParameters</code>, these parameters must also be specified for Method <code>requestParameters</code>.</p>
375    pub fn get_cache_key_parameters(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
376        &self.cache_key_parameters
377    }
378    /// <p>Specifies how to handle request payload content type conversions. Supported values are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following behaviors:</p>
379    /// <p>If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the <code>passthroughBehavior</code> is configured to support payload pass-through.</p>
380    pub fn content_handling(mut self, input: crate::types::ContentHandlingStrategy) -> Self {
381        self.content_handling = ::std::option::Option::Some(input);
382        self
383    }
384    /// <p>Specifies how to handle request payload content type conversions. Supported values are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following behaviors:</p>
385    /// <p>If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the <code>passthroughBehavior</code> is configured to support payload pass-through.</p>
386    pub fn set_content_handling(mut self, input: ::std::option::Option<crate::types::ContentHandlingStrategy>) -> Self {
387        self.content_handling = input;
388        self
389    }
390    /// <p>Specifies how to handle request payload content type conversions. Supported values are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following behaviors:</p>
391    /// <p>If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the <code>passthroughBehavior</code> is configured to support payload pass-through.</p>
392    pub fn get_content_handling(&self) -> &::std::option::Option<crate::types::ContentHandlingStrategy> {
393        &self.content_handling
394    }
395    /// <p>Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.</p>
396    pub fn timeout_in_millis(mut self, input: i32) -> Self {
397        self.timeout_in_millis = ::std::option::Option::Some(input);
398        self
399    }
400    /// <p>Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.</p>
401    pub fn set_timeout_in_millis(mut self, input: ::std::option::Option<i32>) -> Self {
402        self.timeout_in_millis = input;
403        self
404    }
405    /// <p>Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.</p>
406    pub fn get_timeout_in_millis(&self) -> &::std::option::Option<i32> {
407        &self.timeout_in_millis
408    }
409    /// <p>Specifies the TLS configuration for an integration.</p>
410    pub fn tls_config(mut self, input: crate::types::TlsConfig) -> Self {
411        self.tls_config = ::std::option::Option::Some(input);
412        self
413    }
414    /// <p>Specifies the TLS configuration for an integration.</p>
415    pub fn set_tls_config(mut self, input: ::std::option::Option<crate::types::TlsConfig>) -> Self {
416        self.tls_config = input;
417        self
418    }
419    /// <p>Specifies the TLS configuration for an integration.</p>
420    pub fn get_tls_config(&self) -> &::std::option::Option<crate::types::TlsConfig> {
421        &self.tls_config
422    }
423    /// Consumes the builder and constructs a [`PutIntegrationInput`](crate::operation::put_integration::PutIntegrationInput).
424    pub fn build(
425        self,
426    ) -> ::std::result::Result<crate::operation::put_integration::PutIntegrationInput, ::aws_smithy_types::error::operation::BuildError> {
427        ::std::result::Result::Ok(crate::operation::put_integration::PutIntegrationInput {
428            rest_api_id: self.rest_api_id,
429            resource_id: self.resource_id,
430            http_method: self.http_method,
431            r#type: self.r#type,
432            integration_http_method: self.integration_http_method,
433            uri: self.uri,
434            connection_type: self.connection_type,
435            connection_id: self.connection_id,
436            credentials: self.credentials,
437            request_parameters: self.request_parameters,
438            request_templates: self.request_templates,
439            passthrough_behavior: self.passthrough_behavior,
440            cache_namespace: self.cache_namespace,
441            cache_key_parameters: self.cache_key_parameters,
442            content_handling: self.content_handling,
443            timeout_in_millis: self.timeout_in_millis,
444            tls_config: self.tls_config,
445        })
446    }
447}