public class Integration extends Object implements Serializable, Cloneable
Represents a HTTP, AWS, or Mock integration.
Constructor and Description |
---|
Integration() |
Modifier and Type | Method and Description |
---|---|
Integration |
addIntegrationResponsesEntry(String key,
IntegrationResponse value) |
Integration |
addRequestParametersEntry(String key,
String value) |
Integration |
addRequestTemplatesEntry(String key,
String value) |
Integration |
clearIntegrationResponsesEntries()
Removes all the entries added into IntegrationResponses.
|
Integration |
clearRequestParametersEntries()
Removes all the entries added into RequestParameters.
|
Integration |
clearRequestTemplatesEntries()
Removes all the entries added into RequestTemplates.
|
Integration |
clone() |
boolean |
equals(Object obj) |
List<String> |
getCacheKeyParameters()
Specifies the integration's cache key parameters.
|
String |
getCacheNamespace()
Specifies the integration's cache namespace.
|
String |
getCredentials()
Specifies the credentials required for the integration, if any.
|
String |
getHttpMethod()
Specifies the integration's HTTP method type.
|
Map<String,IntegrationResponse> |
getIntegrationResponses()
Specifies the integration's responses.
|
Map<String,String> |
getRequestParameters()
Represents requests parameters that are sent with the backend request.
|
Map<String,String> |
getRequestTemplates()
Specifies the integration's request templates.
|
String |
getType()
Specifies the integration's type.
|
String |
getUri()
Specifies the integration's Uniform Resource Identifier (URI).
|
int |
hashCode() |
void |
setCacheKeyParameters(Collection<String> cacheKeyParameters)
Specifies the integration's cache key parameters.
|
void |
setCacheNamespace(String cacheNamespace)
Specifies the integration's cache namespace.
|
void |
setCredentials(String credentials)
Specifies the credentials required for the integration, if any.
|
void |
setHttpMethod(String httpMethod)
Specifies the integration's HTTP method type.
|
void |
setIntegrationResponses(Map<String,IntegrationResponse> integrationResponses)
Specifies the integration's responses.
|
void |
setRequestParameters(Map<String,String> requestParameters)
Represents requests parameters that are sent with the backend request.
|
void |
setRequestTemplates(Map<String,String> requestTemplates)
Specifies the integration's request templates.
|
void |
setType(IntegrationType type)
Specifies the integration's type.
|
void |
setType(String type)
Specifies the integration's type.
|
void |
setUri(String uri)
Specifies the integration's Uniform Resource Identifier (URI).
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Integration |
withCacheKeyParameters(Collection<String> cacheKeyParameters)
Specifies the integration's cache key parameters.
|
Integration |
withCacheKeyParameters(String... cacheKeyParameters)
Specifies the integration's cache key parameters.
|
Integration |
withCacheNamespace(String cacheNamespace)
Specifies the integration's cache namespace.
|
Integration |
withCredentials(String credentials)
Specifies the credentials required for the integration, if any.
|
Integration |
withHttpMethod(String httpMethod)
Specifies the integration's HTTP method type.
|
Integration |
withIntegrationResponses(Map<String,IntegrationResponse> integrationResponses)
Specifies the integration's responses.
|
Integration |
withRequestParameters(Map<String,String> requestParameters)
Represents requests parameters that are sent with the backend request.
|
Integration |
withRequestTemplates(Map<String,String> requestTemplates)
Specifies the integration's request templates.
|
Integration |
withType(IntegrationType type)
Specifies the integration's type.
|
Integration |
withType(String type)
Specifies the integration's type.
|
Integration |
withUri(String uri)
Specifies the integration's Uniform Resource Identifier (URI).
|
public void setType(String type)
Specifies the integration's type.
type
- Specifies the integration's type.IntegrationType
public String getType()
Specifies the integration's type.
IntegrationType
public Integration withType(String type)
Specifies the integration's type.
type
- Specifies the integration's type.IntegrationType
public void setType(IntegrationType type)
Specifies the integration's type.
type
- Specifies the integration's type.IntegrationType
public Integration withType(IntegrationType type)
Specifies the integration's type.
type
- Specifies the integration's type.IntegrationType
public void setHttpMethod(String httpMethod)
Specifies the integration's HTTP method type.
httpMethod
- Specifies the integration's HTTP method type.public String getHttpMethod()
Specifies the integration's HTTP method type.
public Integration withHttpMethod(String httpMethod)
Specifies the integration's HTTP method type.
httpMethod
- Specifies the integration's HTTP method type.public void setUri(String uri)
Specifies the integration's Uniform Resource Identifier (URI). For HTTP
integrations, the URI must be a fully formed, encoded HTTP(S) URL
according to the RFC-3986 specification.
For AWS integrations, the URI should be of the form
arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}
. Region
and service
are used to determine the
right endpoint. For AWS services that use the Action=
query
string parameter, service_api
should be a valid action for
the desired service. For RESTful AWS service APIs, path
is
used to indicate that the remaining substring in the URI should be
treated as the path to the resource, including the initial /
.
uri
- Specifies the integration's Uniform Resource Identifier (URI). For
HTTP integrations, the URI must be a fully formed, encoded HTTP(S)
URL according to the RFC-3986
specification. For AWS integrations, the URI should be of the
form
arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}
. Region
and service
are used to
determine the right endpoint. For AWS services that use the
Action=
query string parameter,
service_api
should be a valid action for the desired
service. For RESTful AWS service APIs, path
is used
to indicate that the remaining substring in the URI should be
treated as the path to the resource, including the initial
/
.public String getUri()
Specifies the integration's Uniform Resource Identifier (URI). For HTTP
integrations, the URI must be a fully formed, encoded HTTP(S) URL
according to the RFC-3986 specification.
For AWS integrations, the URI should be of the form
arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}
. Region
and service
are used to determine the
right endpoint. For AWS services that use the Action=
query
string parameter, service_api
should be a valid action for
the desired service. For RESTful AWS service APIs, path
is
used to indicate that the remaining substring in the URI should be
treated as the path to the resource, including the initial /
.
arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}
. Region
and service
are used to
determine the right endpoint. For AWS services that use the
Action=
query string parameter,
service_api
should be a valid action for the desired
service. For RESTful AWS service APIs, path
is used
to indicate that the remaining substring in the URI should be
treated as the path to the resource, including the initial
/
.public Integration withUri(String uri)
Specifies the integration's Uniform Resource Identifier (URI). For HTTP
integrations, the URI must be a fully formed, encoded HTTP(S) URL
according to the RFC-3986 specification.
For AWS integrations, the URI should be of the form
arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}
. Region
and service
are used to determine the
right endpoint. For AWS services that use the Action=
query
string parameter, service_api
should be a valid action for
the desired service. For RESTful AWS service APIs, path
is
used to indicate that the remaining substring in the URI should be
treated as the path to the resource, including the initial /
.
uri
- Specifies the integration's Uniform Resource Identifier (URI). For
HTTP integrations, the URI must be a fully formed, encoded HTTP(S)
URL according to the RFC-3986
specification. For AWS integrations, the URI should be of the
form
arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}
. Region
and service
are used to
determine the right endpoint. For AWS services that use the
Action=
query string parameter,
service_api
should be a valid action for the desired
service. For RESTful AWS service APIs, path
is used
to indicate that the remaining substring in the URI should be
treated as the path to the resource, including the initial
/
.public void setCredentials(String credentials)
Specifies the credentials required for the integration, if any. For AWS
integrations, three options are available. To specify an IAM Role for
Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN).
To require that the caller's identity be passed through from the request,
specify the string arn:aws:iam::\*:user/\*
. To use
resource-based permissions on supported AWS services, specify null.
credentials
- Specifies the credentials required for the integration, if any.
For AWS integrations, three options are available. To specify an
IAM Role for Amazon API Gateway to assume, use the role's Amazon
Resource Name (ARN). To require that the caller's identity be
passed through from the request, specify the string
arn:aws:iam::\*:user/\*
. To use resource-based
permissions on supported AWS services, specify null.public String getCredentials()
Specifies the credentials required for the integration, if any. For AWS
integrations, three options are available. To specify an IAM Role for
Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN).
To require that the caller's identity be passed through from the request,
specify the string arn:aws:iam::\*:user/\*
. To use
resource-based permissions on supported AWS services, specify null.
arn:aws:iam::\*:user/\*
. To use resource-based
permissions on supported AWS services, specify null.public Integration withCredentials(String credentials)
Specifies the credentials required for the integration, if any. For AWS
integrations, three options are available. To specify an IAM Role for
Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN).
To require that the caller's identity be passed through from the request,
specify the string arn:aws:iam::\*:user/\*
. To use
resource-based permissions on supported AWS services, specify null.
credentials
- Specifies the credentials required for the integration, if any.
For AWS integrations, three options are available. To specify an
IAM Role for Amazon API Gateway to assume, use the role's Amazon
Resource Name (ARN). To require that the caller's identity be
passed through from the request, specify the string
arn:aws:iam::\*:user/\*
. To use resource-based
permissions on supported AWS services, specify null.public Map<String,String> getRequestParameters()
Represents requests parameters that are sent with the backend request.
Request parameters are represented as a key/value map, with a destination
as the key and a source as the value. A source must match an existing
method request parameter, or a static value. Static values must be
enclosed with single quotes, and be pre-encoded based on their
destination in the request. The destination must match the pattern
integration.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
must be a valid, unique parameter name.
integration.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
must be a valid, unique parameter name.public void setRequestParameters(Map<String,String> requestParameters)
Represents requests parameters that are sent with the backend request.
Request parameters are represented as a key/value map, with a destination
as the key and a source as the value. A source must match an existing
method request parameter, or a static value. Static values must be
enclosed with single quotes, and be pre-encoded based on their
destination in the request. The destination must match the pattern
integration.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
must be a valid, unique parameter name.
requestParameters
- Represents requests parameters that are sent with the backend
request. Request parameters are represented as a key/value map,
with a destination as the key and a source as the value. A source
must match an existing method request parameter, or a static
value. Static values must be enclosed with single quotes, and be
pre-encoded based on their destination in the request. The
destination must match the pattern
integration.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
must be a valid, unique parameter name.public Integration withRequestParameters(Map<String,String> requestParameters)
Represents requests parameters that are sent with the backend request.
Request parameters are represented as a key/value map, with a destination
as the key and a source as the value. A source must match an existing
method request parameter, or a static value. Static values must be
enclosed with single quotes, and be pre-encoded based on their
destination in the request. The destination must match the pattern
integration.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
must be a valid, unique parameter name.
requestParameters
- Represents requests parameters that are sent with the backend
request. Request parameters are represented as a key/value map,
with a destination as the key and a source as the value. A source
must match an existing method request parameter, or a static
value. Static values must be enclosed with single quotes, and be
pre-encoded based on their destination in the request. The
destination must match the pattern
integration.request.{location}.{name}
, where
location
is either querystring, path, or header.
name
must be a valid, unique parameter name.public Integration addRequestParametersEntry(String key, String value)
public Integration clearRequestParametersEntries()
public Map<String,String> getRequestTemplates()
Specifies the integration's request templates.
public void setRequestTemplates(Map<String,String> requestTemplates)
Specifies the integration's request templates.
requestTemplates
- Specifies the integration's request templates.public Integration withRequestTemplates(Map<String,String> requestTemplates)
Specifies the integration's request templates.
requestTemplates
- Specifies the integration's request templates.public Integration addRequestTemplatesEntry(String key, String value)
public Integration clearRequestTemplatesEntries()
public void setCacheNamespace(String cacheNamespace)
Specifies the integration's cache namespace.
cacheNamespace
- Specifies the integration's cache namespace.public String getCacheNamespace()
Specifies the integration's cache namespace.
public Integration withCacheNamespace(String cacheNamespace)
Specifies the integration's cache namespace.
cacheNamespace
- Specifies the integration's cache namespace.public List<String> getCacheKeyParameters()
Specifies the integration's cache key parameters.
public void setCacheKeyParameters(Collection<String> cacheKeyParameters)
Specifies the integration's cache key parameters.
cacheKeyParameters
- Specifies the integration's cache key parameters.public Integration withCacheKeyParameters(String... cacheKeyParameters)
Specifies the integration's cache key parameters.
NOTE: This method appends the values to the existing list (if
any). Use setCacheKeyParameters(java.util.Collection)
or
withCacheKeyParameters(java.util.Collection)
if you want to
override the existing values.
cacheKeyParameters
- Specifies the integration's cache key parameters.public Integration withCacheKeyParameters(Collection<String> cacheKeyParameters)
Specifies the integration's cache key parameters.
cacheKeyParameters
- Specifies the integration's cache key parameters.public Map<String,IntegrationResponse> getIntegrationResponses()
Specifies the integration's responses.
public void setIntegrationResponses(Map<String,IntegrationResponse> integrationResponses)
Specifies the integration's responses.
integrationResponses
- Specifies the integration's responses.public Integration withIntegrationResponses(Map<String,IntegrationResponse> integrationResponses)
Specifies the integration's responses.
integrationResponses
- Specifies the integration's responses.public Integration addIntegrationResponsesEntry(String key, IntegrationResponse value)
public Integration clearIntegrationResponsesEntries()
public String toString()
toString
in class Object
Object.toString()
public Integration clone()
Copyright © 2015. All rights reserved.