software.amazon.awssdk.services.lambda.model.UpdateEventSourceMappingRequest Maven / Gradle / Ivy
Show all versions of lambda Show documentation
/*
* 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.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.awscore.AwsRequestOverrideConfiguration;
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;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class UpdateEventSourceMappingRequest extends LambdaRequest implements
ToCopyableBuilder {
private static final SdkField UUID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("UUID")
.getter(getter(UpdateEventSourceMappingRequest::uuid)).setter(setter(Builder::uuid))
.traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("UUID").build()).build();
private static final SdkField FUNCTION_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FunctionName").getter(getter(UpdateEventSourceMappingRequest::functionName))
.setter(setter(Builder::functionName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FunctionName").build()).build();
private static final SdkField ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("Enabled").getter(getter(UpdateEventSourceMappingRequest::enabled)).setter(setter(Builder::enabled))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Enabled").build()).build();
private static final SdkField BATCH_SIZE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("BatchSize").getter(getter(UpdateEventSourceMappingRequest::batchSize))
.setter(setter(Builder::batchSize))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BatchSize").build()).build();
private static final SdkField FILTER_CRITERIA_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("FilterCriteria")
.getter(getter(UpdateEventSourceMappingRequest::filterCriteria)).setter(setter(Builder::filterCriteria))
.constructor(FilterCriteria::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FilterCriteria").build()).build();
private static final SdkField MAXIMUM_BATCHING_WINDOW_IN_SECONDS_FIELD = SdkField
. builder(MarshallingType.INTEGER)
.memberName("MaximumBatchingWindowInSeconds")
.getter(getter(UpdateEventSourceMappingRequest::maximumBatchingWindowInSeconds))
.setter(setter(Builder::maximumBatchingWindowInSeconds))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaximumBatchingWindowInSeconds")
.build()).build();
private static final SdkField DESTINATION_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("DestinationConfig")
.getter(getter(UpdateEventSourceMappingRequest::destinationConfig)).setter(setter(Builder::destinationConfig))
.constructor(DestinationConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DestinationConfig").build()).build();
private static final SdkField MAXIMUM_RECORD_AGE_IN_SECONDS_FIELD = SdkField
. builder(MarshallingType.INTEGER).memberName("MaximumRecordAgeInSeconds")
.getter(getter(UpdateEventSourceMappingRequest::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(UpdateEventSourceMappingRequest::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(UpdateEventSourceMappingRequest::maximumRetryAttempts))
.setter(setter(Builder::maximumRetryAttempts))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaximumRetryAttempts").build())
.build();
private static final SdkField PARALLELIZATION_FACTOR_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("ParallelizationFactor").getter(getter(UpdateEventSourceMappingRequest::parallelizationFactor))
.setter(setter(Builder::parallelizationFactor))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ParallelizationFactor").build())
.build();
private static final SdkField> SOURCE_ACCESS_CONFIGURATIONS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("SourceAccessConfigurations")
.getter(getter(UpdateEventSourceMappingRequest::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 TUMBLING_WINDOW_IN_SECONDS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("TumblingWindowInSeconds").getter(getter(UpdateEventSourceMappingRequest::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(UpdateEventSourceMappingRequest::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 SdkField SCALING_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ScalingConfig")
.getter(getter(UpdateEventSourceMappingRequest::scalingConfig)).setter(setter(Builder::scalingConfig))
.constructor(ScalingConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ScalingConfig").build()).build();
private static final SdkField DOCUMENT_DB_EVENT_SOURCE_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("DocumentDBEventSourceConfig")
.getter(getter(UpdateEventSourceMappingRequest::documentDBEventSourceConfig))
.setter(setter(Builder::documentDBEventSourceConfig))
.constructor(DocumentDBEventSourceConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DocumentDBEventSourceConfig")
.build()).build();
private static final SdkField KMS_KEY_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("KMSKeyArn").getter(getter(UpdateEventSourceMappingRequest::kmsKeyArn))
.setter(setter(Builder::kmsKeyArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KMSKeyArn").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(UUID_FIELD,
FUNCTION_NAME_FIELD, ENABLED_FIELD, BATCH_SIZE_FIELD, FILTER_CRITERIA_FIELD,
MAXIMUM_BATCHING_WINDOW_IN_SECONDS_FIELD, DESTINATION_CONFIG_FIELD, MAXIMUM_RECORD_AGE_IN_SECONDS_FIELD,
BISECT_BATCH_ON_FUNCTION_ERROR_FIELD, MAXIMUM_RETRY_ATTEMPTS_FIELD, PARALLELIZATION_FACTOR_FIELD,
SOURCE_ACCESS_CONFIGURATIONS_FIELD, TUMBLING_WINDOW_IN_SECONDS_FIELD, FUNCTION_RESPONSE_TYPES_FIELD,
SCALING_CONFIG_FIELD, DOCUMENT_DB_EVENT_SOURCE_CONFIG_FIELD, KMS_KEY_ARN_FIELD));
private final String uuid;
private final String functionName;
private final Boolean enabled;
private final Integer batchSize;
private final FilterCriteria filterCriteria;
private final Integer maximumBatchingWindowInSeconds;
private final DestinationConfig destinationConfig;
private final Integer maximumRecordAgeInSeconds;
private final Boolean bisectBatchOnFunctionError;
private final Integer maximumRetryAttempts;
private final Integer parallelizationFactor;
private final List sourceAccessConfigurations;
private final Integer tumblingWindowInSeconds;
private final List functionResponseTypes;
private final ScalingConfig scalingConfig;
private final DocumentDBEventSourceConfig documentDBEventSourceConfig;
private final String kmsKeyArn;
private UpdateEventSourceMappingRequest(BuilderImpl builder) {
super(builder);
this.uuid = builder.uuid;
this.functionName = builder.functionName;
this.enabled = builder.enabled;
this.batchSize = builder.batchSize;
this.filterCriteria = builder.filterCriteria;
this.maximumBatchingWindowInSeconds = builder.maximumBatchingWindowInSeconds;
this.destinationConfig = builder.destinationConfig;
this.maximumRecordAgeInSeconds = builder.maximumRecordAgeInSeconds;
this.bisectBatchOnFunctionError = builder.bisectBatchOnFunctionError;
this.maximumRetryAttempts = builder.maximumRetryAttempts;
this.parallelizationFactor = builder.parallelizationFactor;
this.sourceAccessConfigurations = builder.sourceAccessConfigurations;
this.tumblingWindowInSeconds = builder.tumblingWindowInSeconds;
this.functionResponseTypes = builder.functionResponseTypes;
this.scalingConfig = builder.scalingConfig;
this.documentDBEventSourceConfig = builder.documentDBEventSourceConfig;
this.kmsKeyArn = builder.kmsKeyArn;
}
/**
*
* The identifier of the event source mapping.
*
*
* @return The identifier of the event source mapping.
*/
public final String uuid() {
return uuid;
}
/**
*
* The name or ARN of the Lambda function.
*
*
* Name formats
*
*
* -
*
* Function name – MyFunction
.
*
*
* -
*
* Function ARN – arn:aws:lambda:us-west-2:123456789012:function:MyFunction
.
*
*
* -
*
* Version or Alias ARN – arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD
.
*
*
* -
*
* Partial ARN – 123456789012:function:MyFunction
.
*
*
*
*
* The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64
* characters in length.
*
*
* @return The name or ARN of the Lambda function.
*
* Name formats
*
*
* -
*
* Function name – MyFunction
.
*
*
* -
*
* Function ARN – arn:aws:lambda:us-west-2:123456789012:function:MyFunction
.
*
*
* -
*
* Version or Alias ARN – arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD
* .
*
*
* -
*
* Partial ARN – 123456789012:function:MyFunction
.
*
*
*
*
* The length constraint applies only to the full ARN. If you specify only the function name, it's limited
* to 64 characters in length.
*/
public final String functionName() {
return functionName;
}
/**
*
* When true, the event source mapping is active. When false, Lambda pauses polling and invocation.
*
*
* Default: True
*
*
* @return When true, the event source mapping is active. When false, Lambda pauses polling and invocation.
*
* Default: True
*/
public final Boolean enabled() {
return enabled;
}
/**
*
* The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your
* function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit
* for synchronous invocation (6 MB).
*
*
* -
*
* Amazon Kinesis – Default 100. Max 10,000.
*
*
* -
*
* Amazon DynamoDB Streams – Default 100. Max 10,000.
*
*
* -
*
* Amazon Simple Queue Service – Default 10. For standard queues the max is 10,000. For FIFO queues the max
* is 10.
*
*
* -
*
* Amazon Managed Streaming for Apache Kafka – Default 100. Max 10,000.
*
*
* -
*
* Self-managed Apache Kafka – Default 100. Max 10,000.
*
*
* -
*
* Amazon MQ (ActiveMQ and RabbitMQ) – Default 100. Max 10,000.
*
*
* -
*
* DocumentDB – Default 100. Max 10,000.
*
*
*
*
* @return The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your
* function. Lambda passes all of the records in the batch to the function in a single call, up to the
* payload limit for synchronous invocation (6 MB).
*
* -
*
* Amazon Kinesis – Default 100. Max 10,000.
*
*
* -
*
* Amazon DynamoDB Streams – Default 100. Max 10,000.
*
*
* -
*
* Amazon Simple Queue Service – Default 10. For standard queues the max is 10,000. For FIFO queues
* the max is 10.
*
*
* -
*
* Amazon Managed Streaming for Apache Kafka – Default 100. Max 10,000.
*
*
* -
*
* Self-managed Apache Kafka – Default 100. Max 10,000.
*
*
* -
*
* Amazon MQ (ActiveMQ and RabbitMQ) – Default 100. Max 10,000.
*
*
* -
*
* DocumentDB – Default 100. Max 10,000.
*
*
*/
public final Integer batchSize() {
return batchSize;
}
/**
*
* An object that defines the filter criteria that determine whether Lambda should process an event. For more
* information, see Lambda
* event filtering.
*
*
* @return An object that defines the filter criteria that determine whether Lambda should process an event. For
* more information, see Lambda event
* filtering.
*/
public final FilterCriteria filterCriteria() {
return filterCriteria;
}
/**
*
* The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You
* can configure MaximumBatchingWindowInSeconds
to any value from 0 seconds to 300 seconds in
* increments of seconds.
*
*
* For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK,
* Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note
* that because you can only change MaximumBatchingWindowInSeconds
in increments of seconds, you cannot
* revert back to the 500 ms default batching window after you have changed it. To restore the default batching
* window, you must create a new event source mapping.
*
*
* Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set BatchSize
to a
* value greater than 10, you must set MaximumBatchingWindowInSeconds
to at least 1.
*
*
* @return The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the
* function. You can configure MaximumBatchingWindowInSeconds
to any value from 0 seconds to
* 300 seconds in increments of seconds.
*
* For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon
* MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is
* 500 ms. Note that because you can only change MaximumBatchingWindowInSeconds
in increments
* of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To
* restore the default batching window, you must create a new event source mapping.
*
*
* Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set BatchSize
* to a value greater than 10, you must set MaximumBatchingWindowInSeconds
to at least 1.
*/
public final Integer maximumBatchingWindowInSeconds() {
return maximumBatchingWindowInSeconds;
}
/**
*
* (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only) A configuration object that specifies the
* destination of an event after Lambda processes it.
*
*
* @return (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only) A configuration object that
* specifies the destination of an event after Lambda processes it.
*/
public final DestinationConfig destinationConfig() {
return destinationConfig;
}
/**
*
* (Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is infinite
* (-1).
*
*
* @return (Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is
* infinite (-1).
*/
public final Integer maximumRecordAgeInSeconds() {
return maximumRecordAgeInSeconds;
}
/**
*
* (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.
*
*
* @return (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.
*/
public final Boolean bisectBatchOnFunctionError() {
return bisectBatchOnFunctionError;
}
/**
*
* (Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is
* infinite (-1). When set to infinite (-1), failed records are retried until the record expires.
*
*
* @return (Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default
* value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.
*/
public final Integer maximumRetryAttempts() {
return maximumRetryAttempts;
}
/**
*
* (Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.
*
*
* @return (Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.
*/
public final Integer parallelizationFactor() {
return parallelizationFactor;
}
/**
* 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 authentication protocols or VPC components required to secure 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 authentication protocols or VPC components required to secure your event source.
*/
public final List sourceAccessConfigurations() {
return sourceAccessConfigurations;
}
/**
*
* (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis
* Streams event sources. A value of 0 seconds indicates no tumbling window.
*
*
* @return (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and
* Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
*/
public final Integer tumblingWindowInSeconds() {
return tumblingWindowInSeconds;
}
/**
*
* (Kinesis, DynamoDB Streams, and Amazon SQS) 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 (Kinesis, DynamoDB Streams, and Amazon SQS) 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);
}
/**
*
* (Kinesis, DynamoDB Streams, and Amazon SQS) 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 (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type enums applied to the event
* source mapping.
*/
public final List functionResponseTypesAsStrings() {
return functionResponseTypes;
}
/**
*
* (Amazon SQS only) The scaling configuration for the event source. For more information, see Configuring maximum
* concurrency for Amazon SQS event sources.
*
*
* @return (Amazon SQS only) The scaling configuration for the event source. For more information, see Configuring
* maximum concurrency for Amazon SQS event sources.
*/
public final ScalingConfig scalingConfig() {
return scalingConfig;
}
/**
*
* Specific configuration settings for a DocumentDB event source.
*
*
* @return Specific configuration settings for a DocumentDB event source.
*/
public final DocumentDBEventSourceConfig documentDBEventSourceConfig() {
return documentDBEventSourceConfig;
}
/**
*
* The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter
* criteria. By default, Lambda does not encrypt your filter criteria object. Specify this property to encrypt
* data using your own customer managed key.
*
*
* @return The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your
* function's filter criteria. By default, Lambda does not encrypt your filter criteria object. Specify this
* property to encrypt data using your own customer managed key.
*/
public final String kmsKeyArn() {
return kmsKeyArn;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> 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(functionName());
hashCode = 31 * hashCode + Objects.hashCode(enabled());
hashCode = 31 * hashCode + Objects.hashCode(batchSize());
hashCode = 31 * hashCode + Objects.hashCode(filterCriteria());
hashCode = 31 * hashCode + Objects.hashCode(maximumBatchingWindowInSeconds());
hashCode = 31 * hashCode + Objects.hashCode(destinationConfig());
hashCode = 31 * hashCode + Objects.hashCode(maximumRecordAgeInSeconds());
hashCode = 31 * hashCode + Objects.hashCode(bisectBatchOnFunctionError());
hashCode = 31 * hashCode + Objects.hashCode(maximumRetryAttempts());
hashCode = 31 * hashCode + Objects.hashCode(parallelizationFactor());
hashCode = 31 * hashCode + Objects.hashCode(hasSourceAccessConfigurations() ? sourceAccessConfigurations() : null);
hashCode = 31 * hashCode + Objects.hashCode(tumblingWindowInSeconds());
hashCode = 31 * hashCode + Objects.hashCode(hasFunctionResponseTypes() ? functionResponseTypesAsStrings() : null);
hashCode = 31 * hashCode + Objects.hashCode(scalingConfig());
hashCode = 31 * hashCode + Objects.hashCode(documentDBEventSourceConfig());
hashCode = 31 * hashCode + Objects.hashCode(kmsKeyArn());
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 UpdateEventSourceMappingRequest)) {
return false;
}
UpdateEventSourceMappingRequest other = (UpdateEventSourceMappingRequest) obj;
return Objects.equals(uuid(), other.uuid()) && Objects.equals(functionName(), other.functionName())
&& Objects.equals(enabled(), other.enabled()) && Objects.equals(batchSize(), other.batchSize())
&& Objects.equals(filterCriteria(), other.filterCriteria())
&& Objects.equals(maximumBatchingWindowInSeconds(), other.maximumBatchingWindowInSeconds())
&& Objects.equals(destinationConfig(), other.destinationConfig())
&& Objects.equals(maximumRecordAgeInSeconds(), other.maximumRecordAgeInSeconds())
&& Objects.equals(bisectBatchOnFunctionError(), other.bisectBatchOnFunctionError())
&& Objects.equals(maximumRetryAttempts(), other.maximumRetryAttempts())
&& Objects.equals(parallelizationFactor(), other.parallelizationFactor())
&& hasSourceAccessConfigurations() == other.hasSourceAccessConfigurations()
&& Objects.equals(sourceAccessConfigurations(), other.sourceAccessConfigurations())
&& Objects.equals(tumblingWindowInSeconds(), other.tumblingWindowInSeconds())
&& hasFunctionResponseTypes() == other.hasFunctionResponseTypes()
&& Objects.equals(functionResponseTypesAsStrings(), other.functionResponseTypesAsStrings())
&& Objects.equals(scalingConfig(), other.scalingConfig())
&& Objects.equals(documentDBEventSourceConfig(), other.documentDBEventSourceConfig())
&& Objects.equals(kmsKeyArn(), other.kmsKeyArn());
}
/**
* 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("UpdateEventSourceMappingRequest").add("UUID", uuid()).add("FunctionName", functionName())
.add("Enabled", enabled()).add("BatchSize", batchSize()).add("FilterCriteria", filterCriteria())
.add("MaximumBatchingWindowInSeconds", maximumBatchingWindowInSeconds())
.add("DestinationConfig", destinationConfig()).add("MaximumRecordAgeInSeconds", maximumRecordAgeInSeconds())
.add("BisectBatchOnFunctionError", bisectBatchOnFunctionError())
.add("MaximumRetryAttempts", maximumRetryAttempts()).add("ParallelizationFactor", parallelizationFactor())
.add("SourceAccessConfigurations", hasSourceAccessConfigurations() ? sourceAccessConfigurations() : null)
.add("TumblingWindowInSeconds", tumblingWindowInSeconds())
.add("FunctionResponseTypes", hasFunctionResponseTypes() ? functionResponseTypesAsStrings() : null)
.add("ScalingConfig", scalingConfig()).add("DocumentDBEventSourceConfig", documentDBEventSourceConfig())
.add("KMSKeyArn", kmsKeyArn()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "UUID":
return Optional.ofNullable(clazz.cast(uuid()));
case "FunctionName":
return Optional.ofNullable(clazz.cast(functionName()));
case "Enabled":
return Optional.ofNullable(clazz.cast(enabled()));
case "BatchSize":
return Optional.ofNullable(clazz.cast(batchSize()));
case "FilterCriteria":
return Optional.ofNullable(clazz.cast(filterCriteria()));
case "MaximumBatchingWindowInSeconds":
return Optional.ofNullable(clazz.cast(maximumBatchingWindowInSeconds()));
case "DestinationConfig":
return Optional.ofNullable(clazz.cast(destinationConfig()));
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 "ParallelizationFactor":
return Optional.ofNullable(clazz.cast(parallelizationFactor()));
case "SourceAccessConfigurations":
return Optional.ofNullable(clazz.cast(sourceAccessConfigurations()));
case "TumblingWindowInSeconds":
return Optional.ofNullable(clazz.cast(tumblingWindowInSeconds()));
case "FunctionResponseTypes":
return Optional.ofNullable(clazz.cast(functionResponseTypesAsStrings()));
case "ScalingConfig":
return Optional.ofNullable(clazz.cast(scalingConfig()));
case "DocumentDBEventSourceConfig":
return Optional.ofNullable(clazz.cast(documentDBEventSourceConfig()));
case "KMSKeyArn":
return Optional.ofNullable(clazz.cast(kmsKeyArn()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function