Class GetIntegrationResponseResult
- java.lang.Object
-
- com.amazonaws.services.apigateway.model.GetIntegrationResponseResult
-
- All Implemented Interfaces:
Serializable,Cloneable
public class GetIntegrationResponseResult extends Object implements Serializable, Cloneable
Represents an integration response. The status code must map to an existing MethodResponse, and parameters and templates can be used to transform the backend response.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GetIntegrationResponseResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GetIntegrationResponseResultaddResponseParametersEntry(String key, String value)GetIntegrationResponseResultaddResponseTemplatesEntry(String key, String value)GetIntegrationResponseResultclearResponseParametersEntries()Removes all the entries added into ResponseParameters.GetIntegrationResponseResultclearResponseTemplatesEntries()Removes all the entries added into ResponseTemplates.GetIntegrationResponseResultclone()booleanequals(Object obj)Map<String,String>getResponseParameters()Represents response parameters that can be read from the backend response.Map<String,String>getResponseTemplates()Specifies the templates used to transform the integration response body.StringgetSelectionPattern()Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend.StringgetStatusCode()Specifies the status code that is used to map the integration response to an existing MethodResponse.inthashCode()voidsetResponseParameters(Map<String,String> responseParameters)Represents response parameters that can be read from the backend response.voidsetResponseTemplates(Map<String,String> responseTemplates)Specifies the templates used to transform the integration response body.voidsetSelectionPattern(String selectionPattern)Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend.voidsetStatusCode(String statusCode)Specifies the status code that is used to map the integration response to an existing MethodResponse.StringtoString()Returns a string representation of this object; useful for testing and debugging.GetIntegrationResponseResultwithResponseParameters(Map<String,String> responseParameters)Represents response parameters that can be read from the backend response.GetIntegrationResponseResultwithResponseTemplates(Map<String,String> responseTemplates)Specifies the templates used to transform the integration response body.GetIntegrationResponseResultwithSelectionPattern(String selectionPattern)Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend.GetIntegrationResponseResultwithStatusCode(String statusCode)Specifies the status code that is used to map the integration response to an existing MethodResponse.
-
-
-
Method Detail
-
setStatusCode
public void setStatusCode(String statusCode)
Specifies the status code that is used to map the integration response to an existing MethodResponse.
- Parameters:
statusCode- Specifies the status code that is used to map the integration response to an existing MethodResponse.
-
getStatusCode
public String getStatusCode()
Specifies the status code that is used to map the integration response to an existing MethodResponse.
- Returns:
- Specifies the status code that is used to map the integration response to an existing MethodResponse.
-
withStatusCode
public GetIntegrationResponseResult withStatusCode(String statusCode)
Specifies the status code that is used to map the integration response to an existing MethodResponse.
- Parameters:
statusCode- Specifies the status code that is used to map the integration response to an existing MethodResponse.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSelectionPattern
public void setSelectionPattern(String selectionPattern)
Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.
- Parameters:
selectionPattern- Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.
-
getSelectionPattern
public String getSelectionPattern()
Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.
- Returns:
- Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.
-
withSelectionPattern
public GetIntegrationResponseResult withSelectionPattern(String selectionPattern)
Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.
- Parameters:
selectionPattern- Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getResponseParameters
public Map<String,String> getResponseParameters()
Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the MethodResponse. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the pattern
integration.response.header.{name}.- Returns:
- Represents response parameters that can be read from the backend
response. Response parameters are represented as a key/value map,
with a destination as the key and a source as the value. A
destination must match an existing response parameter in the
MethodResponse. The source can be a header from the
backend response, or a static value. Static values are specified
using enclosing single quotes, and backend response headers can
be read using the pattern
integration.response.header.{name}.
-
setResponseParameters
public void setResponseParameters(Map<String,String> responseParameters)
Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the MethodResponse. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the pattern
integration.response.header.{name}.- Parameters:
responseParameters- Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the MethodResponse. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the patternintegration.response.header.{name}.
-
withResponseParameters
public GetIntegrationResponseResult withResponseParameters(Map<String,String> responseParameters)
Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the MethodResponse. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the pattern
integration.response.header.{name}.- Parameters:
responseParameters- Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the MethodResponse. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the patternintegration.response.header.{name}.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addResponseParametersEntry
public GetIntegrationResponseResult addResponseParametersEntry(String key, String value)
-
clearResponseParametersEntries
public GetIntegrationResponseResult clearResponseParametersEntries()
Removes all the entries added into ResponseParameters. <p> Returns a reference to this object so that method calls can be chained together.
-
getResponseTemplates
public Map<String,String> getResponseTemplates()
Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
- Returns:
- Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
-
setResponseTemplates
public void setResponseTemplates(Map<String,String> responseTemplates)
Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
- Parameters:
responseTemplates- Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
-
withResponseTemplates
public GetIntegrationResponseResult withResponseTemplates(Map<String,String> responseTemplates)
Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
- Parameters:
responseTemplates- Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addResponseTemplatesEntry
public GetIntegrationResponseResult addResponseTemplatesEntry(String key, String value)
-
clearResponseTemplatesEntries
public GetIntegrationResponseResult clearResponseTemplatesEntries()
Removes all the entries added into ResponseTemplates. <p> Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public GetIntegrationResponseResult clone()
-
-