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

software.amazon.awssdk.services.batch.model.ComputeEnvironmentDetail Maven / Gradle / Ivy

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

package software.amazon.awssdk.services.batch.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
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 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.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* An object representing an AWS Batch compute environment. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ComputeEnvironmentDetail implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField COMPUTE_ENVIRONMENT_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("computeEnvironmentName").getter(getter(ComputeEnvironmentDetail::computeEnvironmentName)) .setter(setter(Builder::computeEnvironmentName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("computeEnvironmentName").build()) .build(); private static final SdkField COMPUTE_ENVIRONMENT_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("computeEnvironmentArn").getter(getter(ComputeEnvironmentDetail::computeEnvironmentArn)) .setter(setter(Builder::computeEnvironmentArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("computeEnvironmentArn").build()) .build(); private static final SdkField ECS_CLUSTER_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ecsClusterArn").getter(getter(ComputeEnvironmentDetail::ecsClusterArn)) .setter(setter(Builder::ecsClusterArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ecsClusterArn").build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("tags") .getter(getter(ComputeEnvironmentDetail::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField TYPE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("type") .getter(getter(ComputeEnvironmentDetail::typeAsString)).setter(setter(Builder::type)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("type").build()).build(); private static final SdkField STATE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("state") .getter(getter(ComputeEnvironmentDetail::stateAsString)).setter(setter(Builder::state)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("state").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status") .getter(getter(ComputeEnvironmentDetail::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build(); private static final SdkField STATUS_REASON_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("statusReason").getter(getter(ComputeEnvironmentDetail::statusReason)) .setter(setter(Builder::statusReason)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("statusReason").build()).build(); private static final SdkField COMPUTE_RESOURCES_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("computeResources") .getter(getter(ComputeEnvironmentDetail::computeResources)).setter(setter(Builder::computeResources)) .constructor(ComputeResource::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("computeResources").build()).build(); private static final SdkField SERVICE_ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("serviceRole").getter(getter(ComputeEnvironmentDetail::serviceRole)).setter(setter(Builder::serviceRole)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serviceRole").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList( COMPUTE_ENVIRONMENT_NAME_FIELD, COMPUTE_ENVIRONMENT_ARN_FIELD, ECS_CLUSTER_ARN_FIELD, TAGS_FIELD, TYPE_FIELD, STATE_FIELD, STATUS_FIELD, STATUS_REASON_FIELD, COMPUTE_RESOURCES_FIELD, SERVICE_ROLE_FIELD)); private static final long serialVersionUID = 1L; private final String computeEnvironmentName; private final String computeEnvironmentArn; private final String ecsClusterArn; private final Map tags; private final String type; private final String state; private final String status; private final String statusReason; private final ComputeResource computeResources; private final String serviceRole; private ComputeEnvironmentDetail(BuilderImpl builder) { this.computeEnvironmentName = builder.computeEnvironmentName; this.computeEnvironmentArn = builder.computeEnvironmentArn; this.ecsClusterArn = builder.ecsClusterArn; this.tags = builder.tags; this.type = builder.type; this.state = builder.state; this.status = builder.status; this.statusReason = builder.statusReason; this.computeResources = builder.computeResources; this.serviceRole = builder.serviceRole; } /** *

* The name of the compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and * underscores are allowed. *

* * @return The name of the compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and * underscores are allowed. */ public final String computeEnvironmentName() { return computeEnvironmentName; } /** *

* The Amazon Resource Name (ARN) of the compute environment. *

* * @return The Amazon Resource Name (ARN) of the compute environment. */ public final String computeEnvironmentArn() { return computeEnvironmentArn; } /** *

* The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment. *

* * @return The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment. */ public final String ecsClusterArn() { return ecsClusterArn; } /** * Returns true if the Tags property was specified by the sender (it may be empty), or false if the sender did not * specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructMap); } /** *

* The tags applied to the compute environment. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* You can use {@link #hasTags()} to see if a value was sent in this field. *

* * @return The tags applied to the compute environment. */ public final Map tags() { return tags; } /** *

* The type of the compute environment: MANAGED or UNMANAGED. For more information, see Compute Environments in * the AWS Batch User Guide. *

*

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

* * @return The type of the compute environment: MANAGED or UNMANAGED. For more * information, see Compute * Environments in the AWS Batch User Guide. * @see CEType */ public final CEType type() { return CEType.fromValue(type); } /** *

* The type of the compute environment: MANAGED or UNMANAGED. For more information, see Compute Environments in * the AWS Batch User Guide. *

*

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

* * @return The type of the compute environment: MANAGED or UNMANAGED. For more * information, see Compute * Environments in the AWS Batch User Guide. * @see CEType */ public final String typeAsString() { return type; } /** *

* The state of the compute environment. The valid values are ENABLED or DISABLED. *

*

* If the state is ENABLED, then the AWS Batch scheduler can attempt to place jobs from an associated * job queue on the compute resources within the environment. If the compute environment is managed, then it can * scale its instances out or in automatically, based on the job queue demand. *

*

* If the state is DISABLED, then the AWS Batch scheduler doesn't attempt to place jobs within the * environment. Jobs in a STARTING or RUNNING state continue to progress normally. Managed * compute environments in the DISABLED state don't scale out. However, they scale in to * minvCpus value after instances become idle. *

*

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

* * @return The state of the compute environment. The valid values are ENABLED or DISABLED * .

*

* If the state is ENABLED, then the AWS Batch scheduler can attempt to place jobs from an * associated job queue on the compute resources within the environment. If the compute environment is * managed, then it can scale its instances out or in automatically, based on the job queue demand. *

*

* If the state is DISABLED, then the AWS Batch scheduler doesn't attempt to place jobs within * the environment. Jobs in a STARTING or RUNNING state continue to progress * normally. Managed compute environments in the DISABLED state don't scale out. However, they * scale in to minvCpus value after instances become idle. * @see CEState */ public final CEState state() { return CEState.fromValue(state); } /** *

* The state of the compute environment. The valid values are ENABLED or DISABLED. *

*

* If the state is ENABLED, then the AWS Batch scheduler can attempt to place jobs from an associated * job queue on the compute resources within the environment. If the compute environment is managed, then it can * scale its instances out or in automatically, based on the job queue demand. *

*

* If the state is DISABLED, then the AWS Batch scheduler doesn't attempt to place jobs within the * environment. Jobs in a STARTING or RUNNING state continue to progress normally. Managed * compute environments in the DISABLED state don't scale out. However, they scale in to * minvCpus value after instances become idle. *

*

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

* * @return The state of the compute environment. The valid values are ENABLED or DISABLED * .

*

* If the state is ENABLED, then the AWS Batch scheduler can attempt to place jobs from an * associated job queue on the compute resources within the environment. If the compute environment is * managed, then it can scale its instances out or in automatically, based on the job queue demand. *

*

* If the state is DISABLED, then the AWS Batch scheduler doesn't attempt to place jobs within * the environment. Jobs in a STARTING or RUNNING state continue to progress * normally. Managed compute environments in the DISABLED state don't scale out. However, they * scale in to minvCpus value after instances become idle. * @see CEState */ public final String stateAsString() { return state; } /** *

* The current status of the compute environment (for example, CREATING or VALID). *

*

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

* * @return The current status of the compute environment (for example, CREATING or VALID). * @see CEStatus */ public final CEStatus status() { return CEStatus.fromValue(status); } /** *

* The current status of the compute environment (for example, CREATING or VALID). *

*

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

* * @return The current status of the compute environment (for example, CREATING or VALID). * @see CEStatus */ public final String statusAsString() { return status; } /** *

* A short, human-readable string to provide additional details about the current status of the compute environment. *

* * @return A short, human-readable string to provide additional details about the current status of the compute * environment. */ public final String statusReason() { return statusReason; } /** *

* The compute resources defined for the compute environment. For more information, see Compute Environments in * the AWS Batch User Guide. *

* * @return The compute resources defined for the compute environment. For more information, see Compute * Environments in the AWS Batch User Guide. */ public final ComputeResource computeResources() { return computeResources; } /** *

* The service role associated with the compute environment that allows AWS Batch to make calls to AWS API * operations on your behalf. For more information, see AWS Batch service IAM role in * the AWS Batch User Guide. *

* * @return The service role associated with the compute environment that allows AWS Batch to make calls to AWS API * operations on your behalf. For more information, see AWS Batch service IAM * role in the AWS Batch User Guide. */ public final String serviceRole() { return serviceRole; } @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 + Objects.hashCode(computeEnvironmentName()); hashCode = 31 * hashCode + Objects.hashCode(computeEnvironmentArn()); hashCode = 31 * hashCode + Objects.hashCode(ecsClusterArn()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(typeAsString()); hashCode = 31 * hashCode + Objects.hashCode(stateAsString()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(statusReason()); hashCode = 31 * hashCode + Objects.hashCode(computeResources()); hashCode = 31 * hashCode + Objects.hashCode(serviceRole()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ComputeEnvironmentDetail)) { return false; } ComputeEnvironmentDetail other = (ComputeEnvironmentDetail) obj; return Objects.equals(computeEnvironmentName(), other.computeEnvironmentName()) && Objects.equals(computeEnvironmentArn(), other.computeEnvironmentArn()) && Objects.equals(ecsClusterArn(), other.ecsClusterArn()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(typeAsString(), other.typeAsString()) && Objects.equals(stateAsString(), other.stateAsString()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(statusReason(), other.statusReason()) && Objects.equals(computeResources(), other.computeResources()) && Objects.equals(serviceRole(), other.serviceRole()); } /** * 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("ComputeEnvironmentDetail").add("ComputeEnvironmentName", computeEnvironmentName()) .add("ComputeEnvironmentArn", computeEnvironmentArn()).add("EcsClusterArn", ecsClusterArn()) .add("Tags", hasTags() ? tags() : null).add("Type", typeAsString()).add("State", stateAsString()) .add("Status", statusAsString()).add("StatusReason", statusReason()).add("ComputeResources", computeResources()) .add("ServiceRole", serviceRole()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "computeEnvironmentName": return Optional.ofNullable(clazz.cast(computeEnvironmentName())); case "computeEnvironmentArn": return Optional.ofNullable(clazz.cast(computeEnvironmentArn())); case "ecsClusterArn": return Optional.ofNullable(clazz.cast(ecsClusterArn())); case "tags": return Optional.ofNullable(clazz.cast(tags())); case "type": return Optional.ofNullable(clazz.cast(typeAsString())); case "state": return Optional.ofNullable(clazz.cast(stateAsString())); case "status": return Optional.ofNullable(clazz.cast(statusAsString())); case "statusReason": return Optional.ofNullable(clazz.cast(statusReason())); case "computeResources": return Optional.ofNullable(clazz.cast(computeResources())); case "serviceRole": return Optional.ofNullable(clazz.cast(serviceRole())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ComputeEnvironmentDetail) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The name of the compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and * underscores are allowed. *

* * @param computeEnvironmentName * The name of the compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, * and underscores are allowed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder computeEnvironmentName(String computeEnvironmentName); /** *

* The Amazon Resource Name (ARN) of the compute environment. *

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

* The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment. *

* * @param ecsClusterArn * The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ecsClusterArn(String ecsClusterArn); /** *

* The tags applied to the compute environment. *

* * @param tags * The tags applied to the compute environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Map tags); /** *

* The type of the compute environment: MANAGED or UNMANAGED. For more information, * see Compute * Environments in the AWS Batch User Guide. *

* * @param type * The type of the compute environment: MANAGED or UNMANAGED. For more * information, see Compute * Environments in the AWS Batch User Guide. * @see CEType * @return Returns a reference to this object so that method calls can be chained together. * @see CEType */ Builder type(String type); /** *

* The type of the compute environment: MANAGED or UNMANAGED. For more information, * see Compute * Environments in the AWS Batch User Guide. *

* * @param type * The type of the compute environment: MANAGED or UNMANAGED. For more * information, see Compute * Environments in the AWS Batch User Guide. * @see CEType * @return Returns a reference to this object so that method calls can be chained together. * @see CEType */ Builder type(CEType type); /** *

* The state of the compute environment. The valid values are ENABLED or DISABLED. *

*

* If the state is ENABLED, then the AWS Batch scheduler can attempt to place jobs from an * associated job queue on the compute resources within the environment. If the compute environment is managed, * then it can scale its instances out or in automatically, based on the job queue demand. *

*

* If the state is DISABLED, then the AWS Batch scheduler doesn't attempt to place jobs within the * environment. Jobs in a STARTING or RUNNING state continue to progress normally. * Managed compute environments in the DISABLED state don't scale out. However, they scale in to * minvCpus value after instances become idle. *

* * @param state * The state of the compute environment. The valid values are ENABLED or * DISABLED.

*

* If the state is ENABLED, then the AWS Batch scheduler can attempt to place jobs from an * associated job queue on the compute resources within the environment. If the compute environment is * managed, then it can scale its instances out or in automatically, based on the job queue demand. *

*

* If the state is DISABLED, then the AWS Batch scheduler doesn't attempt to place jobs * within the environment. Jobs in a STARTING or RUNNING state continue to * progress normally. Managed compute environments in the DISABLED state don't scale out. * However, they scale in to minvCpus value after instances become idle. * @see CEState * @return Returns a reference to this object so that method calls can be chained together. * @see CEState */ Builder state(String state); /** *

* The state of the compute environment. The valid values are ENABLED or DISABLED. *

*

* If the state is ENABLED, then the AWS Batch scheduler can attempt to place jobs from an * associated job queue on the compute resources within the environment. If the compute environment is managed, * then it can scale its instances out or in automatically, based on the job queue demand. *

*

* If the state is DISABLED, then the AWS Batch scheduler doesn't attempt to place jobs within the * environment. Jobs in a STARTING or RUNNING state continue to progress normally. * Managed compute environments in the DISABLED state don't scale out. However, they scale in to * minvCpus value after instances become idle. *

* * @param state * The state of the compute environment. The valid values are ENABLED or * DISABLED.

*

* If the state is ENABLED, then the AWS Batch scheduler can attempt to place jobs from an * associated job queue on the compute resources within the environment. If the compute environment is * managed, then it can scale its instances out or in automatically, based on the job queue demand. *

*

* If the state is DISABLED, then the AWS Batch scheduler doesn't attempt to place jobs * within the environment. Jobs in a STARTING or RUNNING state continue to * progress normally. Managed compute environments in the DISABLED state don't scale out. * However, they scale in to minvCpus value after instances become idle. * @see CEState * @return Returns a reference to this object so that method calls can be chained together. * @see CEState */ Builder state(CEState state); /** *

* The current status of the compute environment (for example, CREATING or VALID). *

* * @param status * The current status of the compute environment (for example, CREATING or * VALID). * @see CEStatus * @return Returns a reference to this object so that method calls can be chained together. * @see CEStatus */ Builder status(String status); /** *

* The current status of the compute environment (for example, CREATING or VALID). *

* * @param status * The current status of the compute environment (for example, CREATING or * VALID). * @see CEStatus * @return Returns a reference to this object so that method calls can be chained together. * @see CEStatus */ Builder status(CEStatus status); /** *

* A short, human-readable string to provide additional details about the current status of the compute * environment. *

* * @param statusReason * A short, human-readable string to provide additional details about the current status of the compute * environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder statusReason(String statusReason); /** *

* The compute resources defined for the compute environment. For more information, see Compute Environments * in the AWS Batch User Guide. *

* * @param computeResources * The compute resources defined for the compute environment. For more information, see Compute * Environments in the AWS Batch User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder computeResources(ComputeResource computeResources); /** *

* The compute resources defined for the compute environment. For more information, see Compute Environments * in the AWS Batch User Guide. *

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

* The service role associated with the compute environment that allows AWS Batch to make calls to AWS API * operations on your behalf. For more information, see AWS Batch service IAM * role in the AWS Batch User Guide. *

* * @param serviceRole * The service role associated with the compute environment that allows AWS Batch to make calls to AWS * API operations on your behalf. For more information, see AWS Batch service IAM * role in the AWS Batch User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceRole(String serviceRole); } static final class BuilderImpl implements Builder { private String computeEnvironmentName; private String computeEnvironmentArn; private String ecsClusterArn; private Map tags = DefaultSdkAutoConstructMap.getInstance(); private String type; private String state; private String status; private String statusReason; private ComputeResource computeResources; private String serviceRole; private BuilderImpl() { } private BuilderImpl(ComputeEnvironmentDetail model) { computeEnvironmentName(model.computeEnvironmentName); computeEnvironmentArn(model.computeEnvironmentArn); ecsClusterArn(model.ecsClusterArn); tags(model.tags); type(model.type); state(model.state); status(model.status); statusReason(model.statusReason); computeResources(model.computeResources); serviceRole(model.serviceRole); } public final String getComputeEnvironmentName() { return computeEnvironmentName; } @Override public final Builder computeEnvironmentName(String computeEnvironmentName) { this.computeEnvironmentName = computeEnvironmentName; return this; } public final void setComputeEnvironmentName(String computeEnvironmentName) { this.computeEnvironmentName = computeEnvironmentName; } public final String getComputeEnvironmentArn() { return computeEnvironmentArn; } @Override public final Builder computeEnvironmentArn(String computeEnvironmentArn) { this.computeEnvironmentArn = computeEnvironmentArn; return this; } public final void setComputeEnvironmentArn(String computeEnvironmentArn) { this.computeEnvironmentArn = computeEnvironmentArn; } public final String getEcsClusterArn() { return ecsClusterArn; } @Override public final Builder ecsClusterArn(String ecsClusterArn) { this.ecsClusterArn = ecsClusterArn; return this; } public final void setEcsClusterArn(String ecsClusterArn) { this.ecsClusterArn = ecsClusterArn; } public final Map getTags() { if (tags instanceof SdkAutoConstructMap) { return null; } return tags; } @Override public final Builder tags(Map tags) { this.tags = TagrisTagsMapCopier.copy(tags); return this; } public final void setTags(Map tags) { this.tags = TagrisTagsMapCopier.copy(tags); } public final String getType() { return type; } @Override public final Builder type(String type) { this.type = type; return this; } @Override public final Builder type(CEType type) { this.type(type == null ? null : type.toString()); return this; } public final void setType(String type) { this.type = type; } public final String getState() { return state; } @Override public final Builder state(String state) { this.state = state; return this; } @Override public final Builder state(CEState state) { this.state(state == null ? null : state.toString()); return this; } public final void setState(String state) { this.state = state; } public final String getStatus() { return status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(CEStatus status) { this.status(status == null ? null : status.toString()); return this; } public final void setStatus(String status) { this.status = status; } public final String getStatusReason() { return statusReason; } @Override public final Builder statusReason(String statusReason) { this.statusReason = statusReason; return this; } public final void setStatusReason(String statusReason) { this.statusReason = statusReason; } public final ComputeResource.Builder getComputeResources() { return computeResources != null ? computeResources.toBuilder() : null; } @Override public final Builder computeResources(ComputeResource computeResources) { this.computeResources = computeResources; return this; } public final void setComputeResources(ComputeResource.BuilderImpl computeResources) { this.computeResources = computeResources != null ? computeResources.build() : null; } public final String getServiceRole() { return serviceRole; } @Override public final Builder serviceRole(String serviceRole) { this.serviceRole = serviceRole; return this; } public final void setServiceRole(String serviceRole) { this.serviceRole = serviceRole; } @Override public ComputeEnvironmentDetail build() { return new ComputeEnvironmentDetail(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy