public class Method extends Object implements Serializable, Cloneable
Represents a method.
Constructor and Description |
---|
Method() |
Modifier and Type | Method and Description |
---|---|
Method |
addMethodResponsesEntry(String key,
MethodResponse value) |
Method |
addRequestModelsEntry(String key,
String value) |
Method |
addRequestParametersEntry(String key,
Boolean value) |
Method |
clearMethodResponsesEntries()
Removes all the entries added into MethodResponses.
|
Method |
clearRequestModelsEntries()
Removes all the entries added into RequestModels.
|
Method |
clearRequestParametersEntries()
Removes all the entries added into RequestParameters.
|
Method |
clone() |
boolean |
equals(Object obj) |
Boolean |
getApiKeyRequired()
Specifies whether the method requires a valid ApiKey.
|
String |
getAuthorizationType()
The method's authorization type.
|
String |
getAuthorizerId()
Specifies the identifier of an Authorizer to use on this Method.
|
String |
getHttpMethod()
The HTTP method.
|
Integration |
getMethodIntegration()
The method's integration.
|
Map<String,MethodResponse> |
getMethodResponses()
Represents available responses that can be sent to the caller.
|
Map<String,String> |
getRequestModels()
Specifies the Model resources used for the request's content type.
|
Map<String,Boolean> |
getRequestParameters()
Represents request parameters that can be accepted by Amazon API Gateway.
|
int |
hashCode() |
Boolean |
isApiKeyRequired()
Specifies whether the method requires a valid ApiKey.
|
void |
setApiKeyRequired(Boolean apiKeyRequired)
Specifies whether the method requires a valid ApiKey.
|
void |
setAuthorizationType(String authorizationType)
The method's authorization type.
|
void |
setAuthorizerId(String authorizerId)
Specifies the identifier of an Authorizer to use on this Method.
|
void |
setHttpMethod(String httpMethod)
The HTTP method.
|
void |
setMethodIntegration(Integration methodIntegration)
The method's integration.
|
void |
setMethodResponses(Map<String,MethodResponse> methodResponses)
Represents available responses that can be sent to the caller.
|
void |
setRequestModels(Map<String,String> requestModels)
Specifies the Model resources used for the request's content type.
|
void |
setRequestParameters(Map<String,Boolean> requestParameters)
Represents request parameters that can be accepted by Amazon API Gateway.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Method |
withApiKeyRequired(Boolean apiKeyRequired)
Specifies whether the method requires a valid ApiKey.
|
Method |
withAuthorizationType(String authorizationType)
The method's authorization type.
|
Method |
withAuthorizerId(String authorizerId)
Specifies the identifier of an Authorizer to use on this Method.
|
Method |
withHttpMethod(String httpMethod)
The HTTP method.
|
Method |
withMethodIntegration(Integration methodIntegration)
The method's integration.
|
Method |
withMethodResponses(Map<String,MethodResponse> methodResponses)
Represents available responses that can be sent to the caller.
|
Method |
withRequestModels(Map<String,String> requestModels)
Specifies the Model resources used for the request's content type.
|
Method |
withRequestParameters(Map<String,Boolean> requestParameters)
Represents request parameters that can be accepted by Amazon API Gateway.
|
public void setHttpMethod(String httpMethod)
The HTTP method.
httpMethod
- The HTTP method.public String getHttpMethod()
The HTTP method.
public Method withHttpMethod(String httpMethod)
The HTTP method.
httpMethod
- The HTTP method.public void setAuthorizationType(String authorizationType)
The method's authorization type.
authorizationType
- The method's authorization type.public String getAuthorizationType()
The method's authorization type.
public Method withAuthorizationType(String authorizationType)
The method's authorization type.
authorizationType
- The method's authorization type.public void setAuthorizerId(String authorizerId)
Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.
authorizerId
- Specifies the identifier of an Authorizer to use on this
Method. The authorizationType must be CUSTOM.public String getAuthorizerId()
Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.
public Method withAuthorizerId(String authorizerId)
Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.
authorizerId
- Specifies the identifier of an Authorizer to use on this
Method. The authorizationType must be CUSTOM.public void setApiKeyRequired(Boolean apiKeyRequired)
Specifies whether the method requires a valid ApiKey.
apiKeyRequired
- Specifies whether the method requires a valid ApiKey.public Boolean getApiKeyRequired()
Specifies whether the method requires a valid ApiKey.
public Method withApiKeyRequired(Boolean apiKeyRequired)
Specifies whether the method requires a valid ApiKey.
apiKeyRequired
- Specifies whether the method requires a valid ApiKey.public Boolean isApiKeyRequired()
Specifies whether the method requires a valid ApiKey.
public Map<String,Boolean> getRequestParameters()
Represents request parameters that can be accepted by Amazon API Gateway.
Request parameters are represented as a key/value map, with a source as
the key and a Boolean flag as the value. The Boolean flag is used to
specify whether the parameter is required. A source must match the
pattern method.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
is a valid, unique parameter name. Sources specified
here are available to the integration for mapping to integration request
parameters or templates.
method.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
is a valid, unique parameter name. Sources
specified here are available to the integration for mapping to
integration request parameters or templates.public void setRequestParameters(Map<String,Boolean> requestParameters)
Represents request parameters that can be accepted by Amazon API Gateway.
Request parameters are represented as a key/value map, with a source as
the key and a Boolean flag as the value. The Boolean flag is used to
specify whether the parameter is required. A source must match the
pattern method.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
is a valid, unique parameter name. Sources specified
here are available to the integration for mapping to integration request
parameters or templates.
requestParameters
- Represents request parameters that can be accepted by Amazon API
Gateway. Request parameters are represented as a key/value map,
with a source as the key and a Boolean flag as the value. The
Boolean flag is used to specify whether the parameter is required.
A source must match the pattern
method.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
is a valid, unique parameter name. Sources
specified here are available to the integration for mapping to
integration request parameters or templates.public Method withRequestParameters(Map<String,Boolean> requestParameters)
Represents request parameters that can be accepted by Amazon API Gateway.
Request parameters are represented as a key/value map, with a source as
the key and a Boolean flag as the value. The Boolean flag is used to
specify whether the parameter is required. A source must match the
pattern method.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
is a valid, unique parameter name. Sources specified
here are available to the integration for mapping to integration request
parameters or templates.
requestParameters
- Represents request parameters that can be accepted by Amazon API
Gateway. Request parameters are represented as a key/value map,
with a source as the key and a Boolean flag as the value. The
Boolean flag is used to specify whether the parameter is required.
A source must match the pattern
method.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
is a valid, unique parameter name. Sources
specified here are available to the integration for mapping to
integration request parameters or templates.public Method clearRequestParametersEntries()
public Method clearRequestModelsEntries()
public Map<String,MethodResponse> getMethodResponses()
Represents available responses that can be sent to the caller. Method responses are represented as a key/value map, with an HTTP status code as the key and a MethodResponse as the value. The status codes are available for the Integration responses to map to.
public void setMethodResponses(Map<String,MethodResponse> methodResponses)
Represents available responses that can be sent to the caller. Method responses are represented as a key/value map, with an HTTP status code as the key and a MethodResponse as the value. The status codes are available for the Integration responses to map to.
methodResponses
- Represents available responses that can be sent to the caller.
Method responses are represented as a key/value map, with an HTTP
status code as the key and a MethodResponse as the value.
The status codes are available for the Integration
responses to map to.public Method withMethodResponses(Map<String,MethodResponse> methodResponses)
Represents available responses that can be sent to the caller. Method responses are represented as a key/value map, with an HTTP status code as the key and a MethodResponse as the value. The status codes are available for the Integration responses to map to.
methodResponses
- Represents available responses that can be sent to the caller.
Method responses are represented as a key/value map, with an HTTP
status code as the key and a MethodResponse as the value.
The status codes are available for the Integration
responses to map to.public Method addMethodResponsesEntry(String key, MethodResponse value)
public Method clearMethodResponsesEntries()
public void setMethodIntegration(Integration methodIntegration)
The method's integration.
methodIntegration
- The method's integration.public Integration getMethodIntegration()
The method's integration.
public Method withMethodIntegration(Integration methodIntegration)
The method's integration.
methodIntegration
- The method's integration.public String toString()
toString
in class Object
Object.toString()
Copyright © 2016. All rights reserved.