Class IntegrationResponse
- All Implemented Interfaces:
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddResponseParametersEntry
(String key, String value) addResponseTemplatesEntry
(String key, String value) Removes all the entries added into ResponseParameters.Removes all the entries added into ResponseTemplates.clone()
boolean
Represents response parameters that can be read from the backend response.Specifies the templates used to transform the integration response body.Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend.Specifies the status code that is used to map the integration response to an existing MethodResponse.int
hashCode()
void
setResponseParameters
(Map<String, String> responseParameters) Represents response parameters that can be read from the backend response.void
setResponseTemplates
(Map<String, String> responseTemplates) Specifies the templates used to transform the integration response body.void
setSelectionPattern
(String selectionPattern) Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend.void
setStatusCode
(String statusCode) Specifies the status code that is used to map the integration response to an existing MethodResponse.toString()
Returns a string representation of this object; useful for testing and debugging.withResponseParameters
(Map<String, String> responseParameters) Represents response parameters that can be read from the backend response.withResponseTemplates
(Map<String, String> responseTemplates) Specifies the templates used to transform the integration response body.withSelectionPattern
(String selectionPattern) Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend.withStatusCode
(String statusCode) Specifies the status code that is used to map the integration response to an existing MethodResponse.
-
Constructor Details
-
IntegrationResponse
public IntegrationResponse()
-
-
Method Details
-
setStatusCode
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
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
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
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
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
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
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
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
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
-
clearResponseParametersEntries
Removes all the entries added into ResponseParameters. <p> Returns a reference to this object so that method calls can be chained together. -
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
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
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
-
clearResponseTemplatesEntries
Removes all the entries added into ResponseTemplates. <p> Returns a reference to this object so that method calls can be chained together. -
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-