public class PutMethodResponseResult extends Object implements Serializable, Cloneable
Represents a method response. Amazon API Gateway sends back the status code to the caller as the HTTP status code. Parameters and models can be used to transform the response from the method's integration.
Constructor and Description |
---|
PutMethodResponseResult() |
Modifier and Type | Method and Description |
---|---|
PutMethodResponseResult |
addResponseModelsEntry(String key,
String value) |
PutMethodResponseResult |
addResponseParametersEntry(String key,
Boolean value) |
PutMethodResponseResult |
clearResponseModelsEntries()
Removes all the entries added into ResponseModels.
|
PutMethodResponseResult |
clearResponseParametersEntries()
Removes all the entries added into ResponseParameters.
|
PutMethodResponseResult |
clone() |
boolean |
equals(Object obj) |
Map<String,String> |
getResponseModels()
Specifies the Model resources used for the response's
content-type.
|
Map<String,Boolean> |
getResponseParameters()
Represents response parameters that can be sent back to the caller by
Amazon API Gateway.
|
String |
getStatusCode()
The method response's status code.
|
int |
hashCode() |
void |
setResponseModels(Map<String,String> responseModels)
Specifies the Model resources used for the response's
content-type.
|
void |
setResponseParameters(Map<String,Boolean> responseParameters)
Represents response parameters that can be sent back to the caller by
Amazon API Gateway.
|
void |
setStatusCode(String statusCode)
The method response's status code.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PutMethodResponseResult |
withResponseModels(Map<String,String> responseModels)
Specifies the Model resources used for the response's
content-type.
|
PutMethodResponseResult |
withResponseParameters(Map<String,Boolean> responseParameters)
Represents response parameters that can be sent back to the caller by
Amazon API Gateway.
|
PutMethodResponseResult |
withStatusCode(String statusCode)
The method response's status code.
|
public void setStatusCode(String statusCode)
The method response's status code.
statusCode
- The method response's status code.public String getStatusCode()
The method response's status code.
public PutMethodResponseResult withStatusCode(String statusCode)
The method response's status code.
statusCode
- The method response's status code.public Map<String,Boolean> getResponseParameters()
Represents response parameters that can be sent back to the caller by
Amazon API Gateway. Response parameters are represented as a key/value
map, with a destination as the key and a boolean flag as the value, which
is used to specify whether the parameter is required. A destination must
match the pattern method.response.header.{name}
, where
name
is a valid, unique header name. Destinations specified
here are available to the integration for mapping from integration
response parameters.
method.response.header.{name}
, where
name
is a valid, unique header name. Destinations
specified here are available to the integration for mapping from
integration response parameters.public void setResponseParameters(Map<String,Boolean> responseParameters)
Represents response parameters that can be sent back to the caller by
Amazon API Gateway. Response parameters are represented as a key/value
map, with a destination as the key and a boolean flag as the value, which
is used to specify whether the parameter is required. A destination must
match the pattern method.response.header.{name}
, where
name
is a valid, unique header name. Destinations specified
here are available to the integration for mapping from integration
response parameters.
responseParameters
- Represents response parameters that can be sent back to the caller
by Amazon API Gateway. Response parameters are represented as a
key/value map, with a destination as the key and a boolean flag as
the value, which is used to specify whether the parameter is
required. A destination must match the pattern
method.response.header.{name}
, where
name
is a valid, unique header name. Destinations
specified here are available to the integration for mapping from
integration response parameters.public PutMethodResponseResult withResponseParameters(Map<String,Boolean> responseParameters)
Represents response parameters that can be sent back to the caller by
Amazon API Gateway. Response parameters are represented as a key/value
map, with a destination as the key and a boolean flag as the value, which
is used to specify whether the parameter is required. A destination must
match the pattern method.response.header.{name}
, where
name
is a valid, unique header name. Destinations specified
here are available to the integration for mapping from integration
response parameters.
responseParameters
- Represents response parameters that can be sent back to the caller
by Amazon API Gateway. Response parameters are represented as a
key/value map, with a destination as the key and a boolean flag as
the value, which is used to specify whether the parameter is
required. A destination must match the pattern
method.response.header.{name}
, where
name
is a valid, unique header name. Destinations
specified here are available to the integration for mapping from
integration response parameters.public PutMethodResponseResult addResponseParametersEntry(String key, Boolean value)
public PutMethodResponseResult clearResponseParametersEntries()
public PutMethodResponseResult withResponseModels(Map<String,String> responseModels)
Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.
responseModels
- Specifies the Model resources used for the response's
content-type. Response models are represented as a key/value map,
with a content-type as the key and a Model name as the
value.public PutMethodResponseResult addResponseModelsEntry(String key, String value)
public PutMethodResponseResult clearResponseModelsEntries()
public String toString()
toString
in class Object
Object.toString()
public PutMethodResponseResult clone()
Copyright © 2016. All rights reserved.