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

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

Go to download

The AWS Java SDK for AWS Lambda module holds the client classes that are used for communicating with AWS Lambda Service

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

package software.amazon.awssdk.services.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 namemy-function. *

    *
  • *
  • *

    * Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function. *

    *
  • *
  • *

    * Partial ARN123456789012: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 namemy-function. *

    *
  • *
  • *

    * Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function. *

    *
  • *
  • *

    * Partial ARN123456789012: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 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 getter(Function g) { return obj -> g.apply((UpdateFunctionConfigurationRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends LambdaRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The name or ARN of the Lambda function. *

*

* Name formats *

*
    *
  • *

    * Function namemy-function. *

    *
  • *
  • *

    * Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function. *

    *
  • *
  • *

    * Partial ARN123456789012: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. *

* * @param functionName * The name or ARN of the Lambda function.

*

* Name formats *

*
    *
  • *

    * Function namemy-function. *

    *
  • *
  • *

    * Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function. *

    *
  • *
  • *

    * Partial ARN123456789012: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 Returns a reference to this object so that method calls can be chained together. */ Builder functionName(String functionName); /** *

* The Amazon Resource Name (ARN) of the function's execution role. *

* * @param role * The Amazon Resource Name (ARN) of the function's execution role. * @return Returns a reference to this object so that method calls can be chained together. */ Builder role(String 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. *

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

* A description of the function. *

* * @param description * A description of the function. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String 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. *

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

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

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

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

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

* When the {@link Consumer} completes, {@link VpcConfig.Builder#build()} is called immediately and its result * is passed to {@link #vpcConfig(VpcConfig)}. * * @param vpcConfig * a consumer that will call methods on {@link VpcConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #vpcConfig(VpcConfig) */ default Builder vpcConfig(Consumer vpcConfig) { return vpcConfig(VpcConfig.builder().applyMutation(vpcConfig).build()); } /** *

* Environment variables that are accessible from function code during execution. *

* * @param environment * Environment variables that are accessible from function code during execution. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environment(Environment environment); /** *

* Environment variables that are accessible from function code during execution. *

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

* When the {@link Consumer} completes, {@link Environment.Builder#build()} is called immediately and its result * is passed to {@link #environment(Environment)}. * * @param environment * a consumer that will call methods on {@link Environment.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #environment(Environment) */ default Builder environment(Consumer environment) { return environment(Environment.builder().applyMutation(environment).build()); } /** *

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

* * @param 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. * @see Runtime * @return Returns a reference to this object so that method calls can be chained together. * @see Runtime */ Builder runtime(String 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. *

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

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

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

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

* When the {@link Consumer} completes, {@link DeadLetterConfig.Builder#build()} is called immediately and its * result is passed to {@link #deadLetterConfig(DeadLetterConfig)}. * * @param deadLetterConfig * a consumer that will call methods on {@link DeadLetterConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #deadLetterConfig(DeadLetterConfig) */ default Builder deadLetterConfig(Consumer deadLetterConfig) { return deadLetterConfig(DeadLetterConfig.builder().applyMutation(deadLetterConfig).build()); } /** *

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

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

* Set Mode to Active to sample and trace a subset of incoming requests with X-Ray. *

* * @param tracingConfig * Set Mode to Active to sample and trace a subset of incoming requests with X-Ray. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tracingConfig(TracingConfig tracingConfig); /** *

* Set Mode to Active to sample and trace a subset of incoming requests with X-Ray. *

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

* When the {@link Consumer} completes, {@link TracingConfig.Builder#build()} is called immediately and its * result is passed to {@link #tracingConfig(TracingConfig)}. * * @param tracingConfig * a consumer that will call methods on {@link TracingConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tracingConfig(TracingConfig) */ default Builder tracingConfig(Consumer tracingConfig) { return tracingConfig(TracingConfig.builder().applyMutation(tracingConfig).build()); } /** *

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

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

* A list of function * layers to add to the function's execution environment. Specify each layer by its ARN, including the * version. *

* * @param layers * A list of function * layers to add to the function's execution environment. Specify each layer by its ARN, including * the version. * @return Returns a reference to this object so that method calls can be chained together. */ Builder layers(Collection layers); /** *

* A list of function * layers to add to the function's execution environment. Specify each layer by its ARN, including the * version. *

* * @param layers * A list of function * layers to add to the function's execution environment. Specify each layer by its ARN, including * the version. * @return Returns a reference to this object so that method calls can be chained together. */ Builder layers(String... layers); /** *

* Connection settings for an Amazon EFS file system. *

* * @param fileSystemConfigs * Connection settings for an Amazon EFS file system. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fileSystemConfigs(Collection fileSystemConfigs); /** *

* Connection settings for an Amazon EFS file system. *

* * @param fileSystemConfigs * Connection settings for an Amazon EFS file system. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fileSystemConfigs(FileSystemConfig... fileSystemConfigs); /** *

* Connection settings for an Amazon EFS file system. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.lambda.model.FileSystemConfig.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.lambda.model.FileSystemConfig#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.lambda.model.FileSystemConfig.Builder#build()} is called immediately * and its result is passed to {@link #fileSystemConfigs(List)}. * * @param fileSystemConfigs * a consumer that will call methods on * {@link software.amazon.awssdk.services.lambda.model.FileSystemConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #fileSystemConfigs(java.util.Collection) */ Builder fileSystemConfigs(Consumer... fileSystemConfigs); /** *

* Container image * configuration values that override the values in the container image Docker file. *

* * @param imageConfig * Container image * configuration values that override the values in the container image Docker file. * @return Returns a reference to this object so that method calls can be chained together. */ Builder imageConfig(ImageConfig imageConfig); /** *

* Container image * configuration values that override the values in the container image Docker file. *

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

* When the {@link Consumer} completes, {@link ImageConfig.Builder#build()} is called immediately and its result * is passed to {@link #imageConfig(ImageConfig)}. * * @param imageConfig * a consumer that will call methods on {@link ImageConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #imageConfig(ImageConfig) */ default Builder imageConfig(Consumer imageConfig) { return imageConfig(ImageConfig.builder().applyMutation(imageConfig).build()); } /** *

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

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

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

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

* When the {@link Consumer} completes, {@link EphemeralStorage.Builder#build()} is called immediately and its * result is passed to {@link #ephemeralStorage(EphemeralStorage)}. * * @param ephemeralStorage * a consumer that will call methods on {@link EphemeralStorage.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #ephemeralStorage(EphemeralStorage) */ default Builder ephemeralStorage(Consumer ephemeralStorage) { return ephemeralStorage(EphemeralStorage.builder().applyMutation(ephemeralStorage).build()); } /** *

* The function's SnapStart setting. *

* * @param snapStart * The function's SnapStart * setting. * @return Returns a reference to this object so that method calls can be chained together. */ Builder snapStart(SnapStart snapStart); /** *

* The function's SnapStart setting. *

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

* When the {@link Consumer} completes, {@link SnapStart.Builder#build()} is called immediately and its result * is passed to {@link #snapStart(SnapStart)}. * * @param snapStart * a consumer that will call methods on {@link SnapStart.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #snapStart(SnapStart) */ default Builder snapStart(Consumer snapStart) { return snapStart(SnapStart.builder().applyMutation(snapStart).build()); } /** *

* The function's Amazon CloudWatch Logs configuration settings. *

* * @param loggingConfig * The function's Amazon CloudWatch Logs configuration settings. * @return Returns a reference to this object so that method calls can be chained together. */ Builder loggingConfig(LoggingConfig loggingConfig); /** *

* The function's Amazon CloudWatch Logs configuration settings. *

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

* When the {@link Consumer} completes, {@link LoggingConfig.Builder#build()} is called immediately and its * result is passed to {@link #loggingConfig(LoggingConfig)}. * * @param loggingConfig * a consumer that will call methods on {@link LoggingConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #loggingConfig(LoggingConfig) */ default Builder loggingConfig(Consumer loggingConfig) { return loggingConfig(LoggingConfig.builder().applyMutation(loggingConfig).build()); } @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends LambdaRequest.BuilderImpl implements Builder { private String functionName; private String role; private String handler; private String description; private Integer timeout; private Integer memorySize; private VpcConfig vpcConfig; private Environment environment; private String runtime; private DeadLetterConfig deadLetterConfig; private String kmsKeyArn; private TracingConfig tracingConfig; private String revisionId; private List layers = DefaultSdkAutoConstructList.getInstance(); private List fileSystemConfigs = DefaultSdkAutoConstructList.getInstance(); private ImageConfig imageConfig; private EphemeralStorage ephemeralStorage; private SnapStart snapStart; private LoggingConfig loggingConfig; private BuilderImpl() { } private BuilderImpl(UpdateFunctionConfigurationRequest model) { super(model); functionName(model.functionName); role(model.role); handler(model.handler); description(model.description); timeout(model.timeout); memorySize(model.memorySize); vpcConfig(model.vpcConfig); environment(model.environment); runtime(model.runtime); deadLetterConfig(model.deadLetterConfig); kmsKeyArn(model.kmsKeyArn); tracingConfig(model.tracingConfig); revisionId(model.revisionId); layers(model.layers); fileSystemConfigs(model.fileSystemConfigs); imageConfig(model.imageConfig); ephemeralStorage(model.ephemeralStorage); snapStart(model.snapStart); loggingConfig(model.loggingConfig); } public final String getFunctionName() { return functionName; } public final void setFunctionName(String functionName) { this.functionName = functionName; } @Override public final Builder functionName(String functionName) { this.functionName = functionName; return this; } public final String getRole() { return role; } public final void setRole(String role) { this.role = role; } @Override public final Builder role(String role) { this.role = role; return this; } public final String getHandler() { return handler; } public final void setHandler(String handler) { this.handler = handler; } @Override public final Builder handler(String handler) { this.handler = handler; return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override public final Builder description(String description) { this.description = description; return this; } public final Integer getTimeout() { return timeout; } public final void setTimeout(Integer timeout) { this.timeout = timeout; } @Override public final Builder timeout(Integer timeout) { this.timeout = timeout; return this; } public final Integer getMemorySize() { return memorySize; } public final void setMemorySize(Integer memorySize) { this.memorySize = memorySize; } @Override public final Builder memorySize(Integer memorySize) { this.memorySize = memorySize; return this; } public final VpcConfig.Builder getVpcConfig() { return vpcConfig != null ? vpcConfig.toBuilder() : null; } public final void setVpcConfig(VpcConfig.BuilderImpl vpcConfig) { this.vpcConfig = vpcConfig != null ? vpcConfig.build() : null; } @Override public final Builder vpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; return this; } public final Environment.Builder getEnvironment() { return environment != null ? environment.toBuilder() : null; } public final void setEnvironment(Environment.BuilderImpl environment) { this.environment = environment != null ? environment.build() : null; } @Override public final Builder environment(Environment environment) { this.environment = environment; return this; } public final String getRuntime() { return runtime; } public final void setRuntime(String runtime) { this.runtime = runtime; } @Override public final Builder runtime(String runtime) { this.runtime = runtime; return this; } @Override public final Builder runtime(Runtime runtime) { this.runtime(runtime == null ? null : runtime.toString()); return this; } public final DeadLetterConfig.Builder getDeadLetterConfig() { return deadLetterConfig != null ? deadLetterConfig.toBuilder() : null; } public final void setDeadLetterConfig(DeadLetterConfig.BuilderImpl deadLetterConfig) { this.deadLetterConfig = deadLetterConfig != null ? deadLetterConfig.build() : null; } @Override public final Builder deadLetterConfig(DeadLetterConfig deadLetterConfig) { this.deadLetterConfig = deadLetterConfig; return this; } public final String getKmsKeyArn() { return kmsKeyArn; } public final void setKmsKeyArn(String kmsKeyArn) { this.kmsKeyArn = kmsKeyArn; } @Override public final Builder kmsKeyArn(String kmsKeyArn) { this.kmsKeyArn = kmsKeyArn; return this; } public final TracingConfig.Builder getTracingConfig() { return tracingConfig != null ? tracingConfig.toBuilder() : null; } public final void setTracingConfig(TracingConfig.BuilderImpl tracingConfig) { this.tracingConfig = tracingConfig != null ? tracingConfig.build() : null; } @Override public final Builder tracingConfig(TracingConfig tracingConfig) { this.tracingConfig = tracingConfig; return this; } public final String getRevisionId() { return revisionId; } public final void setRevisionId(String revisionId) { this.revisionId = revisionId; } @Override public final Builder revisionId(String revisionId) { this.revisionId = revisionId; return this; } public final Collection getLayers() { if (layers instanceof SdkAutoConstructList) { return null; } return layers; } public final void setLayers(Collection layers) { this.layers = LayerListCopier.copy(layers); } @Override public final Builder layers(Collection layers) { this.layers = LayerListCopier.copy(layers); return this; } @Override @SafeVarargs public final Builder layers(String... layers) { layers(Arrays.asList(layers)); return this; } public final List getFileSystemConfigs() { List result = FileSystemConfigListCopier.copyToBuilder(this.fileSystemConfigs); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setFileSystemConfigs(Collection fileSystemConfigs) { this.fileSystemConfigs = FileSystemConfigListCopier.copyFromBuilder(fileSystemConfigs); } @Override public final Builder fileSystemConfigs(Collection fileSystemConfigs) { this.fileSystemConfigs = FileSystemConfigListCopier.copy(fileSystemConfigs); return this; } @Override @SafeVarargs public final Builder fileSystemConfigs(FileSystemConfig... fileSystemConfigs) { fileSystemConfigs(Arrays.asList(fileSystemConfigs)); return this; } @Override @SafeVarargs public final Builder fileSystemConfigs(Consumer... fileSystemConfigs) { fileSystemConfigs(Stream.of(fileSystemConfigs).map(c -> FileSystemConfig.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final ImageConfig.Builder getImageConfig() { return imageConfig != null ? imageConfig.toBuilder() : null; } public final void setImageConfig(ImageConfig.BuilderImpl imageConfig) { this.imageConfig = imageConfig != null ? imageConfig.build() : null; } @Override public final Builder imageConfig(ImageConfig imageConfig) { this.imageConfig = imageConfig; return this; } public final EphemeralStorage.Builder getEphemeralStorage() { return ephemeralStorage != null ? ephemeralStorage.toBuilder() : null; } public final void setEphemeralStorage(EphemeralStorage.BuilderImpl ephemeralStorage) { this.ephemeralStorage = ephemeralStorage != null ? ephemeralStorage.build() : null; } @Override public final Builder ephemeralStorage(EphemeralStorage ephemeralStorage) { this.ephemeralStorage = ephemeralStorage; return this; } public final SnapStart.Builder getSnapStart() { return snapStart != null ? snapStart.toBuilder() : null; } public final void setSnapStart(SnapStart.BuilderImpl snapStart) { this.snapStart = snapStart != null ? snapStart.build() : null; } @Override public final Builder snapStart(SnapStart snapStart) { this.snapStart = snapStart; return this; } public final LoggingConfig.Builder getLoggingConfig() { return loggingConfig != null ? loggingConfig.toBuilder() : null; } public final void setLoggingConfig(LoggingConfig.BuilderImpl loggingConfig) { this.loggingConfig = loggingConfig != null ? loggingConfig.build() : null; } @Override public final Builder loggingConfig(LoggingConfig loggingConfig) { this.loggingConfig = loggingConfig; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public UpdateFunctionConfigurationRequest build() { return new UpdateFunctionConfigurationRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy