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

com.amazonaws.services.apigateway.model.PutIntegrationResponseRequest 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;
import com.amazonaws.AmazonWebServiceRequest;

/**
 * 

* Represents a put integration response request. *

*/ public class PutIntegrationResponseRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* Specifies a put integration response request's API identifier. *

*/ private String restApiId; /** *

* Specifies a put integration response request's resource identifier. *

*/ private String resourceId; /** *

* Specifies a put integration response request's HTTP method. *

*/ private String httpMethod; /** *

* Specifies the status code that is used to map the integration response to an existing MethodResponse. *

*/ private String statusCode; /** *

* Specifies the selection pattern of a put integration response. *

*/ private String selectionPattern; /** *

* A key-value map specifying response parameters that are passed to the method response from the back end. 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 must be a valid and unique response header name and JSON-expression a valid * JSON expression without the $ prefix. *

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

* Specifies a put integration response's templates. *

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

* Specifies a put integration response request's API identifier. *

* * @param restApiId * Specifies a put integration response request's API identifier. */ public void setRestApiId(String restApiId) { this.restApiId = restApiId; } /** *

* Specifies a put integration response request's API identifier. *

* * @return Specifies a put integration response request's API identifier. */ public String getRestApiId() { return this.restApiId; } /** *

* Specifies a put integration response request's API identifier. *

* * @param restApiId * Specifies a put integration response request's API identifier. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationResponseRequest withRestApiId(String restApiId) { setRestApiId(restApiId); return this; } /** *

* Specifies a put integration response request's resource identifier. *

* * @param resourceId * Specifies a put integration response request's resource identifier. */ public void setResourceId(String resourceId) { this.resourceId = resourceId; } /** *

* Specifies a put integration response request's resource identifier. *

* * @return Specifies a put integration response request's resource identifier. */ public String getResourceId() { return this.resourceId; } /** *

* Specifies a put integration response request's resource identifier. *

* * @param resourceId * Specifies a put integration response request's resource identifier. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationResponseRequest withResourceId(String resourceId) { setResourceId(resourceId); return this; } /** *

* Specifies a put integration response request's HTTP method. *

* * @param httpMethod * Specifies a put integration response request's HTTP method. */ public void setHttpMethod(String httpMethod) { this.httpMethod = httpMethod; } /** *

* Specifies a put integration response request's HTTP method. *

* * @return Specifies a put integration response request's HTTP method. */ public String getHttpMethod() { return this.httpMethod; } /** *

* Specifies a put integration response request's HTTP method. *

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

* Specifies the status code that is used to map the integration response to an existing MethodResponse. *

* * @param statusCode * Specifies the status code that is used to map the integration response to an existing * MethodResponse. */ public void setStatusCode(String statusCode) { this.statusCode = statusCode; } /** *

* Specifies the status code that is used to map the integration response to an existing MethodResponse. *

* * @return Specifies the status code that is used to map the integration response to an existing * MethodResponse. */ public String getStatusCode() { return this.statusCode; } /** *

* Specifies the status code that is used to map the integration response to an existing MethodResponse. *

* * @param statusCode * Specifies the status code that is used to map the integration response to an existing * MethodResponse. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationResponseRequest withStatusCode(String statusCode) { setStatusCode(statusCode); return this; } /** *

* Specifies the selection pattern of a put integration response. *

* * @param selectionPattern * Specifies the selection pattern of a put integration response. */ public void setSelectionPattern(String selectionPattern) { this.selectionPattern = selectionPattern; } /** *

* Specifies the selection pattern of a put integration response. *

* * @return Specifies the selection pattern of a put integration response. */ public String getSelectionPattern() { return this.selectionPattern; } /** *

* Specifies the selection pattern of a put integration response. *

* * @param selectionPattern * Specifies the selection pattern of a put integration response. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationResponseRequest withSelectionPattern(String selectionPattern) { setSelectionPattern(selectionPattern); return this; } /** *

* A key-value map specifying response parameters that are passed to the method response from the back end. 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 must be a valid and unique response header name and JSON-expression a valid * JSON expression without the $ prefix. *

* * @return A key-value map specifying response parameters that are passed to the method response from the back end. * 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 must be a valid and * unique response header name and JSON-expression a valid JSON expression without the * $ prefix. */ public java.util.Map getResponseParameters() { return responseParameters; } /** *

* A key-value map specifying response parameters that are passed to the method response from the back end. 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 must be a valid and unique response header name and JSON-expression 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 back end. * 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 must be a valid and * unique response header name and JSON-expression a valid JSON expression without the * $ prefix. */ public void setResponseParameters(java.util.Map responseParameters) { this.responseParameters = responseParameters; } /** *

* A key-value map specifying response parameters that are passed to the method response from the back end. 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 must be a valid and unique response header name and JSON-expression 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 back end. * 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 must be a valid and * unique response header name and JSON-expression a valid JSON expression without the * $ prefix. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationResponseRequest withResponseParameters(java.util.Map responseParameters) { setResponseParameters(responseParameters); return this; } public PutIntegrationResponseRequest addResponseParametersEntry(String key, String value) { if (null == this.responseParameters) { this.responseParameters = new java.util.HashMap(); } if (this.responseParameters.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.responseParameters.put(key, value); return this; } /** * Removes all the entries added into ResponseParameters. <p> Returns a reference to this object so that method * calls can be chained together. */ public PutIntegrationResponseRequest clearResponseParametersEntries() { this.responseParameters = null; return this; } /** *

* Specifies a put integration response's templates. *

* * @return Specifies a put integration response's templates. */ public java.util.Map getResponseTemplates() { return responseTemplates; } /** *

* Specifies a put integration response's templates. *

* * @param responseTemplates * Specifies a put integration response's templates. */ public void setResponseTemplates(java.util.Map responseTemplates) { this.responseTemplates = responseTemplates; } /** *

* Specifies a put integration response's templates. *

* * @param responseTemplates * Specifies a put integration response's templates. * @return Returns a reference to this object so that method calls can be chained together. */ public PutIntegrationResponseRequest withResponseTemplates(java.util.Map responseTemplates) { setResponseTemplates(responseTemplates); return this; } public PutIntegrationResponseRequest addResponseTemplatesEntry(String key, String value) { if (null == this.responseTemplates) { this.responseTemplates = new java.util.HashMap(); } if (this.responseTemplates.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.responseTemplates.put(key, value); return this; } /** * Removes all the entries added into ResponseTemplates. <p> Returns a reference to this object so that method * calls can be chained together. */ public PutIntegrationResponseRequest clearResponseTemplatesEntries() { this.responseTemplates = 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 (getRestApiId() != null) sb.append("RestApiId: " + getRestApiId() + ","); if (getResourceId() != null) sb.append("ResourceId: " + getResourceId() + ","); if (getHttpMethod() != null) sb.append("HttpMethod: " + getHttpMethod() + ","); if (getStatusCode() != null) sb.append("StatusCode: " + getStatusCode() + ","); if (getSelectionPattern() != null) sb.append("SelectionPattern: " + getSelectionPattern() + ","); if (getResponseParameters() != null) sb.append("ResponseParameters: " + getResponseParameters() + ","); if (getResponseTemplates() != null) sb.append("ResponseTemplates: " + getResponseTemplates()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutIntegrationResponseRequest == false) return false; PutIntegrationResponseRequest other = (PutIntegrationResponseRequest) 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.getStatusCode() == null ^ this.getStatusCode() == null) return false; if (other.getStatusCode() != null && other.getStatusCode().equals(this.getStatusCode()) == false) return false; if (other.getSelectionPattern() == null ^ this.getSelectionPattern() == null) return false; if (other.getSelectionPattern() != null && other.getSelectionPattern().equals(this.getSelectionPattern()) == 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; 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 + ((getStatusCode() == null) ? 0 : getStatusCode().hashCode()); hashCode = prime * hashCode + ((getSelectionPattern() == null) ? 0 : getSelectionPattern().hashCode()); hashCode = prime * hashCode + ((getResponseParameters() == null) ? 0 : getResponseParameters().hashCode()); hashCode = prime * hashCode + ((getResponseTemplates() == null) ? 0 : getResponseTemplates().hashCode()); return hashCode; } @Override public PutIntegrationResponseRequest clone() { return (PutIntegrationResponseRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy