All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.apigateway.model.GetIntegrationResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon API Gateway module holds the client classes that are used for communicating with Amazon API Gateway

There is a newer version: 1.11.78
Show newest version
/*
 * Copyright 2011-2016 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;

/**
 * 

* Represents an HTTP, AWS, or Mock integration. *

*
In the API Gateway console, the built-in Lambda integration is an AWS integration.
*/ public class GetIntegrationResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, * AWS for any AWS service endpoints, MOCK for testing without actually invoking the back * end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for * integrating with the Lambda proxy integration type. *

*/ private String type; /** *

* Specifies the integration's HTTP method type. *

*/ private String httpMethod; /** *

* Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully * formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form * arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. * Region, subdomain and service are used to determine the right endpoint. * For AWS services that use the Action= query string parameter, service_api should be a * valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that * the remaining substring in the URI should be treated as the path to the resource, including the initial * /. *

*/ private String uri; /** *

* Specifies the credentials required for the integration, if any. For AWS integrations, three options are * available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To * require that the caller's identity be passed through from the request, specify the string * arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null. *

*/ 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. *

*/ private java.util.Map requestParameters; /** *

* 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 requestTemplates; /** *
*

* 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 * requestTemplates. There are three valid values: WHEN_NO_MATCH, * WHEN_NO_TEMPLATES, and NEVER. *

*
    *
  • WHEN_NO_MATCH 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.
  • *
  • WHEN_NO_TEMPLATES 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.
  • *
  • NEVER 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.
  • *
*
*/ private String passthroughBehavior; /** *

* Specifies the integration's cache namespace. *

*/ private String cacheNamespace; /** *

* Specifies the integration's cache key parameters. *

*/ private java.util.List cacheKeyParameters; /** *

* Specifies the integration's responses. *

*
*

*

Example: Get integration responses of a method

*
Request
*

* *

     * GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
     * 
* *
Response
*

* The successful response returns 200 OK status and a payload as follows: *

* *
     * { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }
     * 
*

*

*/ private java.util.Map integrationResponses; /** *

* Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, * AWS for any AWS service endpoints, MOCK for testing without actually invoking the back * end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for * integrating with the Lambda proxy integration type. *

* * @param type * Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back * end, AWS for any AWS service endpoints, MOCK for testing without actually * invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or * AWS_PROXY for integrating with the Lambda proxy integration type. * @see IntegrationType */ public void setType(String type) { this.type = type; } /** *

* Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, * AWS for any AWS service endpoints, MOCK for testing without actually invoking the back * end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for * integrating with the Lambda proxy integration type. *

* * @return Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back * end, AWS for any AWS service endpoints, MOCK for testing without actually * invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or * AWS_PROXY for integrating with the Lambda proxy integration type. * @see IntegrationType */ public String getType() { return this.type; } /** *

* Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, * AWS for any AWS service endpoints, MOCK for testing without actually invoking the back * end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for * integrating with the Lambda proxy integration type. *

* * @param type * Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back * end, AWS for any AWS service endpoints, MOCK for testing without actually * invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or * AWS_PROXY for integrating with the Lambda proxy integration type. * @return Returns a reference to this object so that method calls can be chained together. * @see IntegrationType */ public GetIntegrationResult withType(String type) { setType(type); return this; } /** *

* Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, * AWS for any AWS service endpoints, MOCK for testing without actually invoking the back * end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for * integrating with the Lambda proxy integration type. *

* * @param type * Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back * end, AWS for any AWS service endpoints, MOCK for testing without actually * invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or * AWS_PROXY for integrating with the Lambda proxy integration type. * @see IntegrationType */ public void setType(IntegrationType type) { this.type = type.toString(); } /** *

* Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, * AWS for any AWS service endpoints, MOCK for testing without actually invoking the back * end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for * integrating with the Lambda proxy integration type. *

* * @param type * Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back * end, AWS for any AWS service endpoints, MOCK for testing without actually * invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or * AWS_PROXY for integrating with the Lambda proxy integration type. * @return Returns a reference to this object so that method calls can be chained together. * @see IntegrationType */ public GetIntegrationResult withType(IntegrationType type) { setType(type); return this; } /** *

* Specifies the integration's HTTP method type. *

* * @param httpMethod * Specifies the integration's HTTP method type. */ public void setHttpMethod(String httpMethod) { this.httpMethod = httpMethod; } /** *

* Specifies the integration's HTTP method type. *

* * @return Specifies the integration's HTTP method type. */ public String getHttpMethod() { return this.httpMethod; } /** *

* Specifies the integration's HTTP method type. *

* * @param httpMethod * Specifies the integration's HTTP method type. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResult withHttpMethod(String httpMethod) { setHttpMethod(httpMethod); return this; } /** *

* Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully * formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form * arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. * Region, subdomain and service are used to determine the right endpoint. * For AWS services that use the Action= query string parameter, service_api should be a * valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that * the remaining substring in the URI should be treated as the path to the resource, including the initial * /. *

* * @param uri * Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a * fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form * arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. * Region, subdomain and service are used to determine the right * endpoint. For AWS services that use the Action= query string parameter, * service_api should be a valid action for the desired service. For RESTful AWS service APIs, * path is used to indicate that the remaining substring in the URI should be treated as the * path to the resource, including the initial /. */ public void setUri(String uri) { this.uri = uri; } /** *

* Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully * formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form * arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. * Region, subdomain and service are used to determine the right endpoint. * For AWS services that use the Action= query string parameter, service_api should be a * valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that * the remaining substring in the URI should be treated as the path to the resource, including the initial * /. *

* * @return Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a * fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form * arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. * Region, subdomain and service are used to determine the right * endpoint. For AWS services that use the Action= query string parameter, * service_api should be a valid action for the desired service. For RESTful AWS service APIs, * path is used to indicate that the remaining substring in the URI should be treated as the * path to the resource, including the initial /. */ public String getUri() { return this.uri; } /** *

* Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully * formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form * arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. * Region, subdomain and service are used to determine the right endpoint. * For AWS services that use the Action= query string parameter, service_api should be a * valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that * the remaining substring in the URI should be treated as the path to the resource, including the initial * /. *

* * @param uri * Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a * fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form * arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. * Region, subdomain and service are used to determine the right * endpoint. For AWS services that use the Action= query string parameter, * service_api should be a valid action for the desired service. For RESTful AWS service APIs, * path is used to indicate that the remaining substring in the URI should be treated as the * path to the resource, including the initial /. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResult withUri(String uri) { setUri(uri); return this; } /** *

* Specifies the credentials required for the integration, if any. For AWS integrations, three options are * available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To * require that the caller's identity be passed through from the request, specify the string * arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null. *

* * @param credentials * Specifies the credentials required for the integration, if any. For AWS integrations, three options are * available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name * (ARN). To require that the caller's identity be passed through from the request, specify the string * arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify * null. */ public void setCredentials(String credentials) { this.credentials = credentials; } /** *

* Specifies the credentials required for the integration, if any. For AWS integrations, three options are * available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To * require that the caller's identity be passed through from the request, specify the string * arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null. *

* * @return Specifies the credentials required for the integration, if any. For AWS integrations, three options are * available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name * (ARN). To require that the caller's identity be passed through from the request, specify the string * arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, * specify null. */ public String getCredentials() { return this.credentials; } /** *

* Specifies the credentials required for the integration, if any. For AWS integrations, three options are * available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To * require that the caller's identity be passed through from the request, specify the string * arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null. *

* * @param credentials * Specifies the credentials required for the integration, if any. For AWS integrations, three options are * available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name * (ARN). To require that the caller's identity be passed through from the request, specify the string * arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify * null. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResult 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. *

* * @return 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. */ public java.util.Map getRequestParameters() { return requestParameters; } /** *

* 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. *

* * @param requestParameters * 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. */ public void setRequestParameters(java.util.Map requestParameters) { this.requestParameters = requestParameters; } /** *

* 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. *

* * @param requestParameters * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResult withRequestParameters(java.util.Map requestParameters) { setRequestParameters(requestParameters); return this; } public GetIntegrationResult addRequestParametersEntry(String key, String value) { if (null == this.requestParameters) { this.requestParameters = new java.util.HashMap(); } if (this.requestParameters.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.requestParameters.put(key, value); return this; } /** * Removes all the entries added into RequestParameters. <p> Returns a reference to this object so that method * calls can be chained together. */ public GetIntegrationResult clearRequestParametersEntries() { this.requestParameters = null; return this; } /** *

* 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 getRequestTemplates() { return 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. *

* * @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 requestTemplates) { this.requestTemplates = 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. *

* * @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 GetIntegrationResult withRequestTemplates(java.util.Map requestTemplates) { setRequestTemplates(requestTemplates); return this; } public GetIntegrationResult addRequestTemplatesEntry(String key, String value) { if (null == this.requestTemplates) { this.requestTemplates = new java.util.HashMap(); } if (this.requestTemplates.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.requestTemplates.put(key, value); return this; } /** * Removes all the entries added into RequestTemplates. <p> Returns a reference to this object so that method * calls can be chained together. */ public GetIntegrationResult clearRequestTemplatesEntries() { this.requestTemplates = null; return this; } /** *
*

* 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 * requestTemplates. There are three valid values: WHEN_NO_MATCH, * WHEN_NO_TEMPLATES, and NEVER. *

*
    *
  • WHEN_NO_MATCH 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.
  • *
  • WHEN_NO_TEMPLATES 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.
  • *
  • NEVER 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.
  • *
*
* * @param passthroughBehavior *

* 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 requestTemplates. There are three valid values: WHEN_NO_MATCH, * WHEN_NO_TEMPLATES, and NEVER. *

*
    *
  • WHEN_NO_MATCH 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.
  • *
  • WHEN_NO_TEMPLATES 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.
  • *
  • NEVER 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.
  • *
*/ public void setPassthroughBehavior(String passthroughBehavior) { this.passthroughBehavior = passthroughBehavior; } /** *
*

* 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 * requestTemplates. There are three valid values: WHEN_NO_MATCH, * WHEN_NO_TEMPLATES, and NEVER. *

*
    *
  • WHEN_NO_MATCH 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.
  • *
  • WHEN_NO_TEMPLATES 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.
  • *
  • NEVER 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.
  • *
*
* * @return

* 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 requestTemplates. There are three valid values: WHEN_NO_MATCH, * WHEN_NO_TEMPLATES, and NEVER. *

*
    *
  • WHEN_NO_MATCH 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.
  • *
  • WHEN_NO_TEMPLATES 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.
  • *
  • NEVER 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.
  • *
*/ public String getPassthroughBehavior() { return this.passthroughBehavior; } /** *
*

* 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 * requestTemplates. There are three valid values: WHEN_NO_MATCH, * WHEN_NO_TEMPLATES, and NEVER. *

*
    *
  • WHEN_NO_MATCH 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.
  • *
  • WHEN_NO_TEMPLATES 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.
  • *
  • NEVER 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.
  • *
*
* * @param passthroughBehavior *

* 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 requestTemplates. There are three valid values: WHEN_NO_MATCH, * WHEN_NO_TEMPLATES, and NEVER. *

*
    *
  • WHEN_NO_MATCH 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.
  • *
  • WHEN_NO_TEMPLATES 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.
  • *
  • NEVER 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.
  • *
* @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResult withPassthroughBehavior(String passthroughBehavior) { setPassthroughBehavior(passthroughBehavior); return this; } /** *

* Specifies the integration's cache namespace. *

* * @param cacheNamespace * Specifies the integration's cache namespace. */ public void setCacheNamespace(String cacheNamespace) { this.cacheNamespace = cacheNamespace; } /** *

* Specifies the integration's cache namespace. *

* * @return Specifies the integration's cache namespace. */ public String getCacheNamespace() { return this.cacheNamespace; } /** *

* Specifies the integration's cache namespace. *

* * @param cacheNamespace * Specifies the integration's cache namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResult withCacheNamespace(String cacheNamespace) { setCacheNamespace(cacheNamespace); return this; } /** *

* Specifies the integration's cache key parameters. *

* * @return Specifies the integration's cache key parameters. */ public java.util.List getCacheKeyParameters() { return cacheKeyParameters; } /** *

* Specifies the integration's cache key parameters. *

* * @param cacheKeyParameters * Specifies the integration's cache key parameters. */ public void setCacheKeyParameters(java.util.Collection cacheKeyParameters) { if (cacheKeyParameters == null) { this.cacheKeyParameters = null; return; } this.cacheKeyParameters = new java.util.ArrayList(cacheKeyParameters); } /** *

* Specifies the integration's cache key parameters. *

*

* 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 * Specifies the integration's cache key parameters. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResult withCacheKeyParameters(String... cacheKeyParameters) { if (this.cacheKeyParameters == null) { setCacheKeyParameters(new java.util.ArrayList(cacheKeyParameters.length)); } for (String ele : cacheKeyParameters) { this.cacheKeyParameters.add(ele); } return this; } /** *

* Specifies the integration's cache key parameters. *

* * @param cacheKeyParameters * Specifies the integration's cache key parameters. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResult withCacheKeyParameters(java.util.Collection cacheKeyParameters) { setCacheKeyParameters(cacheKeyParameters); return this; } /** *

* Specifies the integration's responses. *

*
*

*

Example: Get integration responses of a method

*
Request
*

* *

     * GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
     * 
* *
Response
*

* The successful response returns 200 OK status and a payload as follows: *

* *
     * { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }
     * 
*

*

* * @return Specifies the integration's responses. *

*
*

*

Example: Get integration responses of a method

*
Request
*

* *

     * GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
     * 
* *
Response
*

* The successful response returns 200 OK status and a payload as follows: *

* *
     * { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }
     * 
*

*

Creating an * API */ public java.util.Map getIntegrationResponses() { return integrationResponses; } /** *

* Specifies the integration's responses. *

*
*

*

Example: Get integration responses of a method

*
Request
*

* *

     * GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
     * 
* *
Response
*

* The successful response returns 200 OK status and a payload as follows: *

* *
     * { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }
     * 
*

*

* * @param integrationResponses * Specifies the integration's responses. *

*
*

*

Example: Get integration responses of a method

*
Request
*

* *

     * GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
     * 
* *
Response
*

* The successful response returns 200 OK status and a payload as follows: *

* *
     * { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }
     * 
*

*

Creating an * API */ public void setIntegrationResponses(java.util.Map integrationResponses) { this.integrationResponses = integrationResponses; } /** *

* Specifies the integration's responses. *

*
*

*

Example: Get integration responses of a method

*
Request
*

* *

     * GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
     * 
* *
Response
*

* The successful response returns 200 OK status and a payload as follows: *

* *
     * { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }
     * 
*

*

* * @param integrationResponses * Specifies the integration's responses. *

*
*

*

Example: Get integration responses of a method

*
Request
*

* *

     * GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
     * 
* *
Response
*

* The successful response returns 200 OK status and a payload as follows: *

* *
     * { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }
     * 
*

*

Creating an * API * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResult withIntegrationResponses(java.util.Map integrationResponses) { setIntegrationResponses(integrationResponses); return this; } public GetIntegrationResult addIntegrationResponsesEntry(String key, IntegrationResponse value) { if (null == this.integrationResponses) { this.integrationResponses = new java.util.HashMap(); } if (this.integrationResponses.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.integrationResponses.put(key, value); return this; } /** * Removes all the entries added into IntegrationResponses. <p> Returns a reference to this object so that method * calls can be chained together. */ public GetIntegrationResult clearIntegrationResponsesEntries() { this.integrationResponses = null; return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getType() != null) sb.append("Type: " + getType() + ","); if (getHttpMethod() != null) sb.append("HttpMethod: " + getHttpMethod() + ","); if (getUri() != null) sb.append("Uri: " + getUri() + ","); if (getCredentials() != null) sb.append("Credentials: " + getCredentials() + ","); if (getRequestParameters() != null) sb.append("RequestParameters: " + getRequestParameters() + ","); if (getRequestTemplates() != null) sb.append("RequestTemplates: " + getRequestTemplates() + ","); if (getPassthroughBehavior() != null) sb.append("PassthroughBehavior: " + getPassthroughBehavior() + ","); if (getCacheNamespace() != null) sb.append("CacheNamespace: " + getCacheNamespace() + ","); if (getCacheKeyParameters() != null) sb.append("CacheKeyParameters: " + getCacheKeyParameters() + ","); if (getIntegrationResponses() != null) sb.append("IntegrationResponses: " + getIntegrationResponses()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetIntegrationResult == false) return false; GetIntegrationResult other = (GetIntegrationResult) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == 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.getUri() == null ^ this.getUri() == null) return false; if (other.getUri() != null && other.getUri().equals(this.getUri()) == 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.getIntegrationResponses() == null ^ this.getIntegrationResponses() == null) return false; if (other.getIntegrationResponses() != null && other.getIntegrationResponses().equals(this.getIntegrationResponses()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getHttpMethod() == null) ? 0 : getHttpMethod().hashCode()); hashCode = prime * hashCode + ((getUri() == null) ? 0 : getUri().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 + ((getIntegrationResponses() == null) ? 0 : getIntegrationResponses().hashCode()); return hashCode; } @Override public GetIntegrationResult clone() { try { return (GetIntegrationResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy