/*
* 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.apigatewayv2.model;
import java.io.Serializable;
import javax.annotation.Generated;
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetIntegrationResponseResult extends com.amazonaws.AmazonWebServiceResult
* Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported
* values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
*
* CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
*
* CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
*
* If this property is not defined, the response payload will be passed through from the integration response to the
* route response or method response without modification.
*
* The integration response ID.
*
* The integration response key.
*
* A key-value map specifying response parameters that are passed to the method response from the backend. The key
* is a method response header parameter name and the mapped value is an integration response header value, a static
* value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The
* mapping key must match the pattern of method.response.header.{name}, where name is a valid and unique header
* name. The mapped non-static value must match the pattern of integration.response.header.{name} or
* integration.response.body.{JSON-expression}, where name is a valid and unique response header name and
* JSON-expression is a valid JSON expression without the $ prefix.
*
* The collection of response templates for the integration response as a string-to-string map of key-value pairs.
* Response templates are represented as a key/value map, with a content-type as the key and a template as the
* value.
*
* The template selection expressions for the integration response.
*
* Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported
* values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
*
* CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
*
* CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
*
* If this property is not defined, the response payload will be passed through from the integration response to the
* route response or method response without modification.
*
* CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary * blob. *
** CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string. *
** If this property is not defined, the response payload will be passed through from the integration response * to the route response or method response without modification. * @see ContentHandlingStrategy */ public void setContentHandlingStrategy(String contentHandlingStrategy) { this.contentHandlingStrategy = contentHandlingStrategy; } /** *
* Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported * values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: *
** CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob. *
** CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string. *
** If this property is not defined, the response payload will be passed through from the integration response to the * route response or method response without modification. *
* * @return Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. * Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: ** CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary * blob. *
** CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string. *
** If this property is not defined, the response payload will be passed through from the integration * response to the route response or method response without modification. * @see ContentHandlingStrategy */ public String getContentHandlingStrategy() { return this.contentHandlingStrategy; } /** *
* Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported * values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: *
** CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob. *
** CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string. *
** If this property is not defined, the response payload will be passed through from the integration response to the * route response or method response without modification. *
* * @param contentHandlingStrategy * Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. * Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: ** CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary * blob. *
** CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string. *
** If this property is not defined, the response payload will be passed through from the integration response * to the route response or method response without modification. * @return Returns a reference to this object so that method calls can be chained together. * @see ContentHandlingStrategy */ public GetIntegrationResponseResult withContentHandlingStrategy(String contentHandlingStrategy) { setContentHandlingStrategy(contentHandlingStrategy); return this; } /** *
* Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported * values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: *
** CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob. *
** CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string. *
** If this property is not defined, the response payload will be passed through from the integration response to the * route response or method response without modification. *
* * @param contentHandlingStrategy * Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. * Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: ** CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary * blob. *
** CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string. *
** If this property is not defined, the response payload will be passed through from the integration response * to the route response or method response without modification. * @return Returns a reference to this object so that method calls can be chained together. * @see ContentHandlingStrategy */ public GetIntegrationResponseResult withContentHandlingStrategy(ContentHandlingStrategy contentHandlingStrategy) { this.contentHandlingStrategy = contentHandlingStrategy.toString(); return this; } /** *
* The integration response ID. *
* * @param integrationResponseId * The integration response ID. */ public void setIntegrationResponseId(String integrationResponseId) { this.integrationResponseId = integrationResponseId; } /** ** The integration response ID. *
* * @return The integration response ID. */ public String getIntegrationResponseId() { return this.integrationResponseId; } /** ** The integration response ID. *
* * @param integrationResponseId * The integration response ID. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResponseResult withIntegrationResponseId(String integrationResponseId) { setIntegrationResponseId(integrationResponseId); return this; } /** ** The integration response key. *
* * @param integrationResponseKey * The integration response key. */ public void setIntegrationResponseKey(String integrationResponseKey) { this.integrationResponseKey = integrationResponseKey; } /** ** The integration response key. *
* * @return The integration response key. */ public String getIntegrationResponseKey() { return this.integrationResponseKey; } /** ** The integration response key. *
* * @param integrationResponseKey * The integration response key. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResponseResult withIntegrationResponseKey(String integrationResponseKey) { setIntegrationResponseKey(integrationResponseKey); return this; } /** ** A key-value map specifying response parameters that are passed to the method response from the backend. The key * is a method response header parameter name and the mapped value is an integration response header value, a static * value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The * mapping key must match the pattern of method.response.header.{name}, where name is a valid and unique header * name. The mapped non-static value must match the pattern of integration.response.header.{name} or * integration.response.body.{JSON-expression}, where name is a valid and unique response header name and * JSON-expression is a valid JSON expression without the $ prefix. *
* * @return A key-value map specifying response parameters that are passed to the method response from the backend. * The key is a method response header parameter name and the mapped value is an integration response header * value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration * response body. The mapping key must match the pattern of method.response.header.{name}, where name is a * valid and unique header name. The mapped non-static value must match the pattern of * integration.response.header.{name} or integration.response.body.{JSON-expression}, where name is a valid * and unique response header name and JSON-expression is a valid JSON expression without the $ prefix. */ public java.util.Map* A key-value map specifying response parameters that are passed to the method response from the backend. The key * is a method response header parameter name and the mapped value is an integration response header value, a static * value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The * mapping key must match the pattern of method.response.header.{name}, where name is a valid and unique header * name. The mapped non-static value must match the pattern of integration.response.header.{name} or * integration.response.body.{JSON-expression}, where name is a valid and unique response header name and * JSON-expression is a valid JSON expression without the $ prefix. *
* * @param responseParameters * A key-value map specifying response parameters that are passed to the method response from the backend. * The key is a method response header parameter name and the mapped value is an integration response header * value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration * response body. The mapping key must match the pattern of method.response.header.{name}, where name is a * valid and unique header name. The mapped non-static value must match the pattern of * integration.response.header.{name} or integration.response.body.{JSON-expression}, where name is a valid * and unique response header name and JSON-expression is a valid JSON expression without the $ prefix. */ public void setResponseParameters(java.util.Map* A key-value map specifying response parameters that are passed to the method response from the backend. The key * is a method response header parameter name and the mapped value is an integration response header value, a static * value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The * mapping key must match the pattern of method.response.header.{name}, where name is a valid and unique header * name. The mapped non-static value must match the pattern of integration.response.header.{name} or * integration.response.body.{JSON-expression}, where name is a valid and unique response header name and * JSON-expression is a valid JSON expression without the $ prefix. *
* * @param responseParameters * A key-value map specifying response parameters that are passed to the method response from the backend. * The key is a method response header parameter name and the mapped value is an integration response header * value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration * response body. The mapping key must match the pattern of method.response.header.{name}, where name is a * valid and unique header name. The mapped non-static value must match the pattern of * integration.response.header.{name} or integration.response.body.{JSON-expression}, where name is a valid * and unique response header name and JSON-expression is a valid JSON expression without the $ prefix. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResponseResult withResponseParameters(java.util.Map* The collection of response templates for the integration response as a string-to-string map of key-value pairs. * Response templates are represented as a key/value map, with a content-type as the key and a template as the * value. *
* * @return The collection of response templates for the integration response as a string-to-string map of key-value * pairs. Response templates are represented as a key/value map, with a content-type as the key and a * template as the value. */ public java.util.Map* The collection of response templates for the integration response as a string-to-string map of key-value pairs. * Response templates are represented as a key/value map, with a content-type as the key and a template as the * value. *
* * @param responseTemplates * The collection of response templates for the integration response as a string-to-string map of key-value * pairs. Response templates are represented as a key/value map, with a content-type as the key and a * template as the value. */ public void setResponseTemplates(java.util.Map* The collection of response templates for the integration response as a string-to-string map of key-value pairs. * Response templates are represented as a key/value map, with a content-type as the key and a template as the * value. *
* * @param responseTemplates * The collection of response templates for the integration response as a string-to-string map of key-value * pairs. Response templates are represented as a key/value map, with a content-type as the key and a * template as the value. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResponseResult withResponseTemplates(java.util.Map* The template selection expressions for the integration response. *
* * @param templateSelectionExpression * The template selection expressions for the integration response. */ public void setTemplateSelectionExpression(String templateSelectionExpression) { this.templateSelectionExpression = templateSelectionExpression; } /** ** The template selection expressions for the integration response. *
* * @return The template selection expressions for the integration response. */ public String getTemplateSelectionExpression() { return this.templateSelectionExpression; } /** ** The template selection expressions for the integration response. *
* * @param templateSelectionExpression * The template selection expressions for the integration response. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIntegrationResponseResult withTemplateSelectionExpression(String templateSelectionExpression) { setTemplateSelectionExpression(templateSelectionExpression); 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 (getContentHandlingStrategy() != null) sb.append("ContentHandlingStrategy: ").append(getContentHandlingStrategy()).append(","); if (getIntegrationResponseId() != null) sb.append("IntegrationResponseId: ").append(getIntegrationResponseId()).append(","); if (getIntegrationResponseKey() != null) sb.append("IntegrationResponseKey: ").append(getIntegrationResponseKey()).append(","); if (getResponseParameters() != null) sb.append("ResponseParameters: ").append(getResponseParameters()).append(","); if (getResponseTemplates() != null) sb.append("ResponseTemplates: ").append(getResponseTemplates()).append(","); if (getTemplateSelectionExpression() != null) sb.append("TemplateSelectionExpression: ").append(getTemplateSelectionExpression()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetIntegrationResponseResult == false) return false; GetIntegrationResponseResult other = (GetIntegrationResponseResult) obj; if (other.getContentHandlingStrategy() == null ^ this.getContentHandlingStrategy() == null) return false; if (other.getContentHandlingStrategy() != null && other.getContentHandlingStrategy().equals(this.getContentHandlingStrategy()) == false) return false; if (other.getIntegrationResponseId() == null ^ this.getIntegrationResponseId() == null) return false; if (other.getIntegrationResponseId() != null && other.getIntegrationResponseId().equals(this.getIntegrationResponseId()) == false) return false; if (other.getIntegrationResponseKey() == null ^ this.getIntegrationResponseKey() == null) return false; if (other.getIntegrationResponseKey() != null && other.getIntegrationResponseKey().equals(this.getIntegrationResponseKey()) == false) return false; if (other.getResponseParameters() == null ^ this.getResponseParameters() == null) return false; if (other.getResponseParameters() != null && other.getResponseParameters().equals(this.getResponseParameters()) == false) return false; if (other.getResponseTemplates() == null ^ this.getResponseTemplates() == null) return false; if (other.getResponseTemplates() != null && other.getResponseTemplates().equals(this.getResponseTemplates()) == false) return false; if (other.getTemplateSelectionExpression() == null ^ this.getTemplateSelectionExpression() == null) return false; if (other.getTemplateSelectionExpression() != null && other.getTemplateSelectionExpression().equals(this.getTemplateSelectionExpression()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContentHandlingStrategy() == null) ? 0 : getContentHandlingStrategy().hashCode()); hashCode = prime * hashCode + ((getIntegrationResponseId() == null) ? 0 : getIntegrationResponseId().hashCode()); hashCode = prime * hashCode + ((getIntegrationResponseKey() == null) ? 0 : getIntegrationResponseKey().hashCode()); hashCode = prime * hashCode + ((getResponseParameters() == null) ? 0 : getResponseParameters().hashCode()); hashCode = prime * hashCode + ((getResponseTemplates() == null) ? 0 : getResponseTemplates().hashCode()); hashCode = prime * hashCode + ((getTemplateSelectionExpression() == null) ? 0 : getTemplateSelectionExpression().hashCode()); return hashCode; } @Override public GetIntegrationResponseResult clone() { try { return (GetIntegrationResponseResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }