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

software.amazon.awssdk.services.emr.model.Cluster Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EMR module holds the client classes that are used for communicating with Amazon Elastic MapReduce Service

There is a newer version: 2.31.2
Show 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.emr.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.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;

/**
 * 

* The detailed description of the cluster. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Cluster implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Id") .getter(getter(Cluster::id)).setter(setter(Builder::id)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Id").build()).build(); private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name") .getter(getter(Cluster::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("Status").getter(getter(Cluster::status)).setter(setter(Builder::status)) .constructor(ClusterStatus::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build(); private static final SdkField EC2_INSTANCE_ATTRIBUTES_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("Ec2InstanceAttributes") .getter(getter(Cluster::ec2InstanceAttributes)).setter(setter(Builder::ec2InstanceAttributes)) .constructor(Ec2InstanceAttributes::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Ec2InstanceAttributes").build()) .build(); private static final SdkField INSTANCE_COLLECTION_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("InstanceCollectionType").getter(getter(Cluster::instanceCollectionTypeAsString)) .setter(setter(Builder::instanceCollectionType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceCollectionType").build()) .build(); private static final SdkField LOG_URI_FIELD = SdkField. builder(MarshallingType.STRING).memberName("LogUri") .getter(getter(Cluster::logUri)).setter(setter(Builder::logUri)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LogUri").build()).build(); private static final SdkField LOG_ENCRYPTION_KMS_KEY_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LogEncryptionKmsKeyId").getter(getter(Cluster::logEncryptionKmsKeyId)) .setter(setter(Builder::logEncryptionKmsKeyId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LogEncryptionKmsKeyId").build()) .build(); private static final SdkField REQUESTED_AMI_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("RequestedAmiVersion").getter(getter(Cluster::requestedAmiVersion)) .setter(setter(Builder::requestedAmiVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RequestedAmiVersion").build()) .build(); private static final SdkField RUNNING_AMI_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("RunningAmiVersion").getter(getter(Cluster::runningAmiVersion)) .setter(setter(Builder::runningAmiVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RunningAmiVersion").build()).build(); private static final SdkField RELEASE_LABEL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ReleaseLabel").getter(getter(Cluster::releaseLabel)).setter(setter(Builder::releaseLabel)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReleaseLabel").build()).build(); private static final SdkField AUTO_TERMINATE_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("AutoTerminate").getter(getter(Cluster::autoTerminate)).setter(setter(Builder::autoTerminate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoTerminate").build()).build(); private static final SdkField TERMINATION_PROTECTED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("TerminationProtected").getter(getter(Cluster::terminationProtected)) .setter(setter(Builder::terminationProtected)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TerminationProtected").build()) .build(); private static final SdkField UNHEALTHY_NODE_REPLACEMENT_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("UnhealthyNodeReplacement").getter(getter(Cluster::unhealthyNodeReplacement)) .setter(setter(Builder::unhealthyNodeReplacement)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UnhealthyNodeReplacement").build()) .build(); private static final SdkField VISIBLE_TO_ALL_USERS_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("VisibleToAllUsers").getter(getter(Cluster::visibleToAllUsers)) .setter(setter(Builder::visibleToAllUsers)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VisibleToAllUsers").build()).build(); private static final SdkField> APPLICATIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Applications") .getter(getter(Cluster::applications)) .setter(setter(Builder::applications)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Applications").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Application::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Tags") .getter(getter(Cluster::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Tag::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField SERVICE_ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ServiceRole").getter(getter(Cluster::serviceRole)).setter(setter(Builder::serviceRole)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceRole").build()).build(); private static final SdkField NORMALIZED_INSTANCE_HOURS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("NormalizedInstanceHours").getter(getter(Cluster::normalizedInstanceHours)) .setter(setter(Builder::normalizedInstanceHours)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NormalizedInstanceHours").build()) .build(); private static final SdkField MASTER_PUBLIC_DNS_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("MasterPublicDnsName").getter(getter(Cluster::masterPublicDnsName)) .setter(setter(Builder::masterPublicDnsName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MasterPublicDnsName").build()) .build(); private static final SdkField> CONFIGURATIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Configurations") .getter(getter(Cluster::configurations)) .setter(setter(Builder::configurations)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Configurations").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Configuration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField SECURITY_CONFIGURATION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SecurityConfiguration").getter(getter(Cluster::securityConfiguration)) .setter(setter(Builder::securityConfiguration)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecurityConfiguration").build()) .build(); private static final SdkField AUTO_SCALING_ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AutoScalingRole").getter(getter(Cluster::autoScalingRole)).setter(setter(Builder::autoScalingRole)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoScalingRole").build()).build(); private static final SdkField SCALE_DOWN_BEHAVIOR_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ScaleDownBehavior").getter(getter(Cluster::scaleDownBehaviorAsString)) .setter(setter(Builder::scaleDownBehavior)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ScaleDownBehavior").build()).build(); private static final SdkField CUSTOM_AMI_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CustomAmiId").getter(getter(Cluster::customAmiId)).setter(setter(Builder::customAmiId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomAmiId").build()).build(); private static final SdkField EBS_ROOT_VOLUME_SIZE_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("EbsRootVolumeSize").getter(getter(Cluster::ebsRootVolumeSize)) .setter(setter(Builder::ebsRootVolumeSize)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EbsRootVolumeSize").build()).build(); private static final SdkField REPO_UPGRADE_ON_BOOT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("RepoUpgradeOnBoot").getter(getter(Cluster::repoUpgradeOnBootAsString)) .setter(setter(Builder::repoUpgradeOnBoot)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RepoUpgradeOnBoot").build()).build(); private static final SdkField KERBEROS_ATTRIBUTES_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("KerberosAttributes") .getter(getter(Cluster::kerberosAttributes)).setter(setter(Builder::kerberosAttributes)) .constructor(KerberosAttributes::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KerberosAttributes").build()) .build(); private static final SdkField CLUSTER_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ClusterArn").getter(getter(Cluster::clusterArn)).setter(setter(Builder::clusterArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ClusterArn").build()).build(); private static final SdkField OUTPOST_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("OutpostArn").getter(getter(Cluster::outpostArn)).setter(setter(Builder::outpostArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutpostArn").build()).build(); private static final SdkField STEP_CONCURRENCY_LEVEL_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("StepConcurrencyLevel").getter(getter(Cluster::stepConcurrencyLevel)) .setter(setter(Builder::stepConcurrencyLevel)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StepConcurrencyLevel").build()) .build(); private static final SdkField> PLACEMENT_GROUPS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("PlacementGroups") .getter(getter(Cluster::placementGroups)) .setter(setter(Builder::placementGroups)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PlacementGroups").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(PlacementGroupConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField OS_RELEASE_LABEL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("OSReleaseLabel").getter(getter(Cluster::osReleaseLabel)).setter(setter(Builder::osReleaseLabel)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OSReleaseLabel").build()).build(); private static final SdkField EBS_ROOT_VOLUME_IOPS_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("EbsRootVolumeIops").getter(getter(Cluster::ebsRootVolumeIops)) .setter(setter(Builder::ebsRootVolumeIops)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EbsRootVolumeIops").build()).build(); private static final SdkField EBS_ROOT_VOLUME_THROUGHPUT_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("EbsRootVolumeThroughput").getter(getter(Cluster::ebsRootVolumeThroughput)) .setter(setter(Builder::ebsRootVolumeThroughput)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EbsRootVolumeThroughput").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ID_FIELD, NAME_FIELD, STATUS_FIELD, EC2_INSTANCE_ATTRIBUTES_FIELD, INSTANCE_COLLECTION_TYPE_FIELD, LOG_URI_FIELD, LOG_ENCRYPTION_KMS_KEY_ID_FIELD, REQUESTED_AMI_VERSION_FIELD, RUNNING_AMI_VERSION_FIELD, RELEASE_LABEL_FIELD, AUTO_TERMINATE_FIELD, TERMINATION_PROTECTED_FIELD, UNHEALTHY_NODE_REPLACEMENT_FIELD, VISIBLE_TO_ALL_USERS_FIELD, APPLICATIONS_FIELD, TAGS_FIELD, SERVICE_ROLE_FIELD, NORMALIZED_INSTANCE_HOURS_FIELD, MASTER_PUBLIC_DNS_NAME_FIELD, CONFIGURATIONS_FIELD, SECURITY_CONFIGURATION_FIELD, AUTO_SCALING_ROLE_FIELD, SCALE_DOWN_BEHAVIOR_FIELD, CUSTOM_AMI_ID_FIELD, EBS_ROOT_VOLUME_SIZE_FIELD, REPO_UPGRADE_ON_BOOT_FIELD, KERBEROS_ATTRIBUTES_FIELD, CLUSTER_ARN_FIELD, OUTPOST_ARN_FIELD, STEP_CONCURRENCY_LEVEL_FIELD, PLACEMENT_GROUPS_FIELD, OS_RELEASE_LABEL_FIELD, EBS_ROOT_VOLUME_IOPS_FIELD, EBS_ROOT_VOLUME_THROUGHPUT_FIELD)); private static final long serialVersionUID = 1L; private final String id; private final String name; private final ClusterStatus status; private final Ec2InstanceAttributes ec2InstanceAttributes; private final String instanceCollectionType; private final String logUri; private final String logEncryptionKmsKeyId; private final String requestedAmiVersion; private final String runningAmiVersion; private final String releaseLabel; private final Boolean autoTerminate; private final Boolean terminationProtected; private final Boolean unhealthyNodeReplacement; private final Boolean visibleToAllUsers; private final List applications; private final List tags; private final String serviceRole; private final Integer normalizedInstanceHours; private final String masterPublicDnsName; private final List configurations; private final String securityConfiguration; private final String autoScalingRole; private final String scaleDownBehavior; private final String customAmiId; private final Integer ebsRootVolumeSize; private final String repoUpgradeOnBoot; private final KerberosAttributes kerberosAttributes; private final String clusterArn; private final String outpostArn; private final Integer stepConcurrencyLevel; private final List placementGroups; private final String osReleaseLabel; private final Integer ebsRootVolumeIops; private final Integer ebsRootVolumeThroughput; private Cluster(BuilderImpl builder) { this.id = builder.id; this.name = builder.name; this.status = builder.status; this.ec2InstanceAttributes = builder.ec2InstanceAttributes; this.instanceCollectionType = builder.instanceCollectionType; this.logUri = builder.logUri; this.logEncryptionKmsKeyId = builder.logEncryptionKmsKeyId; this.requestedAmiVersion = builder.requestedAmiVersion; this.runningAmiVersion = builder.runningAmiVersion; this.releaseLabel = builder.releaseLabel; this.autoTerminate = builder.autoTerminate; this.terminationProtected = builder.terminationProtected; this.unhealthyNodeReplacement = builder.unhealthyNodeReplacement; this.visibleToAllUsers = builder.visibleToAllUsers; this.applications = builder.applications; this.tags = builder.tags; this.serviceRole = builder.serviceRole; this.normalizedInstanceHours = builder.normalizedInstanceHours; this.masterPublicDnsName = builder.masterPublicDnsName; this.configurations = builder.configurations; this.securityConfiguration = builder.securityConfiguration; this.autoScalingRole = builder.autoScalingRole; this.scaleDownBehavior = builder.scaleDownBehavior; this.customAmiId = builder.customAmiId; this.ebsRootVolumeSize = builder.ebsRootVolumeSize; this.repoUpgradeOnBoot = builder.repoUpgradeOnBoot; this.kerberosAttributes = builder.kerberosAttributes; this.clusterArn = builder.clusterArn; this.outpostArn = builder.outpostArn; this.stepConcurrencyLevel = builder.stepConcurrencyLevel; this.placementGroups = builder.placementGroups; this.osReleaseLabel = builder.osReleaseLabel; this.ebsRootVolumeIops = builder.ebsRootVolumeIops; this.ebsRootVolumeThroughput = builder.ebsRootVolumeThroughput; } /** *

* The unique identifier for the cluster. *

* * @return The unique identifier for the cluster. */ public final String id() { return id; } /** *

* The name of the cluster. This parameter can't contain the characters <, >, $, |, or ` (backtick). *

* * @return The name of the cluster. This parameter can't contain the characters <, >, $, |, or ` (backtick). */ public final String name() { return name; } /** *

* The current status details about the cluster. *

* * @return The current status details about the cluster. */ public final ClusterStatus status() { return status; } /** *

* Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key name, * subnet ID, IAM instance profile, and so on. *

* * @return Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key * name, subnet ID, IAM instance profile, and so on. */ public final Ec2InstanceAttributes ec2InstanceAttributes() { return ec2InstanceAttributes; } /** * *

* The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x * versions. *

*
*

* The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a uniform * instance group configuration. A value of INSTANCE_FLEET indicates an instance fleets configuration. *

*

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

* * @return

* The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding * 5.0.x versions. *

* *

* The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a * uniform instance group configuration. A value of INSTANCE_FLEET indicates an instance fleets * configuration. * @see InstanceCollectionType */ public final InstanceCollectionType instanceCollectionType() { return InstanceCollectionType.fromValue(instanceCollectionType); } /** * *

* The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x * versions. *

* *

* The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a uniform * instance group configuration. A value of INSTANCE_FLEET indicates an instance fleets configuration. *

*

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

* * @return

* The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding * 5.0.x versions. *

* *

* The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a * uniform instance group configuration. A value of INSTANCE_FLEET indicates an instance fleets * configuration. * @see InstanceCollectionType */ public final String instanceCollectionTypeAsString() { return instanceCollectionType; } /** *

* The path to the Amazon S3 location where logs for this cluster are stored. *

* * @return The path to the Amazon S3 location where logs for this cluster are stored. */ public final String logUri() { return logUri; } /** *

* The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and later, * excluding Amazon EMR 6.0.0. *

* * @return The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and * later, excluding Amazon EMR 6.0.0. */ public final String logEncryptionKmsKeyId() { return logEncryptionKmsKeyId; } /** *

* The AMI version requested for this cluster. *

* * @return The AMI version requested for this cluster. */ public final String requestedAmiVersion() { return requestedAmiVersion; } /** *

* The AMI version running on this cluster. *

* * @return The AMI version running on this cluster. */ public final String runningAmiVersion() { return runningAmiVersion; } /** *

* The Amazon EMR release label, which determines the version of open-source application packages installed on the * cluster. Release labels are in the form emr-x.x.x, where x.x.x is an Amazon EMR release version such * as emr-5.14.0. For more information about Amazon EMR release versions and included application * versions and features, see https://docs.aws.amazon. * com/emr/latest/ReleaseGuide/. The release label applies only to Amazon EMR releases version 4.0 and later. * Earlier versions use AmiVersion. *

* * @return The Amazon EMR release label, which determines the version of open-source application packages installed * on the cluster. Release labels are in the form emr-x.x.x, where x.x.x is an Amazon EMR * release version such as emr-5.14.0. For more information about Amazon EMR release versions * and included application versions and features, see https://docs.aws.amazon.com/emr/latest/ReleaseGuide/. The release label applies only to Amazon EMR * releases version 4.0 and later. Earlier versions use AmiVersion. */ public final String releaseLabel() { return releaseLabel; } /** *

* Specifies whether the cluster should terminate after completing all steps. *

* * @return Specifies whether the cluster should terminate after completing all steps. */ public final Boolean autoTerminate() { return autoTerminate; } /** *

* Indicates whether Amazon EMR will lock the cluster to prevent the Amazon EC2 instances from being terminated by * an API call or user intervention, or in the event of a cluster error. *

* * @return Indicates whether Amazon EMR will lock the cluster to prevent the Amazon EC2 instances from being * terminated by an API call or user intervention, or in the event of a cluster error. */ public final Boolean terminationProtected() { return terminationProtected; } /** *

* Indicates whether Amazon EMR should gracefully replace Amazon EC2 core instances that have degraded within the * cluster. *

* * @return Indicates whether Amazon EMR should gracefully replace Amazon EC2 core instances that have degraded * within the cluster. */ public final Boolean unhealthyNodeReplacement() { return unhealthyNodeReplacement; } /** *

* Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the * cluster. When true, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster * actions on the cluster that their IAM policies allow. When false, only the IAM principal that * created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of * IAM permissions policies attached to other IAM principals. *

*

* The default value is true if a value is not provided when creating a cluster using the Amazon EMR * API RunJobFlow command, the CLI create-cluster command, or * the Amazon Web Services Management Console. *

* * @return Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated * with the cluster. When true, IAM principals in the Amazon Web Services account can perform * Amazon EMR cluster actions on the cluster that their IAM policies allow. When false, only * the IAM principal that created the cluster and the Amazon Web Services account root user can perform * Amazon EMR actions, regardless of IAM permissions policies attached to other IAM principals.

*

* The default value is true if a value is not provided when creating a cluster using the * Amazon EMR API RunJobFlow command, the CLI create-cluster * command, or the Amazon Web Services Management Console. */ public final Boolean visibleToAllUsers() { return visibleToAllUsers; } /** * For responses, this returns true if the service returned a value for the Applications 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 hasApplications() { return applications != null && !(applications instanceof SdkAutoConstructList); } /** *

* The applications installed on this cluster. *

*

* 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 #hasApplications} method. *

* * @return The applications installed on this cluster. */ public final List applications() { return applications; } /** * For responses, this returns true if the service returned a value for the Tags 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 hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

* A list of tags associated with a cluster. *

*

* 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 #hasTags} method. *

* * @return A list of tags associated with a cluster. */ public final List tags() { return tags; } /** *

* The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. *

* * @return The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. */ public final String serviceRole() { return serviceRole; } /** *

* An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time * for every hour an m1.small instance runs. Larger instances are weighted more, so an Amazon EC2 instance that is * roughly four times more expensive would result in the normalized instance hours being incremented by four. This * result is only an approximation and does not reflect the actual billing rate. *

* * @return An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one * time for every hour an m1.small instance runs. Larger instances are weighted more, so an Amazon EC2 * instance that is roughly four times more expensive would result in the normalized instance hours being * incremented by four. This result is only an approximation and does not reflect the actual billing rate. */ public final Integer normalizedInstanceHours() { return normalizedInstanceHours; } /** *

* The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public * subnet, this is the public DNS name. *

* * @return The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On * a public subnet, this is the public DNS name. */ public final String masterPublicDnsName() { return masterPublicDnsName; } /** * For responses, this returns true if the service returned a value for the Configurations 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 hasConfigurations() { return configurations != null && !(configurations instanceof SdkAutoConstructList); } /** *

* Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR * cluster. *

*

* 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 #hasConfigurations} method. *

* * @return Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the * Amazon EMR cluster. */ public final List configurations() { return configurations; } /** *

* The name of the security configuration applied to the cluster. *

* * @return The name of the security configuration applied to the cluster. */ public final String securityConfiguration() { return securityConfiguration; } /** *

* An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The IAM * role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 * instances in an instance group. *

* * @return An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. * The IAM role provides permissions that the automatic scaling feature requires to launch and terminate * Amazon EC2 instances in an instance group. */ public final String autoScalingRole() { return autoScalingRole; } /** *

* The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance * group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the * instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is * only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. * TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR adds nodes to a deny list and drains tasks * from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either * behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to * HDFS corruption. TERMINATE_AT_TASK_COMPLETION is available only in Amazon EMR releases 4.1.0 and * later, and is the default for versions of Amazon EMR earlier than 5.1.0. *

*

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

* * @return The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an * instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates * nodes at the instance-hour boundary, regardless of when the request to terminate the instance was * submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters * created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR adds * nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless * of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and * blocks instance termination if it could lead to HDFS corruption. * TERMINATE_AT_TASK_COMPLETION is available only in Amazon EMR releases 4.1.0 and later, and * is the default for versions of Amazon EMR earlier than 5.1.0. * @see ScaleDownBehavior */ public final ScaleDownBehavior scaleDownBehavior() { return ScaleDownBehavior.fromValue(scaleDownBehavior); } /** *

* The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance * group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the * instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is * only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. * TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR adds nodes to a deny list and drains tasks * from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either * behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to * HDFS corruption. TERMINATE_AT_TASK_COMPLETION is available only in Amazon EMR releases 4.1.0 and * later, and is the default for versions of Amazon EMR earlier than 5.1.0. *

*

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

* * @return The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an * instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates * nodes at the instance-hour boundary, regardless of when the request to terminate the instance was * submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters * created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR adds * nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless * of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and * blocks instance termination if it could lead to HDFS corruption. * TERMINATE_AT_TASK_COMPLETION is available only in Amazon EMR releases 4.1.0 and later, and * is the default for versions of Amazon EMR earlier than 5.1.0. * @see ScaleDownBehavior */ public final String scaleDownBehaviorAsString() { return scaleDownBehavior; } /** *

* Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the * cluster uses a custom AMI. *

* * @return Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if * the cluster uses a custom AMI. */ public final String customAmiId() { return customAmiId; } /** *

* The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 * instance. Available in Amazon EMR releases 4.x and later. *

* * @return The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 * instance. Available in Amazon EMR releases 4.x and later. */ public final Integer ebsRootVolumeSize() { return ebsRootVolumeSize; } /** *

* Applies only when CustomAmiID is used. Specifies the type of updates that the Amazon Linux AMI * package repositories apply when an instance boots using the AMI. *

*

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

* * @return Applies only when CustomAmiID is used. Specifies the type of updates that the Amazon Linux * AMI package repositories apply when an instance boots using the AMI. * @see RepoUpgradeOnBoot */ public final RepoUpgradeOnBoot repoUpgradeOnBoot() { return RepoUpgradeOnBoot.fromValue(repoUpgradeOnBoot); } /** *

* Applies only when CustomAmiID is used. Specifies the type of updates that the Amazon Linux AMI * package repositories apply when an instance boots using the AMI. *

*

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

* * @return Applies only when CustomAmiID is used. Specifies the type of updates that the Amazon Linux * AMI package repositories apply when an instance boots using the AMI. * @see RepoUpgradeOnBoot */ public final String repoUpgradeOnBootAsString() { return repoUpgradeOnBoot; } /** *

* Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For * more information see Use * Kerberos Authentication in the Amazon EMR Management Guide. *

* * @return Attributes for Kerberos configuration when Kerberos authentication is enabled using a security * configuration. For more information see Use Kerberos * Authentication in the Amazon EMR Management Guide. */ public final KerberosAttributes kerberosAttributes() { return kerberosAttributes; } /** *

* The Amazon Resource Name of the cluster. *

* * @return The Amazon Resource Name of the cluster. */ public final String clusterArn() { return clusterArn; } /** *

* The Amazon Resource Name (ARN) of the Outpost where the cluster is launched. *

* * @return The Amazon Resource Name (ARN) of the Outpost where the cluster is launched. */ public final String outpostArn() { return outpostArn; } /** *

* Specifies the number of steps that can be executed concurrently. *

* * @return Specifies the number of steps that can be executed concurrently. */ public final Integer stepConcurrencyLevel() { return stepConcurrencyLevel; } /** * For responses, this returns true if the service returned a value for the PlacementGroups 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 hasPlacementGroups() { return placementGroups != null && !(placementGroups instanceof SdkAutoConstructList); } /** *

* Placement group configured for an Amazon EMR cluster. *

*

* 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 #hasPlacementGroups} method. *

* * @return Placement group configured for an Amazon EMR cluster. */ public final List placementGroups() { return placementGroups; } /** *

* The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was * specified, the default Amazon Linux release is shown in the response. *

* * @return The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was * specified, the default Amazon Linux release is shown in the response. */ public final String osReleaseLabel() { return osReleaseLabel; } /** *

* The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. * Available in Amazon EMR releases 6.15.0 and later. *

* * @return The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 * instance. Available in Amazon EMR releases 6.15.0 and later. */ public final Integer ebsRootVolumeIops() { return ebsRootVolumeIops; } /** *

* The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 * instance. Available in Amazon EMR releases 6.15.0 and later. *

* * @return The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each * Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later. */ public final Integer ebsRootVolumeThroughput() { return ebsRootVolumeThroughput; } @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(id()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(status()); hashCode = 31 * hashCode + Objects.hashCode(ec2InstanceAttributes()); hashCode = 31 * hashCode + Objects.hashCode(instanceCollectionTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(logUri()); hashCode = 31 * hashCode + Objects.hashCode(logEncryptionKmsKeyId()); hashCode = 31 * hashCode + Objects.hashCode(requestedAmiVersion()); hashCode = 31 * hashCode + Objects.hashCode(runningAmiVersion()); hashCode = 31 * hashCode + Objects.hashCode(releaseLabel()); hashCode = 31 * hashCode + Objects.hashCode(autoTerminate()); hashCode = 31 * hashCode + Objects.hashCode(terminationProtected()); hashCode = 31 * hashCode + Objects.hashCode(unhealthyNodeReplacement()); hashCode = 31 * hashCode + Objects.hashCode(visibleToAllUsers()); hashCode = 31 * hashCode + Objects.hashCode(hasApplications() ? applications() : null); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(serviceRole()); hashCode = 31 * hashCode + Objects.hashCode(normalizedInstanceHours()); hashCode = 31 * hashCode + Objects.hashCode(masterPublicDnsName()); hashCode = 31 * hashCode + Objects.hashCode(hasConfigurations() ? configurations() : null); hashCode = 31 * hashCode + Objects.hashCode(securityConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(autoScalingRole()); hashCode = 31 * hashCode + Objects.hashCode(scaleDownBehaviorAsString()); hashCode = 31 * hashCode + Objects.hashCode(customAmiId()); hashCode = 31 * hashCode + Objects.hashCode(ebsRootVolumeSize()); hashCode = 31 * hashCode + Objects.hashCode(repoUpgradeOnBootAsString()); hashCode = 31 * hashCode + Objects.hashCode(kerberosAttributes()); hashCode = 31 * hashCode + Objects.hashCode(clusterArn()); hashCode = 31 * hashCode + Objects.hashCode(outpostArn()); hashCode = 31 * hashCode + Objects.hashCode(stepConcurrencyLevel()); hashCode = 31 * hashCode + Objects.hashCode(hasPlacementGroups() ? placementGroups() : null); hashCode = 31 * hashCode + Objects.hashCode(osReleaseLabel()); hashCode = 31 * hashCode + Objects.hashCode(ebsRootVolumeIops()); hashCode = 31 * hashCode + Objects.hashCode(ebsRootVolumeThroughput()); 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 Cluster)) { return false; } Cluster other = (Cluster) obj; return Objects.equals(id(), other.id()) && Objects.equals(name(), other.name()) && Objects.equals(status(), other.status()) && Objects.equals(ec2InstanceAttributes(), other.ec2InstanceAttributes()) && Objects.equals(instanceCollectionTypeAsString(), other.instanceCollectionTypeAsString()) && Objects.equals(logUri(), other.logUri()) && Objects.equals(logEncryptionKmsKeyId(), other.logEncryptionKmsKeyId()) && Objects.equals(requestedAmiVersion(), other.requestedAmiVersion()) && Objects.equals(runningAmiVersion(), other.runningAmiVersion()) && Objects.equals(releaseLabel(), other.releaseLabel()) && Objects.equals(autoTerminate(), other.autoTerminate()) && Objects.equals(terminationProtected(), other.terminationProtected()) && Objects.equals(unhealthyNodeReplacement(), other.unhealthyNodeReplacement()) && Objects.equals(visibleToAllUsers(), other.visibleToAllUsers()) && hasApplications() == other.hasApplications() && Objects.equals(applications(), other.applications()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(serviceRole(), other.serviceRole()) && Objects.equals(normalizedInstanceHours(), other.normalizedInstanceHours()) && Objects.equals(masterPublicDnsName(), other.masterPublicDnsName()) && hasConfigurations() == other.hasConfigurations() && Objects.equals(configurations(), other.configurations()) && Objects.equals(securityConfiguration(), other.securityConfiguration()) && Objects.equals(autoScalingRole(), other.autoScalingRole()) && Objects.equals(scaleDownBehaviorAsString(), other.scaleDownBehaviorAsString()) && Objects.equals(customAmiId(), other.customAmiId()) && Objects.equals(ebsRootVolumeSize(), other.ebsRootVolumeSize()) && Objects.equals(repoUpgradeOnBootAsString(), other.repoUpgradeOnBootAsString()) && Objects.equals(kerberosAttributes(), other.kerberosAttributes()) && Objects.equals(clusterArn(), other.clusterArn()) && Objects.equals(outpostArn(), other.outpostArn()) && Objects.equals(stepConcurrencyLevel(), other.stepConcurrencyLevel()) && hasPlacementGroups() == other.hasPlacementGroups() && Objects.equals(placementGroups(), other.placementGroups()) && Objects.equals(osReleaseLabel(), other.osReleaseLabel()) && Objects.equals(ebsRootVolumeIops(), other.ebsRootVolumeIops()) && Objects.equals(ebsRootVolumeThroughput(), other.ebsRootVolumeThroughput()); } /** * 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("Cluster").add("Id", id()).add("Name", name()).add("Status", status()) .add("Ec2InstanceAttributes", ec2InstanceAttributes()) .add("InstanceCollectionType", instanceCollectionTypeAsString()).add("LogUri", logUri()) .add("LogEncryptionKmsKeyId", logEncryptionKmsKeyId()).add("RequestedAmiVersion", requestedAmiVersion()) .add("RunningAmiVersion", runningAmiVersion()).add("ReleaseLabel", releaseLabel()) .add("AutoTerminate", autoTerminate()).add("TerminationProtected", terminationProtected()) .add("UnhealthyNodeReplacement", unhealthyNodeReplacement()).add("VisibleToAllUsers", visibleToAllUsers()) .add("Applications", hasApplications() ? applications() : null).add("Tags", hasTags() ? tags() : null) .add("ServiceRole", serviceRole()).add("NormalizedInstanceHours", normalizedInstanceHours()) .add("MasterPublicDnsName", masterPublicDnsName()) .add("Configurations", hasConfigurations() ? configurations() : null) .add("SecurityConfiguration", securityConfiguration()).add("AutoScalingRole", autoScalingRole()) .add("ScaleDownBehavior", scaleDownBehaviorAsString()).add("CustomAmiId", customAmiId()) .add("EbsRootVolumeSize", ebsRootVolumeSize()).add("RepoUpgradeOnBoot", repoUpgradeOnBootAsString()) .add("KerberosAttributes", kerberosAttributes()).add("ClusterArn", clusterArn()).add("OutpostArn", outpostArn()) .add("StepConcurrencyLevel", stepConcurrencyLevel()) .add("PlacementGroups", hasPlacementGroups() ? placementGroups() : null).add("OSReleaseLabel", osReleaseLabel()) .add("EbsRootVolumeIops", ebsRootVolumeIops()).add("EbsRootVolumeThroughput", ebsRootVolumeThroughput()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Id": return Optional.ofNullable(clazz.cast(id())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "Status": return Optional.ofNullable(clazz.cast(status())); case "Ec2InstanceAttributes": return Optional.ofNullable(clazz.cast(ec2InstanceAttributes())); case "InstanceCollectionType": return Optional.ofNullable(clazz.cast(instanceCollectionTypeAsString())); case "LogUri": return Optional.ofNullable(clazz.cast(logUri())); case "LogEncryptionKmsKeyId": return Optional.ofNullable(clazz.cast(logEncryptionKmsKeyId())); case "RequestedAmiVersion": return Optional.ofNullable(clazz.cast(requestedAmiVersion())); case "RunningAmiVersion": return Optional.ofNullable(clazz.cast(runningAmiVersion())); case "ReleaseLabel": return Optional.ofNullable(clazz.cast(releaseLabel())); case "AutoTerminate": return Optional.ofNullable(clazz.cast(autoTerminate())); case "TerminationProtected": return Optional.ofNullable(clazz.cast(terminationProtected())); case "UnhealthyNodeReplacement": return Optional.ofNullable(clazz.cast(unhealthyNodeReplacement())); case "VisibleToAllUsers": return Optional.ofNullable(clazz.cast(visibleToAllUsers())); case "Applications": return Optional.ofNullable(clazz.cast(applications())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "ServiceRole": return Optional.ofNullable(clazz.cast(serviceRole())); case "NormalizedInstanceHours": return Optional.ofNullable(clazz.cast(normalizedInstanceHours())); case "MasterPublicDnsName": return Optional.ofNullable(clazz.cast(masterPublicDnsName())); case "Configurations": return Optional.ofNullable(clazz.cast(configurations())); case "SecurityConfiguration": return Optional.ofNullable(clazz.cast(securityConfiguration())); case "AutoScalingRole": return Optional.ofNullable(clazz.cast(autoScalingRole())); case "ScaleDownBehavior": return Optional.ofNullable(clazz.cast(scaleDownBehaviorAsString())); case "CustomAmiId": return Optional.ofNullable(clazz.cast(customAmiId())); case "EbsRootVolumeSize": return Optional.ofNullable(clazz.cast(ebsRootVolumeSize())); case "RepoUpgradeOnBoot": return Optional.ofNullable(clazz.cast(repoUpgradeOnBootAsString())); case "KerberosAttributes": return Optional.ofNullable(clazz.cast(kerberosAttributes())); case "ClusterArn": return Optional.ofNullable(clazz.cast(clusterArn())); case "OutpostArn": return Optional.ofNullable(clazz.cast(outpostArn())); case "StepConcurrencyLevel": return Optional.ofNullable(clazz.cast(stepConcurrencyLevel())); case "PlacementGroups": return Optional.ofNullable(clazz.cast(placementGroups())); case "OSReleaseLabel": return Optional.ofNullable(clazz.cast(osReleaseLabel())); case "EbsRootVolumeIops": return Optional.ofNullable(clazz.cast(ebsRootVolumeIops())); case "EbsRootVolumeThroughput": return Optional.ofNullable(clazz.cast(ebsRootVolumeThroughput())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Cluster) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The unique identifier for the cluster. *

* * @param id * The unique identifier for the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder id(String id); /** *

* The name of the cluster. This parameter can't contain the characters <, >, $, |, or ` (backtick). *

* * @param name * The name of the cluster. This parameter can't contain the characters <, >, $, |, or ` * (backtick). * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

* The current status details about the cluster. *

* * @param status * The current status details about the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder status(ClusterStatus status); /** *

* The current status details about the cluster. *

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

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

* Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key name, * subnet ID, IAM instance profile, and so on. *

* * @param ec2InstanceAttributes * Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key * name, subnet ID, IAM instance profile, and so on. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ec2InstanceAttributes(Ec2InstanceAttributes ec2InstanceAttributes); /** *

* Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key name, * subnet ID, IAM instance profile, and so on. *

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

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

* The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x * versions. *

* *

* The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a uniform * instance group configuration. A value of INSTANCE_FLEET indicates an instance fleets * configuration. *

* * @param instanceCollectionType *

* The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding * 5.0.x versions. *

* *

* The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a * uniform instance group configuration. A value of INSTANCE_FLEET indicates an instance * fleets configuration. * @see InstanceCollectionType * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceCollectionType */ Builder instanceCollectionType(String instanceCollectionType); /** * *

* The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x * versions. *

* *

* The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a uniform * instance group configuration. A value of INSTANCE_FLEET indicates an instance fleets * configuration. *

* * @param instanceCollectionType *

* The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding * 5.0.x versions. *

* *

* The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a * uniform instance group configuration. A value of INSTANCE_FLEET indicates an instance * fleets configuration. * @see InstanceCollectionType * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceCollectionType */ Builder instanceCollectionType(InstanceCollectionType instanceCollectionType); /** *

* The path to the Amazon S3 location where logs for this cluster are stored. *

* * @param logUri * The path to the Amazon S3 location where logs for this cluster are stored. * @return Returns a reference to this object so that method calls can be chained together. */ Builder logUri(String logUri); /** *

* The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and later, * excluding Amazon EMR 6.0.0. *

* * @param logEncryptionKmsKeyId * The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and * later, excluding Amazon EMR 6.0.0. * @return Returns a reference to this object so that method calls can be chained together. */ Builder logEncryptionKmsKeyId(String logEncryptionKmsKeyId); /** *

* The AMI version requested for this cluster. *

* * @param requestedAmiVersion * The AMI version requested for this cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder requestedAmiVersion(String requestedAmiVersion); /** *

* The AMI version running on this cluster. *

* * @param runningAmiVersion * The AMI version running on this cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder runningAmiVersion(String runningAmiVersion); /** *

* The Amazon EMR release label, which determines the version of open-source application packages installed on * the cluster. Release labels are in the form emr-x.x.x, where x.x.x is an Amazon EMR release * version such as emr-5.14.0. For more information about Amazon EMR release versions and included * application versions and features, see https:// * docs.aws.amazon.com/emr/latest/ReleaseGuide/. The release label applies only to Amazon EMR releases * version 4.0 and later. Earlier versions use AmiVersion. *

* * @param releaseLabel * The Amazon EMR release label, which determines the version of open-source application packages * installed on the cluster. Release labels are in the form emr-x.x.x, where x.x.x is an * Amazon EMR release version such as emr-5.14.0. For more information about Amazon EMR * release versions and included application versions and features, see https://docs.aws.amazon.com/emr/latest/ReleaseGuide/. The release label applies only to Amazon * EMR releases version 4.0 and later. Earlier versions use AmiVersion. * @return Returns a reference to this object so that method calls can be chained together. */ Builder releaseLabel(String releaseLabel); /** *

* Specifies whether the cluster should terminate after completing all steps. *

* * @param autoTerminate * Specifies whether the cluster should terminate after completing all steps. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoTerminate(Boolean autoTerminate); /** *

* Indicates whether Amazon EMR will lock the cluster to prevent the Amazon EC2 instances from being terminated * by an API call or user intervention, or in the event of a cluster error. *

* * @param terminationProtected * Indicates whether Amazon EMR will lock the cluster to prevent the Amazon EC2 instances from being * terminated by an API call or user intervention, or in the event of a cluster error. * @return Returns a reference to this object so that method calls can be chained together. */ Builder terminationProtected(Boolean terminationProtected); /** *

* Indicates whether Amazon EMR should gracefully replace Amazon EC2 core instances that have degraded within * the cluster. *

* * @param unhealthyNodeReplacement * Indicates whether Amazon EMR should gracefully replace Amazon EC2 core instances that have degraded * within the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder unhealthyNodeReplacement(Boolean unhealthyNodeReplacement); /** *

* Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with * the cluster. When true, IAM principals in the Amazon Web Services account can perform Amazon EMR * cluster actions on the cluster that their IAM policies allow. When false, only the IAM principal * that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions, * regardless of IAM permissions policies attached to other IAM principals. *

*

* The default value is true if a value is not provided when creating a cluster using the Amazon * EMR API RunJobFlow command, the CLI create-cluster command, * or the Amazon Web Services Management Console. *

* * @param visibleToAllUsers * Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account * associated with the cluster. When true, IAM principals in the Amazon Web Services account * can perform Amazon EMR cluster actions on the cluster that their IAM policies allow. When * false, only the IAM principal that created the cluster and the Amazon Web Services * account root user can perform Amazon EMR actions, regardless of IAM permissions policies attached to * other IAM principals.

*

* The default value is true if a value is not provided when creating a cluster using the * Amazon EMR API RunJobFlow command, the CLI create-cluster * command, or the Amazon Web Services Management Console. * @return Returns a reference to this object so that method calls can be chained together. */ Builder visibleToAllUsers(Boolean visibleToAllUsers); /** *

* The applications installed on this cluster. *

* * @param applications * The applications installed on this cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applications(Collection applications); /** *

* The applications installed on this cluster. *

* * @param applications * The applications installed on this cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applications(Application... applications); /** *

* The applications installed on this cluster. *

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

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

* A list of tags associated with a cluster. *

* * @param tags * A list of tags associated with a cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* A list of tags associated with a cluster. *

* * @param tags * A list of tags associated with a cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

* A list of tags associated with a cluster. *

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

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

* The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. *

* * @param serviceRole * The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceRole(String serviceRole); /** *

* An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one * time for every hour an m1.small instance runs. Larger instances are weighted more, so an Amazon EC2 instance * that is roughly four times more expensive would result in the normalized instance hours being incremented by * four. This result is only an approximation and does not reflect the actual billing rate. *

* * @param normalizedInstanceHours * An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented * one time for every hour an m1.small instance runs. Larger instances are weighted more, so an Amazon * EC2 instance that is roughly four times more expensive would result in the normalized instance hours * being incremented by four. This result is only an approximation and does not reflect the actual * billing rate. * @return Returns a reference to this object so that method calls can be chained together. */ Builder normalizedInstanceHours(Integer normalizedInstanceHours); /** *

* The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a * public subnet, this is the public DNS name. *

* * @param masterPublicDnsName * The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. * On a public subnet, this is the public DNS name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder masterPublicDnsName(String masterPublicDnsName); /** *

* Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon * EMR cluster. *

* * @param configurations * Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the * Amazon EMR cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder configurations(Collection configurations); /** *

* Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon * EMR cluster. *

* * @param configurations * Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the * Amazon EMR cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder configurations(Configuration... configurations); /** *

* Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon * EMR cluster. *

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

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

* The name of the security configuration applied to the cluster. *

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

* An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The * IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 * instances in an instance group. *

* * @param autoScalingRole * An IAM role for automatic scaling policies. The default role is * EMR_AutoScaling_DefaultRole. The IAM role provides permissions that the automatic scaling * feature requires to launch and terminate Amazon EC2 instances in an instance group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoScalingRole(String autoScalingRole); /** *

* The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an * instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes * at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This * option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that * version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR adds nodes to a deny list and * drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour * boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance * termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION is available only * in Amazon EMR releases 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0. *

* * @param scaleDownBehavior * The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or * an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR * terminates nodes at the instance-hour boundary, regardless of when the request to terminate the * instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the * default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates * that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon * EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the * least active nodes first and blocks instance termination if it could lead to HDFS corruption. * TERMINATE_AT_TASK_COMPLETION is available only in Amazon EMR releases 4.1.0 and later, * and is the default for versions of Amazon EMR earlier than 5.1.0. * @see ScaleDownBehavior * @return Returns a reference to this object so that method calls can be chained together. * @see ScaleDownBehavior */ Builder scaleDownBehavior(String scaleDownBehavior); /** *

* The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an * instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes * at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This * option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that * version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR adds nodes to a deny list and * drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour * boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance * termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION is available only * in Amazon EMR releases 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0. *

* * @param scaleDownBehavior * The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or * an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR * terminates nodes at the instance-hour boundary, regardless of when the request to terminate the * instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the * default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates * that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon * EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the * least active nodes first and blocks instance termination if it could lead to HDFS corruption. * TERMINATE_AT_TASK_COMPLETION is available only in Amazon EMR releases 4.1.0 and later, * and is the default for versions of Amazon EMR earlier than 5.1.0. * @see ScaleDownBehavior * @return Returns a reference to this object so that method calls can be chained together. * @see ScaleDownBehavior */ Builder scaleDownBehavior(ScaleDownBehavior scaleDownBehavior); /** *

* Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the * cluster uses a custom AMI. *

* * @param customAmiId * Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI * if the cluster uses a custom AMI. * @return Returns a reference to this object so that method calls can be chained together. */ Builder customAmiId(String customAmiId); /** *

* The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 * instance. Available in Amazon EMR releases 4.x and later. *

* * @param ebsRootVolumeSize * The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon * EC2 instance. Available in Amazon EMR releases 4.x and later. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ebsRootVolumeSize(Integer ebsRootVolumeSize); /** *

* Applies only when CustomAmiID is used. Specifies the type of updates that the Amazon Linux AMI * package repositories apply when an instance boots using the AMI. *

* * @param repoUpgradeOnBoot * Applies only when CustomAmiID is used. Specifies the type of updates that the Amazon * Linux AMI package repositories apply when an instance boots using the AMI. * @see RepoUpgradeOnBoot * @return Returns a reference to this object so that method calls can be chained together. * @see RepoUpgradeOnBoot */ Builder repoUpgradeOnBoot(String repoUpgradeOnBoot); /** *

* Applies only when CustomAmiID is used. Specifies the type of updates that the Amazon Linux AMI * package repositories apply when an instance boots using the AMI. *

* * @param repoUpgradeOnBoot * Applies only when CustomAmiID is used. Specifies the type of updates that the Amazon * Linux AMI package repositories apply when an instance boots using the AMI. * @see RepoUpgradeOnBoot * @return Returns a reference to this object so that method calls can be chained together. * @see RepoUpgradeOnBoot */ Builder repoUpgradeOnBoot(RepoUpgradeOnBoot repoUpgradeOnBoot); /** *

* Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. * For more information see Use Kerberos * Authentication in the Amazon EMR Management Guide. *

* * @param kerberosAttributes * Attributes for Kerberos configuration when Kerberos authentication is enabled using a security * configuration. For more information see Use Kerberos * Authentication in the Amazon EMR Management Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder kerberosAttributes(KerberosAttributes kerberosAttributes); /** *

* Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. * For more information see Use Kerberos * Authentication in the Amazon EMR Management Guide. *

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

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

* The Amazon Resource Name of the cluster. *

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

* The Amazon Resource Name (ARN) of the Outpost where the cluster is launched. *

* * @param outpostArn * The Amazon Resource Name (ARN) of the Outpost where the cluster is launched. * @return Returns a reference to this object so that method calls can be chained together. */ Builder outpostArn(String outpostArn); /** *

* Specifies the number of steps that can be executed concurrently. *

* * @param stepConcurrencyLevel * Specifies the number of steps that can be executed concurrently. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stepConcurrencyLevel(Integer stepConcurrencyLevel); /** *

* Placement group configured for an Amazon EMR cluster. *

* * @param placementGroups * Placement group configured for an Amazon EMR cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder placementGroups(Collection placementGroups); /** *

* Placement group configured for an Amazon EMR cluster. *

* * @param placementGroups * Placement group configured for an Amazon EMR cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder placementGroups(PlacementGroupConfig... placementGroups); /** *

* Placement group configured for an Amazon EMR cluster. *

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

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

* The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was * specified, the default Amazon Linux release is shown in the response. *

* * @param osReleaseLabel * The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release * was specified, the default Amazon Linux release is shown in the response. * @return Returns a reference to this object so that method calls can be chained together. */ Builder osReleaseLabel(String osReleaseLabel); /** *

* The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. * Available in Amazon EMR releases 6.15.0 and later. *

* * @param ebsRootVolumeIops * The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 * instance. Available in Amazon EMR releases 6.15.0 and later. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ebsRootVolumeIops(Integer ebsRootVolumeIops); /** *

* The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon * EC2 instance. Available in Amazon EMR releases 6.15.0 and later. *

* * @param ebsRootVolumeThroughput * The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each * Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ebsRootVolumeThroughput(Integer ebsRootVolumeThroughput); } static final class BuilderImpl implements Builder { private String id; private String name; private ClusterStatus status; private Ec2InstanceAttributes ec2InstanceAttributes; private String instanceCollectionType; private String logUri; private String logEncryptionKmsKeyId; private String requestedAmiVersion; private String runningAmiVersion; private String releaseLabel; private Boolean autoTerminate; private Boolean terminationProtected; private Boolean unhealthyNodeReplacement; private Boolean visibleToAllUsers; private List applications = DefaultSdkAutoConstructList.getInstance(); private List tags = DefaultSdkAutoConstructList.getInstance(); private String serviceRole; private Integer normalizedInstanceHours; private String masterPublicDnsName; private List configurations = DefaultSdkAutoConstructList.getInstance(); private String securityConfiguration; private String autoScalingRole; private String scaleDownBehavior; private String customAmiId; private Integer ebsRootVolumeSize; private String repoUpgradeOnBoot; private KerberosAttributes kerberosAttributes; private String clusterArn; private String outpostArn; private Integer stepConcurrencyLevel; private List placementGroups = DefaultSdkAutoConstructList.getInstance(); private String osReleaseLabel; private Integer ebsRootVolumeIops; private Integer ebsRootVolumeThroughput; private BuilderImpl() { } private BuilderImpl(Cluster model) { id(model.id); name(model.name); status(model.status); ec2InstanceAttributes(model.ec2InstanceAttributes); instanceCollectionType(model.instanceCollectionType); logUri(model.logUri); logEncryptionKmsKeyId(model.logEncryptionKmsKeyId); requestedAmiVersion(model.requestedAmiVersion); runningAmiVersion(model.runningAmiVersion); releaseLabel(model.releaseLabel); autoTerminate(model.autoTerminate); terminationProtected(model.terminationProtected); unhealthyNodeReplacement(model.unhealthyNodeReplacement); visibleToAllUsers(model.visibleToAllUsers); applications(model.applications); tags(model.tags); serviceRole(model.serviceRole); normalizedInstanceHours(model.normalizedInstanceHours); masterPublicDnsName(model.masterPublicDnsName); configurations(model.configurations); securityConfiguration(model.securityConfiguration); autoScalingRole(model.autoScalingRole); scaleDownBehavior(model.scaleDownBehavior); customAmiId(model.customAmiId); ebsRootVolumeSize(model.ebsRootVolumeSize); repoUpgradeOnBoot(model.repoUpgradeOnBoot); kerberosAttributes(model.kerberosAttributes); clusterArn(model.clusterArn); outpostArn(model.outpostArn); stepConcurrencyLevel(model.stepConcurrencyLevel); placementGroups(model.placementGroups); osReleaseLabel(model.osReleaseLabel); ebsRootVolumeIops(model.ebsRootVolumeIops); ebsRootVolumeThroughput(model.ebsRootVolumeThroughput); } public final String getId() { return id; } public final void setId(String id) { this.id = id; } @Override public final Builder id(String id) { this.id = id; return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final ClusterStatus.Builder getStatus() { return status != null ? status.toBuilder() : null; } public final void setStatus(ClusterStatus.BuilderImpl status) { this.status = status != null ? status.build() : null; } @Override public final Builder status(ClusterStatus status) { this.status = status; return this; } public final Ec2InstanceAttributes.Builder getEc2InstanceAttributes() { return ec2InstanceAttributes != null ? ec2InstanceAttributes.toBuilder() : null; } public final void setEc2InstanceAttributes(Ec2InstanceAttributes.BuilderImpl ec2InstanceAttributes) { this.ec2InstanceAttributes = ec2InstanceAttributes != null ? ec2InstanceAttributes.build() : null; } @Override public final Builder ec2InstanceAttributes(Ec2InstanceAttributes ec2InstanceAttributes) { this.ec2InstanceAttributes = ec2InstanceAttributes; return this; } public final String getInstanceCollectionType() { return instanceCollectionType; } public final void setInstanceCollectionType(String instanceCollectionType) { this.instanceCollectionType = instanceCollectionType; } @Override public final Builder instanceCollectionType(String instanceCollectionType) { this.instanceCollectionType = instanceCollectionType; return this; } @Override public final Builder instanceCollectionType(InstanceCollectionType instanceCollectionType) { this.instanceCollectionType(instanceCollectionType == null ? null : instanceCollectionType.toString()); return this; } public final String getLogUri() { return logUri; } public final void setLogUri(String logUri) { this.logUri = logUri; } @Override public final Builder logUri(String logUri) { this.logUri = logUri; return this; } public final String getLogEncryptionKmsKeyId() { return logEncryptionKmsKeyId; } public final void setLogEncryptionKmsKeyId(String logEncryptionKmsKeyId) { this.logEncryptionKmsKeyId = logEncryptionKmsKeyId; } @Override public final Builder logEncryptionKmsKeyId(String logEncryptionKmsKeyId) { this.logEncryptionKmsKeyId = logEncryptionKmsKeyId; return this; } public final String getRequestedAmiVersion() { return requestedAmiVersion; } public final void setRequestedAmiVersion(String requestedAmiVersion) { this.requestedAmiVersion = requestedAmiVersion; } @Override public final Builder requestedAmiVersion(String requestedAmiVersion) { this.requestedAmiVersion = requestedAmiVersion; return this; } public final String getRunningAmiVersion() { return runningAmiVersion; } public final void setRunningAmiVersion(String runningAmiVersion) { this.runningAmiVersion = runningAmiVersion; } @Override public final Builder runningAmiVersion(String runningAmiVersion) { this.runningAmiVersion = runningAmiVersion; return this; } public final String getReleaseLabel() { return releaseLabel; } public final void setReleaseLabel(String releaseLabel) { this.releaseLabel = releaseLabel; } @Override public final Builder releaseLabel(String releaseLabel) { this.releaseLabel = releaseLabel; return this; } public final Boolean getAutoTerminate() { return autoTerminate; } public final void setAutoTerminate(Boolean autoTerminate) { this.autoTerminate = autoTerminate; } @Override public final Builder autoTerminate(Boolean autoTerminate) { this.autoTerminate = autoTerminate; return this; } public final Boolean getTerminationProtected() { return terminationProtected; } public final void setTerminationProtected(Boolean terminationProtected) { this.terminationProtected = terminationProtected; } @Override public final Builder terminationProtected(Boolean terminationProtected) { this.terminationProtected = terminationProtected; return this; } public final Boolean getUnhealthyNodeReplacement() { return unhealthyNodeReplacement; } public final void setUnhealthyNodeReplacement(Boolean unhealthyNodeReplacement) { this.unhealthyNodeReplacement = unhealthyNodeReplacement; } @Override public final Builder unhealthyNodeReplacement(Boolean unhealthyNodeReplacement) { this.unhealthyNodeReplacement = unhealthyNodeReplacement; return this; } public final Boolean getVisibleToAllUsers() { return visibleToAllUsers; } public final void setVisibleToAllUsers(Boolean visibleToAllUsers) { this.visibleToAllUsers = visibleToAllUsers; } @Override public final Builder visibleToAllUsers(Boolean visibleToAllUsers) { this.visibleToAllUsers = visibleToAllUsers; return this; } public final List getApplications() { List result = ApplicationListCopier.copyToBuilder(this.applications); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setApplications(Collection applications) { this.applications = ApplicationListCopier.copyFromBuilder(applications); } @Override public final Builder applications(Collection applications) { this.applications = ApplicationListCopier.copy(applications); return this; } @Override @SafeVarargs public final Builder applications(Application... applications) { applications(Arrays.asList(applications)); return this; } @Override @SafeVarargs public final Builder applications(Consumer... applications) { applications(Stream.of(applications).map(c -> Application.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final List getTags() { List result = TagListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final String getServiceRole() { return serviceRole; } public final void setServiceRole(String serviceRole) { this.serviceRole = serviceRole; } @Override public final Builder serviceRole(String serviceRole) { this.serviceRole = serviceRole; return this; } public final Integer getNormalizedInstanceHours() { return normalizedInstanceHours; } public final void setNormalizedInstanceHours(Integer normalizedInstanceHours) { this.normalizedInstanceHours = normalizedInstanceHours; } @Override public final Builder normalizedInstanceHours(Integer normalizedInstanceHours) { this.normalizedInstanceHours = normalizedInstanceHours; return this; } public final String getMasterPublicDnsName() { return masterPublicDnsName; } public final void setMasterPublicDnsName(String masterPublicDnsName) { this.masterPublicDnsName = masterPublicDnsName; } @Override public final Builder masterPublicDnsName(String masterPublicDnsName) { this.masterPublicDnsName = masterPublicDnsName; return this; } public final List getConfigurations() { List result = ConfigurationListCopier.copyToBuilder(this.configurations); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setConfigurations(Collection configurations) { this.configurations = ConfigurationListCopier.copyFromBuilder(configurations); } @Override public final Builder configurations(Collection configurations) { this.configurations = ConfigurationListCopier.copy(configurations); return this; } @Override @SafeVarargs public final Builder configurations(Configuration... configurations) { configurations(Arrays.asList(configurations)); return this; } @Override @SafeVarargs public final Builder configurations(Consumer... configurations) { configurations(Stream.of(configurations).map(c -> Configuration.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final String getSecurityConfiguration() { return securityConfiguration; } public final void setSecurityConfiguration(String securityConfiguration) { this.securityConfiguration = securityConfiguration; } @Override public final Builder securityConfiguration(String securityConfiguration) { this.securityConfiguration = securityConfiguration; return this; } public final String getAutoScalingRole() { return autoScalingRole; } public final void setAutoScalingRole(String autoScalingRole) { this.autoScalingRole = autoScalingRole; } @Override public final Builder autoScalingRole(String autoScalingRole) { this.autoScalingRole = autoScalingRole; return this; } public final String getScaleDownBehavior() { return scaleDownBehavior; } public final void setScaleDownBehavior(String scaleDownBehavior) { this.scaleDownBehavior = scaleDownBehavior; } @Override public final Builder scaleDownBehavior(String scaleDownBehavior) { this.scaleDownBehavior = scaleDownBehavior; return this; } @Override public final Builder scaleDownBehavior(ScaleDownBehavior scaleDownBehavior) { this.scaleDownBehavior(scaleDownBehavior == null ? null : scaleDownBehavior.toString()); return this; } public final String getCustomAmiId() { return customAmiId; } public final void setCustomAmiId(String customAmiId) { this.customAmiId = customAmiId; } @Override public final Builder customAmiId(String customAmiId) { this.customAmiId = customAmiId; return this; } public final Integer getEbsRootVolumeSize() { return ebsRootVolumeSize; } public final void setEbsRootVolumeSize(Integer ebsRootVolumeSize) { this.ebsRootVolumeSize = ebsRootVolumeSize; } @Override public final Builder ebsRootVolumeSize(Integer ebsRootVolumeSize) { this.ebsRootVolumeSize = ebsRootVolumeSize; return this; } public final String getRepoUpgradeOnBoot() { return repoUpgradeOnBoot; } public final void setRepoUpgradeOnBoot(String repoUpgradeOnBoot) { this.repoUpgradeOnBoot = repoUpgradeOnBoot; } @Override public final Builder repoUpgradeOnBoot(String repoUpgradeOnBoot) { this.repoUpgradeOnBoot = repoUpgradeOnBoot; return this; } @Override public final Builder repoUpgradeOnBoot(RepoUpgradeOnBoot repoUpgradeOnBoot) { this.repoUpgradeOnBoot(repoUpgradeOnBoot == null ? null : repoUpgradeOnBoot.toString()); return this; } public final KerberosAttributes.Builder getKerberosAttributes() { return kerberosAttributes != null ? kerberosAttributes.toBuilder() : null; } public final void setKerberosAttributes(KerberosAttributes.BuilderImpl kerberosAttributes) { this.kerberosAttributes = kerberosAttributes != null ? kerberosAttributes.build() : null; } @Override public final Builder kerberosAttributes(KerberosAttributes kerberosAttributes) { this.kerberosAttributes = kerberosAttributes; return this; } public final String getClusterArn() { return clusterArn; } public final void setClusterArn(String clusterArn) { this.clusterArn = clusterArn; } @Override public final Builder clusterArn(String clusterArn) { this.clusterArn = clusterArn; return this; } public final String getOutpostArn() { return outpostArn; } public final void setOutpostArn(String outpostArn) { this.outpostArn = outpostArn; } @Override public final Builder outpostArn(String outpostArn) { this.outpostArn = outpostArn; return this; } public final Integer getStepConcurrencyLevel() { return stepConcurrencyLevel; } public final void setStepConcurrencyLevel(Integer stepConcurrencyLevel) { this.stepConcurrencyLevel = stepConcurrencyLevel; } @Override public final Builder stepConcurrencyLevel(Integer stepConcurrencyLevel) { this.stepConcurrencyLevel = stepConcurrencyLevel; return this; } public final List getPlacementGroups() { List result = PlacementGroupConfigListCopier.copyToBuilder(this.placementGroups); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setPlacementGroups(Collection placementGroups) { this.placementGroups = PlacementGroupConfigListCopier.copyFromBuilder(placementGroups); } @Override public final Builder placementGroups(Collection placementGroups) { this.placementGroups = PlacementGroupConfigListCopier.copy(placementGroups); return this; } @Override @SafeVarargs public final Builder placementGroups(PlacementGroupConfig... placementGroups) { placementGroups(Arrays.asList(placementGroups)); return this; } @Override @SafeVarargs public final Builder placementGroups(Consumer... placementGroups) { placementGroups(Stream.of(placementGroups).map(c -> PlacementGroupConfig.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final String getOsReleaseLabel() { return osReleaseLabel; } public final void setOsReleaseLabel(String osReleaseLabel) { this.osReleaseLabel = osReleaseLabel; } @Override public final Builder osReleaseLabel(String osReleaseLabel) { this.osReleaseLabel = osReleaseLabel; return this; } public final Integer getEbsRootVolumeIops() { return ebsRootVolumeIops; } public final void setEbsRootVolumeIops(Integer ebsRootVolumeIops) { this.ebsRootVolumeIops = ebsRootVolumeIops; } @Override public final Builder ebsRootVolumeIops(Integer ebsRootVolumeIops) { this.ebsRootVolumeIops = ebsRootVolumeIops; return this; } public final Integer getEbsRootVolumeThroughput() { return ebsRootVolumeThroughput; } public final void setEbsRootVolumeThroughput(Integer ebsRootVolumeThroughput) { this.ebsRootVolumeThroughput = ebsRootVolumeThroughput; } @Override public final Builder ebsRootVolumeThroughput(Integer ebsRootVolumeThroughput) { this.ebsRootVolumeThroughput = ebsRootVolumeThroughput; return this; } @Override public Cluster build() { return new Cluster(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy