public class Method
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Represents a method.
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
apiKeyRequired
Specifies whether the method requires a valid ApiKey.
|
private java.lang.String |
authorizationType
The method's authorization type.
|
private java.lang.String |
authorizerId
Specifies the identifier of an Authorizer to use on this Method.
|
private java.lang.String |
httpMethod
The HTTP method.
|
private Integration |
methodIntegration
The method's integration.
|
private java.util.Map<java.lang.String,MethodResponse> |
methodResponses
Represents available responses that can be sent to the caller.
|
private java.util.Map<java.lang.String,java.lang.String> |
requestModels
Specifies the Model resources used for the request's content type.
|
private java.util.Map<java.lang.String,java.lang.Boolean> |
requestParameters
Represents request parameters that can be accepted by Amazon API Gateway.
|
Constructor and Description |
---|
Method() |
Modifier and Type | Method and Description |
---|---|
Method |
addMethodResponsesEntry(java.lang.String key,
MethodResponse value) |
Method |
addRequestModelsEntry(java.lang.String key,
java.lang.String value) |
Method |
addRequestParametersEntry(java.lang.String key,
java.lang.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(java.lang.Object obj) |
java.lang.Boolean |
getApiKeyRequired()
Specifies whether the method requires a valid ApiKey.
|
java.lang.String |
getAuthorizationType()
The method's authorization type.
|
java.lang.String |
getAuthorizerId()
Specifies the identifier of an Authorizer to use on this Method.
|
java.lang.String |
getHttpMethod()
The HTTP method.
|
Integration |
getMethodIntegration()
The method's integration.
|
java.util.Map<java.lang.String,MethodResponse> |
getMethodResponses()
Represents available responses that can be sent to the caller.
|
java.util.Map<java.lang.String,java.lang.String> |
getRequestModels()
Specifies the Model resources used for the request's content type.
|
java.util.Map<java.lang.String,java.lang.Boolean> |
getRequestParameters()
Represents request parameters that can be accepted by Amazon API Gateway.
|
int |
hashCode() |
java.lang.Boolean |
isApiKeyRequired()
Specifies whether the method requires a valid ApiKey.
|
void |
setApiKeyRequired(java.lang.Boolean apiKeyRequired)
Specifies whether the method requires a valid ApiKey.
|
void |
setAuthorizationType(java.lang.String authorizationType)
The method's authorization type.
|
void |
setAuthorizerId(java.lang.String authorizerId)
Specifies the identifier of an Authorizer to use on this Method.
|
void |
setHttpMethod(java.lang.String httpMethod)
The HTTP method.
|
void |
setMethodIntegration(Integration methodIntegration)
The method's integration.
|
void |
setMethodResponses(java.util.Map<java.lang.String,MethodResponse> methodResponses)
Represents available responses that can be sent to the caller.
|
void |
setRequestModels(java.util.Map<java.lang.String,java.lang.String> requestModels)
Specifies the Model resources used for the request's content type.
|
void |
setRequestParameters(java.util.Map<java.lang.String,java.lang.Boolean> requestParameters)
Represents request parameters that can be accepted by Amazon API Gateway.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Method |
withApiKeyRequired(java.lang.Boolean apiKeyRequired)
Specifies whether the method requires a valid ApiKey.
|
Method |
withAuthorizationType(java.lang.String authorizationType)
The method's authorization type.
|
Method |
withAuthorizerId(java.lang.String authorizerId)
Specifies the identifier of an Authorizer to use on this Method.
|
Method |
withHttpMethod(java.lang.String httpMethod)
The HTTP method.
|
Method |
withMethodIntegration(Integration methodIntegration)
The method's integration.
|
Method |
withMethodResponses(java.util.Map<java.lang.String,MethodResponse> methodResponses)
Represents available responses that can be sent to the caller.
|
Method |
withRequestModels(java.util.Map<java.lang.String,java.lang.String> requestModels)
Specifies the Model resources used for the request's content type.
|
Method |
withRequestParameters(java.util.Map<java.lang.String,java.lang.Boolean> requestParameters)
Represents request parameters that can be accepted by Amazon API Gateway.
|
private java.lang.String httpMethod
The HTTP method.
private java.lang.String authorizationType
The method's authorization type.
private java.lang.String authorizerId
Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.
private java.lang.Boolean apiKeyRequired
Specifies whether the method requires a valid ApiKey.
private java.util.Map<java.lang.String,java.lang.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.
private java.util.Map<java.lang.String,java.lang.String> requestModels
private java.util.Map<java.lang.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.
private Integration methodIntegration
The method's integration.
public void setHttpMethod(java.lang.String httpMethod)
The HTTP method.
httpMethod
- The HTTP method.public java.lang.String getHttpMethod()
The HTTP method.
public Method withHttpMethod(java.lang.String httpMethod)
The HTTP method.
httpMethod
- The HTTP method.public void setAuthorizationType(java.lang.String authorizationType)
The method's authorization type.
authorizationType
- The method's authorization type.public java.lang.String getAuthorizationType()
The method's authorization type.
public Method withAuthorizationType(java.lang.String authorizationType)
The method's authorization type.
authorizationType
- The method's authorization type.public void setAuthorizerId(java.lang.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 java.lang.String getAuthorizerId()
Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.
public Method withAuthorizerId(java.lang.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(java.lang.Boolean apiKeyRequired)
Specifies whether the method requires a valid ApiKey.
apiKeyRequired
- Specifies whether the method requires a valid ApiKey.public java.lang.Boolean getApiKeyRequired()
Specifies whether the method requires a valid ApiKey.
public Method withApiKeyRequired(java.lang.Boolean apiKeyRequired)
Specifies whether the method requires a valid ApiKey.
apiKeyRequired
- Specifies whether the method requires a valid ApiKey.public java.lang.Boolean isApiKeyRequired()
Specifies whether the method requires a valid ApiKey.
public java.util.Map<java.lang.String,java.lang.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(java.util.Map<java.lang.String,java.lang.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(java.util.Map<java.lang.String,java.lang.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 addRequestParametersEntry(java.lang.String key, java.lang.Boolean value)
public Method clearRequestParametersEntries()
public java.util.Map<java.lang.String,java.lang.String> getRequestModels()
public void setRequestModels(java.util.Map<java.lang.String,java.lang.String> requestModels)
public Method withRequestModels(java.util.Map<java.lang.String,java.lang.String> requestModels)
public Method addRequestModelsEntry(java.lang.String key, java.lang.String value)
public Method clearRequestModelsEntries()
public java.util.Map<java.lang.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(java.util.Map<java.lang.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(java.util.Map<java.lang.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(java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Method clone()
clone
in class java.lang.Object