Class Integration

    • Constructor Detail

      • Integration

        public Integration()
    • Method Detail

      • setType

        public void setType​(String type)

        Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

        Parameters:
        type - Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.
        See Also:
        IntegrationType
      • getType

        public String getType()

        Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

        Returns:
        Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.
        See Also:
        IntegrationType
      • withType

        public Integration withType​(String type)

        Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

        Parameters:
        type - Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        IntegrationType
      • setType

        public void setType​(IntegrationType type)

        Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

        Parameters:
        type - Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.
        See Also:
        IntegrationType
      • withType

        public Integration withType​(IntegrationType type)

        Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

        Parameters:
        type - Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        IntegrationType
      • setHttpMethod

        public void setHttpMethod​(String httpMethod)

        Specifies the integration's HTTP method type.

        Parameters:
        httpMethod - Specifies the integration's HTTP method type.
      • getHttpMethod

        public String getHttpMethod()

        Specifies the integration's HTTP method type.

        Returns:
        Specifies the integration's HTTP method type.
      • withHttpMethod

        public Integration withHttpMethod​(String httpMethod)

        Specifies the integration's HTTP method type.

        Parameters:
        httpMethod - Specifies the integration's HTTP method type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setUri

        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}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain 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 /.

        Parameters:
        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}:{subdomain.service|service}:{path|action}/{service_api} . Region, subdomain 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 /.
      • getUri

        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}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain 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 /.

        Returns:
        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}:{subdomain.service|service}:{path|action}/{service_api} . Region, subdomain 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 /.
      • withUri

        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}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain 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 /.

        Parameters:
        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}:{subdomain.service|service}:{path|action}/{service_api} . Region, subdomain 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 /.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setCredentials

        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.

        Parameters:
        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.
      • getCredentials

        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.

        Returns:
        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.
      • withCredentials

        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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getRequestParameters

        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.

        Returns:
        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.
      • setRequestParameters

        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.

        Parameters:
        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.
      • withRequestParameters

        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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • clearRequestParametersEntries

        public Integration clearRequestParametersEntries()
        Removes all the entries added into RequestParameters. <p> Returns a reference to this object so that method calls can be chained together.
      • getRequestTemplates

        public Map<String,​String> getRequestTemplates()

        Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.

        Returns:
        Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.
      • setRequestTemplates

        public void setRequestTemplates​(Map<String,​String> requestTemplates)

        Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.

        Parameters:
        requestTemplates - Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.
      • withRequestTemplates

        public Integration withRequestTemplates​(Map<String,​String> requestTemplates)

        Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.

        Parameters:
        requestTemplates - Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • clearRequestTemplatesEntries

        public Integration clearRequestTemplatesEntries()
        Removes all the entries added into RequestTemplates. <p> Returns a reference to this object so that method calls can be chained together.
      • setPassthroughBehavior

        public void setPassthroughBehavior​(String passthroughBehavior)

        Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

        WHEN_NO_MATCH passes the request body for unmapped content types through to the Integration backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

        WHEN_NO_TEMPLATES will allow pass-through when the Integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response.

        Parameters:
        passthroughBehavior - Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES , and NEVER.

        WHEN_NO_MATCH passes the request body for unmapped content types through to the Integration backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

        WHEN_NO_TEMPLATES will allow pass-through when the Integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response.

      • getPassthroughBehavior

        public String getPassthroughBehavior()

        Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

        WHEN_NO_MATCH passes the request body for unmapped content types through to the Integration backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

        WHEN_NO_TEMPLATES will allow pass-through when the Integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response.

        Returns:
        Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

        WHEN_NO_MATCH passes the request body for unmapped content types through to the Integration backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

        WHEN_NO_TEMPLATES will allow pass-through when the Integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response.

      • withPassthroughBehavior

        public Integration withPassthroughBehavior​(String passthroughBehavior)

        Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

        WHEN_NO_MATCH passes the request body for unmapped content types through to the Integration backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

        WHEN_NO_TEMPLATES will allow pass-through when the Integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response.

        Parameters:
        passthroughBehavior - Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES , and NEVER.

        WHEN_NO_MATCH passes the request body for unmapped content types through to the Integration backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

        WHEN_NO_TEMPLATES will allow pass-through when the Integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setCacheNamespace

        public void setCacheNamespace​(String cacheNamespace)

        Specifies the integration's cache namespace.

        Parameters:
        cacheNamespace - Specifies the integration's cache namespace.
      • getCacheNamespace

        public String getCacheNamespace()

        Specifies the integration's cache namespace.

        Returns:
        Specifies the integration's cache namespace.
      • withCacheNamespace

        public Integration withCacheNamespace​(String cacheNamespace)

        Specifies the integration's cache namespace.

        Parameters:
        cacheNamespace - Specifies the integration's cache namespace.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getCacheKeyParameters

        public List<String> getCacheKeyParameters()

        Specifies the integration's cache key parameters.

        Returns:
        Specifies the integration's cache key parameters.
      • setCacheKeyParameters

        public void setCacheKeyParameters​(Collection<String> cacheKeyParameters)

        Specifies the integration's cache key parameters.

        Parameters:
        cacheKeyParameters - Specifies the integration's cache key parameters.
      • withCacheKeyParameters

        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.

        Parameters:
        cacheKeyParameters - Specifies the integration's cache key parameters.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withCacheKeyParameters

        public Integration withCacheKeyParameters​(Collection<String> cacheKeyParameters)

        Specifies the integration's cache key parameters.

        Parameters:
        cacheKeyParameters - Specifies the integration's cache key parameters.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getIntegrationResponses

        public Map<String,​IntegrationResponse> getIntegrationResponses()

        Specifies the integration's responses.

        Returns:
        Specifies the integration's responses.
      • setIntegrationResponses

        public void setIntegrationResponses​(Map<String,​IntegrationResponse> integrationResponses)

        Specifies the integration's responses.

        Parameters:
        integrationResponses - Specifies the integration's responses.
      • withIntegrationResponses

        public Integration withIntegrationResponses​(Map<String,​IntegrationResponse> integrationResponses)

        Specifies the integration's responses.

        Parameters:
        integrationResponses - Specifies the integration's responses.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • clearIntegrationResponsesEntries

        public Integration clearIntegrationResponsesEntries()
        Removes all the entries added into IntegrationResponses. <p> Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Returns a string representation of this object; useful for testing and debugging.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object