Class Method
- All Implemented Interfaces:
Serializable
,Cloneable
Represents a method.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMethodResponsesEntry
(String key, MethodResponse value) addRequestModelsEntry
(String key, String value) addRequestParametersEntry
(String key, Boolean value) Removes all the entries added into MethodResponses.Removes all the entries added into RequestModels.Removes all the entries added into RequestParameters.clone()
boolean
Specifies whether the method requires a valid ApiKey.The method's authorization type.Specifies the identifier of an Authorizer to use on this Method.The HTTP method.The method's integration.Represents available responses that can be sent to the caller.Specifies the Model resources used for the request's content type.Represents request parameters that can be accepted by Amazon API Gateway.int
hashCode()
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.toString()
Returns a string representation of this object; useful for testing and debugging.withApiKeyRequired
(Boolean apiKeyRequired) Specifies whether the method requires a valid ApiKey.withAuthorizationType
(String authorizationType) The method's authorization type.withAuthorizerId
(String authorizerId) Specifies the identifier of an Authorizer to use on this Method.withHttpMethod
(String httpMethod) The HTTP method.withMethodIntegration
(Integration methodIntegration) The method's integration.withMethodResponses
(Map<String, MethodResponse> methodResponses) Represents available responses that can be sent to the caller.withRequestModels
(Map<String, String> requestModels) Specifies the Model resources used for the request's content type.withRequestParameters
(Map<String, Boolean> requestParameters) Represents request parameters that can be accepted by Amazon API Gateway.
-
Constructor Details
-
Method
public Method()
-
-
Method Details
-
setHttpMethod
The HTTP method.
- Parameters:
httpMethod
- The HTTP method.
-
getHttpMethod
The HTTP method.
- Returns:
- The HTTP method.
-
withHttpMethod
The HTTP method.
- Parameters:
httpMethod
- The HTTP method.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAuthorizationType
The method's authorization type.
- Parameters:
authorizationType
- The method's authorization type.
-
getAuthorizationType
The method's authorization type.
- Returns:
- The method's authorization type.
-
withAuthorizationType
The method's authorization type.
- Parameters:
authorizationType
- The method's authorization type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAuthorizerId
Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.
- Parameters:
authorizerId
- Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.
-
getAuthorizerId
Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.
- Returns:
- Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.
-
withAuthorizerId
Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.
- Parameters:
authorizerId
- Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setApiKeyRequired
Specifies whether the method requires a valid ApiKey.
- Parameters:
apiKeyRequired
- Specifies whether the method requires a valid ApiKey.
-
getApiKeyRequired
Specifies whether the method requires a valid ApiKey.
- Returns:
- Specifies whether the method requires a valid ApiKey.
-
withApiKeyRequired
Specifies whether the method requires a valid ApiKey.
- Parameters:
apiKeyRequired
- Specifies whether the method requires a valid ApiKey.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isApiKeyRequired
Specifies whether the method requires a valid ApiKey.
- Returns:
- Specifies whether the method requires a valid ApiKey.
-
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}
, wherelocation
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.- Returns:
- 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}
, wherelocation
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.
-
setRequestParameters
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}
, wherelocation
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.- Parameters:
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 patternmethod.request.{location}.{name}
, wherelocation
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.
-
withRequestParameters
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}
, wherelocation
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.- Parameters:
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 patternmethod.request.{location}.{name}
, wherelocation
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addRequestParametersEntry
-
clearRequestParametersEntries
Removes all the entries added into RequestParameters. <p> Returns a reference to this object so that method calls can be chained together. -
getRequestModels
-
setRequestModels
-
withRequestModels
-
addRequestModelsEntry
-
clearRequestModelsEntries
Removes all the entries added into RequestModels. <p> Returns a reference to this object so that method calls can be chained together. -
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.
- Returns:
- 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.
-
setMethodResponses
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.
- Parameters:
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.
-
withMethodResponses
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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addMethodResponsesEntry
-
clearMethodResponsesEntries
Removes all the entries added into MethodResponses. <p> Returns a reference to this object so that method calls can be chained together. -
setMethodIntegration
The method's integration.
- Parameters:
methodIntegration
- The method's integration.
-
getMethodIntegration
The method's integration.
- Returns:
- The method's integration.
-
withMethodIntegration
The method's integration.
- Parameters:
methodIntegration
- The method's integration.- Returns:
- 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
-