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

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

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

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

import java.beans.Transient;
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.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Input to the RunJobFlow operation. *

*/ @Generated("software.amazon.awssdk:codegen") public final class RunJobFlowRequest extends EmrRequest implements ToCopyableBuilder { private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name") .getter(getter(RunJobFlowRequest::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build(); private static final SdkField LOG_URI_FIELD = SdkField. builder(MarshallingType.STRING).memberName("LogUri") .getter(getter(RunJobFlowRequest::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(RunJobFlowRequest::logEncryptionKmsKeyId)) .setter(setter(Builder::logEncryptionKmsKeyId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LogEncryptionKmsKeyId").build()) .build(); private static final SdkField ADDITIONAL_INFO_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AdditionalInfo").getter(getter(RunJobFlowRequest::additionalInfo)) .setter(setter(Builder::additionalInfo)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AdditionalInfo").build()).build(); private static final SdkField AMI_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AmiVersion").getter(getter(RunJobFlowRequest::amiVersion)).setter(setter(Builder::amiVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AmiVersion").build()).build(); private static final SdkField RELEASE_LABEL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ReleaseLabel").getter(getter(RunJobFlowRequest::releaseLabel)).setter(setter(Builder::releaseLabel)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReleaseLabel").build()).build(); private static final SdkField INSTANCES_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("Instances") .getter(getter(RunJobFlowRequest::instances)).setter(setter(Builder::instances)) .constructor(JobFlowInstancesConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Instances").build()).build(); private static final SdkField> STEPS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Steps") .getter(getter(RunJobFlowRequest::steps)) .setter(setter(Builder::steps)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Steps").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(StepConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> BOOTSTRAP_ACTIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("BootstrapActions") .getter(getter(RunJobFlowRequest::bootstrapActions)) .setter(setter(Builder::bootstrapActions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BootstrapActions").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(BootstrapActionConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> SUPPORTED_PRODUCTS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("SupportedProducts") .getter(getter(RunJobFlowRequest::supportedProducts)) .setter(setter(Builder::supportedProducts)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SupportedProducts").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> NEW_SUPPORTED_PRODUCTS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("NewSupportedProducts") .getter(getter(RunJobFlowRequest::newSupportedProducts)) .setter(setter(Builder::newSupportedProducts)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NewSupportedProducts").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(SupportedProductConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> APPLICATIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Applications") .getter(getter(RunJobFlowRequest::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> CONFIGURATIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Configurations") .getter(getter(RunJobFlowRequest::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 VISIBLE_TO_ALL_USERS_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("VisibleToAllUsers").getter(getter(RunJobFlowRequest::visibleToAllUsers)) .setter(setter(Builder::visibleToAllUsers)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VisibleToAllUsers").build()).build(); private static final SdkField JOB_FLOW_ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("JobFlowRole").getter(getter(RunJobFlowRequest::jobFlowRole)).setter(setter(Builder::jobFlowRole)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("JobFlowRole").build()).build(); private static final SdkField SERVICE_ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ServiceRole").getter(getter(RunJobFlowRequest::serviceRole)).setter(setter(Builder::serviceRole)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceRole").build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Tags") .getter(getter(RunJobFlowRequest::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 SECURITY_CONFIGURATION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SecurityConfiguration").getter(getter(RunJobFlowRequest::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(RunJobFlowRequest::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(RunJobFlowRequest::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(RunJobFlowRequest::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(RunJobFlowRequest::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(RunJobFlowRequest::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(RunJobFlowRequest::kerberosAttributes)).setter(setter(Builder::kerberosAttributes)) .constructor(KerberosAttributes::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KerberosAttributes").build()) .build(); private static final SdkField STEP_CONCURRENCY_LEVEL_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("StepConcurrencyLevel").getter(getter(RunJobFlowRequest::stepConcurrencyLevel)) .setter(setter(Builder::stepConcurrencyLevel)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StepConcurrencyLevel").build()) .build(); private static final SdkField MANAGED_SCALING_POLICY_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ManagedScalingPolicy") .getter(getter(RunJobFlowRequest::managedScalingPolicy)).setter(setter(Builder::managedScalingPolicy)) .constructor(ManagedScalingPolicy::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ManagedScalingPolicy").build()) .build(); private static final SdkField> PLACEMENT_GROUP_CONFIGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("PlacementGroupConfigs") .getter(getter(RunJobFlowRequest::placementGroupConfigs)) .setter(setter(Builder::placementGroupConfigs)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PlacementGroupConfigs").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 AUTO_TERMINATION_POLICY_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("AutoTerminationPolicy") .getter(getter(RunJobFlowRequest::autoTerminationPolicy)).setter(setter(Builder::autoTerminationPolicy)) .constructor(AutoTerminationPolicy::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoTerminationPolicy").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(NAME_FIELD, LOG_URI_FIELD, LOG_ENCRYPTION_KMS_KEY_ID_FIELD, ADDITIONAL_INFO_FIELD, AMI_VERSION_FIELD, RELEASE_LABEL_FIELD, INSTANCES_FIELD, STEPS_FIELD, BOOTSTRAP_ACTIONS_FIELD, SUPPORTED_PRODUCTS_FIELD, NEW_SUPPORTED_PRODUCTS_FIELD, APPLICATIONS_FIELD, CONFIGURATIONS_FIELD, VISIBLE_TO_ALL_USERS_FIELD, JOB_FLOW_ROLE_FIELD, SERVICE_ROLE_FIELD, TAGS_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, STEP_CONCURRENCY_LEVEL_FIELD, MANAGED_SCALING_POLICY_FIELD, PLACEMENT_GROUP_CONFIGS_FIELD, AUTO_TERMINATION_POLICY_FIELD)); private final String name; private final String logUri; private final String logEncryptionKmsKeyId; private final String additionalInfo; private final String amiVersion; private final String releaseLabel; private final JobFlowInstancesConfig instances; private final List steps; private final List bootstrapActions; private final List supportedProducts; private final List newSupportedProducts; private final List applications; private final List configurations; private final Boolean visibleToAllUsers; private final String jobFlowRole; private final String serviceRole; private final List tags; 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 Integer stepConcurrencyLevel; private final ManagedScalingPolicy managedScalingPolicy; private final List placementGroupConfigs; private final AutoTerminationPolicy autoTerminationPolicy; private RunJobFlowRequest(BuilderImpl builder) { super(builder); this.name = builder.name; this.logUri = builder.logUri; this.logEncryptionKmsKeyId = builder.logEncryptionKmsKeyId; this.additionalInfo = builder.additionalInfo; this.amiVersion = builder.amiVersion; this.releaseLabel = builder.releaseLabel; this.instances = builder.instances; this.steps = builder.steps; this.bootstrapActions = builder.bootstrapActions; this.supportedProducts = builder.supportedProducts; this.newSupportedProducts = builder.newSupportedProducts; this.applications = builder.applications; this.configurations = builder.configurations; this.visibleToAllUsers = builder.visibleToAllUsers; this.jobFlowRole = builder.jobFlowRole; this.serviceRole = builder.serviceRole; this.tags = builder.tags; 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.stepConcurrencyLevel = builder.stepConcurrencyLevel; this.managedScalingPolicy = builder.managedScalingPolicy; this.placementGroupConfigs = builder.placementGroupConfigs; this.autoTerminationPolicy = builder.autoTerminationPolicy; } /** *

* The name of the job flow. *

* * @return The name of the job flow. */ public final String name() { return name; } /** *

* The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not * created. *

* * @return The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are * not created. */ public final String logUri() { return logUri; } /** *

* The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This * attribute is only available with Amazon EMR version 5.30.0 and later, excluding Amazon EMR 6.0.0. *

* * @return The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by * AES-256. This attribute is only available with Amazon EMR version 5.30.0 and later, excluding Amazon EMR * 6.0.0. */ public final String logEncryptionKmsKeyId() { return logEncryptionKmsKeyId; } /** *

* A JSON string for selecting additional features. *

* * @return A JSON string for selecting additional features. */ public final String additionalInfo() { return additionalInfo; } /** *

* Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, * ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. *

* * @return Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, * ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. */ public final String amiVersion() { return amiVersion; } /** *

* 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; } /** *

* A specification of the number and type of Amazon EC2 instances. *

* * @return A specification of the number and type of Amazon EC2 instances. */ public final JobFlowInstancesConfig instances() { return instances; } /** * For responses, this returns true if the service returned a value for the Steps 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 hasSteps() { return steps != null && !(steps instanceof SdkAutoConstructList); } /** *

* A list of steps to run. *

*

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

* * @return A list of steps to run. */ public final List steps() { return steps; } /** * For responses, this returns true if the service returned a value for the BootstrapActions 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 hasBootstrapActions() { return bootstrapActions != null && !(bootstrapActions instanceof SdkAutoConstructList); } /** *

* A list of bootstrap actions to run before Hadoop starts on the cluster nodes. *

*

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

* * @return A list of bootstrap actions to run before Hadoop starts on the cluster nodes. */ public final List bootstrapActions() { return bootstrapActions; } /** * For responses, this returns true if the service returned a value for the SupportedProducts 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 hasSupportedProducts() { return supportedProducts != null && !(supportedProducts instanceof SdkAutoConstructList); } /** * *

* For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

*
*

* A list of strings that indicates third-party software to use. For more information, see the Amazon EMR Developer Guide. Currently * supported values are: *

*
    *
  • *

    * "mapr-m3" - launch the job flow using MapR M3 Edition. *

    *
  • *
  • *

    * "mapr-m5" - launch the job flow using MapR M5 Edition. *

    *
  • *
*

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

* * @return

* For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

* *

* A list of strings that indicates third-party software to use. For more information, see the Amazon EMR Developer Guide. * Currently supported values are: *

*
    *
  • *

    * "mapr-m3" - launch the job flow using MapR M3 Edition. *

    *
  • *
  • *

    * "mapr-m5" - launch the job flow using MapR M5 Edition. *

    *
  • */ public final List supportedProducts() { return supportedProducts; } /** * For responses, this returns true if the service returned a value for the NewSupportedProducts 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 hasNewSupportedProducts() { return newSupportedProducts != null && !(newSupportedProducts instanceof SdkAutoConstructList); } /** * *

    * For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

    *
    *

    * A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. * EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action * arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the Amazon EMR Developer Guide. Supported * values are: *

    *
      *
    • *

      * "mapr-m3" - launch the cluster using MapR M3 Edition. *

      *
    • *
    • *

      * "mapr-m5" - launch the cluster using MapR M5 Edition. *

      *
    • *
    • *

      * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or * M5 Edition respectively. *

      *
    • *
    • *

      * "mapr-m7" - launch the cluster using MapR M7 Edition. *

      *
    • *
    • *

      * "hunk" - launch the cluster with the Hunk Big Data Analytics Platform. *

      *
    • *
    • *

      * "hue"- launch the cluster with Hue installed. *

      *
    • *
    • *

      * "spark" - launch the cluster with Apache Spark installed. *

      *
    • *
    • *

      * "ganglia" - launch the cluster with the Ganglia Monitoring System installed. *

      *
    • *
    *

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

    * * @return

    * For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

    * *

    * A list of strings that indicates third-party software to use with the job flow that accepts a user * argument list. EMR accepts and forwards the argument list to the corresponding installation script as * bootstrap action arguments. For more information, see * "Launch a Job Flow on the MapR Distribution for Hadoop" in the Amazon EMR Developer Guide. * Supported values are: *

    *
      *
    • *

      * "mapr-m3" - launch the cluster using MapR M3 Edition. *

      *
    • *
    • *

      * "mapr-m5" - launch the cluster using MapR M5 Edition. *

      *
    • *
    • *

      * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using * MapR M3 or M5 Edition respectively. *

      *
    • *
    • *

      * "mapr-m7" - launch the cluster using MapR M7 Edition. *

      *
    • *
    • *

      * "hunk" - launch the cluster with the Hunk Big Data Analytics Platform. *

      *
    • *
    • *

      * "hue"- launch the cluster with Hue installed. *

      *
    • *
    • *

      * "spark" - launch the cluster with Apache Spark installed. *

      *
    • *
    • *

      * "ganglia" - launch the cluster with the Ganglia Monitoring System installed. *

      *
    • */ public final List newSupportedProducts() { return newSupportedProducts; } /** * 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); } /** *

      * Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to install * and configure when launching the cluster. For a list of applications available for each Amazon EMR release * version, see the Amazon EMR Release Guide. *

      *

      * 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 Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to * install and configure when launching the cluster. For a list of applications available for each Amazon * EMR release version, see the Amazon EMR * Release Guide. */ public final List applications() { return applications; } /** * 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); } /** *

      * For Amazon EMR releases 4.0 and later. The list of configurations supplied for the EMR cluster you are creating. *

      *

      * 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 For Amazon EMR releases 4.0 and later. The list of configurations supplied for the EMR cluster you are * creating. */ public final List configurations() { return configurations; } /** *

      * Set this value to true so that IAM principals in the Amazon Web Services account associated with the * cluster can perform EMR actions on the cluster that their IAM policies allow. This value defaults to * true for clusters created using the EMR API or the CLI create-cluster command. *

      *

      * When set to false, only the IAM principal that created the cluster and the Amazon Web Services * account root user can perform EMR actions for the cluster, regardless of the IAM permissions policies attached to * other IAM principals. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide. *

      * * @return Set this value to true so that IAM principals in the Amazon Web Services account associated * with the cluster can perform EMR actions on the cluster that their IAM policies allow. This value * defaults to true for clusters created using the EMR API or the CLI create-cluster * command.

      *

      * When set to false, only the IAM principal that created the cluster and the Amazon Web * Services account root user can perform EMR actions for the cluster, regardless of the IAM permissions * policies attached to other IAM principals. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide. */ public final Boolean visibleToAllUsers() { return visibleToAllUsers; } /** *

      * Also called instance profile and EC2 role. An IAM role for an EMR cluster. The EC2 instances of the cluster * assume this role. The default role is EMR_EC2_DefaultRole. In order to use the default role, you * must have already created it using the CLI or console. *

      * * @return Also called instance profile and EC2 role. An IAM role for an EMR cluster. The EC2 instances of the * cluster assume this role. The default role is EMR_EC2_DefaultRole. In order to use the * default role, you must have already created it using the CLI or console. */ public final String jobFlowRole() { return jobFlowRole; } /** *

      * 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; } /** * 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 to associate with a cluster and propagate to Amazon EC2 instances. *

      *

      * 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 to associate with a cluster and propagate to Amazon EC2 instances. */ public final List tags() { return tags; } /** *

      * The name of a security configuration to apply to the cluster. *

      * * @return The name of a security configuration to apply 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 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 EC2 * instances in an instance group. */ public final String autoScalingRole() { return autoScalingRole; } /** *

      * Specifies 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 available only in Amazon EMR version 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 Specifies 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 available only in Amazon EMR version 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); } /** *

      * Specifies 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 available only in Amazon EMR version 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 Specifies 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 available only in Amazon EMR version 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 version 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If * specified, Amazon EMR uses this AMI when it launches cluster EC2 instances. For more information about custom * AMIs in Amazon EMR, see Using a Custom AMI in the * Amazon EMR Management Guide. If omitted, the cluster uses the base Linux AMI for the * ReleaseLabel specified. For Amazon EMR versions 2.x and 3.x, use AmiVersion instead. *

      *

      * For information about creating a custom AMI, see Creating an Amazon EBS-Backed * Linux AMI in the Amazon Elastic Compute Cloud User Guide for Linux Instances. For information about * finding an AMI ID, see Finding * a Linux AMI. *

      * * @return Available only in Amazon EMR version 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If * specified, Amazon EMR uses this AMI when it launches cluster EC2 instances. For more information about * custom AMIs in Amazon EMR, see Using a Custom AMI * in the Amazon EMR Management Guide. If omitted, the cluster uses the base Linux AMI for the * ReleaseLabel specified. For Amazon EMR versions 2.x and 3.x, use AmiVersion * instead.

      *

      * For information about creating a custom AMI, see Creating an Amazon * EBS-Backed Linux AMI in the Amazon Elastic Compute Cloud User Guide for Linux Instances. For * information about finding an AMI ID, see Finding a Linux 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 EC2 instance. * Available in Amazon EMR version 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 EC2 * instance. Available in Amazon EMR version 4.x and later. */ public final Integer ebsRootVolumeSize() { return ebsRootVolumeSize; } /** *

      * Applies only when CustomAmiID is used. Specifies which updates from the Amazon Linux AMI package * repositories to apply automatically when the instance boots using the AMI. If omitted, the default is * SECURITY, which indicates that only security updates are applied. If NONE is specified, * no updates are applied, and all updates must be applied manually. *

      *

      * 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 which updates from the Amazon Linux AMI * package repositories to apply automatically when the instance boots using the AMI. If omitted, the * default is SECURITY, which indicates that only security updates are applied. If * NONE is specified, no updates are applied, and all updates must be applied manually. * @see RepoUpgradeOnBoot */ public final RepoUpgradeOnBoot repoUpgradeOnBoot() { return RepoUpgradeOnBoot.fromValue(repoUpgradeOnBoot); } /** *

      * Applies only when CustomAmiID is used. Specifies which updates from the Amazon Linux AMI package * repositories to apply automatically when the instance boots using the AMI. If omitted, the default is * SECURITY, which indicates that only security updates are applied. If NONE is specified, * no updates are applied, and all updates must be applied manually. *

      *

      * 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 which updates from the Amazon Linux AMI * package repositories to apply automatically when the instance boots using the AMI. If omitted, the * default is SECURITY, which indicates that only security updates are applied. If * NONE is specified, no updates are applied, and all updates must be applied manually. * @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; } /** *

      * Specifies the number of steps that can be executed concurrently. The default value is 1. The maximum * value is 256. *

      * * @return Specifies the number of steps that can be executed concurrently. The default value is 1. The * maximum value is 256. */ public final Integer stepConcurrencyLevel() { return stepConcurrencyLevel; } /** *

      * The specified managed scaling policy for an Amazon EMR cluster. *

      * * @return The specified managed scaling policy for an Amazon EMR cluster. */ public final ManagedScalingPolicy managedScalingPolicy() { return managedScalingPolicy; } /** * For responses, this returns true if the service returned a value for the PlacementGroupConfigs 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 hasPlacementGroupConfigs() { return placementGroupConfigs != null && !(placementGroupConfigs instanceof SdkAutoConstructList); } /** *

      * The specified placement group configuration 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 #hasPlacementGroupConfigs} method. *

      * * @return The specified placement group configuration for an Amazon EMR cluster. */ public final List placementGroupConfigs() { return placementGroupConfigs; } /** * Returns the value of the AutoTerminationPolicy property for this object. * * @return The value of the AutoTerminationPolicy property for this object. */ public final AutoTerminationPolicy autoTerminationPolicy() { return autoTerminationPolicy; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(logUri()); hashCode = 31 * hashCode + Objects.hashCode(logEncryptionKmsKeyId()); hashCode = 31 * hashCode + Objects.hashCode(additionalInfo()); hashCode = 31 * hashCode + Objects.hashCode(amiVersion()); hashCode = 31 * hashCode + Objects.hashCode(releaseLabel()); hashCode = 31 * hashCode + Objects.hashCode(instances()); hashCode = 31 * hashCode + Objects.hashCode(hasSteps() ? steps() : null); hashCode = 31 * hashCode + Objects.hashCode(hasBootstrapActions() ? bootstrapActions() : null); hashCode = 31 * hashCode + Objects.hashCode(hasSupportedProducts() ? supportedProducts() : null); hashCode = 31 * hashCode + Objects.hashCode(hasNewSupportedProducts() ? newSupportedProducts() : null); hashCode = 31 * hashCode + Objects.hashCode(hasApplications() ? applications() : null); hashCode = 31 * hashCode + Objects.hashCode(hasConfigurations() ? configurations() : null); hashCode = 31 * hashCode + Objects.hashCode(visibleToAllUsers()); hashCode = 31 * hashCode + Objects.hashCode(jobFlowRole()); hashCode = 31 * hashCode + Objects.hashCode(serviceRole()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : 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(stepConcurrencyLevel()); hashCode = 31 * hashCode + Objects.hashCode(managedScalingPolicy()); hashCode = 31 * hashCode + Objects.hashCode(hasPlacementGroupConfigs() ? placementGroupConfigs() : null); hashCode = 31 * hashCode + Objects.hashCode(autoTerminationPolicy()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof RunJobFlowRequest)) { return false; } RunJobFlowRequest other = (RunJobFlowRequest) obj; return Objects.equals(name(), other.name()) && Objects.equals(logUri(), other.logUri()) && Objects.equals(logEncryptionKmsKeyId(), other.logEncryptionKmsKeyId()) && Objects.equals(additionalInfo(), other.additionalInfo()) && Objects.equals(amiVersion(), other.amiVersion()) && Objects.equals(releaseLabel(), other.releaseLabel()) && Objects.equals(instances(), other.instances()) && hasSteps() == other.hasSteps() && Objects.equals(steps(), other.steps()) && hasBootstrapActions() == other.hasBootstrapActions() && Objects.equals(bootstrapActions(), other.bootstrapActions()) && hasSupportedProducts() == other.hasSupportedProducts() && Objects.equals(supportedProducts(), other.supportedProducts()) && hasNewSupportedProducts() == other.hasNewSupportedProducts() && Objects.equals(newSupportedProducts(), other.newSupportedProducts()) && hasApplications() == other.hasApplications() && Objects.equals(applications(), other.applications()) && hasConfigurations() == other.hasConfigurations() && Objects.equals(configurations(), other.configurations()) && Objects.equals(visibleToAllUsers(), other.visibleToAllUsers()) && Objects.equals(jobFlowRole(), other.jobFlowRole()) && Objects.equals(serviceRole(), other.serviceRole()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && 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(stepConcurrencyLevel(), other.stepConcurrencyLevel()) && Objects.equals(managedScalingPolicy(), other.managedScalingPolicy()) && hasPlacementGroupConfigs() == other.hasPlacementGroupConfigs() && Objects.equals(placementGroupConfigs(), other.placementGroupConfigs()) && Objects.equals(autoTerminationPolicy(), other.autoTerminationPolicy()); } /** * 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("RunJobFlowRequest").add("Name", name()).add("LogUri", logUri()) .add("LogEncryptionKmsKeyId", logEncryptionKmsKeyId()).add("AdditionalInfo", additionalInfo()) .add("AmiVersion", amiVersion()).add("ReleaseLabel", releaseLabel()).add("Instances", instances()) .add("Steps", hasSteps() ? steps() : null) .add("BootstrapActions", hasBootstrapActions() ? bootstrapActions() : null) .add("SupportedProducts", hasSupportedProducts() ? supportedProducts() : null) .add("NewSupportedProducts", hasNewSupportedProducts() ? newSupportedProducts() : null) .add("Applications", hasApplications() ? applications() : null) .add("Configurations", hasConfigurations() ? configurations() : null) .add("VisibleToAllUsers", visibleToAllUsers()).add("JobFlowRole", jobFlowRole()) .add("ServiceRole", serviceRole()).add("Tags", hasTags() ? tags() : null) .add("SecurityConfiguration", securityConfiguration()).add("AutoScalingRole", autoScalingRole()) .add("ScaleDownBehavior", scaleDownBehaviorAsString()).add("CustomAmiId", customAmiId()) .add("EbsRootVolumeSize", ebsRootVolumeSize()).add("RepoUpgradeOnBoot", repoUpgradeOnBootAsString()) .add("KerberosAttributes", kerberosAttributes()).add("StepConcurrencyLevel", stepConcurrencyLevel()) .add("ManagedScalingPolicy", managedScalingPolicy()) .add("PlacementGroupConfigs", hasPlacementGroupConfigs() ? placementGroupConfigs() : null) .add("AutoTerminationPolicy", autoTerminationPolicy()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Name": return Optional.ofNullable(clazz.cast(name())); case "LogUri": return Optional.ofNullable(clazz.cast(logUri())); case "LogEncryptionKmsKeyId": return Optional.ofNullable(clazz.cast(logEncryptionKmsKeyId())); case "AdditionalInfo": return Optional.ofNullable(clazz.cast(additionalInfo())); case "AmiVersion": return Optional.ofNullable(clazz.cast(amiVersion())); case "ReleaseLabel": return Optional.ofNullable(clazz.cast(releaseLabel())); case "Instances": return Optional.ofNullable(clazz.cast(instances())); case "Steps": return Optional.ofNullable(clazz.cast(steps())); case "BootstrapActions": return Optional.ofNullable(clazz.cast(bootstrapActions())); case "SupportedProducts": return Optional.ofNullable(clazz.cast(supportedProducts())); case "NewSupportedProducts": return Optional.ofNullable(clazz.cast(newSupportedProducts())); case "Applications": return Optional.ofNullable(clazz.cast(applications())); case "Configurations": return Optional.ofNullable(clazz.cast(configurations())); case "VisibleToAllUsers": return Optional.ofNullable(clazz.cast(visibleToAllUsers())); case "JobFlowRole": return Optional.ofNullable(clazz.cast(jobFlowRole())); case "ServiceRole": return Optional.ofNullable(clazz.cast(serviceRole())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); 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 "StepConcurrencyLevel": return Optional.ofNullable(clazz.cast(stepConcurrencyLevel())); case "ManagedScalingPolicy": return Optional.ofNullable(clazz.cast(managedScalingPolicy())); case "PlacementGroupConfigs": return Optional.ofNullable(clazz.cast(placementGroupConfigs())); case "AutoTerminationPolicy": return Optional.ofNullable(clazz.cast(autoTerminationPolicy())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((RunJobFlowRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends EmrRequest.Builder, SdkPojo, CopyableBuilder { /** *

      * The name of the job flow. *

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

      * The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not * created. *

      * * @param logUri * The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are * not created. * @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. If a value is not provided, the logs remain encrypted by AES-256. * This attribute is only available with Amazon EMR version 5.30.0 and later, excluding Amazon EMR 6.0.0. *

      * * @param logEncryptionKmsKeyId * The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by * AES-256. This attribute is only available with Amazon EMR version 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); /** *

      * A JSON string for selecting additional features. *

      * * @param additionalInfo * A JSON string for selecting additional features. * @return Returns a reference to this object so that method calls can be chained together. */ Builder additionalInfo(String additionalInfo); /** *

      * Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, * ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. *

      * * @param amiVersion * Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, * ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder amiVersion(String amiVersion); /** *

      * 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); /** *

      * A specification of the number and type of Amazon EC2 instances. *

      * * @param instances * A specification of the number and type of Amazon EC2 instances. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instances(JobFlowInstancesConfig instances); /** *

      * A specification of the number and type of Amazon EC2 instances. *

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

      * A list of steps to run. *

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

      * A list of steps to run. *

      * * @param steps * A list of steps to run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder steps(StepConfig... steps); /** *

      * A list of steps to run. *

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

      * A list of bootstrap actions to run before Hadoop starts on the cluster nodes. *

      * * @param bootstrapActions * A list of bootstrap actions to run before Hadoop starts on the cluster nodes. * @return Returns a reference to this object so that method calls can be chained together. */ Builder bootstrapActions(Collection bootstrapActions); /** *

      * A list of bootstrap actions to run before Hadoop starts on the cluster nodes. *

      * * @param bootstrapActions * A list of bootstrap actions to run before Hadoop starts on the cluster nodes. * @return Returns a reference to this object so that method calls can be chained together. */ Builder bootstrapActions(BootstrapActionConfig... bootstrapActions); /** *

      * A list of bootstrap actions to run before Hadoop starts on the cluster nodes. *

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

      * For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

      *
      *

      * A list of strings that indicates third-party software to use. For more information, see the Amazon EMR Developer Guide. * Currently supported values are: *

      *
        *
      • *

        * "mapr-m3" - launch the job flow using MapR M3 Edition. *

        *
      • *
      • *

        * "mapr-m5" - launch the job flow using MapR M5 Edition. *

        *
      • *
      * * @param supportedProducts *

      * For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

      * *

      * A list of strings that indicates third-party software to use. For more information, see the Amazon EMR Developer * Guide. Currently supported values are: *

      *
        *
      • *

        * "mapr-m3" - launch the job flow using MapR M3 Edition. *

        *
      • *
      • *

        * "mapr-m5" - launch the job flow using MapR M5 Edition. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ Builder supportedProducts(Collection supportedProducts); /** * *

        * For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

        *
        *

        * A list of strings that indicates third-party software to use. For more information, see the Amazon EMR Developer Guide. * Currently supported values are: *

        *
          *
        • *

          * "mapr-m3" - launch the job flow using MapR M3 Edition. *

          *
        • *
        • *

          * "mapr-m5" - launch the job flow using MapR M5 Edition. *

          *
        • *
        * * @param supportedProducts *

        * For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

        * *

        * A list of strings that indicates third-party software to use. For more information, see the Amazon EMR Developer * Guide. Currently supported values are: *

        *
          *
        • *

          * "mapr-m3" - launch the job flow using MapR M3 Edition. *

          *
        • *
        • *

          * "mapr-m5" - launch the job flow using MapR M5 Edition. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. */ Builder supportedProducts(String... supportedProducts); /** * *

          * For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

          *
          *

          * A list of strings that indicates third-party software to use with the job flow that accepts a user argument * list. EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action * arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the Amazon EMR Developer Guide. * Supported values are: *

          *
            *
          • *

            * "mapr-m3" - launch the cluster using MapR M3 Edition. *

            *
          • *
          • *

            * "mapr-m5" - launch the cluster using MapR M5 Edition. *

            *
          • *
          • *

            * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR * M3 or M5 Edition respectively. *

            *
          • *
          • *

            * "mapr-m7" - launch the cluster using MapR M7 Edition. *

            *
          • *
          • *

            * "hunk" - launch the cluster with the Hunk Big Data Analytics Platform. *

            *
          • *
          • *

            * "hue"- launch the cluster with Hue installed. *

            *
          • *
          • *

            * "spark" - launch the cluster with Apache Spark installed. *

            *
          • *
          • *

            * "ganglia" - launch the cluster with the Ganglia Monitoring System installed. *

            *
          • *
          * * @param newSupportedProducts *

          * For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

          * *

          * A list of strings that indicates third-party software to use with the job flow that accepts a user * argument list. EMR accepts and forwards the argument list to the corresponding installation script as * bootstrap action arguments. For more information, see * "Launch a Job Flow on the MapR Distribution for Hadoop" in the Amazon EMR Developer * Guide. Supported values are: *

          *
            *
          • *

            * "mapr-m3" - launch the cluster using MapR M3 Edition. *

            *
          • *
          • *

            * "mapr-m5" - launch the cluster using MapR M5 Edition. *

            *
          • *
          • *

            * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using * MapR M3 or M5 Edition respectively. *

            *
          • *
          • *

            * "mapr-m7" - launch the cluster using MapR M7 Edition. *

            *
          • *
          • *

            * "hunk" - launch the cluster with the Hunk Big Data Analytics Platform. *

            *
          • *
          • *

            * "hue"- launch the cluster with Hue installed. *

            *
          • *
          • *

            * "spark" - launch the cluster with Apache Spark installed. *

            *
          • *
          • *

            * "ganglia" - launch the cluster with the Ganglia Monitoring System installed. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. */ Builder newSupportedProducts(Collection newSupportedProducts); /** * *

            * For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

            *
            *

            * A list of strings that indicates third-party software to use with the job flow that accepts a user argument * list. EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action * arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the Amazon EMR Developer Guide. * Supported values are: *

            *
              *
            • *

              * "mapr-m3" - launch the cluster using MapR M3 Edition. *

              *
            • *
            • *

              * "mapr-m5" - launch the cluster using MapR M5 Edition. *

              *
            • *
            • *

              * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR * M3 or M5 Edition respectively. *

              *
            • *
            • *

              * "mapr-m7" - launch the cluster using MapR M7 Edition. *

              *
            • *
            • *

              * "hunk" - launch the cluster with the Hunk Big Data Analytics Platform. *

              *
            • *
            • *

              * "hue"- launch the cluster with Hue installed. *

              *
            • *
            • *

              * "spark" - launch the cluster with Apache Spark installed. *

              *
            • *
            • *

              * "ganglia" - launch the cluster with the Ganglia Monitoring System installed. *

              *
            • *
            * * @param newSupportedProducts *

            * For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

            * *

            * A list of strings that indicates third-party software to use with the job flow that accepts a user * argument list. EMR accepts and forwards the argument list to the corresponding installation script as * bootstrap action arguments. For more information, see * "Launch a Job Flow on the MapR Distribution for Hadoop" in the Amazon EMR Developer * Guide. Supported values are: *

            *
              *
            • *

              * "mapr-m3" - launch the cluster using MapR M3 Edition. *

              *
            • *
            • *

              * "mapr-m5" - launch the cluster using MapR M5 Edition. *

              *
            • *
            • *

              * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using * MapR M3 or M5 Edition respectively. *

              *
            • *
            • *

              * "mapr-m7" - launch the cluster using MapR M7 Edition. *

              *
            • *
            • *

              * "hunk" - launch the cluster with the Hunk Big Data Analytics Platform. *

              *
            • *
            • *

              * "hue"- launch the cluster with Hue installed. *

              *
            • *
            • *

              * "spark" - launch the cluster with Apache Spark installed. *

              *
            • *
            • *

              * "ganglia" - launch the cluster with the Ganglia Monitoring System installed. *

              *
            • * @return Returns a reference to this object so that method calls can be chained together. */ Builder newSupportedProducts(SupportedProductConfig... newSupportedProducts); /** * *

              * For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications. *

              *
              *

              * A list of strings that indicates third-party software to use with the job flow that accepts a user argument * list. EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action * arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the Amazon EMR Developer Guide. * Supported values are: *

              *
                *
              • *

                * "mapr-m3" - launch the cluster using MapR M3 Edition. *

                *
              • *
              • *

                * "mapr-m5" - launch the cluster using MapR M5 Edition. *

                *
              • *
              • *

                * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR * M3 or M5 Edition respectively. *

                *
              • *
              • *

                * "mapr-m7" - launch the cluster using MapR M7 Edition. *

                *
              • *
              • *

                * "hunk" - launch the cluster with the Hunk Big Data Analytics Platform. *

                *
              • *
              • *

                * "hue"- launch the cluster with Hue installed. *

                *
              • *
              • *

                * "spark" - launch the cluster with Apache Spark installed. *

                *
              • *
              • *

                * "ganglia" - launch the cluster with the Ganglia Monitoring System installed. *

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

              * Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to * install and configure when launching the cluster. For a list of applications available for each Amazon EMR * release version, see the Amazon EMR Release * Guide. *

              * * @param applications * Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR * to install and configure when launching the cluster. For a list of applications available for each * Amazon EMR release version, see the Amazon EMR Release Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applications(Collection applications); /** *

              * Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to * install and configure when launching the cluster. For a list of applications available for each Amazon EMR * release version, see the Amazon EMR Release * Guide. *

              * * @param applications * Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR * to install and configure when launching the cluster. For a list of applications available for each * Amazon EMR release version, see the Amazon EMR Release Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applications(Application... applications); /** *

              * Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to * install and configure when launching the cluster. For a list of applications available for each Amazon EMR * release version, see the Amazon EMR Release * Guide. *

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

              * For Amazon EMR releases 4.0 and later. The list of configurations supplied for the EMR cluster you are * creating. *

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

              * For Amazon EMR releases 4.0 and later. The list of configurations supplied for the EMR cluster you are * creating. *

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

              * For Amazon EMR releases 4.0 and later. The list of configurations supplied for the EMR cluster you are * creating. *

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

              * Set this value to true so that IAM principals in the Amazon Web Services account associated with * the cluster can perform EMR actions on the cluster that their IAM policies allow. This value defaults to * true for clusters created using the EMR API or the CLI create-cluster command. *

              *

              * When set to false, only the IAM principal that created the cluster and the Amazon Web Services * account root user can perform EMR actions for the cluster, regardless of the IAM permissions policies * attached to other IAM principals. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide. *

              * * @param visibleToAllUsers * Set this value to true so that IAM principals in the Amazon Web Services account * associated with the cluster can perform EMR actions on the cluster that their IAM policies allow. This * value defaults to true for clusters created using the EMR API or the CLI create-cluster * command.

              *

              * When set to false, only the IAM principal that created the cluster and the Amazon Web * Services account root user can perform EMR actions for the cluster, regardless of the IAM permissions * policies attached to other IAM principals. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder visibleToAllUsers(Boolean visibleToAllUsers); /** *

              * Also called instance profile and EC2 role. An IAM role for an EMR cluster. The EC2 instances of the cluster * assume this role. The default role is EMR_EC2_DefaultRole. In order to use the default role, you * must have already created it using the CLI or console. *

              * * @param jobFlowRole * Also called instance profile and EC2 role. An IAM role for an EMR cluster. The EC2 instances of the * cluster assume this role. The default role is EMR_EC2_DefaultRole. In order to use the * default role, you must have already created it using the CLI or console. * @return Returns a reference to this object so that method calls can be chained together. */ Builder jobFlowRole(String jobFlowRole); /** *

              * 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); /** *

              * A list of tags to associate with a cluster and propagate to Amazon EC2 instances. *

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

              * A list of tags to associate with a cluster and propagate to Amazon EC2 instances. *

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

              * A list of tags to associate with a cluster and propagate to Amazon EC2 instances. *

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

              * The name of a security configuration to apply to the cluster. *

              * * @param securityConfiguration * The name of a security configuration to apply 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 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 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); /** *

              * Specifies 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 available only in * Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0. *

              * * @param scaleDownBehavior * Specifies 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 available only in Amazon EMR version 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); /** *

              * Specifies 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 available only in * Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0. *

              * * @param scaleDownBehavior * Specifies 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 available only in Amazon EMR version 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 version 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If * specified, Amazon EMR uses this AMI when it launches cluster EC2 instances. For more information about custom * AMIs in Amazon EMR, see Using a Custom AMI in * the Amazon EMR Management Guide. If omitted, the cluster uses the base Linux AMI for the * ReleaseLabel specified. For Amazon EMR versions 2.x and 3.x, use AmiVersion * instead. *

              *

              * For information about creating a custom AMI, see Creating an Amazon * EBS-Backed Linux AMI in the Amazon Elastic Compute Cloud User Guide for Linux Instances. For * information about finding an AMI ID, see Finding a Linux AMI. *

              * * @param customAmiId * Available only in Amazon EMR version 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. * If specified, Amazon EMR uses this AMI when it launches cluster EC2 instances. For more information * about custom AMIs in Amazon EMR, see Using a Custom * AMI in the Amazon EMR Management Guide. If omitted, the cluster uses the base Linux AMI for * the ReleaseLabel specified. For Amazon EMR versions 2.x and 3.x, use * AmiVersion instead.

              *

              * For information about creating a custom AMI, see Creating an Amazon * EBS-Backed Linux AMI in the Amazon Elastic Compute Cloud User Guide for Linux Instances. * For information about finding an AMI ID, see Finding a Linux * 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 EC2 instance. * Available in Amazon EMR version 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 EC2 * instance. Available in Amazon EMR version 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 which updates from the Amazon Linux AMI package * repositories to apply automatically when the instance boots using the AMI. If omitted, the default is * SECURITY, which indicates that only security updates are applied. If NONE is * specified, no updates are applied, and all updates must be applied manually. *

              * * @param repoUpgradeOnBoot * Applies only when CustomAmiID is used. Specifies which updates from the Amazon Linux AMI * package repositories to apply automatically when the instance boots using the AMI. If omitted, the * default is SECURITY, which indicates that only security updates are applied. If * NONE is specified, no updates are applied, and all updates must be applied manually. * @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 which updates from the Amazon Linux AMI package * repositories to apply automatically when the instance boots using the AMI. If omitted, the default is * SECURITY, which indicates that only security updates are applied. If NONE is * specified, no updates are applied, and all updates must be applied manually. *

              * * @param repoUpgradeOnBoot * Applies only when CustomAmiID is used. Specifies which updates from the Amazon Linux AMI * package repositories to apply automatically when the instance boots using the AMI. If omitted, the * default is SECURITY, which indicates that only security updates are applied. If * NONE is specified, no updates are applied, and all updates must be applied manually. * @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 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()); } /** *

              * Specifies the number of steps that can be executed concurrently. The default value is 1. The * maximum value is 256. *

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

              * The specified managed scaling policy for an Amazon EMR cluster. *

              * * @param managedScalingPolicy * The specified managed scaling policy for an Amazon EMR cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder managedScalingPolicy(ManagedScalingPolicy managedScalingPolicy); /** *

              * The specified managed scaling policy for an Amazon EMR cluster. *

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

              * The specified placement group configuration for an Amazon EMR cluster. *

              * * @param placementGroupConfigs * The specified placement group configuration for an Amazon EMR cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder placementGroupConfigs(Collection placementGroupConfigs); /** *

              * The specified placement group configuration for an Amazon EMR cluster. *

              * * @param placementGroupConfigs * The specified placement group configuration for an Amazon EMR cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder placementGroupConfigs(PlacementGroupConfig... placementGroupConfigs); /** *

              * The specified placement group configuration for an Amazon EMR cluster. *

              * This is a convenience that creates an instance of the {@link List.Builder} avoiding the * need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately * and its result is passed to {@link #placementGroupConfigs(List)}. * * @param placementGroupConfigs * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #placementGroupConfigs(List) */ Builder placementGroupConfigs(Consumer... placementGroupConfigs); /** * Sets the value of the AutoTerminationPolicy property for this object. * * @param autoTerminationPolicy * The new value for the AutoTerminationPolicy property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoTerminationPolicy(AutoTerminationPolicy autoTerminationPolicy); /** * Sets the value of the AutoTerminationPolicy property for this object. * * This is a convenience that creates an instance of the {@link AutoTerminationPolicy.Builder} avoiding the need * to create one manually via {@link AutoTerminationPolicy#builder()}. * * When the {@link Consumer} completes, {@link AutoTerminationPolicy.Builder#build()} is called immediately and * its result is passed to {@link #autoTerminationPolicy(AutoTerminationPolicy)}. * * @param autoTerminationPolicy * a consumer that will call methods on {@link AutoTerminationPolicy.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #autoTerminationPolicy(AutoTerminationPolicy) */ default Builder autoTerminationPolicy(Consumer autoTerminationPolicy) { return autoTerminationPolicy(AutoTerminationPolicy.builder().applyMutation(autoTerminationPolicy).build()); } @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends EmrRequest.BuilderImpl implements Builder { private String name; private String logUri; private String logEncryptionKmsKeyId; private String additionalInfo; private String amiVersion; private String releaseLabel; private JobFlowInstancesConfig instances; private List steps = DefaultSdkAutoConstructList.getInstance(); private List bootstrapActions = DefaultSdkAutoConstructList.getInstance(); private List supportedProducts = DefaultSdkAutoConstructList.getInstance(); private List newSupportedProducts = DefaultSdkAutoConstructList.getInstance(); private List applications = DefaultSdkAutoConstructList.getInstance(); private List configurations = DefaultSdkAutoConstructList.getInstance(); private Boolean visibleToAllUsers; private String jobFlowRole; private String serviceRole; private List tags = DefaultSdkAutoConstructList.getInstance(); private String securityConfiguration; private String autoScalingRole; private String scaleDownBehavior; private String customAmiId; private Integer ebsRootVolumeSize; private String repoUpgradeOnBoot; private KerberosAttributes kerberosAttributes; private Integer stepConcurrencyLevel; private ManagedScalingPolicy managedScalingPolicy; private List placementGroupConfigs = DefaultSdkAutoConstructList.getInstance(); private AutoTerminationPolicy autoTerminationPolicy; private BuilderImpl() { } private BuilderImpl(RunJobFlowRequest model) { super(model); name(model.name); logUri(model.logUri); logEncryptionKmsKeyId(model.logEncryptionKmsKeyId); additionalInfo(model.additionalInfo); amiVersion(model.amiVersion); releaseLabel(model.releaseLabel); instances(model.instances); steps(model.steps); bootstrapActions(model.bootstrapActions); supportedProducts(model.supportedProducts); newSupportedProducts(model.newSupportedProducts); applications(model.applications); configurations(model.configurations); visibleToAllUsers(model.visibleToAllUsers); jobFlowRole(model.jobFlowRole); serviceRole(model.serviceRole); tags(model.tags); securityConfiguration(model.securityConfiguration); autoScalingRole(model.autoScalingRole); scaleDownBehavior(model.scaleDownBehavior); customAmiId(model.customAmiId); ebsRootVolumeSize(model.ebsRootVolumeSize); repoUpgradeOnBoot(model.repoUpgradeOnBoot); kerberosAttributes(model.kerberosAttributes); stepConcurrencyLevel(model.stepConcurrencyLevel); managedScalingPolicy(model.managedScalingPolicy); placementGroupConfigs(model.placementGroupConfigs); autoTerminationPolicy(model.autoTerminationPolicy); } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override @Transient public final Builder name(String name) { this.name = name; return this; } public final String getLogUri() { return logUri; } public final void setLogUri(String logUri) { this.logUri = logUri; } @Override @Transient 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 @Transient public final Builder logEncryptionKmsKeyId(String logEncryptionKmsKeyId) { this.logEncryptionKmsKeyId = logEncryptionKmsKeyId; return this; } public final String getAdditionalInfo() { return additionalInfo; } public final void setAdditionalInfo(String additionalInfo) { this.additionalInfo = additionalInfo; } @Override @Transient public final Builder additionalInfo(String additionalInfo) { this.additionalInfo = additionalInfo; return this; } public final String getAmiVersion() { return amiVersion; } public final void setAmiVersion(String amiVersion) { this.amiVersion = amiVersion; } @Override @Transient public final Builder amiVersion(String amiVersion) { this.amiVersion = amiVersion; return this; } public final String getReleaseLabel() { return releaseLabel; } public final void setReleaseLabel(String releaseLabel) { this.releaseLabel = releaseLabel; } @Override @Transient public final Builder releaseLabel(String releaseLabel) { this.releaseLabel = releaseLabel; return this; } public final JobFlowInstancesConfig.Builder getInstances() { return instances != null ? instances.toBuilder() : null; } public final void setInstances(JobFlowInstancesConfig.BuilderImpl instances) { this.instances = instances != null ? instances.build() : null; } @Override @Transient public final Builder instances(JobFlowInstancesConfig instances) { this.instances = instances; return this; } public final List getSteps() { List result = StepConfigListCopier.copyToBuilder(this.steps); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setSteps(Collection steps) { this.steps = StepConfigListCopier.copyFromBuilder(steps); } @Override @Transient public final Builder steps(Collection steps) { this.steps = StepConfigListCopier.copy(steps); return this; } @Override @Transient @SafeVarargs public final Builder steps(StepConfig... steps) { steps(Arrays.asList(steps)); return this; } @Override @Transient @SafeVarargs public final Builder steps(Consumer... steps) { steps(Stream.of(steps).map(c -> StepConfig.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final List getBootstrapActions() { List result = BootstrapActionConfigListCopier.copyToBuilder(this.bootstrapActions); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setBootstrapActions(Collection bootstrapActions) { this.bootstrapActions = BootstrapActionConfigListCopier.copyFromBuilder(bootstrapActions); } @Override @Transient public final Builder bootstrapActions(Collection bootstrapActions) { this.bootstrapActions = BootstrapActionConfigListCopier.copy(bootstrapActions); return this; } @Override @Transient @SafeVarargs public final Builder bootstrapActions(BootstrapActionConfig... bootstrapActions) { bootstrapActions(Arrays.asList(bootstrapActions)); return this; } @Override @Transient @SafeVarargs public final Builder bootstrapActions(Consumer... bootstrapActions) { bootstrapActions(Stream.of(bootstrapActions).map(c -> BootstrapActionConfig.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final Collection getSupportedProducts() { if (supportedProducts instanceof SdkAutoConstructList) { return null; } return supportedProducts; } public final void setSupportedProducts(Collection supportedProducts) { this.supportedProducts = SupportedProductsListCopier.copy(supportedProducts); } @Override @Transient public final Builder supportedProducts(Collection supportedProducts) { this.supportedProducts = SupportedProductsListCopier.copy(supportedProducts); return this; } @Override @Transient @SafeVarargs public final Builder supportedProducts(String... supportedProducts) { supportedProducts(Arrays.asList(supportedProducts)); return this; } public final List getNewSupportedProducts() { List result = NewSupportedProductsListCopier.copyToBuilder(this.newSupportedProducts); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setNewSupportedProducts(Collection newSupportedProducts) { this.newSupportedProducts = NewSupportedProductsListCopier.copyFromBuilder(newSupportedProducts); } @Override @Transient public final Builder newSupportedProducts(Collection newSupportedProducts) { this.newSupportedProducts = NewSupportedProductsListCopier.copy(newSupportedProducts); return this; } @Override @Transient @SafeVarargs public final Builder newSupportedProducts(SupportedProductConfig... newSupportedProducts) { newSupportedProducts(Arrays.asList(newSupportedProducts)); return this; } @Override @Transient @SafeVarargs public final Builder newSupportedProducts(Consumer... newSupportedProducts) { newSupportedProducts(Stream.of(newSupportedProducts) .map(c -> SupportedProductConfig.builder().applyMutation(c).build()).collect(Collectors.toList())); 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 @Transient public final Builder applications(Collection applications) { this.applications = ApplicationListCopier.copy(applications); return this; } @Override @Transient @SafeVarargs public final Builder applications(Application... applications) { applications(Arrays.asList(applications)); return this; } @Override @Transient @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 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 @Transient public final Builder configurations(Collection configurations) { this.configurations = ConfigurationListCopier.copy(configurations); return this; } @Override @Transient @SafeVarargs public final Builder configurations(Configuration... configurations) { configurations(Arrays.asList(configurations)); return this; } @Override @Transient @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 Boolean getVisibleToAllUsers() { return visibleToAllUsers; } public final void setVisibleToAllUsers(Boolean visibleToAllUsers) { this.visibleToAllUsers = visibleToAllUsers; } @Override @Transient public final Builder visibleToAllUsers(Boolean visibleToAllUsers) { this.visibleToAllUsers = visibleToAllUsers; return this; } public final String getJobFlowRole() { return jobFlowRole; } public final void setJobFlowRole(String jobFlowRole) { this.jobFlowRole = jobFlowRole; } @Override @Transient public final Builder jobFlowRole(String jobFlowRole) { this.jobFlowRole = jobFlowRole; return this; } public final String getServiceRole() { return serviceRole; } public final void setServiceRole(String serviceRole) { this.serviceRole = serviceRole; } @Override @Transient public final Builder serviceRole(String serviceRole) { this.serviceRole = serviceRole; 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 @Transient public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @Transient @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @Transient @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 getSecurityConfiguration() { return securityConfiguration; } public final void setSecurityConfiguration(String securityConfiguration) { this.securityConfiguration = securityConfiguration; } @Override @Transient 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 @Transient 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 @Transient public final Builder scaleDownBehavior(String scaleDownBehavior) { this.scaleDownBehavior = scaleDownBehavior; return this; } @Override @Transient 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 @Transient 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 @Transient 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 @Transient public final Builder repoUpgradeOnBoot(String repoUpgradeOnBoot) { this.repoUpgradeOnBoot = repoUpgradeOnBoot; return this; } @Override @Transient 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 @Transient public final Builder kerberosAttributes(KerberosAttributes kerberosAttributes) { this.kerberosAttributes = kerberosAttributes; return this; } public final Integer getStepConcurrencyLevel() { return stepConcurrencyLevel; } public final void setStepConcurrencyLevel(Integer stepConcurrencyLevel) { this.stepConcurrencyLevel = stepConcurrencyLevel; } @Override @Transient public final Builder stepConcurrencyLevel(Integer stepConcurrencyLevel) { this.stepConcurrencyLevel = stepConcurrencyLevel; return this; } public final ManagedScalingPolicy.Builder getManagedScalingPolicy() { return managedScalingPolicy != null ? managedScalingPolicy.toBuilder() : null; } public final void setManagedScalingPolicy(ManagedScalingPolicy.BuilderImpl managedScalingPolicy) { this.managedScalingPolicy = managedScalingPolicy != null ? managedScalingPolicy.build() : null; } @Override @Transient public final Builder managedScalingPolicy(ManagedScalingPolicy managedScalingPolicy) { this.managedScalingPolicy = managedScalingPolicy; return this; } public final List getPlacementGroupConfigs() { List result = PlacementGroupConfigListCopier.copyToBuilder(this.placementGroupConfigs); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setPlacementGroupConfigs(Collection placementGroupConfigs) { this.placementGroupConfigs = PlacementGroupConfigListCopier.copyFromBuilder(placementGroupConfigs); } @Override @Transient public final Builder placementGroupConfigs(Collection placementGroupConfigs) { this.placementGroupConfigs = PlacementGroupConfigListCopier.copy(placementGroupConfigs); return this; } @Override @Transient @SafeVarargs public final Builder placementGroupConfigs(PlacementGroupConfig... placementGroupConfigs) { placementGroupConfigs(Arrays.asList(placementGroupConfigs)); return this; } @Override @Transient @SafeVarargs public final Builder placementGroupConfigs(Consumer... placementGroupConfigs) { placementGroupConfigs(Stream.of(placementGroupConfigs) .map(c -> PlacementGroupConfig.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final AutoTerminationPolicy.Builder getAutoTerminationPolicy() { return autoTerminationPolicy != null ? autoTerminationPolicy.toBuilder() : null; } public final void setAutoTerminationPolicy(AutoTerminationPolicy.BuilderImpl autoTerminationPolicy) { this.autoTerminationPolicy = autoTerminationPolicy != null ? autoTerminationPolicy.build() : null; } @Override @Transient public final Builder autoTerminationPolicy(AutoTerminationPolicy autoTerminationPolicy) { this.autoTerminationPolicy = autoTerminationPolicy; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public RunJobFlowRequest build() { return new RunJobFlowRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy