aws_sdk_apigateway/operation/put_integration/
_put_integration_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents an <code>HTTP</code>, <code>HTTP_PROXY</code>, <code>AWS</code>, <code>AWS_PROXY</code>, or Mock integration.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PutIntegrationOutput {
7    /// <p>Specifies an API method integration type. The valid value is one of the following:</p>
8    /// <p>For the HTTP and HTTP proxy integrations, each integration can specify a protocol (<code>http/https</code>), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a <code>connectionType</code> of <code>VPC_LINK</code> is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.</p>
9    pub r#type: ::std::option::Option<crate::types::IntegrationType>,
10    /// <p>Specifies the integration's HTTP method type. For the Type property, if you specify <code>MOCK</code>, this property is optional. For Lambda integrations, you must set the integration method to <code>POST</code>. For all other types, you must specify this property.</p>
11    pub http_method: ::std::option::Option<::std::string::String>,
12    /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint.</p>
13    /// <p>For <code>HTTP</code> or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification for standard integrations. If <code>connectionType</code> is <code>VPC_LINK</code> specify the Network Load Balancer DNS name. 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 GetObject, the uri 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>
14    pub uri: ::std::option::Option<::std::string::String>,
15    /// <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>
16    pub connection_type: ::std::option::Option<crate::types::ConnectionType>,
17    /// <p>The ID of the VpcLink used for the integration when <code>connectionType=VPC_LINK</code> and undefined, otherwise.</p>
18    pub connection_id: ::std::option::Option<::std::string::String>,
19    /// <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 <code>arn:aws:iam::\*:user/\*</code>. To use resource-based permissions on supported Amazon Web Services services, specify null.</p>
20    pub credentials: ::std::option::Option<::std::string::String>,
21    /// <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>
22    pub request_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
23    /// <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>
24    pub request_templates: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
25    /// <p>Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in <code>requestTemplates</code>. The valid value is one of the following: <code>WHEN_NO_MATCH</code>: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request. <code>WHEN_NO_TEMPLATES</code>: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response. <code>NEVER</code>: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.</p>
26    pub passthrough_behavior: ::std::option::Option<::std::string::String>,
27    /// <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>
28    /// <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>
29    pub content_handling: ::std::option::Option<crate::types::ContentHandlingStrategy>,
30    /// <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>
31    pub timeout_in_millis: i32,
32    /// <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>
33    pub cache_namespace: ::std::option::Option<::std::string::String>,
34    /// <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>
35    pub cache_key_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
36    /// <p>Specifies the integration's responses.</p>
37    pub integration_responses: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::IntegrationResponse>>,
38    /// <p>Specifies the TLS configuration for an integration.</p>
39    pub tls_config: ::std::option::Option<crate::types::TlsConfig>,
40    _request_id: Option<String>,
41}
42impl PutIntegrationOutput {
43    /// <p>Specifies an API method integration type. The valid value is one of the following:</p>
44    /// <p>For the HTTP and HTTP proxy integrations, each integration can specify a protocol (<code>http/https</code>), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a <code>connectionType</code> of <code>VPC_LINK</code> is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.</p>
45    pub fn r#type(&self) -> ::std::option::Option<&crate::types::IntegrationType> {
46        self.r#type.as_ref()
47    }
48    /// <p>Specifies the integration's HTTP method type. For the Type property, if you specify <code>MOCK</code>, this property is optional. For Lambda integrations, you must set the integration method to <code>POST</code>. For all other types, you must specify this property.</p>
49    pub fn http_method(&self) -> ::std::option::Option<&str> {
50        self.http_method.as_deref()
51    }
52    /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint.</p>
53    /// <p>For <code>HTTP</code> or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification for standard integrations. If <code>connectionType</code> is <code>VPC_LINK</code> specify the Network Load Balancer DNS name. 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 GetObject, the uri 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>
54    pub fn uri(&self) -> ::std::option::Option<&str> {
55        self.uri.as_deref()
56    }
57    /// <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>
58    pub fn connection_type(&self) -> ::std::option::Option<&crate::types::ConnectionType> {
59        self.connection_type.as_ref()
60    }
61    /// <p>The ID of the VpcLink used for the integration when <code>connectionType=VPC_LINK</code> and undefined, otherwise.</p>
62    pub fn connection_id(&self) -> ::std::option::Option<&str> {
63        self.connection_id.as_deref()
64    }
65    /// <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 <code>arn:aws:iam::\*:user/\*</code>. To use resource-based permissions on supported Amazon Web Services services, specify null.</p>
66    pub fn credentials(&self) -> ::std::option::Option<&str> {
67        self.credentials.as_deref()
68    }
69    /// <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>
70    pub fn request_parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
71        self.request_parameters.as_ref()
72    }
73    /// <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>
74    pub fn request_templates(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
75        self.request_templates.as_ref()
76    }
77    /// <p>Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in <code>requestTemplates</code>. The valid value is one of the following: <code>WHEN_NO_MATCH</code>: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request. <code>WHEN_NO_TEMPLATES</code>: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response. <code>NEVER</code>: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.</p>
78    pub fn passthrough_behavior(&self) -> ::std::option::Option<&str> {
79        self.passthrough_behavior.as_deref()
80    }
81    /// <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>
82    /// <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>
83    pub fn content_handling(&self) -> ::std::option::Option<&crate::types::ContentHandlingStrategy> {
84        self.content_handling.as_ref()
85    }
86    /// <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>
87    pub fn timeout_in_millis(&self) -> i32 {
88        self.timeout_in_millis
89    }
90    /// <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>
91    pub fn cache_namespace(&self) -> ::std::option::Option<&str> {
92        self.cache_namespace.as_deref()
93    }
94    /// <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>
95    ///
96    /// 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()`.
97    pub fn cache_key_parameters(&self) -> &[::std::string::String] {
98        self.cache_key_parameters.as_deref().unwrap_or_default()
99    }
100    /// <p>Specifies the integration's responses.</p>
101    pub fn integration_responses(
102        &self,
103    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::IntegrationResponse>> {
104        self.integration_responses.as_ref()
105    }
106    /// <p>Specifies the TLS configuration for an integration.</p>
107    pub fn tls_config(&self) -> ::std::option::Option<&crate::types::TlsConfig> {
108        self.tls_config.as_ref()
109    }
110}
111impl ::aws_types::request_id::RequestId for PutIntegrationOutput {
112    fn request_id(&self) -> Option<&str> {
113        self._request_id.as_deref()
114    }
115}
116impl PutIntegrationOutput {
117    /// Creates a new builder-style object to manufacture [`PutIntegrationOutput`](crate::operation::put_integration::PutIntegrationOutput).
118    pub fn builder() -> crate::operation::put_integration::builders::PutIntegrationOutputBuilder {
119        crate::operation::put_integration::builders::PutIntegrationOutputBuilder::default()
120    }
121}
122
123/// A builder for [`PutIntegrationOutput`](crate::operation::put_integration::PutIntegrationOutput).
124#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
125#[non_exhaustive]
126pub struct PutIntegrationOutputBuilder {
127    pub(crate) r#type: ::std::option::Option<crate::types::IntegrationType>,
128    pub(crate) http_method: ::std::option::Option<::std::string::String>,
129    pub(crate) uri: ::std::option::Option<::std::string::String>,
130    pub(crate) connection_type: ::std::option::Option<crate::types::ConnectionType>,
131    pub(crate) connection_id: ::std::option::Option<::std::string::String>,
132    pub(crate) credentials: ::std::option::Option<::std::string::String>,
133    pub(crate) request_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
134    pub(crate) request_templates: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
135    pub(crate) passthrough_behavior: ::std::option::Option<::std::string::String>,
136    pub(crate) content_handling: ::std::option::Option<crate::types::ContentHandlingStrategy>,
137    pub(crate) timeout_in_millis: ::std::option::Option<i32>,
138    pub(crate) cache_namespace: ::std::option::Option<::std::string::String>,
139    pub(crate) cache_key_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
140    pub(crate) integration_responses: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::IntegrationResponse>>,
141    pub(crate) tls_config: ::std::option::Option<crate::types::TlsConfig>,
142    _request_id: Option<String>,
143}
144impl PutIntegrationOutputBuilder {
145    /// <p>Specifies an API method integration type. The valid value is one of the following:</p>
146    /// <p>For the HTTP and HTTP proxy integrations, each integration can specify a protocol (<code>http/https</code>), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a <code>connectionType</code> of <code>VPC_LINK</code> is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.</p>
147    pub fn r#type(mut self, input: crate::types::IntegrationType) -> Self {
148        self.r#type = ::std::option::Option::Some(input);
149        self
150    }
151    /// <p>Specifies an API method integration type. The valid value is one of the following:</p>
152    /// <p>For the HTTP and HTTP proxy integrations, each integration can specify a protocol (<code>http/https</code>), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a <code>connectionType</code> of <code>VPC_LINK</code> is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.</p>
153    pub fn set_type(mut self, input: ::std::option::Option<crate::types::IntegrationType>) -> Self {
154        self.r#type = input;
155        self
156    }
157    /// <p>Specifies an API method integration type. The valid value is one of the following:</p>
158    /// <p>For the HTTP and HTTP proxy integrations, each integration can specify a protocol (<code>http/https</code>), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a <code>connectionType</code> of <code>VPC_LINK</code> is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.</p>
159    pub fn get_type(&self) -> &::std::option::Option<crate::types::IntegrationType> {
160        &self.r#type
161    }
162    /// <p>Specifies the integration's HTTP method type. For the Type property, if you specify <code>MOCK</code>, this property is optional. For Lambda integrations, you must set the integration method to <code>POST</code>. For all other types, you must specify this property.</p>
163    pub fn http_method(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.http_method = ::std::option::Option::Some(input.into());
165        self
166    }
167    /// <p>Specifies the integration's HTTP method type. For the Type property, if you specify <code>MOCK</code>, this property is optional. For Lambda integrations, you must set the integration method to <code>POST</code>. For all other types, you must specify this property.</p>
168    pub fn set_http_method(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.http_method = input;
170        self
171    }
172    /// <p>Specifies the integration's HTTP method type. For the Type property, if you specify <code>MOCK</code>, this property is optional. For Lambda integrations, you must set the integration method to <code>POST</code>. For all other types, you must specify this property.</p>
173    pub fn get_http_method(&self) -> &::std::option::Option<::std::string::String> {
174        &self.http_method
175    }
176    /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint.</p>
177    /// <p>For <code>HTTP</code> or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification for standard integrations. If <code>connectionType</code> is <code>VPC_LINK</code> specify the Network Load Balancer DNS name. 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 GetObject, the uri 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>
178    pub fn uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.uri = ::std::option::Option::Some(input.into());
180        self
181    }
182    /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint.</p>
183    /// <p>For <code>HTTP</code> or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification for standard integrations. If <code>connectionType</code> is <code>VPC_LINK</code> specify the Network Load Balancer DNS name. 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 GetObject, the uri 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>
184    pub fn set_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185        self.uri = input;
186        self
187    }
188    /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint.</p>
189    /// <p>For <code>HTTP</code> or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification for standard integrations. If <code>connectionType</code> is <code>VPC_LINK</code> specify the Network Load Balancer DNS name. 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 GetObject, the uri 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>
190    pub fn get_uri(&self) -> &::std::option::Option<::std::string::String> {
191        &self.uri
192    }
193    /// <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>
194    pub fn connection_type(mut self, input: crate::types::ConnectionType) -> Self {
195        self.connection_type = ::std::option::Option::Some(input);
196        self
197    }
198    /// <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>
199    pub fn set_connection_type(mut self, input: ::std::option::Option<crate::types::ConnectionType>) -> Self {
200        self.connection_type = input;
201        self
202    }
203    /// <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>
204    pub fn get_connection_type(&self) -> &::std::option::Option<crate::types::ConnectionType> {
205        &self.connection_type
206    }
207    /// <p>The ID of the VpcLink used for the integration when <code>connectionType=VPC_LINK</code> and undefined, otherwise.</p>
208    pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209        self.connection_id = ::std::option::Option::Some(input.into());
210        self
211    }
212    /// <p>The ID of the VpcLink used for the integration when <code>connectionType=VPC_LINK</code> and undefined, otherwise.</p>
213    pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
214        self.connection_id = input;
215        self
216    }
217    /// <p>The ID of the VpcLink used for the integration when <code>connectionType=VPC_LINK</code> and undefined, otherwise.</p>
218    pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
219        &self.connection_id
220    }
221    /// <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 <code>arn:aws:iam::\*:user/\*</code>. To use resource-based permissions on supported Amazon Web Services services, specify null.</p>
222    pub fn credentials(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223        self.credentials = ::std::option::Option::Some(input.into());
224        self
225    }
226    /// <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 <code>arn:aws:iam::\*:user/\*</code>. To use resource-based permissions on supported Amazon Web Services services, specify null.</p>
227    pub fn set_credentials(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228        self.credentials = input;
229        self
230    }
231    /// <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 <code>arn:aws:iam::\*:user/\*</code>. To use resource-based permissions on supported Amazon Web Services services, specify null.</p>
232    pub fn get_credentials(&self) -> &::std::option::Option<::std::string::String> {
233        &self.credentials
234    }
235    /// Adds a key-value pair to `request_parameters`.
236    ///
237    /// To override the contents of this collection use [`set_request_parameters`](Self::set_request_parameters).
238    ///
239    /// <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>
240    pub fn request_parameters(
241        mut self,
242        k: impl ::std::convert::Into<::std::string::String>,
243        v: impl ::std::convert::Into<::std::string::String>,
244    ) -> Self {
245        let mut hash_map = self.request_parameters.unwrap_or_default();
246        hash_map.insert(k.into(), v.into());
247        self.request_parameters = ::std::option::Option::Some(hash_map);
248        self
249    }
250    /// <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>
251    pub fn set_request_parameters(
252        mut self,
253        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
254    ) -> Self {
255        self.request_parameters = input;
256        self
257    }
258    /// <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>
259    pub fn get_request_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
260        &self.request_parameters
261    }
262    /// Adds a key-value pair to `request_templates`.
263    ///
264    /// To override the contents of this collection use [`set_request_templates`](Self::set_request_templates).
265    ///
266    /// <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>
267    pub fn request_templates(
268        mut self,
269        k: impl ::std::convert::Into<::std::string::String>,
270        v: impl ::std::convert::Into<::std::string::String>,
271    ) -> Self {
272        let mut hash_map = self.request_templates.unwrap_or_default();
273        hash_map.insert(k.into(), v.into());
274        self.request_templates = ::std::option::Option::Some(hash_map);
275        self
276    }
277    /// <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>
278    pub fn set_request_templates(
279        mut self,
280        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
281    ) -> Self {
282        self.request_templates = input;
283        self
284    }
285    /// <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>
286    pub fn get_request_templates(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
287        &self.request_templates
288    }
289    /// <p>Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in <code>requestTemplates</code>. The valid value is one of the following: <code>WHEN_NO_MATCH</code>: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request. <code>WHEN_NO_TEMPLATES</code>: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response. <code>NEVER</code>: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.</p>
290    pub fn passthrough_behavior(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
291        self.passthrough_behavior = ::std::option::Option::Some(input.into());
292        self
293    }
294    /// <p>Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in <code>requestTemplates</code>. The valid value is one of the following: <code>WHEN_NO_MATCH</code>: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request. <code>WHEN_NO_TEMPLATES</code>: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response. <code>NEVER</code>: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.</p>
295    pub fn set_passthrough_behavior(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
296        self.passthrough_behavior = input;
297        self
298    }
299    /// <p>Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in <code>requestTemplates</code>. The valid value is one of the following: <code>WHEN_NO_MATCH</code>: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request. <code>WHEN_NO_TEMPLATES</code>: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response. <code>NEVER</code>: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.</p>
300    pub fn get_passthrough_behavior(&self) -> &::std::option::Option<::std::string::String> {
301        &self.passthrough_behavior
302    }
303    /// <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>
304    /// <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>
305    pub fn content_handling(mut self, input: crate::types::ContentHandlingStrategy) -> Self {
306        self.content_handling = ::std::option::Option::Some(input);
307        self
308    }
309    /// <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>
310    /// <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>
311    pub fn set_content_handling(mut self, input: ::std::option::Option<crate::types::ContentHandlingStrategy>) -> Self {
312        self.content_handling = input;
313        self
314    }
315    /// <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>
316    /// <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>
317    pub fn get_content_handling(&self) -> &::std::option::Option<crate::types::ContentHandlingStrategy> {
318        &self.content_handling
319    }
320    /// <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>
321    pub fn timeout_in_millis(mut self, input: i32) -> Self {
322        self.timeout_in_millis = ::std::option::Option::Some(input);
323        self
324    }
325    /// <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>
326    pub fn set_timeout_in_millis(mut self, input: ::std::option::Option<i32>) -> Self {
327        self.timeout_in_millis = input;
328        self
329    }
330    /// <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>
331    pub fn get_timeout_in_millis(&self) -> &::std::option::Option<i32> {
332        &self.timeout_in_millis
333    }
334    /// <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>
335    pub fn cache_namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
336        self.cache_namespace = ::std::option::Option::Some(input.into());
337        self
338    }
339    /// <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>
340    pub fn set_cache_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
341        self.cache_namespace = input;
342        self
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 get_cache_namespace(&self) -> &::std::option::Option<::std::string::String> {
346        &self.cache_namespace
347    }
348    /// Appends an item to `cache_key_parameters`.
349    ///
350    /// To override the contents of this collection use [`set_cache_key_parameters`](Self::set_cache_key_parameters).
351    ///
352    /// <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>
353    pub fn cache_key_parameters(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
354        let mut v = self.cache_key_parameters.unwrap_or_default();
355        v.push(input.into());
356        self.cache_key_parameters = ::std::option::Option::Some(v);
357        self
358    }
359    /// <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>
360    pub fn set_cache_key_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
361        self.cache_key_parameters = input;
362        self
363    }
364    /// <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>
365    pub fn get_cache_key_parameters(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
366        &self.cache_key_parameters
367    }
368    /// Adds a key-value pair to `integration_responses`.
369    ///
370    /// To override the contents of this collection use [`set_integration_responses`](Self::set_integration_responses).
371    ///
372    /// <p>Specifies the integration's responses.</p>
373    pub fn integration_responses(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::IntegrationResponse) -> Self {
374        let mut hash_map = self.integration_responses.unwrap_or_default();
375        hash_map.insert(k.into(), v);
376        self.integration_responses = ::std::option::Option::Some(hash_map);
377        self
378    }
379    /// <p>Specifies the integration's responses.</p>
380    pub fn set_integration_responses(
381        mut self,
382        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::IntegrationResponse>>,
383    ) -> Self {
384        self.integration_responses = input;
385        self
386    }
387    /// <p>Specifies the integration's responses.</p>
388    pub fn get_integration_responses(
389        &self,
390    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::IntegrationResponse>> {
391        &self.integration_responses
392    }
393    /// <p>Specifies the TLS configuration for an integration.</p>
394    pub fn tls_config(mut self, input: crate::types::TlsConfig) -> Self {
395        self.tls_config = ::std::option::Option::Some(input);
396        self
397    }
398    /// <p>Specifies the TLS configuration for an integration.</p>
399    pub fn set_tls_config(mut self, input: ::std::option::Option<crate::types::TlsConfig>) -> Self {
400        self.tls_config = input;
401        self
402    }
403    /// <p>Specifies the TLS configuration for an integration.</p>
404    pub fn get_tls_config(&self) -> &::std::option::Option<crate::types::TlsConfig> {
405        &self.tls_config
406    }
407    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
408        self._request_id = Some(request_id.into());
409        self
410    }
411
412    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
413        self._request_id = request_id;
414        self
415    }
416    /// Consumes the builder and constructs a [`PutIntegrationOutput`](crate::operation::put_integration::PutIntegrationOutput).
417    pub fn build(self) -> crate::operation::put_integration::PutIntegrationOutput {
418        crate::operation::put_integration::PutIntegrationOutput {
419            r#type: self.r#type,
420            http_method: self.http_method,
421            uri: self.uri,
422            connection_type: self.connection_type,
423            connection_id: self.connection_id,
424            credentials: self.credentials,
425            request_parameters: self.request_parameters,
426            request_templates: self.request_templates,
427            passthrough_behavior: self.passthrough_behavior,
428            content_handling: self.content_handling,
429            timeout_in_millis: self.timeout_in_millis.unwrap_or_default(),
430            cache_namespace: self.cache_namespace,
431            cache_key_parameters: self.cache_key_parameters,
432            integration_responses: self.integration_responses,
433            tls_config: self.tls_config,
434            _request_id: self._request_id,
435        }
436    }
437}