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

software.amazon.awssdk.services.lambda.model.CreateEventSourceMappingResponse Maven / Gradle / Ivy

/*
 * 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.lambda.model;

import java.beans.Transient;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
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.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* A mapping between an Amazon Web Services resource and a Lambda function. For details, see * CreateEventSourceMapping. *

*/ @Generated("software.amazon.awssdk:codegen") public final class CreateEventSourceMappingResponse extends LambdaResponse implements ToCopyableBuilder { private static final SdkField UUID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("UUID") .getter(getter(CreateEventSourceMappingResponse::uuid)).setter(setter(Builder::uuid)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UUID").build()).build(); private static final SdkField STARTING_POSITION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StartingPosition").getter(getter(CreateEventSourceMappingResponse::startingPositionAsString)) .setter(setter(Builder::startingPosition)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StartingPosition").build()).build(); private static final SdkField STARTING_POSITION_TIMESTAMP_FIELD = SdkField . builder(MarshallingType.INSTANT).memberName("StartingPositionTimestamp") .getter(getter(CreateEventSourceMappingResponse::startingPositionTimestamp)) .setter(setter(Builder::startingPositionTimestamp)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StartingPositionTimestamp").build()) .build(); private static final SdkField BATCH_SIZE_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("BatchSize").getter(getter(CreateEventSourceMappingResponse::batchSize)) .setter(setter(Builder::batchSize)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BatchSize").build()).build(); private static final SdkField MAXIMUM_BATCHING_WINDOW_IN_SECONDS_FIELD = SdkField . builder(MarshallingType.INTEGER) .memberName("MaximumBatchingWindowInSeconds") .getter(getter(CreateEventSourceMappingResponse::maximumBatchingWindowInSeconds)) .setter(setter(Builder::maximumBatchingWindowInSeconds)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaximumBatchingWindowInSeconds") .build()).build(); private static final SdkField PARALLELIZATION_FACTOR_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("ParallelizationFactor").getter(getter(CreateEventSourceMappingResponse::parallelizationFactor)) .setter(setter(Builder::parallelizationFactor)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ParallelizationFactor").build()) .build(); private static final SdkField EVENT_SOURCE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EventSourceArn").getter(getter(CreateEventSourceMappingResponse::eventSourceArn)) .setter(setter(Builder::eventSourceArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EventSourceArn").build()).build(); private static final SdkField FUNCTION_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FunctionArn").getter(getter(CreateEventSourceMappingResponse::functionArn)) .setter(setter(Builder::functionArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FunctionArn").build()).build(); private static final SdkField LAST_MODIFIED_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("LastModified").getter(getter(CreateEventSourceMappingResponse::lastModified)) .setter(setter(Builder::lastModified)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModified").build()).build(); private static final SdkField LAST_PROCESSING_RESULT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LastProcessingResult").getter(getter(CreateEventSourceMappingResponse::lastProcessingResult)) .setter(setter(Builder::lastProcessingResult)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastProcessingResult").build()) .build(); private static final SdkField STATE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("State") .getter(getter(CreateEventSourceMappingResponse::state)).setter(setter(Builder::state)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("State").build()).build(); private static final SdkField STATE_TRANSITION_REASON_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StateTransitionReason").getter(getter(CreateEventSourceMappingResponse::stateTransitionReason)) .setter(setter(Builder::stateTransitionReason)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StateTransitionReason").build()) .build(); private static final SdkField DESTINATION_CONFIG_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("DestinationConfig") .getter(getter(CreateEventSourceMappingResponse::destinationConfig)).setter(setter(Builder::destinationConfig)) .constructor(DestinationConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DestinationConfig").build()).build(); private static final SdkField> TOPICS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Topics") .getter(getter(CreateEventSourceMappingResponse::topics)) .setter(setter(Builder::topics)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Topics").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> QUEUES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Queues") .getter(getter(CreateEventSourceMappingResponse::queues)) .setter(setter(Builder::queues)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Queues").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> SOURCE_ACCESS_CONFIGURATIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("SourceAccessConfigurations") .getter(getter(CreateEventSourceMappingResponse::sourceAccessConfigurations)) .setter(setter(Builder::sourceAccessConfigurations)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SourceAccessConfigurations").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(SourceAccessConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField SELF_MANAGED_EVENT_SOURCE_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("SelfManagedEventSource") .getter(getter(CreateEventSourceMappingResponse::selfManagedEventSource)) .setter(setter(Builder::selfManagedEventSource)).constructor(SelfManagedEventSource::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SelfManagedEventSource").build()) .build(); private static final SdkField MAXIMUM_RECORD_AGE_IN_SECONDS_FIELD = SdkField . builder(MarshallingType.INTEGER).memberName("MaximumRecordAgeInSeconds") .getter(getter(CreateEventSourceMappingResponse::maximumRecordAgeInSeconds)) .setter(setter(Builder::maximumRecordAgeInSeconds)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaximumRecordAgeInSeconds").build()) .build(); private static final SdkField BISECT_BATCH_ON_FUNCTION_ERROR_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("BisectBatchOnFunctionError") .getter(getter(CreateEventSourceMappingResponse::bisectBatchOnFunctionError)) .setter(setter(Builder::bisectBatchOnFunctionError)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BisectBatchOnFunctionError").build()) .build(); private static final SdkField MAXIMUM_RETRY_ATTEMPTS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("MaximumRetryAttempts").getter(getter(CreateEventSourceMappingResponse::maximumRetryAttempts)) .setter(setter(Builder::maximumRetryAttempts)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaximumRetryAttempts").build()) .build(); private static final SdkField TUMBLING_WINDOW_IN_SECONDS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("TumblingWindowInSeconds").getter(getter(CreateEventSourceMappingResponse::tumblingWindowInSeconds)) .setter(setter(Builder::tumblingWindowInSeconds)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TumblingWindowInSeconds").build()) .build(); private static final SdkField> FUNCTION_RESPONSE_TYPES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("FunctionResponseTypes") .getter(getter(CreateEventSourceMappingResponse::functionResponseTypesAsStrings)) .setter(setter(Builder::functionResponseTypesWithStrings)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FunctionResponseTypes").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 List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(UUID_FIELD, STARTING_POSITION_FIELD, STARTING_POSITION_TIMESTAMP_FIELD, BATCH_SIZE_FIELD, MAXIMUM_BATCHING_WINDOW_IN_SECONDS_FIELD, PARALLELIZATION_FACTOR_FIELD, EVENT_SOURCE_ARN_FIELD, FUNCTION_ARN_FIELD, LAST_MODIFIED_FIELD, LAST_PROCESSING_RESULT_FIELD, STATE_FIELD, STATE_TRANSITION_REASON_FIELD, DESTINATION_CONFIG_FIELD, TOPICS_FIELD, QUEUES_FIELD, SOURCE_ACCESS_CONFIGURATIONS_FIELD, SELF_MANAGED_EVENT_SOURCE_FIELD, MAXIMUM_RECORD_AGE_IN_SECONDS_FIELD, BISECT_BATCH_ON_FUNCTION_ERROR_FIELD, MAXIMUM_RETRY_ATTEMPTS_FIELD, TUMBLING_WINDOW_IN_SECONDS_FIELD, FUNCTION_RESPONSE_TYPES_FIELD)); private final String uuid; private final String startingPosition; private final Instant startingPositionTimestamp; private final Integer batchSize; private final Integer maximumBatchingWindowInSeconds; private final Integer parallelizationFactor; private final String eventSourceArn; private final String functionArn; private final Instant lastModified; private final String lastProcessingResult; private final String state; private final String stateTransitionReason; private final DestinationConfig destinationConfig; private final List topics; private final List queues; private final List sourceAccessConfigurations; private final SelfManagedEventSource selfManagedEventSource; private final Integer maximumRecordAgeInSeconds; private final Boolean bisectBatchOnFunctionError; private final Integer maximumRetryAttempts; private final Integer tumblingWindowInSeconds; private final List functionResponseTypes; private CreateEventSourceMappingResponse(BuilderImpl builder) { super(builder); this.uuid = builder.uuid; this.startingPosition = builder.startingPosition; this.startingPositionTimestamp = builder.startingPositionTimestamp; this.batchSize = builder.batchSize; this.maximumBatchingWindowInSeconds = builder.maximumBatchingWindowInSeconds; this.parallelizationFactor = builder.parallelizationFactor; this.eventSourceArn = builder.eventSourceArn; this.functionArn = builder.functionArn; this.lastModified = builder.lastModified; this.lastProcessingResult = builder.lastProcessingResult; this.state = builder.state; this.stateTransitionReason = builder.stateTransitionReason; this.destinationConfig = builder.destinationConfig; this.topics = builder.topics; this.queues = builder.queues; this.sourceAccessConfigurations = builder.sourceAccessConfigurations; this.selfManagedEventSource = builder.selfManagedEventSource; this.maximumRecordAgeInSeconds = builder.maximumRecordAgeInSeconds; this.bisectBatchOnFunctionError = builder.bisectBatchOnFunctionError; this.maximumRetryAttempts = builder.maximumRetryAttempts; this.tumblingWindowInSeconds = builder.tumblingWindowInSeconds; this.functionResponseTypes = builder.functionResponseTypes; } /** *

* The identifier of the event source mapping. *

* * @return The identifier of the event source mapping. */ public final String uuid() { return uuid; } /** *

* The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon * MSK stream sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams. *

*

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

* * @return The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and * Amazon MSK stream sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams. * @see EventSourcePosition */ public final EventSourcePosition startingPosition() { return EventSourcePosition.fromValue(startingPosition); } /** *

* The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon * MSK stream sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams. *

*

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

* * @return The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and * Amazon MSK stream sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams. * @see EventSourcePosition */ public final String startingPositionAsString() { return startingPosition; } /** *

* With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. *

* * @return With StartingPosition set to AT_TIMESTAMP, the time from which to start * reading. */ public final Instant startingPositionTimestamp() { return startingPositionTimestamp; } /** *

* The maximum number of items to retrieve in a single batch. *

* * @return The maximum number of items to retrieve in a single batch. */ public final Integer batchSize() { return batchSize; } /** *

* (Streams and Amazon SQS standard queues) The maximum amount of time to gather records before invoking the * function, in seconds. The default value is zero. *

* * @return (Streams and Amazon SQS standard queues) The maximum amount of time to gather records before invoking the * function, in seconds. The default value is zero. */ public final Integer maximumBatchingWindowInSeconds() { return maximumBatchingWindowInSeconds; } /** *

* (Streams only) The number of batches to process concurrently from each shard. The default value is 1. *

* * @return (Streams only) The number of batches to process concurrently from each shard. The default value is 1. */ public final Integer parallelizationFactor() { return parallelizationFactor; } /** *

* The Amazon Resource Name (ARN) of the event source. *

* * @return The Amazon Resource Name (ARN) of the event source. */ public final String eventSourceArn() { return eventSourceArn; } /** *

* The ARN of the Lambda function. *

* * @return The ARN of the Lambda function. */ public final String functionArn() { return functionArn; } /** *

* The date that the event source mapping was last updated or that its state changed. *

* * @return The date that the event source mapping was last updated or that its state changed. */ public final Instant lastModified() { return lastModified; } /** *

* The result of the last Lambda invocation of your function. *

* * @return The result of the last Lambda invocation of your function. */ public final String lastProcessingResult() { return lastProcessingResult; } /** *

* The state of the event source mapping. It can be one of the following: Creating, * Enabling, Enabled, Disabling, Disabled, Updating * , or Deleting. *

* * @return The state of the event source mapping. It can be one of the following: Creating, * Enabling, Enabled, Disabling, Disabled, * Updating, or Deleting. */ public final String state() { return state; } /** *

* Indicates whether a user or Lambda made the last change to the event source mapping. *

* * @return Indicates whether a user or Lambda made the last change to the event source mapping. */ public final String stateTransitionReason() { return stateTransitionReason; } /** *

* (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records. *

* * @return (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records. */ public final DestinationConfig destinationConfig() { return destinationConfig; } /** * For responses, this returns true if the service returned a value for the Topics 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 hasTopics() { return topics != null && !(topics instanceof SdkAutoConstructList); } /** *

* The name of the Kafka topic. *

*

* 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 #hasTopics} method. *

* * @return The name of the Kafka topic. */ public final List topics() { return topics; } /** * For responses, this returns true if the service returned a value for the Queues 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 hasQueues() { return queues != null && !(queues instanceof SdkAutoConstructList); } /** *

* (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. *

*

* 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 #hasQueues} method. *

* * @return (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. */ public final List queues() { return queues; } /** * For responses, this returns true if the service returned a value for the SourceAccessConfigurations 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 hasSourceAccessConfigurations() { return sourceAccessConfigurations != null && !(sourceAccessConfigurations instanceof SdkAutoConstructList); } /** *

* An array of the authentication protocol, VPC components, or virtual host to secure and define your event source. *

*

* 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 #hasSourceAccessConfigurations} method. *

* * @return An array of the authentication protocol, VPC components, or virtual host to secure and define your event * source. */ public final List sourceAccessConfigurations() { return sourceAccessConfigurations; } /** *

* The self-managed Apache Kafka cluster for your event source. *

* * @return The self-managed Apache Kafka cluster for your event source. */ public final SelfManagedEventSource selfManagedEventSource() { return selfManagedEventSource; } /** *

* (Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age * to infinite. When the value is set to infinite, Lambda never discards old records. *

* * @return (Streams only) Discard records older than the specified age. The default value is -1, which sets the * maximum age to infinite. When the value is set to infinite, Lambda never discards old records. */ public final Integer maximumRecordAgeInSeconds() { return maximumRecordAgeInSeconds; } /** *

* (Streams only) If the function returns an error, split the batch in two and retry. The default value is false. *

* * @return (Streams only) If the function returns an error, split the batch in two and retry. The default value is * false. */ public final Boolean bisectBatchOnFunctionError() { return bisectBatchOnFunctionError; } /** *

* (Streams only) Discard records after the specified number of retries. The default value is -1, which sets the * maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until * the record expires in the event source. *

* * @return (Streams only) Discard records after the specified number of retries. The default value is -1, which sets * the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed * records until the record expires in the event source. */ public final Integer maximumRetryAttempts() { return maximumRetryAttempts; } /** *

* (Streams only) The duration in seconds of a processing window. The range is 1–900 seconds. *

* * @return (Streams only) The duration in seconds of a processing window. The range is 1–900 seconds. */ public final Integer tumblingWindowInSeconds() { return tumblingWindowInSeconds; } /** *

* (Streams only) A list of current response type enums applied to the event source mapping. *

*

* 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 #hasFunctionResponseTypes} method. *

* * @return (Streams only) A list of current response type enums applied to the event source mapping. */ public final List functionResponseTypes() { return FunctionResponseTypeListCopier.copyStringToEnum(functionResponseTypes); } /** * For responses, this returns true if the service returned a value for the FunctionResponseTypes 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 hasFunctionResponseTypes() { return functionResponseTypes != null && !(functionResponseTypes instanceof SdkAutoConstructList); } /** *

* (Streams only) A list of current response type enums applied to the event source mapping. *

*

* 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 #hasFunctionResponseTypes} method. *

* * @return (Streams only) A list of current response type enums applied to the event source mapping. */ public final List functionResponseTypesAsStrings() { return functionResponseTypes; } @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 + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(uuid()); hashCode = 31 * hashCode + Objects.hashCode(startingPositionAsString()); hashCode = 31 * hashCode + Objects.hashCode(startingPositionTimestamp()); hashCode = 31 * hashCode + Objects.hashCode(batchSize()); hashCode = 31 * hashCode + Objects.hashCode(maximumBatchingWindowInSeconds()); hashCode = 31 * hashCode + Objects.hashCode(parallelizationFactor()); hashCode = 31 * hashCode + Objects.hashCode(eventSourceArn()); hashCode = 31 * hashCode + Objects.hashCode(functionArn()); hashCode = 31 * hashCode + Objects.hashCode(lastModified()); hashCode = 31 * hashCode + Objects.hashCode(lastProcessingResult()); hashCode = 31 * hashCode + Objects.hashCode(state()); hashCode = 31 * hashCode + Objects.hashCode(stateTransitionReason()); hashCode = 31 * hashCode + Objects.hashCode(destinationConfig()); hashCode = 31 * hashCode + Objects.hashCode(hasTopics() ? topics() : null); hashCode = 31 * hashCode + Objects.hashCode(hasQueues() ? queues() : null); hashCode = 31 * hashCode + Objects.hashCode(hasSourceAccessConfigurations() ? sourceAccessConfigurations() : null); hashCode = 31 * hashCode + Objects.hashCode(selfManagedEventSource()); hashCode = 31 * hashCode + Objects.hashCode(maximumRecordAgeInSeconds()); hashCode = 31 * hashCode + Objects.hashCode(bisectBatchOnFunctionError()); hashCode = 31 * hashCode + Objects.hashCode(maximumRetryAttempts()); hashCode = 31 * hashCode + Objects.hashCode(tumblingWindowInSeconds()); hashCode = 31 * hashCode + Objects.hashCode(hasFunctionResponseTypes() ? functionResponseTypesAsStrings() : null); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CreateEventSourceMappingResponse)) { return false; } CreateEventSourceMappingResponse other = (CreateEventSourceMappingResponse) obj; return Objects.equals(uuid(), other.uuid()) && Objects.equals(startingPositionAsString(), other.startingPositionAsString()) && Objects.equals(startingPositionTimestamp(), other.startingPositionTimestamp()) && Objects.equals(batchSize(), other.batchSize()) && Objects.equals(maximumBatchingWindowInSeconds(), other.maximumBatchingWindowInSeconds()) && Objects.equals(parallelizationFactor(), other.parallelizationFactor()) && Objects.equals(eventSourceArn(), other.eventSourceArn()) && Objects.equals(functionArn(), other.functionArn()) && Objects.equals(lastModified(), other.lastModified()) && Objects.equals(lastProcessingResult(), other.lastProcessingResult()) && Objects.equals(state(), other.state()) && Objects.equals(stateTransitionReason(), other.stateTransitionReason()) && Objects.equals(destinationConfig(), other.destinationConfig()) && hasTopics() == other.hasTopics() && Objects.equals(topics(), other.topics()) && hasQueues() == other.hasQueues() && Objects.equals(queues(), other.queues()) && hasSourceAccessConfigurations() == other.hasSourceAccessConfigurations() && Objects.equals(sourceAccessConfigurations(), other.sourceAccessConfigurations()) && Objects.equals(selfManagedEventSource(), other.selfManagedEventSource()) && Objects.equals(maximumRecordAgeInSeconds(), other.maximumRecordAgeInSeconds()) && Objects.equals(bisectBatchOnFunctionError(), other.bisectBatchOnFunctionError()) && Objects.equals(maximumRetryAttempts(), other.maximumRetryAttempts()) && Objects.equals(tumblingWindowInSeconds(), other.tumblingWindowInSeconds()) && hasFunctionResponseTypes() == other.hasFunctionResponseTypes() && Objects.equals(functionResponseTypesAsStrings(), other.functionResponseTypesAsStrings()); } /** * 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("CreateEventSourceMappingResponse").add("UUID", uuid()) .add("StartingPosition", startingPositionAsString()) .add("StartingPositionTimestamp", startingPositionTimestamp()).add("BatchSize", batchSize()) .add("MaximumBatchingWindowInSeconds", maximumBatchingWindowInSeconds()) .add("ParallelizationFactor", parallelizationFactor()).add("EventSourceArn", eventSourceArn()) .add("FunctionArn", functionArn()).add("LastModified", lastModified()) .add("LastProcessingResult", lastProcessingResult()).add("State", state()) .add("StateTransitionReason", stateTransitionReason()).add("DestinationConfig", destinationConfig()) .add("Topics", hasTopics() ? topics() : null).add("Queues", hasQueues() ? queues() : null) .add("SourceAccessConfigurations", hasSourceAccessConfigurations() ? sourceAccessConfigurations() : null) .add("SelfManagedEventSource", selfManagedEventSource()) .add("MaximumRecordAgeInSeconds", maximumRecordAgeInSeconds()) .add("BisectBatchOnFunctionError", bisectBatchOnFunctionError()) .add("MaximumRetryAttempts", maximumRetryAttempts()).add("TumblingWindowInSeconds", tumblingWindowInSeconds()) .add("FunctionResponseTypes", hasFunctionResponseTypes() ? functionResponseTypesAsStrings() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "UUID": return Optional.ofNullable(clazz.cast(uuid())); case "StartingPosition": return Optional.ofNullable(clazz.cast(startingPositionAsString())); case "StartingPositionTimestamp": return Optional.ofNullable(clazz.cast(startingPositionTimestamp())); case "BatchSize": return Optional.ofNullable(clazz.cast(batchSize())); case "MaximumBatchingWindowInSeconds": return Optional.ofNullable(clazz.cast(maximumBatchingWindowInSeconds())); case "ParallelizationFactor": return Optional.ofNullable(clazz.cast(parallelizationFactor())); case "EventSourceArn": return Optional.ofNullable(clazz.cast(eventSourceArn())); case "FunctionArn": return Optional.ofNullable(clazz.cast(functionArn())); case "LastModified": return Optional.ofNullable(clazz.cast(lastModified())); case "LastProcessingResult": return Optional.ofNullable(clazz.cast(lastProcessingResult())); case "State": return Optional.ofNullable(clazz.cast(state())); case "StateTransitionReason": return Optional.ofNullable(clazz.cast(stateTransitionReason())); case "DestinationConfig": return Optional.ofNullable(clazz.cast(destinationConfig())); case "Topics": return Optional.ofNullable(clazz.cast(topics())); case "Queues": return Optional.ofNullable(clazz.cast(queues())); case "SourceAccessConfigurations": return Optional.ofNullable(clazz.cast(sourceAccessConfigurations())); case "SelfManagedEventSource": return Optional.ofNullable(clazz.cast(selfManagedEventSource())); case "MaximumRecordAgeInSeconds": return Optional.ofNullable(clazz.cast(maximumRecordAgeInSeconds())); case "BisectBatchOnFunctionError": return Optional.ofNullable(clazz.cast(bisectBatchOnFunctionError())); case "MaximumRetryAttempts": return Optional.ofNullable(clazz.cast(maximumRetryAttempts())); case "TumblingWindowInSeconds": return Optional.ofNullable(clazz.cast(tumblingWindowInSeconds())); case "FunctionResponseTypes": return Optional.ofNullable(clazz.cast(functionResponseTypesAsStrings())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateEventSourceMappingResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends LambdaResponse.Builder, SdkPojo, CopyableBuilder { /** *

* The identifier of the event source mapping. *

* * @param uuid * The identifier of the event source mapping. * @return Returns a reference to this object so that method calls can be chained together. */ Builder uuid(String uuid); /** *

* The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and * Amazon MSK stream sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams. *

* * @param startingPosition * The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, * and Amazon MSK stream sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams. * @see EventSourcePosition * @return Returns a reference to this object so that method calls can be chained together. * @see EventSourcePosition */ Builder startingPosition(String startingPosition); /** *

* The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and * Amazon MSK stream sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams. *

* * @param startingPosition * The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, * and Amazon MSK stream sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams. * @see EventSourcePosition * @return Returns a reference to this object so that method calls can be chained together. * @see EventSourcePosition */ Builder startingPosition(EventSourcePosition startingPosition); /** *

* With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. *

* * @param startingPositionTimestamp * With StartingPosition set to AT_TIMESTAMP, the time from which to start * reading. * @return Returns a reference to this object so that method calls can be chained together. */ Builder startingPositionTimestamp(Instant startingPositionTimestamp); /** *

* The maximum number of items to retrieve in a single batch. *

* * @param batchSize * The maximum number of items to retrieve in a single batch. * @return Returns a reference to this object so that method calls can be chained together. */ Builder batchSize(Integer batchSize); /** *

* (Streams and Amazon SQS standard queues) The maximum amount of time to gather records before invoking the * function, in seconds. The default value is zero. *

* * @param maximumBatchingWindowInSeconds * (Streams and Amazon SQS standard queues) The maximum amount of time to gather records before invoking * the function, in seconds. The default value is zero. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maximumBatchingWindowInSeconds(Integer maximumBatchingWindowInSeconds); /** *

* (Streams only) The number of batches to process concurrently from each shard. The default value is 1. *

* * @param parallelizationFactor * (Streams only) The number of batches to process concurrently from each shard. The default value is 1. * @return Returns a reference to this object so that method calls can be chained together. */ Builder parallelizationFactor(Integer parallelizationFactor); /** *

* The Amazon Resource Name (ARN) of the event source. *

* * @param eventSourceArn * The Amazon Resource Name (ARN) of the event source. * @return Returns a reference to this object so that method calls can be chained together. */ Builder eventSourceArn(String eventSourceArn); /** *

* The ARN of the Lambda function. *

* * @param functionArn * The ARN of the Lambda function. * @return Returns a reference to this object so that method calls can be chained together. */ Builder functionArn(String functionArn); /** *

* The date that the event source mapping was last updated or that its state changed. *

* * @param lastModified * The date that the event source mapping was last updated or that its state changed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastModified(Instant lastModified); /** *

* The result of the last Lambda invocation of your function. *

* * @param lastProcessingResult * The result of the last Lambda invocation of your function. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastProcessingResult(String lastProcessingResult); /** *

* The state of the event source mapping. It can be one of the following: Creating, * Enabling, Enabled, Disabling, Disabled, * Updating, or Deleting. *

* * @param state * The state of the event source mapping. It can be one of the following: Creating, * Enabling, Enabled, Disabling, Disabled, * Updating, or Deleting. * @return Returns a reference to this object so that method calls can be chained together. */ Builder state(String state); /** *

* Indicates whether a user or Lambda made the last change to the event source mapping. *

* * @param stateTransitionReason * Indicates whether a user or Lambda made the last change to the event source mapping. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stateTransitionReason(String stateTransitionReason); /** *

* (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records. *

* * @param destinationConfig * (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records. * @return Returns a reference to this object so that method calls can be chained together. */ Builder destinationConfig(DestinationConfig destinationConfig); /** *

* (Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records. *

* This is a convenience that creates an instance of the {@link DestinationConfig.Builder} avoiding the need to * create one manually via {@link DestinationConfig#builder()}. * * When the {@link Consumer} completes, {@link DestinationConfig.Builder#build()} is called immediately and its * result is passed to {@link #destinationConfig(DestinationConfig)}. * * @param destinationConfig * a consumer that will call methods on {@link DestinationConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #destinationConfig(DestinationConfig) */ default Builder destinationConfig(Consumer destinationConfig) { return destinationConfig(DestinationConfig.builder().applyMutation(destinationConfig).build()); } /** *

* The name of the Kafka topic. *

* * @param topics * The name of the Kafka topic. * @return Returns a reference to this object so that method calls can be chained together. */ Builder topics(Collection topics); /** *

* The name of the Kafka topic. *

* * @param topics * The name of the Kafka topic. * @return Returns a reference to this object so that method calls can be chained together. */ Builder topics(String... topics); /** *

* (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. *

* * @param queues * (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. * @return Returns a reference to this object so that method calls can be chained together. */ Builder queues(Collection queues); /** *

* (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. *

* * @param queues * (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. * @return Returns a reference to this object so that method calls can be chained together. */ Builder queues(String... queues); /** *

* An array of the authentication protocol, VPC components, or virtual host to secure and define your event * source. *

* * @param sourceAccessConfigurations * An array of the authentication protocol, VPC components, or virtual host to secure and define your * event source. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sourceAccessConfigurations(Collection sourceAccessConfigurations); /** *

* An array of the authentication protocol, VPC components, or virtual host to secure and define your event * source. *

* * @param sourceAccessConfigurations * An array of the authentication protocol, VPC components, or virtual host to secure and define your * event source. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sourceAccessConfigurations(SourceAccessConfiguration... sourceAccessConfigurations); /** *

* An array of the authentication protocol, VPC components, or virtual host to secure and define your event * source. *

* This is a convenience that creates an instance of the {@link List.Builder} * avoiding the need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called * immediately and its result is passed to {@link #sourceAccessConfigurations(List)}. * * @param sourceAccessConfigurations * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #sourceAccessConfigurations(List) */ Builder sourceAccessConfigurations(Consumer... sourceAccessConfigurations); /** *

* The self-managed Apache Kafka cluster for your event source. *

* * @param selfManagedEventSource * The self-managed Apache Kafka cluster for your event source. * @return Returns a reference to this object so that method calls can be chained together. */ Builder selfManagedEventSource(SelfManagedEventSource selfManagedEventSource); /** *

* The self-managed Apache Kafka cluster for your event source. *

* This is a convenience that creates an instance of the {@link SelfManagedEventSource.Builder} avoiding the * need to create one manually via {@link SelfManagedEventSource#builder()}. * * When the {@link Consumer} completes, {@link SelfManagedEventSource.Builder#build()} is called immediately and * its result is passed to {@link #selfManagedEventSource(SelfManagedEventSource)}. * * @param selfManagedEventSource * a consumer that will call methods on {@link SelfManagedEventSource.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #selfManagedEventSource(SelfManagedEventSource) */ default Builder selfManagedEventSource(Consumer selfManagedEventSource) { return selfManagedEventSource(SelfManagedEventSource.builder().applyMutation(selfManagedEventSource).build()); } /** *

* (Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum * age to infinite. When the value is set to infinite, Lambda never discards old records. *

* * @param maximumRecordAgeInSeconds * (Streams only) Discard records older than the specified age. The default value is -1, which sets the * maximum age to infinite. When the value is set to infinite, Lambda never discards old records. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maximumRecordAgeInSeconds(Integer maximumRecordAgeInSeconds); /** *

* (Streams only) If the function returns an error, split the batch in two and retry. The default value is * false. *

* * @param bisectBatchOnFunctionError * (Streams only) If the function returns an error, split the batch in two and retry. The default value * is false. * @return Returns a reference to this object so that method calls can be chained together. */ Builder bisectBatchOnFunctionError(Boolean bisectBatchOnFunctionError); /** *

* (Streams only) Discard records after the specified number of retries. The default value is -1, which sets the * maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records * until the record expires in the event source. *

* * @param maximumRetryAttempts * (Streams only) Discard records after the specified number of retries. The default value is -1, which * sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries * failed records until the record expires in the event source. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maximumRetryAttempts(Integer maximumRetryAttempts); /** *

* (Streams only) The duration in seconds of a processing window. The range is 1–900 seconds. *

* * @param tumblingWindowInSeconds * (Streams only) The duration in seconds of a processing window. The range is 1–900 seconds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tumblingWindowInSeconds(Integer tumblingWindowInSeconds); /** *

* (Streams only) A list of current response type enums applied to the event source mapping. *

* * @param functionResponseTypes * (Streams only) A list of current response type enums applied to the event source mapping. * @return Returns a reference to this object so that method calls can be chained together. */ Builder functionResponseTypesWithStrings(Collection functionResponseTypes); /** *

* (Streams only) A list of current response type enums applied to the event source mapping. *

* * @param functionResponseTypes * (Streams only) A list of current response type enums applied to the event source mapping. * @return Returns a reference to this object so that method calls can be chained together. */ Builder functionResponseTypesWithStrings(String... functionResponseTypes); /** *

* (Streams only) A list of current response type enums applied to the event source mapping. *

* * @param functionResponseTypes * (Streams only) A list of current response type enums applied to the event source mapping. * @return Returns a reference to this object so that method calls can be chained together. */ Builder functionResponseTypes(Collection functionResponseTypes); /** *

* (Streams only) A list of current response type enums applied to the event source mapping. *

* * @param functionResponseTypes * (Streams only) A list of current response type enums applied to the event source mapping. * @return Returns a reference to this object so that method calls can be chained together. */ Builder functionResponseTypes(FunctionResponseType... functionResponseTypes); } static final class BuilderImpl extends LambdaResponse.BuilderImpl implements Builder { private String uuid; private String startingPosition; private Instant startingPositionTimestamp; private Integer batchSize; private Integer maximumBatchingWindowInSeconds; private Integer parallelizationFactor; private String eventSourceArn; private String functionArn; private Instant lastModified; private String lastProcessingResult; private String state; private String stateTransitionReason; private DestinationConfig destinationConfig; private List topics = DefaultSdkAutoConstructList.getInstance(); private List queues = DefaultSdkAutoConstructList.getInstance(); private List sourceAccessConfigurations = DefaultSdkAutoConstructList.getInstance(); private SelfManagedEventSource selfManagedEventSource; private Integer maximumRecordAgeInSeconds; private Boolean bisectBatchOnFunctionError; private Integer maximumRetryAttempts; private Integer tumblingWindowInSeconds; private List functionResponseTypes = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(CreateEventSourceMappingResponse model) { super(model); uuid(model.uuid); startingPosition(model.startingPosition); startingPositionTimestamp(model.startingPositionTimestamp); batchSize(model.batchSize); maximumBatchingWindowInSeconds(model.maximumBatchingWindowInSeconds); parallelizationFactor(model.parallelizationFactor); eventSourceArn(model.eventSourceArn); functionArn(model.functionArn); lastModified(model.lastModified); lastProcessingResult(model.lastProcessingResult); state(model.state); stateTransitionReason(model.stateTransitionReason); destinationConfig(model.destinationConfig); topics(model.topics); queues(model.queues); sourceAccessConfigurations(model.sourceAccessConfigurations); selfManagedEventSource(model.selfManagedEventSource); maximumRecordAgeInSeconds(model.maximumRecordAgeInSeconds); bisectBatchOnFunctionError(model.bisectBatchOnFunctionError); maximumRetryAttempts(model.maximumRetryAttempts); tumblingWindowInSeconds(model.tumblingWindowInSeconds); functionResponseTypesWithStrings(model.functionResponseTypes); } public final String getUuid() { return uuid; } public final void setUuid(String uuid) { this.uuid = uuid; } @Override @Transient public final Builder uuid(String uuid) { this.uuid = uuid; return this; } public final String getStartingPosition() { return startingPosition; } public final void setStartingPosition(String startingPosition) { this.startingPosition = startingPosition; } @Override @Transient public final Builder startingPosition(String startingPosition) { this.startingPosition = startingPosition; return this; } @Override @Transient public final Builder startingPosition(EventSourcePosition startingPosition) { this.startingPosition(startingPosition == null ? null : startingPosition.toString()); return this; } public final Instant getStartingPositionTimestamp() { return startingPositionTimestamp; } public final void setStartingPositionTimestamp(Instant startingPositionTimestamp) { this.startingPositionTimestamp = startingPositionTimestamp; } @Override @Transient public final Builder startingPositionTimestamp(Instant startingPositionTimestamp) { this.startingPositionTimestamp = startingPositionTimestamp; return this; } public final Integer getBatchSize() { return batchSize; } public final void setBatchSize(Integer batchSize) { this.batchSize = batchSize; } @Override @Transient public final Builder batchSize(Integer batchSize) { this.batchSize = batchSize; return this; } public final Integer getMaximumBatchingWindowInSeconds() { return maximumBatchingWindowInSeconds; } public final void setMaximumBatchingWindowInSeconds(Integer maximumBatchingWindowInSeconds) { this.maximumBatchingWindowInSeconds = maximumBatchingWindowInSeconds; } @Override @Transient public final Builder maximumBatchingWindowInSeconds(Integer maximumBatchingWindowInSeconds) { this.maximumBatchingWindowInSeconds = maximumBatchingWindowInSeconds; return this; } public final Integer getParallelizationFactor() { return parallelizationFactor; } public final void setParallelizationFactor(Integer parallelizationFactor) { this.parallelizationFactor = parallelizationFactor; } @Override @Transient public final Builder parallelizationFactor(Integer parallelizationFactor) { this.parallelizationFactor = parallelizationFactor; return this; } public final String getEventSourceArn() { return eventSourceArn; } public final void setEventSourceArn(String eventSourceArn) { this.eventSourceArn = eventSourceArn; } @Override @Transient public final Builder eventSourceArn(String eventSourceArn) { this.eventSourceArn = eventSourceArn; return this; } public final String getFunctionArn() { return functionArn; } public final void setFunctionArn(String functionArn) { this.functionArn = functionArn; } @Override @Transient public final Builder functionArn(String functionArn) { this.functionArn = functionArn; return this; } public final Instant getLastModified() { return lastModified; } public final void setLastModified(Instant lastModified) { this.lastModified = lastModified; } @Override @Transient public final Builder lastModified(Instant lastModified) { this.lastModified = lastModified; return this; } public final String getLastProcessingResult() { return lastProcessingResult; } public final void setLastProcessingResult(String lastProcessingResult) { this.lastProcessingResult = lastProcessingResult; } @Override @Transient public final Builder lastProcessingResult(String lastProcessingResult) { this.lastProcessingResult = lastProcessingResult; return this; } public final String getState() { return state; } public final void setState(String state) { this.state = state; } @Override @Transient public final Builder state(String state) { this.state = state; return this; } public final String getStateTransitionReason() { return stateTransitionReason; } public final void setStateTransitionReason(String stateTransitionReason) { this.stateTransitionReason = stateTransitionReason; } @Override @Transient public final Builder stateTransitionReason(String stateTransitionReason) { this.stateTransitionReason = stateTransitionReason; return this; } public final DestinationConfig.Builder getDestinationConfig() { return destinationConfig != null ? destinationConfig.toBuilder() : null; } public final void setDestinationConfig(DestinationConfig.BuilderImpl destinationConfig) { this.destinationConfig = destinationConfig != null ? destinationConfig.build() : null; } @Override @Transient public final Builder destinationConfig(DestinationConfig destinationConfig) { this.destinationConfig = destinationConfig; return this; } public final Collection getTopics() { if (topics instanceof SdkAutoConstructList) { return null; } return topics; } public final void setTopics(Collection topics) { this.topics = TopicsCopier.copy(topics); } @Override @Transient public final Builder topics(Collection topics) { this.topics = TopicsCopier.copy(topics); return this; } @Override @Transient @SafeVarargs public final Builder topics(String... topics) { topics(Arrays.asList(topics)); return this; } public final Collection getQueues() { if (queues instanceof SdkAutoConstructList) { return null; } return queues; } public final void setQueues(Collection queues) { this.queues = QueuesCopier.copy(queues); } @Override @Transient public final Builder queues(Collection queues) { this.queues = QueuesCopier.copy(queues); return this; } @Override @Transient @SafeVarargs public final Builder queues(String... queues) { queues(Arrays.asList(queues)); return this; } public final List getSourceAccessConfigurations() { List result = SourceAccessConfigurationsCopier .copyToBuilder(this.sourceAccessConfigurations); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setSourceAccessConfigurations( Collection sourceAccessConfigurations) { this.sourceAccessConfigurations = SourceAccessConfigurationsCopier.copyFromBuilder(sourceAccessConfigurations); } @Override @Transient public final Builder sourceAccessConfigurations(Collection sourceAccessConfigurations) { this.sourceAccessConfigurations = SourceAccessConfigurationsCopier.copy(sourceAccessConfigurations); return this; } @Override @Transient @SafeVarargs public final Builder sourceAccessConfigurations(SourceAccessConfiguration... sourceAccessConfigurations) { sourceAccessConfigurations(Arrays.asList(sourceAccessConfigurations)); return this; } @Override @Transient @SafeVarargs public final Builder sourceAccessConfigurations(Consumer... sourceAccessConfigurations) { sourceAccessConfigurations(Stream.of(sourceAccessConfigurations) .map(c -> SourceAccessConfiguration.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final SelfManagedEventSource.Builder getSelfManagedEventSource() { return selfManagedEventSource != null ? selfManagedEventSource.toBuilder() : null; } public final void setSelfManagedEventSource(SelfManagedEventSource.BuilderImpl selfManagedEventSource) { this.selfManagedEventSource = selfManagedEventSource != null ? selfManagedEventSource.build() : null; } @Override @Transient public final Builder selfManagedEventSource(SelfManagedEventSource selfManagedEventSource) { this.selfManagedEventSource = selfManagedEventSource; return this; } public final Integer getMaximumRecordAgeInSeconds() { return maximumRecordAgeInSeconds; } public final void setMaximumRecordAgeInSeconds(Integer maximumRecordAgeInSeconds) { this.maximumRecordAgeInSeconds = maximumRecordAgeInSeconds; } @Override @Transient public final Builder maximumRecordAgeInSeconds(Integer maximumRecordAgeInSeconds) { this.maximumRecordAgeInSeconds = maximumRecordAgeInSeconds; return this; } public final Boolean getBisectBatchOnFunctionError() { return bisectBatchOnFunctionError; } public final void setBisectBatchOnFunctionError(Boolean bisectBatchOnFunctionError) { this.bisectBatchOnFunctionError = bisectBatchOnFunctionError; } @Override @Transient public final Builder bisectBatchOnFunctionError(Boolean bisectBatchOnFunctionError) { this.bisectBatchOnFunctionError = bisectBatchOnFunctionError; return this; } public final Integer getMaximumRetryAttempts() { return maximumRetryAttempts; } public final void setMaximumRetryAttempts(Integer maximumRetryAttempts) { this.maximumRetryAttempts = maximumRetryAttempts; } @Override @Transient public final Builder maximumRetryAttempts(Integer maximumRetryAttempts) { this.maximumRetryAttempts = maximumRetryAttempts; return this; } public final Integer getTumblingWindowInSeconds() { return tumblingWindowInSeconds; } public final void setTumblingWindowInSeconds(Integer tumblingWindowInSeconds) { this.tumblingWindowInSeconds = tumblingWindowInSeconds; } @Override @Transient public final Builder tumblingWindowInSeconds(Integer tumblingWindowInSeconds) { this.tumblingWindowInSeconds = tumblingWindowInSeconds; return this; } public final Collection getFunctionResponseTypes() { if (functionResponseTypes instanceof SdkAutoConstructList) { return null; } return functionResponseTypes; } public final void setFunctionResponseTypes(Collection functionResponseTypes) { this.functionResponseTypes = FunctionResponseTypeListCopier.copy(functionResponseTypes); } @Override @Transient public final Builder functionResponseTypesWithStrings(Collection functionResponseTypes) { this.functionResponseTypes = FunctionResponseTypeListCopier.copy(functionResponseTypes); return this; } @Override @Transient @SafeVarargs public final Builder functionResponseTypesWithStrings(String... functionResponseTypes) { functionResponseTypesWithStrings(Arrays.asList(functionResponseTypes)); return this; } @Override @Transient public final Builder functionResponseTypes(Collection functionResponseTypes) { this.functionResponseTypes = FunctionResponseTypeListCopier.copyEnumToString(functionResponseTypes); return this; } @Override @Transient @SafeVarargs public final Builder functionResponseTypes(FunctionResponseType... functionResponseTypes) { functionResponseTypes(Arrays.asList(functionResponseTypes)); return this; } @Override public CreateEventSourceMappingResponse build() { return new CreateEventSourceMappingResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy