/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.apigateway.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *
* Sets up a method's integration. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutIntegrationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** The string identifier of the associated RestApi. *
*/ private String restApiId; /** ** Specifies a put integration request's resource ID. *
*/ private String resourceId; /** ** Specifies the HTTP method for the integration. *
*/ private String httpMethod; /** ** Specifies a put integration input's type. *
*/ private String type; /** ** The HTTP method for the integration. *
*/ private String integrationHttpMethod; /** *
* Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or HTTP_PROXY
* integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for
* either standard integration, where connectionType
is not VPC_LINK
, or private
* integration, where connectionType
is VPC_LINK
. For a private HTTP integration, the URI
* is not used for routing. For AWS
or AWS_PROXY
integrations, the URI is of the form
* arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api
. 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}&{p1}={v1}&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
* arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}
or
* arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}
.
*
* The type of the network connection to the integration endpoint. The valid value is INTERNET
for
* connections through the public routable internet or VPC_LINK
for private connections between API
* Gateway and a network load balancer in a VPC. The default value is INTERNET
.
*
* The ID of the VpcLink used for the integration. Specify this value only if you specify VPC_LINK
as
* the connection type.
*
* Specifies whether credentials are required for a put integration. *
*/ private String credentials; /** *
* 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 method.request.{location}.{name}
, where
* location
is querystring
, path
, or header
and
* name
must be a valid and unique method request parameter name.
*
* 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. *
*/ private java.util.Map
* Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and
* the available mapping templates specified as the requestTemplates
property on the Integration
* resource. There are three valid values: WHEN_NO_MATCH
, WHEN_NO_TEMPLATES
, and
* NEVER
.
*
* Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the
* cacheNamespace
. You can specify the same cacheNamespace
across resources to return the
* same cached data for requests to different resources.
*
* A list of request parameters whose values API Gateway caches. To be valid values for
* cacheKeyParameters
, these parameters must also be specified for Method
* requestParameters
.
*
* Specifies how to handle request payload content type conversions. Supported values are
* CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
*
* 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 passthroughBehavior
is configured to
* support payload pass-through.
*
* Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. *
*/ private Integer timeoutInMillis; private TlsConfig tlsConfig; /** ** The string identifier of the associated RestApi. *
* * @param restApiId * The string identifier of the associated RestApi. */ public void setRestApiId(String restApiId) { this.restApiId = restApiId; } /** ** The string identifier of the associated RestApi. *
* * @return The string identifier of the associated RestApi. */ public String getRestApiId() { return this.restApiId; } /** ** The string identifier of the associated RestApi. *
* * @param restApiId * The string identifier of the associated RestApi. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationRequest withRestApiId(String restApiId) { setRestApiId(restApiId); return this; } /** ** Specifies a put integration request's resource ID. *
* * @param resourceId * Specifies a put integration request's resource ID. */ public void setResourceId(String resourceId) { this.resourceId = resourceId; } /** ** Specifies a put integration request's resource ID. *
* * @return Specifies a put integration request's resource ID. */ public String getResourceId() { return this.resourceId; } /** ** Specifies a put integration request's resource ID. *
* * @param resourceId * Specifies a put integration request's resource ID. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationRequest withResourceId(String resourceId) { setResourceId(resourceId); return this; } /** ** Specifies the HTTP method for the integration. *
* * @param httpMethod * Specifies the HTTP method for the integration. */ public void setHttpMethod(String httpMethod) { this.httpMethod = httpMethod; } /** ** Specifies the HTTP method for the integration. *
* * @return Specifies the HTTP method for the integration. */ public String getHttpMethod() { return this.httpMethod; } /** ** Specifies the HTTP method for the integration. *
* * @param httpMethod * Specifies the HTTP method for the integration. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationRequest withHttpMethod(String httpMethod) { setHttpMethod(httpMethod); return this; } /** ** Specifies a put integration input's type. *
* * @param type * Specifies a put integration input's type. * @see IntegrationType */ public void setType(String type) { this.type = type; } /** ** Specifies a put integration input's type. *
* * @return Specifies a put integration input's type. * @see IntegrationType */ public String getType() { return this.type; } /** ** Specifies a put integration input's type. *
* * @param type * Specifies a put integration input's type. * @return Returns a reference to this object so that method calls can be chained together. * @see IntegrationType */ public PutIntegrationRequest withType(String type) { setType(type); return this; } /** ** Specifies a put integration input's type. *
* * @param type * Specifies a put integration input's type. * @see IntegrationType */ public void setType(IntegrationType type) { withType(type); } /** ** Specifies a put integration input's type. *
* * @param type * Specifies a put integration input's type. * @return Returns a reference to this object so that method calls can be chained together. * @see IntegrationType */ public PutIntegrationRequest withType(IntegrationType type) { this.type = type.toString(); return this; } /** ** The HTTP method for the integration. *
* * @param integrationHttpMethod * The HTTP method for the integration. */ public void setIntegrationHttpMethod(String integrationHttpMethod) { this.integrationHttpMethod = integrationHttpMethod; } /** ** The HTTP method for the integration. *
* * @return The HTTP method for the integration. */ public String getIntegrationHttpMethod() { return this.integrationHttpMethod; } /** ** The HTTP method for the integration. *
* * @param integrationHttpMethod * The HTTP method for the integration. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationRequest withIntegrationHttpMethod(String integrationHttpMethod) { setIntegrationHttpMethod(integrationHttpMethod); return this; } /** *
* Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or HTTP_PROXY
* integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for
* either standard integration, where connectionType
is not VPC_LINK
, or private
* integration, where connectionType
is VPC_LINK
. For a private HTTP integration, the URI
* is not used for routing. For AWS
or AWS_PROXY
integrations, the URI is of the form
* arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api
. 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}&{p1}={v1}&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
* arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}
or
* arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}
.
*
HTTP_PROXY
integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the
* RFC-3986 specification, for either standard integration, where connectionType
is not
* VPC_LINK
, or private integration, where connectionType
is VPC_LINK
.
* For a private HTTP integration, the URI is not used for routing. For AWS
or
* AWS_PROXY
integrations, the URI is of the form
* arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api
. 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}&{p1}={v1}&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
* arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}
or
* arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}
.
*/
public void setUri(String uri) {
this.uri = uri;
}
/**
*
* Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or HTTP_PROXY
* integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for
* either standard integration, where connectionType
is not VPC_LINK
, or private
* integration, where connectionType
is VPC_LINK
. For a private HTTP integration, the URI
* is not used for routing. For AWS
or AWS_PROXY
integrations, the URI is of the form
* arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api
. 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}&{p1}={v1}&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
* arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}
or
* arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}
.
*
HTTP_PROXY
integrations, the URI must be a fully formed, encoded HTTP(S) URL according to
* the RFC-3986 specification, for either standard integration, where connectionType
is not
* VPC_LINK
, or private integration, where connectionType
is VPC_LINK
* . For a private HTTP integration, the URI is not used for routing. For AWS
or
* AWS_PROXY
integrations, the URI is of the form
* arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api
. 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}&{p1}={v1}&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
* arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}
or
* arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}
.
*/
public String getUri() {
return this.uri;
}
/**
*
* Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or HTTP_PROXY
* integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for
* either standard integration, where connectionType
is not VPC_LINK
, or private
* integration, where connectionType
is VPC_LINK
. For a private HTTP integration, the URI
* is not used for routing. For AWS
or AWS_PROXY
integrations, the URI is of the form
* arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api
. 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}&{p1}={v1}&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
* arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}
or
* arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}
.
*
HTTP_PROXY
integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the
* RFC-3986 specification, for either standard integration, where connectionType
is not
* VPC_LINK
, or private integration, where connectionType
is VPC_LINK
.
* For a private HTTP integration, the URI is not used for routing. For AWS
or
* AWS_PROXY
integrations, the URI is of the form
* arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api
. 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}&{p1}={v1}&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
* arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}
or
* arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutIntegrationRequest withUri(String uri) {
setUri(uri);
return this;
}
/**
*
* The type of the network connection to the integration endpoint. The valid value is INTERNET
for
* connections through the public routable internet or VPC_LINK
for private connections between API
* Gateway and a network load balancer in a VPC. The default value is INTERNET
.
*
INTERNET
* for connections through the public routable internet or VPC_LINK
for private connections
* between API Gateway and a network load balancer in a VPC. The default value is INTERNET
.
* @see ConnectionType
*/
public void setConnectionType(String connectionType) {
this.connectionType = connectionType;
}
/**
*
* The type of the network connection to the integration endpoint. The valid value is INTERNET
for
* connections through the public routable internet or VPC_LINK
for private connections between API
* Gateway and a network load balancer in a VPC. The default value is INTERNET
.
*
INTERNET
* for connections through the public routable internet or VPC_LINK
for private connections
* between API Gateway and a network load balancer in a VPC. The default value is INTERNET
.
* @see ConnectionType
*/
public String getConnectionType() {
return this.connectionType;
}
/**
*
* The type of the network connection to the integration endpoint. The valid value is INTERNET
for
* connections through the public routable internet or VPC_LINK
for private connections between API
* Gateway and a network load balancer in a VPC. The default value is INTERNET
.
*
INTERNET
* for connections through the public routable internet or VPC_LINK
for private connections
* between API Gateway and a network load balancer in a VPC. The default value is INTERNET
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConnectionType
*/
public PutIntegrationRequest withConnectionType(String connectionType) {
setConnectionType(connectionType);
return this;
}
/**
*
* The type of the network connection to the integration endpoint. The valid value is INTERNET
for
* connections through the public routable internet or VPC_LINK
for private connections between API
* Gateway and a network load balancer in a VPC. The default value is INTERNET
.
*
INTERNET
* for connections through the public routable internet or VPC_LINK
for private connections
* between API Gateway and a network load balancer in a VPC. The default value is INTERNET
.
* @see ConnectionType
*/
public void setConnectionType(ConnectionType connectionType) {
withConnectionType(connectionType);
}
/**
*
* The type of the network connection to the integration endpoint. The valid value is INTERNET
for
* connections through the public routable internet or VPC_LINK
for private connections between API
* Gateway and a network load balancer in a VPC. The default value is INTERNET
.
*
INTERNET
* for connections through the public routable internet or VPC_LINK
for private connections
* between API Gateway and a network load balancer in a VPC. The default value is INTERNET
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConnectionType
*/
public PutIntegrationRequest withConnectionType(ConnectionType connectionType) {
this.connectionType = connectionType.toString();
return this;
}
/**
*
* The ID of the VpcLink used for the integration. Specify this value only if you specify VPC_LINK
as
* the connection type.
*
VPC_LINK
as the connection type.
*/
public void setConnectionId(String connectionId) {
this.connectionId = connectionId;
}
/**
*
* The ID of the VpcLink used for the integration. Specify this value only if you specify VPC_LINK
as
* the connection type.
*
VPC_LINK
as the connection type.
*/
public String getConnectionId() {
return this.connectionId;
}
/**
*
* The ID of the VpcLink used for the integration. Specify this value only if you specify VPC_LINK
as
* the connection type.
*
VPC_LINK
as the connection type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutIntegrationRequest withConnectionId(String connectionId) {
setConnectionId(connectionId);
return this;
}
/**
* * Specifies whether credentials are required for a put integration. *
* * @param credentials * Specifies whether credentials are required for a put integration. */ public void setCredentials(String credentials) { this.credentials = credentials; } /** ** Specifies whether credentials are required for a put integration. *
* * @return Specifies whether credentials are required for a put integration. */ public String getCredentials() { return this.credentials; } /** ** Specifies whether credentials are required for a put integration. *
* * @param credentials * Specifies whether credentials are required for a put integration. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationRequest withCredentials(String credentials) { setCredentials(credentials); return this; } /** *
* 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 method.request.{location}.{name}
, where
* location
is querystring
, path
, or header
and
* name
must be a valid and unique method request parameter name.
*
method.request.{location}.{name}
, where location
is querystring
,
* path
, or header
and name
must be a valid and unique method request
* parameter name.
*/
public java.util.Map
* 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 method.request.{location}.{name}
, where
* location
is querystring
, path
, or header
and
* name
must be a valid and unique method request parameter name.
*
method.request.{location}.{name}
* , where location
is querystring
, path
, or header
and
* name
must be a valid and unique method request parameter name.
*/
public void setRequestParameters(java.util.Map
* 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 method.request.{location}.{name}
, where
* location
is querystring
, path
, or header
and
* name
must be a valid and unique method request parameter name.
*
method.request.{location}.{name}
* , where location
is querystring
, path
, or header
and
* name
must be a valid and unique method request parameter name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutIntegrationRequest withRequestParameters(java.util.Map* 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. *
* * @return 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. */ public java.util.Map* 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. *
* * @param requestTemplates * 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. */ public void setRequestTemplates(java.util.Map* 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. *
* * @param requestTemplates * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationRequest withRequestTemplates(java.util.Map
* Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and
* the available mapping templates specified as the requestTemplates
property on the Integration
* resource. There are three valid values: WHEN_NO_MATCH
, WHEN_NO_TEMPLATES
, and
* NEVER
.
*
requestTemplates
property on the
* Integration resource. There are three valid values: WHEN_NO_MATCH
,
* WHEN_NO_TEMPLATES
, and NEVER
.
*/
public void setPassthroughBehavior(String passthroughBehavior) {
this.passthroughBehavior = passthroughBehavior;
}
/**
*
* Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and
* the available mapping templates specified as the requestTemplates
property on the Integration
* resource. There are three valid values: WHEN_NO_MATCH
, WHEN_NO_TEMPLATES
, and
* NEVER
.
*
requestTemplates
property on
* the Integration resource. There are three valid values: WHEN_NO_MATCH
,
* WHEN_NO_TEMPLATES
, and NEVER
.
*/
public String getPassthroughBehavior() {
return this.passthroughBehavior;
}
/**
*
* Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and
* the available mapping templates specified as the requestTemplates
property on the Integration
* resource. There are three valid values: WHEN_NO_MATCH
, WHEN_NO_TEMPLATES
, and
* NEVER
.
*
requestTemplates
property on the
* Integration resource. There are three valid values: WHEN_NO_MATCH
,
* WHEN_NO_TEMPLATES
, and NEVER
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutIntegrationRequest withPassthroughBehavior(String passthroughBehavior) {
setPassthroughBehavior(passthroughBehavior);
return this;
}
/**
*
* Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the
* cacheNamespace
. You can specify the same cacheNamespace
across resources to return the
* same cached data for requests to different resources.
*
cacheNamespace
. You can specify the same cacheNamespace
across resources to
* return the same cached data for requests to different resources.
*/
public void setCacheNamespace(String cacheNamespace) {
this.cacheNamespace = cacheNamespace;
}
/**
*
* Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the
* cacheNamespace
. You can specify the same cacheNamespace
across resources to return the
* same cached data for requests to different resources.
*
cacheNamespace
. You can specify the same cacheNamespace
across resources to
* return the same cached data for requests to different resources.
*/
public String getCacheNamespace() {
return this.cacheNamespace;
}
/**
*
* Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the
* cacheNamespace
. You can specify the same cacheNamespace
across resources to return the
* same cached data for requests to different resources.
*
cacheNamespace
. You can specify the same cacheNamespace
across resources to
* return the same cached data for requests to different resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutIntegrationRequest withCacheNamespace(String cacheNamespace) {
setCacheNamespace(cacheNamespace);
return this;
}
/**
*
* A list of request parameters whose values API Gateway caches. To be valid values for
* cacheKeyParameters
, these parameters must also be specified for Method
* requestParameters
.
*
cacheKeyParameters
, these parameters must also be specified for Method
* requestParameters
.
*/
public java.util.List
* A list of request parameters whose values API Gateway caches. To be valid values for
* cacheKeyParameters
, these parameters must also be specified for Method
* requestParameters
.
*
cacheKeyParameters
, these parameters must also be specified for Method
* requestParameters
.
*/
public void setCacheKeyParameters(java.util.Collection
* A list of request parameters whose values API Gateway caches. To be valid values for
* cacheKeyParameters
, these parameters must also be specified for Method
* requestParameters
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setCacheKeyParameters(java.util.Collection)} or {@link #withCacheKeyParameters(java.util.Collection)} if * you want to override the existing values. *
* * @param cacheKeyParameters * A list of request parameters whose values API Gateway caches. To be valid values for *cacheKeyParameters
, these parameters must also be specified for Method
* requestParameters
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutIntegrationRequest withCacheKeyParameters(String... cacheKeyParameters) {
if (this.cacheKeyParameters == null) {
setCacheKeyParameters(new java.util.ArrayList
* A list of request parameters whose values API Gateway caches. To be valid values for
* cacheKeyParameters
, these parameters must also be specified for Method
* requestParameters
.
*
cacheKeyParameters
, these parameters must also be specified for Method
* requestParameters
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutIntegrationRequest withCacheKeyParameters(java.util.Collection
* Specifies how to handle request payload content type conversions. Supported values are
* CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
*
* 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 passthroughBehavior
is configured to
* support payload pass-through.
*
CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
*
* 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 passthroughBehavior
is configured
* to support payload pass-through.
* @see ContentHandlingStrategy
*/
public void setContentHandling(String contentHandling) {
this.contentHandling = contentHandling;
}
/**
*
* Specifies how to handle request payload content type conversions. Supported values are
* CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
*
* 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 passthroughBehavior
is configured to
* support payload pass-through.
*
CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
*
* 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 passthroughBehavior
is
* configured to support payload pass-through.
* @see ContentHandlingStrategy
*/
public String getContentHandling() {
return this.contentHandling;
}
/**
*
* Specifies how to handle request payload content type conversions. Supported values are
* CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
*
* 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 passthroughBehavior
is configured to
* support payload pass-through.
*
CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
*
* 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 passthroughBehavior
is configured
* to support payload pass-through.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ContentHandlingStrategy
*/
public PutIntegrationRequest withContentHandling(String contentHandling) {
setContentHandling(contentHandling);
return this;
}
/**
*
* Specifies how to handle request payload content type conversions. Supported values are
* CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
*
* 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 passthroughBehavior
is configured to
* support payload pass-through.
*
CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
*
* 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 passthroughBehavior
is configured
* to support payload pass-through.
* @see ContentHandlingStrategy
*/
public void setContentHandling(ContentHandlingStrategy contentHandling) {
withContentHandling(contentHandling);
}
/**
*
* Specifies how to handle request payload content type conversions. Supported values are
* CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
*
* 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 passthroughBehavior
is configured to
* support payload pass-through.
*
CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
*
* 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 passthroughBehavior
is configured
* to support payload pass-through.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ContentHandlingStrategy
*/
public PutIntegrationRequest withContentHandling(ContentHandlingStrategy contentHandling) {
this.contentHandling = contentHandling.toString();
return this;
}
/**
*
* Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. *
* * @param timeoutInMillis * Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. */ public void setTimeoutInMillis(Integer timeoutInMillis) { this.timeoutInMillis = timeoutInMillis; } /** ** Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. *
* * @return Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 * seconds. */ public Integer getTimeoutInMillis() { return this.timeoutInMillis; } /** ** Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. *
* * @param timeoutInMillis * Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationRequest withTimeoutInMillis(Integer timeoutInMillis) { setTimeoutInMillis(timeoutInMillis); return this; } /** * @param tlsConfig */ public void setTlsConfig(TlsConfig tlsConfig) { this.tlsConfig = tlsConfig; } /** * @return */ public TlsConfig getTlsConfig() { return this.tlsConfig; } /** * @param tlsConfig * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationRequest withTlsConfig(TlsConfig tlsConfig) { setTlsConfig(tlsConfig); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getRestApiId() != null) sb.append("RestApiId: ").append(getRestApiId()).append(","); if (getResourceId() != null) sb.append("ResourceId: ").append(getResourceId()).append(","); if (getHttpMethod() != null) sb.append("HttpMethod: ").append(getHttpMethod()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getIntegrationHttpMethod() != null) sb.append("IntegrationHttpMethod: ").append(getIntegrationHttpMethod()).append(","); if (getUri() != null) sb.append("Uri: ").append(getUri()).append(","); if (getConnectionType() != null) sb.append("ConnectionType: ").append(getConnectionType()).append(","); if (getConnectionId() != null) sb.append("ConnectionId: ").append(getConnectionId()).append(","); if (getCredentials() != null) sb.append("Credentials: ").append(getCredentials()).append(","); if (getRequestParameters() != null) sb.append("RequestParameters: ").append(getRequestParameters()).append(","); if (getRequestTemplates() != null) sb.append("RequestTemplates: ").append(getRequestTemplates()).append(","); if (getPassthroughBehavior() != null) sb.append("PassthroughBehavior: ").append(getPassthroughBehavior()).append(","); if (getCacheNamespace() != null) sb.append("CacheNamespace: ").append(getCacheNamespace()).append(","); if (getCacheKeyParameters() != null) sb.append("CacheKeyParameters: ").append(getCacheKeyParameters()).append(","); if (getContentHandling() != null) sb.append("ContentHandling: ").append(getContentHandling()).append(","); if (getTimeoutInMillis() != null) sb.append("TimeoutInMillis: ").append(getTimeoutInMillis()).append(","); if (getTlsConfig() != null) sb.append("TlsConfig: ").append(getTlsConfig()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutIntegrationRequest == false) return false; PutIntegrationRequest other = (PutIntegrationRequest) obj; if (other.getRestApiId() == null ^ this.getRestApiId() == null) return false; if (other.getRestApiId() != null && other.getRestApiId().equals(this.getRestApiId()) == false) return false; if (other.getResourceId() == null ^ this.getResourceId() == null) return false; if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == false) return false; if (other.getHttpMethod() == null ^ this.getHttpMethod() == null) return false; if (other.getHttpMethod() != null && other.getHttpMethod().equals(this.getHttpMethod()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getIntegrationHttpMethod() == null ^ this.getIntegrationHttpMethod() == null) return false; if (other.getIntegrationHttpMethod() != null && other.getIntegrationHttpMethod().equals(this.getIntegrationHttpMethod()) == false) return false; if (other.getUri() == null ^ this.getUri() == null) return false; if (other.getUri() != null && other.getUri().equals(this.getUri()) == false) return false; if (other.getConnectionType() == null ^ this.getConnectionType() == null) return false; if (other.getConnectionType() != null && other.getConnectionType().equals(this.getConnectionType()) == false) return false; if (other.getConnectionId() == null ^ this.getConnectionId() == null) return false; if (other.getConnectionId() != null && other.getConnectionId().equals(this.getConnectionId()) == false) return false; if (other.getCredentials() == null ^ this.getCredentials() == null) return false; if (other.getCredentials() != null && other.getCredentials().equals(this.getCredentials()) == false) return false; if (other.getRequestParameters() == null ^ this.getRequestParameters() == null) return false; if (other.getRequestParameters() != null && other.getRequestParameters().equals(this.getRequestParameters()) == false) return false; if (other.getRequestTemplates() == null ^ this.getRequestTemplates() == null) return false; if (other.getRequestTemplates() != null && other.getRequestTemplates().equals(this.getRequestTemplates()) == false) return false; if (other.getPassthroughBehavior() == null ^ this.getPassthroughBehavior() == null) return false; if (other.getPassthroughBehavior() != null && other.getPassthroughBehavior().equals(this.getPassthroughBehavior()) == false) return false; if (other.getCacheNamespace() == null ^ this.getCacheNamespace() == null) return false; if (other.getCacheNamespace() != null && other.getCacheNamespace().equals(this.getCacheNamespace()) == false) return false; if (other.getCacheKeyParameters() == null ^ this.getCacheKeyParameters() == null) return false; if (other.getCacheKeyParameters() != null && other.getCacheKeyParameters().equals(this.getCacheKeyParameters()) == false) return false; if (other.getContentHandling() == null ^ this.getContentHandling() == null) return false; if (other.getContentHandling() != null && other.getContentHandling().equals(this.getContentHandling()) == false) return false; if (other.getTimeoutInMillis() == null ^ this.getTimeoutInMillis() == null) return false; if (other.getTimeoutInMillis() != null && other.getTimeoutInMillis().equals(this.getTimeoutInMillis()) == false) return false; if (other.getTlsConfig() == null ^ this.getTlsConfig() == null) return false; if (other.getTlsConfig() != null && other.getTlsConfig().equals(this.getTlsConfig()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRestApiId() == null) ? 0 : getRestApiId().hashCode()); hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().hashCode()); hashCode = prime * hashCode + ((getHttpMethod() == null) ? 0 : getHttpMethod().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getIntegrationHttpMethod() == null) ? 0 : getIntegrationHttpMethod().hashCode()); hashCode = prime * hashCode + ((getUri() == null) ? 0 : getUri().hashCode()); hashCode = prime * hashCode + ((getConnectionType() == null) ? 0 : getConnectionType().hashCode()); hashCode = prime * hashCode + ((getConnectionId() == null) ? 0 : getConnectionId().hashCode()); hashCode = prime * hashCode + ((getCredentials() == null) ? 0 : getCredentials().hashCode()); hashCode = prime * hashCode + ((getRequestParameters() == null) ? 0 : getRequestParameters().hashCode()); hashCode = prime * hashCode + ((getRequestTemplates() == null) ? 0 : getRequestTemplates().hashCode()); hashCode = prime * hashCode + ((getPassthroughBehavior() == null) ? 0 : getPassthroughBehavior().hashCode()); hashCode = prime * hashCode + ((getCacheNamespace() == null) ? 0 : getCacheNamespace().hashCode()); hashCode = prime * hashCode + ((getCacheKeyParameters() == null) ? 0 : getCacheKeyParameters().hashCode()); hashCode = prime * hashCode + ((getContentHandling() == null) ? 0 : getContentHandling().hashCode()); hashCode = prime * hashCode + ((getTimeoutInMillis() == null) ? 0 : getTimeoutInMillis().hashCode()); hashCode = prime * hashCode + ((getTlsConfig() == null) ? 0 : getTlsConfig().hashCode()); return hashCode; } @Override public PutIntegrationRequest clone() { return (PutIntegrationRequest) super.clone(); } }