software.amazon.awssdk.services.lambda.model.UpdateFunctionConfigurationRequest 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.HashMap;
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 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 UpdateFunctionConfigurationRequest extends LambdaRequest implements
ToCopyableBuilder {
private static final SdkField FUNCTION_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FunctionName").getter(getter(UpdateFunctionConfigurationRequest::functionName))
.setter(setter(Builder::functionName))
.traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("FunctionName").build()).build();
private static final SdkField ROLE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Role")
.getter(getter(UpdateFunctionConfigurationRequest::role)).setter(setter(Builder::role))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Role").build()).build();
private static final SdkField HANDLER_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Handler")
.getter(getter(UpdateFunctionConfigurationRequest::handler)).setter(setter(Builder::handler))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Handler").build()).build();
private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Description").getter(getter(UpdateFunctionConfigurationRequest::description))
.setter(setter(Builder::description))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build();
private static final SdkField TIMEOUT_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("Timeout").getter(getter(UpdateFunctionConfigurationRequest::timeout)).setter(setter(Builder::timeout))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Timeout").build()).build();
private static final SdkField MEMORY_SIZE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("MemorySize").getter(getter(UpdateFunctionConfigurationRequest::memorySize))
.setter(setter(Builder::memorySize))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MemorySize").build()).build();
private static final SdkField VPC_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("VpcConfig").getter(getter(UpdateFunctionConfigurationRequest::vpcConfig))
.setter(setter(Builder::vpcConfig)).constructor(VpcConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcConfig").build()).build();
private static final SdkField ENVIRONMENT_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Environment").getter(getter(UpdateFunctionConfigurationRequest::environment))
.setter(setter(Builder::environment)).constructor(Environment::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Environment").build()).build();
private static final SdkField RUNTIME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Runtime")
.getter(getter(UpdateFunctionConfigurationRequest::runtimeAsString)).setter(setter(Builder::runtime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Runtime").build()).build();
private static final SdkField DEAD_LETTER_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("DeadLetterConfig")
.getter(getter(UpdateFunctionConfigurationRequest::deadLetterConfig)).setter(setter(Builder::deadLetterConfig))
.constructor(DeadLetterConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DeadLetterConfig").build()).build();
private static final SdkField KMS_KEY_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("KMSKeyArn").getter(getter(UpdateFunctionConfigurationRequest::kmsKeyArn))
.setter(setter(Builder::kmsKeyArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KMSKeyArn").build()).build();
private static final SdkField TRACING_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("TracingConfig")
.getter(getter(UpdateFunctionConfigurationRequest::tracingConfig)).setter(setter(Builder::tracingConfig))
.constructor(TracingConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TracingConfig").build()).build();
private static final SdkField REVISION_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RevisionId").getter(getter(UpdateFunctionConfigurationRequest::revisionId))
.setter(setter(Builder::revisionId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RevisionId").build()).build();
private static final SdkField> LAYERS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Layers")
.getter(getter(UpdateFunctionConfigurationRequest::layers))
.setter(setter(Builder::layers))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Layers").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> FILE_SYSTEM_CONFIGS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("FileSystemConfigs")
.getter(getter(UpdateFunctionConfigurationRequest::fileSystemConfigs))
.setter(setter(Builder::fileSystemConfigs))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FileSystemConfigs").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(FileSystemConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField IMAGE_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("ImageConfig").getter(getter(UpdateFunctionConfigurationRequest::imageConfig))
.setter(setter(Builder::imageConfig)).constructor(ImageConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImageConfig").build()).build();
private static final SdkField EPHEMERAL_STORAGE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("EphemeralStorage")
.getter(getter(UpdateFunctionConfigurationRequest::ephemeralStorage)).setter(setter(Builder::ephemeralStorage))
.constructor(EphemeralStorage::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EphemeralStorage").build()).build();
private static final SdkField SNAP_START_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("SnapStart").getter(getter(UpdateFunctionConfigurationRequest::snapStart))
.setter(setter(Builder::snapStart)).constructor(SnapStart::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnapStart").build()).build();
private static final SdkField LOGGING_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("LoggingConfig")
.getter(getter(UpdateFunctionConfigurationRequest::loggingConfig)).setter(setter(Builder::loggingConfig))
.constructor(LoggingConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LoggingConfig").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(FUNCTION_NAME_FIELD,
ROLE_FIELD, HANDLER_FIELD, DESCRIPTION_FIELD, TIMEOUT_FIELD, MEMORY_SIZE_FIELD, VPC_CONFIG_FIELD, ENVIRONMENT_FIELD,
RUNTIME_FIELD, DEAD_LETTER_CONFIG_FIELD, KMS_KEY_ARN_FIELD, TRACING_CONFIG_FIELD, REVISION_ID_FIELD, LAYERS_FIELD,
FILE_SYSTEM_CONFIGS_FIELD, IMAGE_CONFIG_FIELD, EPHEMERAL_STORAGE_FIELD, SNAP_START_FIELD, LOGGING_CONFIG_FIELD));
private static final Map> SDK_NAME_TO_FIELD = Collections
.unmodifiableMap(new HashMap>() {
{
put("FunctionName", FUNCTION_NAME_FIELD);
put("Role", ROLE_FIELD);
put("Handler", HANDLER_FIELD);
put("Description", DESCRIPTION_FIELD);
put("Timeout", TIMEOUT_FIELD);
put("MemorySize", MEMORY_SIZE_FIELD);
put("VpcConfig", VPC_CONFIG_FIELD);
put("Environment", ENVIRONMENT_FIELD);
put("Runtime", RUNTIME_FIELD);
put("DeadLetterConfig", DEAD_LETTER_CONFIG_FIELD);
put("KMSKeyArn", KMS_KEY_ARN_FIELD);
put("TracingConfig", TRACING_CONFIG_FIELD);
put("RevisionId", REVISION_ID_FIELD);
put("Layers", LAYERS_FIELD);
put("FileSystemConfigs", FILE_SYSTEM_CONFIGS_FIELD);
put("ImageConfig", IMAGE_CONFIG_FIELD);
put("EphemeralStorage", EPHEMERAL_STORAGE_FIELD);
put("SnapStart", SNAP_START_FIELD);
put("LoggingConfig", LOGGING_CONFIG_FIELD);
}
});
private final String functionName;
private final String role;
private final String handler;
private final String description;
private final Integer timeout;
private final Integer memorySize;
private final VpcConfig vpcConfig;
private final Environment environment;
private final String runtime;
private final DeadLetterConfig deadLetterConfig;
private final String kmsKeyArn;
private final TracingConfig tracingConfig;
private final String revisionId;
private final List layers;
private final List fileSystemConfigs;
private final ImageConfig imageConfig;
private final EphemeralStorage ephemeralStorage;
private final SnapStart snapStart;
private final LoggingConfig loggingConfig;
private UpdateFunctionConfigurationRequest(BuilderImpl builder) {
super(builder);
this.functionName = builder.functionName;
this.role = builder.role;
this.handler = builder.handler;
this.description = builder.description;
this.timeout = builder.timeout;
this.memorySize = builder.memorySize;
this.vpcConfig = builder.vpcConfig;
this.environment = builder.environment;
this.runtime = builder.runtime;
this.deadLetterConfig = builder.deadLetterConfig;
this.kmsKeyArn = builder.kmsKeyArn;
this.tracingConfig = builder.tracingConfig;
this.revisionId = builder.revisionId;
this.layers = builder.layers;
this.fileSystemConfigs = builder.fileSystemConfigs;
this.imageConfig = builder.imageConfig;
this.ephemeralStorage = builder.ephemeralStorage;
this.snapStart = builder.snapStart;
this.loggingConfig = builder.loggingConfig;
}
/**
*
* The name or ARN of the Lambda function.
*
*
* Name formats
*
*
* -
*
* Function name – my-function
.
*
*
* -
*
* Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function
.
*
*
* -
*
* Partial ARN – 123456789012:function:my-function
.
*
*
*
*
* The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64
* characters in length.
*
*
* @return The name or ARN of the Lambda function.
*
* Name formats
*
*
* -
*
* Function name – my-function
.
*
*
* -
*
* Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function
.
*
*
* -
*
* Partial ARN – 123456789012:function:my-function
.
*
*
*
*
* The length constraint applies only to the full ARN. If you specify only the function name, it is limited
* to 64 characters in length.
*/
public final String functionName() {
return functionName;
}
/**
*
* The Amazon Resource Name (ARN) of the function's execution role.
*
*
* @return The Amazon Resource Name (ARN) of the function's execution role.
*/
public final String role() {
return role;
}
/**
*
* The name of the method within your code that Lambda calls to run your function. Handler is required if the
* deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and
* other qualifiers, depending on the runtime. For more information, see Lambda programming model.
*
*
* @return The name of the method within your code that Lambda calls to run your function. Handler is required if
* the deployment package is a .zip file archive. The format includes the file name. It can also include
* namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming
* model.
*/
public final String handler() {
return handler;
}
/**
*
* A description of the function.
*
*
* @return A description of the function.
*/
public final String description() {
return description;
}
/**
*
* The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3
* seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.
*
*
* @return The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3
* seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution
* environment.
*/
public final Integer timeout() {
return timeout;
}
/**
*
* The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU
* allocation. The default value is 128 MB. The value can be any multiple of 1 MB.
*
*
* @return The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU
* allocation. The default value is 128 MB. The value can be any multiple of 1 MB.
*/
public final Integer memorySize() {
return memorySize;
}
/**
*
* For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets
* in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC.
* For more information, see Configuring a Lambda function to
* access resources in a VPC.
*
*
* @return For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and
* subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only
* through that VPC. For more information, see Configuring a Lambda function
* to access resources in a VPC.
*/
public final VpcConfig vpcConfig() {
return vpcConfig;
}
/**
*
* Environment variables that are accessible from function code during execution.
*
*
* @return Environment variables that are accessible from function code during execution.
*/
public final Environment environment() {
return environment;
}
/**
*
* The identifier of the function's
* runtime. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results
* in an error if you're deploying a function using a container image.
*
*
* The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing
* functions shortly after each runtime is deprecated. For more information, see Runtime use
* after deprecation.
*
*
* For a list of all currently supported runtimes, see Supported
* runtimes.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #runtime} will
* return {@link Runtime#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #runtimeAsString}.
*
*
* @return The identifier of the function's runtime. Runtime is
* required if the deployment package is a .zip file archive. Specifying a runtime results in an error if
* you're deploying a function using a container image.
*
* The following list includes deprecated runtimes. Lambda blocks creating new functions and updating
* existing functions shortly after each runtime is deprecated. For more information, see Runtime use after deprecation.
*
*
* For a list of all currently supported runtimes, see Supported
* runtimes.
* @see Runtime
*/
public final Runtime runtime() {
return Runtime.fromValue(runtime);
}
/**
*
* The identifier of the function's
* runtime. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results
* in an error if you're deploying a function using a container image.
*
*
* The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing
* functions shortly after each runtime is deprecated. For more information, see Runtime use
* after deprecation.
*
*
* For a list of all currently supported runtimes, see Supported
* runtimes.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #runtime} will
* return {@link Runtime#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #runtimeAsString}.
*
*
* @return The identifier of the function's runtime. Runtime is
* required if the deployment package is a .zip file archive. Specifying a runtime results in an error if
* you're deploying a function using a container image.
*
* The following list includes deprecated runtimes. Lambda blocks creating new functions and updating
* existing functions shortly after each runtime is deprecated. For more information, see Runtime use after deprecation.
*
*
* For a list of all currently supported runtimes, see Supported
* runtimes.
* @see Runtime
*/
public final String runtimeAsString() {
return runtime;
}
/**
*
* A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when
* they fail processing. For more information, see Dead-letter queues.
*
*
* @return A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous
* events when they fail processing. For more information, see Dead-letter
* queues.
*/
public final DeadLetterConfig deadLetterConfig() {
return deadLetterConfig;
}
/**
*
* The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:
*
*
* -
*
* The function's environment variables.
*
*
* -
*
* The function's Lambda
* SnapStart snapshots.
*
*
* -
*
* When used with SourceKMSKeyArn
, the unzipped version of the .zip deployment package that's used for
* function invocations. For more information, see
* Specifying a customer managed key for Lambda.
*
*
* -
*
* The optimized version of the container image that's used for function invocations. Note that this is not the same
* key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more
* information, see Function lifecycle.
*
*
*
*
* If you don't provide a customer managed key, Lambda uses an Amazon Web Services
* owned key or an Amazon Web Services
* managed key.
*
*
* @return The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following
* resources:
*
* -
*
* The function's environment variables.
*
*
* -
*
* The function's Lambda
* SnapStart snapshots.
*
*
* -
*
* When used with SourceKMSKeyArn
, the unzipped version of the .zip deployment package that's
* used for function invocations. For more information, see
* Specifying a customer managed key for Lambda.
*
*
* -
*
* The optimized version of the container image that's used for function invocations. Note that this is not
* the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon
* ECR). For more information, see Function
* lifecycle.
*
*
*
*
* If you don't provide a customer managed key, Lambda uses an Amazon Web
* Services owned key or an Amazon Web
* Services managed key.
*/
public final String kmsKeyArn() {
return kmsKeyArn;
}
/**
*
* Set Mode
to Active
to sample and trace a subset of incoming requests with X-Ray.
*
*
* @return Set Mode
to Active
to sample and trace a subset of incoming requests with X-Ray.
*/
public final TracingConfig tracingConfig() {
return tracingConfig;
}
/**
*
* Update the function only if the revision ID matches the ID that's specified. Use this option to avoid modifying a
* function that has changed since you last read it.
*
*
* @return Update the function only if the revision ID matches the ID that's specified. Use this option to avoid
* modifying a function that has changed since you last read it.
*/
public final String revisionId() {
return revisionId;
}
/**
* For responses, this returns true if the service returned a value for the Layers 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 hasLayers() {
return layers != null && !(layers instanceof SdkAutoConstructList);
}
/**
*
* A list of function layers to
* add to the function's execution environment. Specify each layer by its ARN, including the version.
*
*
* 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 #hasLayers} method.
*
*
* @return A list of function
* layers to add to the function's execution environment. Specify each layer by its ARN, including the
* version.
*/
public final List layers() {
return layers;
}
/**
* For responses, this returns true if the service returned a value for the FileSystemConfigs 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 hasFileSystemConfigs() {
return fileSystemConfigs != null && !(fileSystemConfigs instanceof SdkAutoConstructList);
}
/**
*
* Connection settings for an Amazon EFS file system.
*
*
* 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 #hasFileSystemConfigs} method.
*
*
* @return Connection settings for an Amazon EFS file system.
*/
public final List fileSystemConfigs() {
return fileSystemConfigs;
}
/**
*
* Container image
* configuration values that override the values in the container image Docker file.
*
*
* @return Container image
* configuration values that override the values in the container image Docker file.
*/
public final ImageConfig imageConfig() {
return imageConfig;
}
/**
*
* The size of the function's /tmp
directory in MB. The default value is 512, but can be any whole
* number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).
*
*
* @return The size of the function's /tmp
directory in MB. The default value is 512, but can be any
* whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).
*/
public final EphemeralStorage ephemeralStorage() {
return ephemeralStorage;
}
/**
*
* The function's SnapStart setting.
*
*
* @return The function's SnapStart
* setting.
*/
public final SnapStart snapStart() {
return snapStart;
}
/**
*
* The function's Amazon CloudWatch Logs configuration settings.
*
*
* @return The function's Amazon CloudWatch Logs configuration settings.
*/
public final LoggingConfig loggingConfig() {
return loggingConfig;
}
@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(functionName());
hashCode = 31 * hashCode + Objects.hashCode(role());
hashCode = 31 * hashCode + Objects.hashCode(handler());
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(timeout());
hashCode = 31 * hashCode + Objects.hashCode(memorySize());
hashCode = 31 * hashCode + Objects.hashCode(vpcConfig());
hashCode = 31 * hashCode + Objects.hashCode(environment());
hashCode = 31 * hashCode + Objects.hashCode(runtimeAsString());
hashCode = 31 * hashCode + Objects.hashCode(deadLetterConfig());
hashCode = 31 * hashCode + Objects.hashCode(kmsKeyArn());
hashCode = 31 * hashCode + Objects.hashCode(tracingConfig());
hashCode = 31 * hashCode + Objects.hashCode(revisionId());
hashCode = 31 * hashCode + Objects.hashCode(hasLayers() ? layers() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasFileSystemConfigs() ? fileSystemConfigs() : null);
hashCode = 31 * hashCode + Objects.hashCode(imageConfig());
hashCode = 31 * hashCode + Objects.hashCode(ephemeralStorage());
hashCode = 31 * hashCode + Objects.hashCode(snapStart());
hashCode = 31 * hashCode + Objects.hashCode(loggingConfig());
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 UpdateFunctionConfigurationRequest)) {
return false;
}
UpdateFunctionConfigurationRequest other = (UpdateFunctionConfigurationRequest) obj;
return Objects.equals(functionName(), other.functionName()) && Objects.equals(role(), other.role())
&& Objects.equals(handler(), other.handler()) && Objects.equals(description(), other.description())
&& Objects.equals(timeout(), other.timeout()) && Objects.equals(memorySize(), other.memorySize())
&& Objects.equals(vpcConfig(), other.vpcConfig()) && Objects.equals(environment(), other.environment())
&& Objects.equals(runtimeAsString(), other.runtimeAsString())
&& Objects.equals(deadLetterConfig(), other.deadLetterConfig()) && Objects.equals(kmsKeyArn(), other.kmsKeyArn())
&& Objects.equals(tracingConfig(), other.tracingConfig()) && Objects.equals(revisionId(), other.revisionId())
&& hasLayers() == other.hasLayers() && Objects.equals(layers(), other.layers())
&& hasFileSystemConfigs() == other.hasFileSystemConfigs()
&& Objects.equals(fileSystemConfigs(), other.fileSystemConfigs())
&& Objects.equals(imageConfig(), other.imageConfig())
&& Objects.equals(ephemeralStorage(), other.ephemeralStorage()) && Objects.equals(snapStart(), other.snapStart())
&& Objects.equals(loggingConfig(), other.loggingConfig());
}
/**
* 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("UpdateFunctionConfigurationRequest").add("FunctionName", functionName()).add("Role", role())
.add("Handler", handler()).add("Description", description()).add("Timeout", timeout())
.add("MemorySize", memorySize()).add("VpcConfig", vpcConfig()).add("Environment", environment())
.add("Runtime", runtimeAsString()).add("DeadLetterConfig", deadLetterConfig()).add("KMSKeyArn", kmsKeyArn())
.add("TracingConfig", tracingConfig()).add("RevisionId", revisionId())
.add("Layers", hasLayers() ? layers() : null)
.add("FileSystemConfigs", hasFileSystemConfigs() ? fileSystemConfigs() : null).add("ImageConfig", imageConfig())
.add("EphemeralStorage", ephemeralStorage()).add("SnapStart", snapStart()).add("LoggingConfig", loggingConfig())
.build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "FunctionName":
return Optional.ofNullable(clazz.cast(functionName()));
case "Role":
return Optional.ofNullable(clazz.cast(role()));
case "Handler":
return Optional.ofNullable(clazz.cast(handler()));
case "Description":
return Optional.ofNullable(clazz.cast(description()));
case "Timeout":
return Optional.ofNullable(clazz.cast(timeout()));
case "MemorySize":
return Optional.ofNullable(clazz.cast(memorySize()));
case "VpcConfig":
return Optional.ofNullable(clazz.cast(vpcConfig()));
case "Environment":
return Optional.ofNullable(clazz.cast(environment()));
case "Runtime":
return Optional.ofNullable(clazz.cast(runtimeAsString()));
case "DeadLetterConfig":
return Optional.ofNullable(clazz.cast(deadLetterConfig()));
case "KMSKeyArn":
return Optional.ofNullable(clazz.cast(kmsKeyArn()));
case "TracingConfig":
return Optional.ofNullable(clazz.cast(tracingConfig()));
case "RevisionId":
return Optional.ofNullable(clazz.cast(revisionId()));
case "Layers":
return Optional.ofNullable(clazz.cast(layers()));
case "FileSystemConfigs":
return Optional.ofNullable(clazz.cast(fileSystemConfigs()));
case "ImageConfig":
return Optional.ofNullable(clazz.cast(imageConfig()));
case "EphemeralStorage":
return Optional.ofNullable(clazz.cast(ephemeralStorage()));
case "SnapStart":
return Optional.ofNullable(clazz.cast(snapStart()));
case "LoggingConfig":
return Optional.ofNullable(clazz.cast(loggingConfig()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
@Override
public final Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
private static Function