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

software.amazon.awssdk.services.lambda.model.UpdateFunctionCodeResponse 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

There is a newer version: 2.28.3
Show newest version
/*
 * Copyright 2013-2018 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.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* A Lambda function's configuration settings. *

*/ @Generated("software.amazon.awssdk:codegen") public final class UpdateFunctionCodeResponse extends LambdaResponse implements ToCopyableBuilder { private static final SdkField FUNCTION_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateFunctionCodeResponse::functionName)).setter(setter(Builder::functionName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FunctionName").build()).build(); private static final SdkField FUNCTION_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateFunctionCodeResponse::functionArn)).setter(setter(Builder::functionArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FunctionArn").build()).build(); private static final SdkField RUNTIME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateFunctionCodeResponse::runtimeAsString)).setter(setter(Builder::runtime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Runtime").build()).build(); private static final SdkField ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateFunctionCodeResponse::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) .getter(getter(UpdateFunctionCodeResponse::handler)).setter(setter(Builder::handler)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Handler").build()).build(); private static final SdkField CODE_SIZE_FIELD = SdkField. builder(MarshallingType.LONG) .getter(getter(UpdateFunctionCodeResponse::codeSize)).setter(setter(Builder::codeSize)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CodeSize").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateFunctionCodeResponse::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) .getter(getter(UpdateFunctionCodeResponse::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) .getter(getter(UpdateFunctionCodeResponse::memorySize)).setter(setter(Builder::memorySize)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MemorySize").build()).build(); private static final SdkField LAST_MODIFIED_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateFunctionCodeResponse::lastModified)).setter(setter(Builder::lastModified)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModified").build()).build(); private static final SdkField CODE_SHA256_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateFunctionCodeResponse::codeSha256)).setter(setter(Builder::codeSha256)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CodeSha256").build()).build(); private static final SdkField VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateFunctionCodeResponse::version)).setter(setter(Builder::version)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Version").build()).build(); private static final SdkField VPC_CONFIG_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(UpdateFunctionCodeResponse::vpcConfig)) .setter(setter(Builder::vpcConfig)).constructor(VpcConfigResponse::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcConfig").build()).build(); private static final SdkField DEAD_LETTER_CONFIG_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(UpdateFunctionCodeResponse::deadLetterConfig)) .setter(setter(Builder::deadLetterConfig)).constructor(DeadLetterConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DeadLetterConfig").build()).build(); private static final SdkField ENVIRONMENT_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(UpdateFunctionCodeResponse::environment)) .setter(setter(Builder::environment)).constructor(EnvironmentResponse::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Environment").build()).build(); private static final SdkField KMS_KEY_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateFunctionCodeResponse::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).getter(getter(UpdateFunctionCodeResponse::tracingConfig)) .setter(setter(Builder::tracingConfig)).constructor(TracingConfigResponse::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TracingConfig").build()).build(); private static final SdkField MASTER_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateFunctionCodeResponse::masterArn)).setter(setter(Builder::masterArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MasterArn").build()).build(); private static final SdkField REVISION_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(UpdateFunctionCodeResponse::revisionId)).setter(setter(Builder::revisionId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RevisionId").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(FUNCTION_NAME_FIELD, FUNCTION_ARN_FIELD, RUNTIME_FIELD, ROLE_FIELD, HANDLER_FIELD, CODE_SIZE_FIELD, DESCRIPTION_FIELD, TIMEOUT_FIELD, MEMORY_SIZE_FIELD, LAST_MODIFIED_FIELD, CODE_SHA256_FIELD, VERSION_FIELD, VPC_CONFIG_FIELD, DEAD_LETTER_CONFIG_FIELD, ENVIRONMENT_FIELD, KMS_KEY_ARN_FIELD, TRACING_CONFIG_FIELD, MASTER_ARN_FIELD, REVISION_ID_FIELD)); private final String functionName; private final String functionArn; private final String runtime; private final String role; private final String handler; private final Long codeSize; private final String description; private final Integer timeout; private final Integer memorySize; private final String lastModified; private final String codeSha256; private final String version; private final VpcConfigResponse vpcConfig; private final DeadLetterConfig deadLetterConfig; private final EnvironmentResponse environment; private final String kmsKeyArn; private final TracingConfigResponse tracingConfig; private final String masterArn; private final String revisionId; private UpdateFunctionCodeResponse(BuilderImpl builder) { super(builder); this.functionName = builder.functionName; this.functionArn = builder.functionArn; this.runtime = builder.runtime; this.role = builder.role; this.handler = builder.handler; this.codeSize = builder.codeSize; this.description = builder.description; this.timeout = builder.timeout; this.memorySize = builder.memorySize; this.lastModified = builder.lastModified; this.codeSha256 = builder.codeSha256; this.version = builder.version; this.vpcConfig = builder.vpcConfig; this.deadLetterConfig = builder.deadLetterConfig; this.environment = builder.environment; this.kmsKeyArn = builder.kmsKeyArn; this.tracingConfig = builder.tracingConfig; this.masterArn = builder.masterArn; this.revisionId = builder.revisionId; } /** *

* The name of the function. *

* * @return The name of the function. */ public String functionName() { return functionName; } /** *

* The function's Amazon Resource Name. *

* * @return The function's Amazon Resource Name. */ public String functionArn() { return functionArn; } /** *

* The runtime environment for the Lambda function. *

*

* 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 runtime environment for the Lambda function. * @see Runtime */ public Runtime runtime() { return Runtime.fromValue(runtime); } /** *

* The runtime environment for the Lambda function. *

*

* 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 runtime environment for the Lambda function. * @see Runtime */ public String runtimeAsString() { return runtime; } /** *

* The function's execution role. *

* * @return The function's execution role. */ public String role() { return role; } /** *

* The function Lambda calls to begin executing your function. *

* * @return The function Lambda calls to begin executing your function. */ public String handler() { return handler; } /** *

* The size of the function's deployment package in bytes. *

* * @return The size of the function's deployment package in bytes. */ public Long codeSize() { return codeSize; } /** *

* The function's description. *

* * @return The function's description. */ public String description() { return description; } /** *

* The amount of time that Lambda allows a function to run before terminating it. *

* * @return The amount of time that Lambda allows a function to run before terminating it. */ public Integer timeout() { return timeout; } /** *

* The memory allocated to the function *

* * @return The memory allocated to the function */ public Integer memorySize() { return memorySize; } /** *

* The date and time that the function was last updated, in ISO-8601 * format (YYYY-MM-DDThh:mm:ssTZD). *

* * @return The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ssTZD). */ public String lastModified() { return lastModified; } /** *

* The SHA256 hash of the function's deployment package. *

* * @return The SHA256 hash of the function's deployment package. */ public String codeSha256() { return codeSha256; } /** *

* The version of the Lambda function. *

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

* The function's networking configuration. *

* * @return The function's networking configuration. */ public VpcConfigResponse vpcConfig() { return vpcConfig; } /** *

* The function's dead letter queue. *

* * @return The function's dead letter queue. */ public DeadLetterConfig deadLetterConfig() { return deadLetterConfig; } /** *

* The function's environment variables. *

* * @return The function's environment variables. */ public EnvironmentResponse environment() { return environment; } /** *

* The KMS key used to encrypt the function's environment variables. Only returned if you've configured a customer * managed CMK. *

* * @return The KMS key used to encrypt the function's environment variables. Only returned if you've configured a * customer managed CMK. */ public String kmsKeyArn() { return kmsKeyArn; } /** *

* The function's AWS X-Ray tracing configuration. *

* * @return The function's AWS X-Ray tracing configuration. */ public TracingConfigResponse tracingConfig() { return tracingConfig; } /** *

* The ARN of the master function. *

* * @return The ARN of the master function. */ public String masterArn() { return masterArn; } /** *

* Represents the latest updated revision of the function or alias. *

* * @return Represents the latest updated revision of the function or alias. */ public String revisionId() { return revisionId; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(functionName()); hashCode = 31 * hashCode + Objects.hashCode(functionArn()); hashCode = 31 * hashCode + Objects.hashCode(runtimeAsString()); hashCode = 31 * hashCode + Objects.hashCode(role()); hashCode = 31 * hashCode + Objects.hashCode(handler()); hashCode = 31 * hashCode + Objects.hashCode(codeSize()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(timeout()); hashCode = 31 * hashCode + Objects.hashCode(memorySize()); hashCode = 31 * hashCode + Objects.hashCode(lastModified()); hashCode = 31 * hashCode + Objects.hashCode(codeSha256()); hashCode = 31 * hashCode + Objects.hashCode(version()); hashCode = 31 * hashCode + Objects.hashCode(vpcConfig()); hashCode = 31 * hashCode + Objects.hashCode(deadLetterConfig()); hashCode = 31 * hashCode + Objects.hashCode(environment()); hashCode = 31 * hashCode + Objects.hashCode(kmsKeyArn()); hashCode = 31 * hashCode + Objects.hashCode(tracingConfig()); hashCode = 31 * hashCode + Objects.hashCode(masterArn()); hashCode = 31 * hashCode + Objects.hashCode(revisionId()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof UpdateFunctionCodeResponse)) { return false; } UpdateFunctionCodeResponse other = (UpdateFunctionCodeResponse) obj; return Objects.equals(functionName(), other.functionName()) && Objects.equals(functionArn(), other.functionArn()) && Objects.equals(runtimeAsString(), other.runtimeAsString()) && Objects.equals(role(), other.role()) && Objects.equals(handler(), other.handler()) && Objects.equals(codeSize(), other.codeSize()) && Objects.equals(description(), other.description()) && Objects.equals(timeout(), other.timeout()) && Objects.equals(memorySize(), other.memorySize()) && Objects.equals(lastModified(), other.lastModified()) && Objects.equals(codeSha256(), other.codeSha256()) && Objects.equals(version(), other.version()) && Objects.equals(vpcConfig(), other.vpcConfig()) && Objects.equals(deadLetterConfig(), other.deadLetterConfig()) && Objects.equals(environment(), other.environment()) && Objects.equals(kmsKeyArn(), other.kmsKeyArn()) && Objects.equals(tracingConfig(), other.tracingConfig()) && Objects.equals(masterArn(), other.masterArn()) && Objects.equals(revisionId(), other.revisionId()); } @Override public String toString() { return ToString.builder("UpdateFunctionCodeResponse").add("FunctionName", functionName()) .add("FunctionArn", functionArn()).add("Runtime", runtimeAsString()).add("Role", role()) .add("Handler", handler()).add("CodeSize", codeSize()).add("Description", description()) .add("Timeout", timeout()).add("MemorySize", memorySize()).add("LastModified", lastModified()) .add("CodeSha256", codeSha256()).add("Version", version()).add("VpcConfig", vpcConfig()) .add("DeadLetterConfig", deadLetterConfig()).add("Environment", environment()).add("KMSKeyArn", kmsKeyArn()) .add("TracingConfig", tracingConfig()).add("MasterArn", masterArn()).add("RevisionId", revisionId()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "FunctionName": return Optional.ofNullable(clazz.cast(functionName())); case "FunctionArn": return Optional.ofNullable(clazz.cast(functionArn())); case "Runtime": return Optional.ofNullable(clazz.cast(runtimeAsString())); case "Role": return Optional.ofNullable(clazz.cast(role())); case "Handler": return Optional.ofNullable(clazz.cast(handler())); case "CodeSize": return Optional.ofNullable(clazz.cast(codeSize())); 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 "LastModified": return Optional.ofNullable(clazz.cast(lastModified())); case "CodeSha256": return Optional.ofNullable(clazz.cast(codeSha256())); case "Version": return Optional.ofNullable(clazz.cast(version())); case "VpcConfig": return Optional.ofNullable(clazz.cast(vpcConfig())); case "DeadLetterConfig": return Optional.ofNullable(clazz.cast(deadLetterConfig())); case "Environment": return Optional.ofNullable(clazz.cast(environment())); case "KMSKeyArn": return Optional.ofNullable(clazz.cast(kmsKeyArn())); case "TracingConfig": return Optional.ofNullable(clazz.cast(tracingConfig())); case "MasterArn": return Optional.ofNullable(clazz.cast(masterArn())); case "RevisionId": return Optional.ofNullable(clazz.cast(revisionId())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((UpdateFunctionCodeResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends LambdaResponse.Builder, SdkPojo, CopyableBuilder { /** *

* The name of the function. *

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

* The function's Amazon Resource Name. *

* * @param functionArn * The function's Amazon Resource Name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder functionArn(String functionArn); /** *

* The runtime environment for the Lambda function. *

* * @param runtime * The runtime environment for the Lambda function. * @see Runtime * @return Returns a reference to this object so that method calls can be chained together. * @see Runtime */ Builder runtime(String runtime); /** *

* The runtime environment for the Lambda function. *

* * @param runtime * The runtime environment for the Lambda function. * @see Runtime * @return Returns a reference to this object so that method calls can be chained together. * @see Runtime */ Builder runtime(Runtime runtime); /** *

* The function's execution role. *

* * @param role * 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 function Lambda calls to begin executing your function. *

* * @param handler * The function Lambda calls to begin executing your function. * @return Returns a reference to this object so that method calls can be chained together. */ Builder handler(String handler); /** *

* The size of the function's deployment package in bytes. *

* * @param codeSize * The size of the function's deployment package in bytes. * @return Returns a reference to this object so that method calls can be chained together. */ Builder codeSize(Long codeSize); /** *

* The function's description. *

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

* The amount of time that Lambda allows a function to run before terminating it. *

* * @param timeout * The amount of time that Lambda allows a function to run before terminating it. * @return Returns a reference to this object so that method calls can be chained together. */ Builder timeout(Integer timeout); /** *

* The memory allocated to the function *

* * @param memorySize * The memory allocated to the function * @return Returns a reference to this object so that method calls can be chained together. */ Builder memorySize(Integer memorySize); /** *

* The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ssTZD). *

* * @param lastModified * The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ssTZD). * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastModified(String lastModified); /** *

* The SHA256 hash of the function's deployment package. *

* * @param codeSha256 * The SHA256 hash of the function's deployment package. * @return Returns a reference to this object so that method calls can be chained together. */ Builder codeSha256(String codeSha256); /** *

* The version of the Lambda function. *

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

* The function's networking configuration. *

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

* The function's networking configuration. *

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

* The function's dead letter queue. *

* * @param deadLetterConfig * The function's dead letter queue. * @return Returns a reference to this object so that method calls can be chained together. */ Builder deadLetterConfig(DeadLetterConfig deadLetterConfig); /** *

* The function's dead letter queue. *

* This is a convenience 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 function's environment variables. *

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

* The function's environment variables. *

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

* The KMS key used to encrypt the function's environment variables. Only returned if you've configured a * customer managed CMK. *

* * @param kmsKeyArn * The KMS key used to encrypt the function's environment variables. Only returned if you've configured a * customer managed CMK. * @return Returns a reference to this object so that method calls can be chained together. */ Builder kmsKeyArn(String kmsKeyArn); /** *

* The function's AWS X-Ray tracing configuration. *

* * @param tracingConfig * The function's AWS X-Ray tracing configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tracingConfig(TracingConfigResponse tracingConfig); /** *

* The function's AWS X-Ray tracing configuration. *

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

* The ARN of the master function. *

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

* Represents the latest updated revision of the function or alias. *

* * @param revisionId * Represents the latest updated revision of the function or alias. * @return Returns a reference to this object so that method calls can be chained together. */ Builder revisionId(String revisionId); } static final class BuilderImpl extends LambdaResponse.BuilderImpl implements Builder { private String functionName; private String functionArn; private String runtime; private String role; private String handler; private Long codeSize; private String description; private Integer timeout; private Integer memorySize; private String lastModified; private String codeSha256; private String version; private VpcConfigResponse vpcConfig; private DeadLetterConfig deadLetterConfig; private EnvironmentResponse environment; private String kmsKeyArn; private TracingConfigResponse tracingConfig; private String masterArn; private String revisionId; private BuilderImpl() { } private BuilderImpl(UpdateFunctionCodeResponse model) { super(model); functionName(model.functionName); functionArn(model.functionArn); runtime(model.runtime); role(model.role); handler(model.handler); codeSize(model.codeSize); description(model.description); timeout(model.timeout); memorySize(model.memorySize); lastModified(model.lastModified); codeSha256(model.codeSha256); version(model.version); vpcConfig(model.vpcConfig); deadLetterConfig(model.deadLetterConfig); environment(model.environment); kmsKeyArn(model.kmsKeyArn); tracingConfig(model.tracingConfig); masterArn(model.masterArn); revisionId(model.revisionId); } public final String getFunctionName() { return functionName; } @Override public final Builder functionName(String functionName) { this.functionName = functionName; return this; } public final void setFunctionName(String functionName) { this.functionName = functionName; } public final String getFunctionArn() { return functionArn; } @Override public final Builder functionArn(String functionArn) { this.functionArn = functionArn; return this; } public final void setFunctionArn(String functionArn) { this.functionArn = functionArn; } public final String getRuntime() { return runtime; } @Override public final Builder runtime(String runtime) { this.runtime = runtime; return this; } @Override public final Builder runtime(Runtime runtime) { this.runtime(runtime.toString()); return this; } public final void setRuntime(String runtime) { this.runtime = runtime; } public final String getRole() { return role; } @Override public final Builder role(String role) { this.role = role; return this; } public final void setRole(String role) { this.role = role; } public final String getHandler() { return handler; } @Override public final Builder handler(String handler) { this.handler = handler; return this; } public final void setHandler(String handler) { this.handler = handler; } public final Long getCodeSize() { return codeSize; } @Override public final Builder codeSize(Long codeSize) { this.codeSize = codeSize; return this; } public final void setCodeSize(Long codeSize) { this.codeSize = codeSize; } public final String getDescription() { return description; } @Override public final Builder description(String description) { this.description = description; return this; } public final void setDescription(String description) { this.description = description; } public final Integer getTimeout() { return timeout; } @Override public final Builder timeout(Integer timeout) { this.timeout = timeout; return this; } public final void setTimeout(Integer timeout) { this.timeout = timeout; } public final Integer getMemorySize() { return memorySize; } @Override public final Builder memorySize(Integer memorySize) { this.memorySize = memorySize; return this; } public final void setMemorySize(Integer memorySize) { this.memorySize = memorySize; } public final String getLastModified() { return lastModified; } @Override public final Builder lastModified(String lastModified) { this.lastModified = lastModified; return this; } public final void setLastModified(String lastModified) { this.lastModified = lastModified; } public final String getCodeSha256() { return codeSha256; } @Override public final Builder codeSha256(String codeSha256) { this.codeSha256 = codeSha256; return this; } public final void setCodeSha256(String codeSha256) { this.codeSha256 = codeSha256; } public final String getVersion() { return version; } @Override public final Builder version(String version) { this.version = version; return this; } public final void setVersion(String version) { this.version = version; } public final VpcConfigResponse.Builder getVpcConfig() { return vpcConfig != null ? vpcConfig.toBuilder() : null; } @Override public final Builder vpcConfig(VpcConfigResponse vpcConfig) { this.vpcConfig = vpcConfig; return this; } public final void setVpcConfig(VpcConfigResponse.BuilderImpl vpcConfig) { this.vpcConfig = vpcConfig != null ? vpcConfig.build() : null; } public final DeadLetterConfig.Builder getDeadLetterConfig() { return deadLetterConfig != null ? deadLetterConfig.toBuilder() : null; } @Override public final Builder deadLetterConfig(DeadLetterConfig deadLetterConfig) { this.deadLetterConfig = deadLetterConfig; return this; } public final void setDeadLetterConfig(DeadLetterConfig.BuilderImpl deadLetterConfig) { this.deadLetterConfig = deadLetterConfig != null ? deadLetterConfig.build() : null; } public final EnvironmentResponse.Builder getEnvironment() { return environment != null ? environment.toBuilder() : null; } @Override public final Builder environment(EnvironmentResponse environment) { this.environment = environment; return this; } public final void setEnvironment(EnvironmentResponse.BuilderImpl environment) { this.environment = environment != null ? environment.build() : null; } public final String getKMSKeyArn() { return kmsKeyArn; } @Override public final Builder kmsKeyArn(String kmsKeyArn) { this.kmsKeyArn = kmsKeyArn; return this; } public final void setKMSKeyArn(String kmsKeyArn) { this.kmsKeyArn = kmsKeyArn; } public final TracingConfigResponse.Builder getTracingConfig() { return tracingConfig != null ? tracingConfig.toBuilder() : null; } @Override public final Builder tracingConfig(TracingConfigResponse tracingConfig) { this.tracingConfig = tracingConfig; return this; } public final void setTracingConfig(TracingConfigResponse.BuilderImpl tracingConfig) { this.tracingConfig = tracingConfig != null ? tracingConfig.build() : null; } public final String getMasterArn() { return masterArn; } @Override public final Builder masterArn(String masterArn) { this.masterArn = masterArn; return this; } public final void setMasterArn(String masterArn) { this.masterArn = masterArn; } public final String getRevisionId() { return revisionId; } @Override public final Builder revisionId(String revisionId) { this.revisionId = revisionId; return this; } public final void setRevisionId(String revisionId) { this.revisionId = revisionId; } @Override public UpdateFunctionCodeResponse build() { return new UpdateFunctionCodeResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy