All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.apigateway.model.Integration Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon API Gateway module holds the client classes that are used for communicating with Amazon API Gateway

There is a newer version: 2.28.3
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.apigateway.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents an HTTP, HTTP_PROXY, AWS, AWS_PROXY, or Mock * integration. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Integration implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField TYPE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("type") .getter(getter(Integration::typeAsString)).setter(setter(Builder::type)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("type").build()).build(); private static final SdkField HTTP_METHOD_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("httpMethod").getter(getter(Integration::httpMethod)).setter(setter(Builder::httpMethod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("httpMethod").build()).build(); private static final SdkField URI_FIELD = SdkField. builder(MarshallingType.STRING).memberName("uri") .getter(getter(Integration::uri)).setter(setter(Builder::uri)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("uri").build()).build(); private static final SdkField CONNECTION_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("connectionType").getter(getter(Integration::connectionTypeAsString)) .setter(setter(Builder::connectionType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("connectionType").build()).build(); private static final SdkField CONNECTION_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("connectionId").getter(getter(Integration::connectionId)).setter(setter(Builder::connectionId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("connectionId").build()).build(); private static final SdkField CREDENTIALS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("credentials").getter(getter(Integration::credentials)).setter(setter(Builder::credentials)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("credentials").build()).build(); private static final SdkField> REQUEST_PARAMETERS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("requestParameters") .getter(getter(Integration::requestParameters)) .setter(setter(Builder::requestParameters)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("requestParameters").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField> REQUEST_TEMPLATES_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("requestTemplates") .getter(getter(Integration::requestTemplates)) .setter(setter(Builder::requestTemplates)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("requestTemplates").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField PASSTHROUGH_BEHAVIOR_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("passthroughBehavior").getter(getter(Integration::passthroughBehavior)) .setter(setter(Builder::passthroughBehavior)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("passthroughBehavior").build()) .build(); private static final SdkField CONTENT_HANDLING_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("contentHandling").getter(getter(Integration::contentHandlingAsString)) .setter(setter(Builder::contentHandling)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("contentHandling").build()).build(); private static final SdkField TIMEOUT_IN_MILLIS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("timeoutInMillis").getter(getter(Integration::timeoutInMillis)).setter(setter(Builder::timeoutInMillis)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("timeoutInMillis").build()).build(); private static final SdkField CACHE_NAMESPACE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("cacheNamespace").getter(getter(Integration::cacheNamespace)).setter(setter(Builder::cacheNamespace)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("cacheNamespace").build()).build(); private static final SdkField> CACHE_KEY_PARAMETERS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("cacheKeyParameters") .getter(getter(Integration::cacheKeyParameters)) .setter(setter(Builder::cacheKeyParameters)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("cacheKeyParameters").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> INTEGRATION_RESPONSES_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("integrationResponses") .getter(getter(Integration::integrationResponses)) .setter(setter(Builder::integrationResponses)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("integrationResponses").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(IntegrationResponse::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField TLS_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("tlsConfig").getter(getter(Integration::tlsConfig)).setter(setter(Builder::tlsConfig)) .constructor(TlsConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tlsConfig").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(TYPE_FIELD, HTTP_METHOD_FIELD, URI_FIELD, CONNECTION_TYPE_FIELD, CONNECTION_ID_FIELD, CREDENTIALS_FIELD, REQUEST_PARAMETERS_FIELD, REQUEST_TEMPLATES_FIELD, PASSTHROUGH_BEHAVIOR_FIELD, CONTENT_HANDLING_FIELD, TIMEOUT_IN_MILLIS_FIELD, CACHE_NAMESPACE_FIELD, CACHE_KEY_PARAMETERS_FIELD, INTEGRATION_RESPONSES_FIELD, TLS_CONFIG_FIELD)); private static final long serialVersionUID = 1L; private final String type; private final String httpMethod; private final String uri; private final String connectionType; private final String connectionId; private final String credentials; private final Map requestParameters; private final Map requestTemplates; private final String passthroughBehavior; private final String contentHandling; private final Integer timeoutInMillis; private final String cacheNamespace; private final List cacheKeyParameters; private final Map integrationResponses; private final TlsConfig tlsConfig; private Integration(BuilderImpl builder) { this.type = builder.type; this.httpMethod = builder.httpMethod; this.uri = builder.uri; this.connectionType = builder.connectionType; this.connectionId = builder.connectionId; this.credentials = builder.credentials; this.requestParameters = builder.requestParameters; this.requestTemplates = builder.requestTemplates; this.passthroughBehavior = builder.passthroughBehavior; this.contentHandling = builder.contentHandling; this.timeoutInMillis = builder.timeoutInMillis; this.cacheNamespace = builder.cacheNamespace; this.cacheKeyParameters = builder.cacheKeyParameters; this.integrationResponses = builder.integrationResponses; this.tlsConfig = builder.tlsConfig; } /** *

* Specifies an API method integration type. The valid value is one of the following: *

*

* For the HTTP and HTTP proxy integrations, each integration can specify a protocol (http/https), port * and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy * integration with a connectionType of VPC_LINK is referred to as a private integration * and uses a VpcLink to connect API Gateway to a network load balancer of a VPC. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #type} will return * {@link IntegrationType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #typeAsString}. *

* * @return Specifies an API method integration type. The valid value is one of the following:

*

* For the HTTP and HTTP proxy integrations, each integration can specify a protocol ( * http/https), port and path. Standard 80 and 443 ports are supported as well as custom ports * above 1024. An HTTP or HTTP proxy integration with a connectionType of VPC_LINK * is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load * balancer of a VPC. * @see IntegrationType */ public final IntegrationType type() { return IntegrationType.fromValue(type); } /** *

* Specifies an API method integration type. The valid value is one of the following: *

*

* For the HTTP and HTTP proxy integrations, each integration can specify a protocol (http/https), port * and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy * integration with a connectionType of VPC_LINK is referred to as a private integration * and uses a VpcLink to connect API Gateway to a network load balancer of a VPC. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #type} will return * {@link IntegrationType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #typeAsString}. *

* * @return Specifies an API method integration type. The valid value is one of the following:

*

* For the HTTP and HTTP proxy integrations, each integration can specify a protocol ( * http/https), port and path. Standard 80 and 443 ports are supported as well as custom ports * above 1024. An HTTP or HTTP proxy integration with a connectionType of VPC_LINK * is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load * balancer of a VPC. * @see IntegrationType */ public final String typeAsString() { return type; } /** *

* Specifies the integration's HTTP method type. For the Type property, if you specify MOCK, this * property is optional. For Lambda integrations, you must set the integration method to POST. For all * other types, you must specify this property. *

* * @return Specifies the integration's HTTP method type. For the Type property, if you specify MOCK, * this property is optional. For Lambda integrations, you must set the integration method to * POST. For all other types, you must specify this property. */ public final String httpMethod() { return httpMethod; } /** *

* Specifies Uniform Resource Identifier (URI) of the integration endpoint. *

*

* For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) * URL according to the RFC-3986 specification for standard integrations. If connectionType is * VPC_LINK specify the Network Load Balancer DNS name. For AWS or AWS_PROXY * integrations, the URI is of the form * arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is * the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service * (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast * host-name lookup. action can be used for an Amazon Web Services service action-based API, using an * Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action * {name} plus any required input parameters. Alternatively, path can be used for an Amazon Web Services service * path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including * the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 * API of GetObject, the uri can be either * arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or * arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} *

* * @return Specifies Uniform Resource Identifier (URI) of the integration endpoint.

*

* For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded * HTTP(S) URL according to the RFC-3986 specification for standard integrations. If * connectionType is VPC_LINK specify the Network Load Balancer DNS name. For * AWS or AWS_PROXY integrations, the URI is of the form * arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, * {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web * Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web * Services service for fast host-name lookup. action can be used for an Amazon Web Services service * action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing * {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path * can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to the path * to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services * service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either * arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or * arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} */ public final String uri() { return uri; } /** *

* The type of the network connection to the integration endpoint. The valid value is INTERNET for * connections through the public routable internet or VPC_LINK for private connections between API * Gateway and a network load balancer in a VPC. The default value is INTERNET. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #connectionType} * will return {@link ConnectionType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #connectionTypeAsString}. *

* * @return The type of the network connection to the integration endpoint. The valid value is INTERNET * for connections through the public routable internet or VPC_LINK for private connections * between API Gateway and a network load balancer in a VPC. The default value is INTERNET. * @see ConnectionType */ public final ConnectionType connectionType() { return ConnectionType.fromValue(connectionType); } /** *

* The type of the network connection to the integration endpoint. The valid value is INTERNET for * connections through the public routable internet or VPC_LINK for private connections between API * Gateway and a network load balancer in a VPC. The default value is INTERNET. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #connectionType} * will return {@link ConnectionType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #connectionTypeAsString}. *

* * @return The type of the network connection to the integration endpoint. The valid value is INTERNET * for connections through the public routable internet or VPC_LINK for private connections * between API Gateway and a network load balancer in a VPC. The default value is INTERNET. * @see ConnectionType */ public final String connectionTypeAsString() { return connectionType; } /** *

* The ID of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, * otherwise. *

* * @return The ID of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, * otherwise. */ public final String connectionId() { return connectionId; } /** *

* Specifies the credentials required for the integration, if any. For AWS integrations, three options are * available. To specify an IAM Role for 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 Amazon Web Services * services, specify null. *

* * @return Specifies the credentials required for the integration, if any. For AWS integrations, three options are * available. To specify an IAM Role for 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 Amazon Web Services * services, specify null. */ public final String credentials() { return credentials; } /** * For responses, this returns true if the service returned a value for the RequestParameters property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasRequestParameters() { return requestParameters != null && !(requestParameters instanceof SdkAutoConstructMap); } /** *

* A key-value map specifying request parameters that are passed from the method request to the back end. The key is * an integration request parameter name and the associated value is a method request parameter value or static * value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request * parameter value must match the pattern of method.request.{location}.{name}, where * location is querystring, path, or header and * name must be a valid and unique method request parameter name. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasRequestParameters} method. *

* * @return A key-value map specifying request parameters that are passed from the method request to the back end. * The key is an integration request parameter name and the associated value is a method request parameter * value or static value that must be enclosed within single quotes and pre-encoded as required by the back * end. The method request parameter value must match the pattern of * method.request.{location}.{name}, where location is querystring, * path, or header and name must be a valid and unique method request * parameter name. */ public final Map requestParameters() { return requestParameters; } /** * For responses, this returns true if the service returned a value for the RequestTemplates property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasRequestTemplates() { return requestTemplates != null && !(requestTemplates instanceof SdkAutoConstructMap); } /** *

* 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. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasRequestTemplates} method. *

* * @return 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. */ public final Map requestTemplates() { return requestTemplates; } /** *

* Specifies how the method request body of an unmapped content type will be passed through the integration request * to the back end without transformation. A content type is unmapped if no mapping template is defined in the * integration or the content type does not match any of the mapped content types, as specified in * requestTemplates. The valid value is one of the following: WHEN_NO_MATCH: passes the * method request body through the integration request to the back end without transformation when the method * request content type does not match any content type associated with the mapping templates defined in the * integration request. WHEN_NO_TEMPLATES: passes the method request body through the integration * request to the back end without transformation when no mapping template is defined in the integration request. If * a template is defined when this option is selected, the method request of an unmapped content-type will be * rejected with an HTTP 415 Unsupported Media Type response. NEVER: rejects the method request with an * HTTP 415 Unsupported Media Type response when either the method request content type does not match any content * type associated with the mapping templates defined in the integration request or no mapping template is defined * in the integration request. *

* * @return Specifies how the method request body of an unmapped content type will be passed through the integration * request to the back end without transformation. A content type is unmapped if no mapping template is * defined in the integration or the content type does not match any of the mapped content types, as * specified in requestTemplates. The valid value is one of the following: * WHEN_NO_MATCH: passes the method request body through the integration request to the back * end without transformation when the method request content type does not match any content type * associated with the mapping templates defined in the integration request. WHEN_NO_TEMPLATES: * passes the method request body through the integration request to the back end without transformation * when no mapping template is defined in the integration request. If a template is defined when this option * is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported * Media Type response. NEVER: rejects the method request with an HTTP 415 Unsupported Media * Type response when either the method request content type does not match any content type associated with * the mapping templates defined in the integration request or no mapping template is defined in the * integration request. */ public final String passthroughBehavior() { return passthroughBehavior; } /** *

* Specifies how to handle request payload content type conversions. Supported values are * CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: *

*

* If this property is not defined, the request payload will be passed through from the method request to * integration request without modification, provided that the passthroughBehavior is configured to * support payload pass-through. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #contentHandling} * will return {@link ContentHandlingStrategy#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #contentHandlingAsString}. *

* * @return Specifies how to handle request payload content type conversions. Supported values are * CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

*

* If this property is not defined, the request payload will be passed through from the method request to * integration request without modification, provided that the passthroughBehavior is * configured to support payload pass-through. * @see ContentHandlingStrategy */ public final ContentHandlingStrategy contentHandling() { return ContentHandlingStrategy.fromValue(contentHandling); } /** *

* Specifies how to handle request payload content type conversions. Supported values are * CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: *

*

* If this property is not defined, the request payload will be passed through from the method request to * integration request without modification, provided that the passthroughBehavior is configured to * support payload pass-through. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #contentHandling} * will return {@link ContentHandlingStrategy#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #contentHandlingAsString}. *

* * @return Specifies how to handle request payload content type conversions. Supported values are * CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

*

* If this property is not defined, the request payload will be passed through from the method request to * integration request without modification, provided that the passthroughBehavior is * configured to support payload pass-through. * @see ContentHandlingStrategy */ public final String contentHandlingAsString() { return contentHandling; } /** *

* Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. *

* * @return Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 * seconds. */ public final Integer timeoutInMillis() { return timeoutInMillis; } /** *

* Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the * cacheNamespace. You can specify the same cacheNamespace across resources to return the * same cached data for requests to different resources. *

* * @return Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the * cacheNamespace. You can specify the same cacheNamespace across resources to * return the same cached data for requests to different resources. */ public final String cacheNamespace() { return cacheNamespace; } /** * For responses, this returns true if the service returned a value for the CacheKeyParameters property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasCacheKeyParameters() { return cacheKeyParameters != null && !(cacheKeyParameters instanceof SdkAutoConstructList); } /** *

* A list of request parameters whose values API Gateway caches. To be valid values for * cacheKeyParameters, these parameters must also be specified for Method * requestParameters. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasCacheKeyParameters} method. *

* * @return A list of request parameters whose values API Gateway caches. To be valid values for * cacheKeyParameters, these parameters must also be specified for Method * requestParameters. */ public final List cacheKeyParameters() { return cacheKeyParameters; } /** * For responses, this returns true if the service returned a value for the IntegrationResponses property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasIntegrationResponses() { return integrationResponses != null && !(integrationResponses instanceof SdkAutoConstructMap); } /** *

* Specifies the integration's responses. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasIntegrationResponses} method. *

* * @return Specifies the integration's responses. */ public final Map integrationResponses() { return integrationResponses; } /** *

* Specifies the TLS configuration for an integration. *

* * @return Specifies the TLS configuration for an integration. */ public final TlsConfig tlsConfig() { return tlsConfig; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(typeAsString()); hashCode = 31 * hashCode + Objects.hashCode(httpMethod()); hashCode = 31 * hashCode + Objects.hashCode(uri()); hashCode = 31 * hashCode + Objects.hashCode(connectionTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(connectionId()); hashCode = 31 * hashCode + Objects.hashCode(credentials()); hashCode = 31 * hashCode + Objects.hashCode(hasRequestParameters() ? requestParameters() : null); hashCode = 31 * hashCode + Objects.hashCode(hasRequestTemplates() ? requestTemplates() : null); hashCode = 31 * hashCode + Objects.hashCode(passthroughBehavior()); hashCode = 31 * hashCode + Objects.hashCode(contentHandlingAsString()); hashCode = 31 * hashCode + Objects.hashCode(timeoutInMillis()); hashCode = 31 * hashCode + Objects.hashCode(cacheNamespace()); hashCode = 31 * hashCode + Objects.hashCode(hasCacheKeyParameters() ? cacheKeyParameters() : null); hashCode = 31 * hashCode + Objects.hashCode(hasIntegrationResponses() ? integrationResponses() : null); hashCode = 31 * hashCode + Objects.hashCode(tlsConfig()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Integration)) { return false; } Integration other = (Integration) obj; return Objects.equals(typeAsString(), other.typeAsString()) && Objects.equals(httpMethod(), other.httpMethod()) && Objects.equals(uri(), other.uri()) && Objects.equals(connectionTypeAsString(), other.connectionTypeAsString()) && Objects.equals(connectionId(), other.connectionId()) && Objects.equals(credentials(), other.credentials()) && hasRequestParameters() == other.hasRequestParameters() && Objects.equals(requestParameters(), other.requestParameters()) && hasRequestTemplates() == other.hasRequestTemplates() && Objects.equals(requestTemplates(), other.requestTemplates()) && Objects.equals(passthroughBehavior(), other.passthroughBehavior()) && Objects.equals(contentHandlingAsString(), other.contentHandlingAsString()) && Objects.equals(timeoutInMillis(), other.timeoutInMillis()) && Objects.equals(cacheNamespace(), other.cacheNamespace()) && hasCacheKeyParameters() == other.hasCacheKeyParameters() && Objects.equals(cacheKeyParameters(), other.cacheKeyParameters()) && hasIntegrationResponses() == other.hasIntegrationResponses() && Objects.equals(integrationResponses(), other.integrationResponses()) && Objects.equals(tlsConfig(), other.tlsConfig()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("Integration").add("Type", typeAsString()).add("HttpMethod", httpMethod()).add("Uri", uri()) .add("ConnectionType", connectionTypeAsString()).add("ConnectionId", connectionId()) .add("Credentials", credentials()).add("RequestParameters", hasRequestParameters() ? requestParameters() : null) .add("RequestTemplates", hasRequestTemplates() ? requestTemplates() : null) .add("PassthroughBehavior", passthroughBehavior()).add("ContentHandling", contentHandlingAsString()) .add("TimeoutInMillis", timeoutInMillis()).add("CacheNamespace", cacheNamespace()) .add("CacheKeyParameters", hasCacheKeyParameters() ? cacheKeyParameters() : null) .add("IntegrationResponses", hasIntegrationResponses() ? integrationResponses() : null) .add("TlsConfig", tlsConfig()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "type": return Optional.ofNullable(clazz.cast(typeAsString())); case "httpMethod": return Optional.ofNullable(clazz.cast(httpMethod())); case "uri": return Optional.ofNullable(clazz.cast(uri())); case "connectionType": return Optional.ofNullable(clazz.cast(connectionTypeAsString())); case "connectionId": return Optional.ofNullable(clazz.cast(connectionId())); case "credentials": return Optional.ofNullable(clazz.cast(credentials())); case "requestParameters": return Optional.ofNullable(clazz.cast(requestParameters())); case "requestTemplates": return Optional.ofNullable(clazz.cast(requestTemplates())); case "passthroughBehavior": return Optional.ofNullable(clazz.cast(passthroughBehavior())); case "contentHandling": return Optional.ofNullable(clazz.cast(contentHandlingAsString())); case "timeoutInMillis": return Optional.ofNullable(clazz.cast(timeoutInMillis())); case "cacheNamespace": return Optional.ofNullable(clazz.cast(cacheNamespace())); case "cacheKeyParameters": return Optional.ofNullable(clazz.cast(cacheKeyParameters())); case "integrationResponses": return Optional.ofNullable(clazz.cast(integrationResponses())); case "tlsConfig": return Optional.ofNullable(clazz.cast(tlsConfig())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Integration) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* Specifies an API method integration type. The valid value is one of the following: *

*

* For the HTTP and HTTP proxy integrations, each integration can specify a protocol (http/https), * port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP * proxy integration with a connectionType of VPC_LINK is referred to as a private * integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC. *

* * @param type * Specifies an API method integration type. The valid value is one of the following:

*

* For the HTTP and HTTP proxy integrations, each integration can specify a protocol ( * http/https), port and path. Standard 80 and 443 ports are supported as well as custom * ports above 1024. An HTTP or HTTP proxy integration with a connectionType of * VPC_LINK is referred to as a private integration and uses a VpcLink to connect API * Gateway to a network load balancer of a VPC. * @see IntegrationType * @return Returns a reference to this object so that method calls can be chained together. * @see IntegrationType */ Builder type(String type); /** *

* Specifies an API method integration type. The valid value is one of the following: *

*

* For the HTTP and HTTP proxy integrations, each integration can specify a protocol (http/https), * port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP * proxy integration with a connectionType of VPC_LINK is referred to as a private * integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC. *

* * @param type * Specifies an API method integration type. The valid value is one of the following:

*

* For the HTTP and HTTP proxy integrations, each integration can specify a protocol ( * http/https), port and path. Standard 80 and 443 ports are supported as well as custom * ports above 1024. An HTTP or HTTP proxy integration with a connectionType of * VPC_LINK is referred to as a private integration and uses a VpcLink to connect API * Gateway to a network load balancer of a VPC. * @see IntegrationType * @return Returns a reference to this object so that method calls can be chained together. * @see IntegrationType */ Builder type(IntegrationType type); /** *

* Specifies the integration's HTTP method type. For the Type property, if you specify MOCK, this * property is optional. For Lambda integrations, you must set the integration method to POST. For * all other types, you must specify this property. *

* * @param httpMethod * Specifies the integration's HTTP method type. For the Type property, if you specify MOCK, * this property is optional. For Lambda integrations, you must set the integration method to * POST. For all other types, you must specify this property. * @return Returns a reference to this object so that method calls can be chained together. */ Builder httpMethod(String httpMethod); /** *

* Specifies Uniform Resource Identifier (URI) of the integration endpoint. *

*

* For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded * HTTP(S) URL according to the RFC-3986 specification for standard integrations. If connectionType * is VPC_LINK specify the Network Load Balancer DNS name. For AWS or * AWS_PROXY integrations, the URI is of the form * arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, * {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web * Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web * Services service for fast host-name lookup. action can be used for an Amazon Web Services service * action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} * refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for * an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web * Services service resource, including the region of the integrated Amazon Web Services service, if applicable. * For example, for integration with the S3 API of GetObject, the uri can be either * arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or * arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} *

* * @param uri * Specifies Uniform Resource Identifier (URI) of the integration endpoint.

*

* For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded * HTTP(S) URL according to the RFC-3986 specification for standard integrations. If * connectionType is VPC_LINK specify the Network Load Balancer DNS name. For * AWS or AWS_PROXY integrations, the URI is of the form * arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, * {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon * Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon * Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service * action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing * {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, * path can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to * the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web * Services service, if applicable. For example, for integration with the S3 API of GetObject, the uri * can be either * arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or * arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} * @return Returns a reference to this object so that method calls can be chained together. */ Builder uri(String uri); /** *

* The type of the network connection to the integration endpoint. The valid value is INTERNET for * connections through the public routable internet or VPC_LINK for private connections between API * Gateway and a network load balancer in a VPC. The default value is INTERNET. *

* * @param connectionType * The type of the network connection to the integration endpoint. The valid value is * INTERNET for connections through the public routable internet or VPC_LINK * for private connections between API Gateway and a network load balancer in a VPC. The default value is * INTERNET. * @see ConnectionType * @return Returns a reference to this object so that method calls can be chained together. * @see ConnectionType */ Builder connectionType(String connectionType); /** *

* The type of the network connection to the integration endpoint. The valid value is INTERNET for * connections through the public routable internet or VPC_LINK for private connections between API * Gateway and a network load balancer in a VPC. The default value is INTERNET. *

* * @param connectionType * The type of the network connection to the integration endpoint. The valid value is * INTERNET for connections through the public routable internet or VPC_LINK * for private connections between API Gateway and a network load balancer in a VPC. The default value is * INTERNET. * @see ConnectionType * @return Returns a reference to this object so that method calls can be chained together. * @see ConnectionType */ Builder connectionType(ConnectionType connectionType); /** *

* The ID of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, * otherwise. *

* * @param connectionId * The ID of the VpcLink used for the integration when connectionType=VPC_LINK and * undefined, otherwise. * @return Returns a reference to this object so that method calls can be chained together. */ Builder connectionId(String connectionId); /** *

* Specifies the credentials required for the integration, if any. For AWS integrations, three options are * available. To specify an IAM Role for 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 Amazon Web Services * services, specify null. *

* * @param credentials * Specifies the credentials required for the integration, if any. For AWS integrations, three options * are available. To specify an IAM Role for 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 Amazon Web * Services services, specify null. * @return Returns a reference to this object so that method calls can be chained together. */ Builder credentials(String credentials); /** *

* A key-value map specifying request parameters that are passed from the method request to the back end. The * key is an integration request parameter name and the associated value is a method request parameter value or * static value that must be enclosed within single quotes and pre-encoded as required by the back end. The * method request parameter value must match the pattern of method.request.{location}.{name}, where * location is querystring, path, or header and * name must be a valid and unique method request parameter name. *

* * @param requestParameters * A key-value map specifying request parameters that are passed from the method request to the back end. * The key is an integration request parameter name and the associated value is a method request * parameter value or static value that must be enclosed within single quotes and pre-encoded as required * by the back end. The method request parameter value must match the pattern of * method.request.{location}.{name}, where location is querystring * , path, or header and name must be a valid and unique method * request parameter name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder requestParameters(Map requestParameters); /** *

* 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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ Builder requestTemplates(Map requestTemplates); /** *

* Specifies how the method request body of an unmapped content type will be passed through the integration * request to the back end without transformation. A content type is unmapped if no mapping template is defined * in the integration or the content type does not match any of the mapped content types, as specified in * requestTemplates. The valid value is one of the following: WHEN_NO_MATCH: passes * the method request body through the integration request to the back end without transformation when the * method request content type does not match any content type associated with the mapping templates defined in * the integration request. WHEN_NO_TEMPLATES: passes the method request body through the * integration request to the back end without transformation when no mapping template is defined in the * integration request. If a template is defined when this option is selected, the method request of an unmapped * content-type will be rejected with an HTTP 415 Unsupported Media Type response. NEVER: rejects * the method request with an HTTP 415 Unsupported Media Type response when either the method request content * type does not match any content type associated with the mapping templates defined in the integration request * or no mapping template is defined in the integration request. *

* * @param passthroughBehavior * Specifies how the method request body of an unmapped content type will be passed through the * integration request to the back end without transformation. A content type is unmapped if no mapping * template is defined in the integration or the content type does not match any of the mapped content * types, as specified in requestTemplates. The valid value is one of the following: * WHEN_NO_MATCH: passes the method request body through the integration request to the back * end without transformation when the method request content type does not match any content type * associated with the mapping templates defined in the integration request. * WHEN_NO_TEMPLATES: passes the method request body through the integration request to the * back end without transformation when no mapping template is defined in the integration request. If a * template is defined when this option is selected, the method request of an unmapped content-type will * be rejected with an HTTP 415 Unsupported Media Type response. NEVER: rejects the method * request with an HTTP 415 Unsupported Media Type response when either the method request content type * does not match any content type associated with the mapping templates defined in the integration * request or no mapping template is defined in the integration request. * @return Returns a reference to this object so that method calls can be chained together. */ Builder passthroughBehavior(String passthroughBehavior); /** *

* Specifies how to handle request payload content type conversions. Supported values are * CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: *

*

* If this property is not defined, the request payload will be passed through from the method request to * integration request without modification, provided that the passthroughBehavior is configured to * support payload pass-through. *

* * @param contentHandling * Specifies how to handle request payload content type conversions. Supported values are * CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

*

* If this property is not defined, the request payload will be passed through from the method request to * integration request without modification, provided that the passthroughBehavior is * configured to support payload pass-through. * @see ContentHandlingStrategy * @return Returns a reference to this object so that method calls can be chained together. * @see ContentHandlingStrategy */ Builder contentHandling(String contentHandling); /** *

* Specifies how to handle request payload content type conversions. Supported values are * CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: *

*

* If this property is not defined, the request payload will be passed through from the method request to * integration request without modification, provided that the passthroughBehavior is configured to * support payload pass-through. *

* * @param contentHandling * Specifies how to handle request payload content type conversions. Supported values are * CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

*

* If this property is not defined, the request payload will be passed through from the method request to * integration request without modification, provided that the passthroughBehavior is * configured to support payload pass-through. * @see ContentHandlingStrategy * @return Returns a reference to this object so that method calls can be chained together. * @see ContentHandlingStrategy */ Builder contentHandling(ContentHandlingStrategy contentHandling); /** *

* Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. *

* * @param timeoutInMillis * Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 * seconds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder timeoutInMillis(Integer timeoutInMillis); /** *

* Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the * cacheNamespace. You can specify the same cacheNamespace across resources to return * the same cached data for requests to different resources. *

* * @param cacheNamespace * Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the * cacheNamespace. You can specify the same cacheNamespace across resources to * return the same cached data for requests to different resources. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheNamespace(String cacheNamespace); /** *

* A list of request parameters whose values API Gateway caches. To be valid values for * cacheKeyParameters, these parameters must also be specified for Method * requestParameters. *

* * @param cacheKeyParameters * A list of request parameters whose values API Gateway caches. To be valid values for * cacheKeyParameters, these parameters must also be specified for Method * requestParameters. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheKeyParameters(Collection cacheKeyParameters); /** *

* A list of request parameters whose values API Gateway caches. To be valid values for * cacheKeyParameters, these parameters must also be specified for Method * requestParameters. *

* * @param cacheKeyParameters * A list of request parameters whose values API Gateway caches. To be valid values for * cacheKeyParameters, these parameters must also be specified for Method * requestParameters. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheKeyParameters(String... cacheKeyParameters); /** *

* Specifies the integration's responses. *

* * @param integrationResponses * Specifies the integration's responses. * @return Returns a reference to this object so that method calls can be chained together. */ Builder integrationResponses(Map integrationResponses); /** *

* Specifies the TLS configuration for an integration. *

* * @param tlsConfig * Specifies the TLS configuration for an integration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tlsConfig(TlsConfig tlsConfig); /** *

* Specifies the TLS configuration for an integration. *

* This is a convenience method that creates an instance of the {@link TlsConfig.Builder} avoiding the need to * create one manually via {@link TlsConfig#builder()}. * *

* When the {@link Consumer} completes, {@link TlsConfig.Builder#build()} is called immediately and its result * is passed to {@link #tlsConfig(TlsConfig)}. * * @param tlsConfig * a consumer that will call methods on {@link TlsConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tlsConfig(TlsConfig) */ default Builder tlsConfig(Consumer tlsConfig) { return tlsConfig(TlsConfig.builder().applyMutation(tlsConfig).build()); } } static final class BuilderImpl implements Builder { private String type; private String httpMethod; private String uri; private String connectionType; private String connectionId; private String credentials; private Map requestParameters = DefaultSdkAutoConstructMap.getInstance(); private Map requestTemplates = DefaultSdkAutoConstructMap.getInstance(); private String passthroughBehavior; private String contentHandling; private Integer timeoutInMillis; private String cacheNamespace; private List cacheKeyParameters = DefaultSdkAutoConstructList.getInstance(); private Map integrationResponses = DefaultSdkAutoConstructMap.getInstance(); private TlsConfig tlsConfig; private BuilderImpl() { } private BuilderImpl(Integration model) { type(model.type); httpMethod(model.httpMethod); uri(model.uri); connectionType(model.connectionType); connectionId(model.connectionId); credentials(model.credentials); requestParameters(model.requestParameters); requestTemplates(model.requestTemplates); passthroughBehavior(model.passthroughBehavior); contentHandling(model.contentHandling); timeoutInMillis(model.timeoutInMillis); cacheNamespace(model.cacheNamespace); cacheKeyParameters(model.cacheKeyParameters); integrationResponses(model.integrationResponses); tlsConfig(model.tlsConfig); } public final String getType() { return type; } public final void setType(String type) { this.type = type; } @Override public final Builder type(String type) { this.type = type; return this; } @Override public final Builder type(IntegrationType type) { this.type(type == null ? null : type.toString()); return this; } public final String getHttpMethod() { return httpMethod; } public final void setHttpMethod(String httpMethod) { this.httpMethod = httpMethod; } @Override public final Builder httpMethod(String httpMethod) { this.httpMethod = httpMethod; return this; } public final String getUri() { return uri; } public final void setUri(String uri) { this.uri = uri; } @Override public final Builder uri(String uri) { this.uri = uri; return this; } public final String getConnectionType() { return connectionType; } public final void setConnectionType(String connectionType) { this.connectionType = connectionType; } @Override public final Builder connectionType(String connectionType) { this.connectionType = connectionType; return this; } @Override public final Builder connectionType(ConnectionType connectionType) { this.connectionType(connectionType == null ? null : connectionType.toString()); return this; } public final String getConnectionId() { return connectionId; } public final void setConnectionId(String connectionId) { this.connectionId = connectionId; } @Override public final Builder connectionId(String connectionId) { this.connectionId = connectionId; return this; } public final String getCredentials() { return credentials; } public final void setCredentials(String credentials) { this.credentials = credentials; } @Override public final Builder credentials(String credentials) { this.credentials = credentials; return this; } public final Map getRequestParameters() { if (requestParameters instanceof SdkAutoConstructMap) { return null; } return requestParameters; } public final void setRequestParameters(Map requestParameters) { this.requestParameters = MapOfStringToStringCopier.copy(requestParameters); } @Override public final Builder requestParameters(Map requestParameters) { this.requestParameters = MapOfStringToStringCopier.copy(requestParameters); return this; } public final Map getRequestTemplates() { if (requestTemplates instanceof SdkAutoConstructMap) { return null; } return requestTemplates; } public final void setRequestTemplates(Map requestTemplates) { this.requestTemplates = MapOfStringToStringCopier.copy(requestTemplates); } @Override public final Builder requestTemplates(Map requestTemplates) { this.requestTemplates = MapOfStringToStringCopier.copy(requestTemplates); return this; } public final String getPassthroughBehavior() { return passthroughBehavior; } public final void setPassthroughBehavior(String passthroughBehavior) { this.passthroughBehavior = passthroughBehavior; } @Override public final Builder passthroughBehavior(String passthroughBehavior) { this.passthroughBehavior = passthroughBehavior; return this; } public final String getContentHandling() { return contentHandling; } public final void setContentHandling(String contentHandling) { this.contentHandling = contentHandling; } @Override public final Builder contentHandling(String contentHandling) { this.contentHandling = contentHandling; return this; } @Override public final Builder contentHandling(ContentHandlingStrategy contentHandling) { this.contentHandling(contentHandling == null ? null : contentHandling.toString()); return this; } public final Integer getTimeoutInMillis() { return timeoutInMillis; } public final void setTimeoutInMillis(Integer timeoutInMillis) { this.timeoutInMillis = timeoutInMillis; } @Override public final Builder timeoutInMillis(Integer timeoutInMillis) { this.timeoutInMillis = timeoutInMillis; return this; } public final String getCacheNamespace() { return cacheNamespace; } public final void setCacheNamespace(String cacheNamespace) { this.cacheNamespace = cacheNamespace; } @Override public final Builder cacheNamespace(String cacheNamespace) { this.cacheNamespace = cacheNamespace; return this; } public final Collection getCacheKeyParameters() { if (cacheKeyParameters instanceof SdkAutoConstructList) { return null; } return cacheKeyParameters; } public final void setCacheKeyParameters(Collection cacheKeyParameters) { this.cacheKeyParameters = ListOfStringCopier.copy(cacheKeyParameters); } @Override public final Builder cacheKeyParameters(Collection cacheKeyParameters) { this.cacheKeyParameters = ListOfStringCopier.copy(cacheKeyParameters); return this; } @Override @SafeVarargs public final Builder cacheKeyParameters(String... cacheKeyParameters) { cacheKeyParameters(Arrays.asList(cacheKeyParameters)); return this; } public final Map getIntegrationResponses() { Map result = MapOfIntegrationResponseCopier .copyToBuilder(this.integrationResponses); if (result instanceof SdkAutoConstructMap) { return null; } return result; } public final void setIntegrationResponses(Map integrationResponses) { this.integrationResponses = MapOfIntegrationResponseCopier.copyFromBuilder(integrationResponses); } @Override public final Builder integrationResponses(Map integrationResponses) { this.integrationResponses = MapOfIntegrationResponseCopier.copy(integrationResponses); return this; } public final TlsConfig.Builder getTlsConfig() { return tlsConfig != null ? tlsConfig.toBuilder() : null; } public final void setTlsConfig(TlsConfig.BuilderImpl tlsConfig) { this.tlsConfig = tlsConfig != null ? tlsConfig.build() : null; } @Override public final Builder tlsConfig(TlsConfig tlsConfig) { this.tlsConfig = tlsConfig; return this; } @Override public Integration build() { return new Integration(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy