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

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

Go to download

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

There is a newer version: 2.29.15
Show newest version
/*
 * Copyright 2014-2019 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.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.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) .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) .getter(getter(RunJobFlowRequest::logUri)).setter(setter(Builder::logUri)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LogUri").build()).build(); private static final SdkField ADDITIONAL_INFO_FIELD = SdkField. builder(MarshallingType.STRING) .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) .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) .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).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) .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) .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) .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) .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) .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) .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) .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) .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) .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) .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) .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) .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) .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) .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) .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) .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).getter(getter(RunJobFlowRequest::kerberosAttributes)) .setter(setter(Builder::kerberosAttributes)).constructor(KerberosAttributes::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KerberosAttributes").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(NAME_FIELD, LOG_URI_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)); private final String name; private final String logUri; 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 RunJobFlowRequest(BuilderImpl builder) { super(builder); this.name = builder.name; this.logUri = builder.logUri; 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; } /** *

* The name of the job flow. *

* * @return The name of the job flow. */ public 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 String logUri() { return logUri; } /** *

* A JSON string for selecting additional features. *

* * @return A JSON string for selecting additional features. */ public 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 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, for * example, 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 versions 4.x 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, for example, 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 versions 4.x and later. Earlier versions use AmiVersion. */ public 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 JobFlowInstancesConfig instances() { return instances; } /** *

* A list of steps to run. *

*

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

* * @return A list of steps to run. */ public List steps() { return steps; } /** *

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

* * @return A list of bootstrap actions to run before Hadoop starts on the cluster nodes. */ public List bootstrapActions() { return 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. *

    *
  • *
*

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

* * @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 List supportedProducts() { return 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 Analtics 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. *

    * * @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 Analtics 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 List newSupportedProducts() { return 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. *

      *

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

      * * @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 List applications() { return applications; } /** *

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

      * * @return For Amazon EMR releases 4.0 and later. The list of configurations supplied for the EMR cluster you are * creating. */ public List configurations() { return configurations; } /** *

      * Whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is * set to true, all IAM users of that AWS account can view and (if they have the proper policy * permissions set) manage the cluster. If it is set to false, only the IAM user that created the * cluster can view and manage it. *

      * * @return Whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this * value is set to true, all IAM users of that AWS account can view and (if they have the * proper policy permissions set) manage the cluster. If it is set to false, only the IAM user * that created the cluster can view and manage it. */ public 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 String jobFlowRole() { return jobFlowRole; } /** *

      * The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf. *

      * * @return The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf. */ public String serviceRole() { return serviceRole; } /** *

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

      * * @return A list of tags to associate with a cluster and propagate to Amazon EC2 instances. */ public 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 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 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 blacklists 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 * blacklists 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 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 blacklists 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 * blacklists 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 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 String customAmiId() { return customAmiId; } /** *

      * The size, in GiB, of the 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 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 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 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 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 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 EMR Management Guide. */ public KerberosAttributes kerberosAttributes() { return kerberosAttributes; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(logUri()); 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(steps()); hashCode = 31 * hashCode + Objects.hashCode(bootstrapActions()); hashCode = 31 * hashCode + Objects.hashCode(supportedProducts()); hashCode = 31 * hashCode + Objects.hashCode(newSupportedProducts()); hashCode = 31 * hashCode + Objects.hashCode(applications()); hashCode = 31 * hashCode + Objects.hashCode(configurations()); hashCode = 31 * hashCode + Objects.hashCode(visibleToAllUsers()); hashCode = 31 * hashCode + Objects.hashCode(jobFlowRole()); hashCode = 31 * hashCode + Objects.hashCode(serviceRole()); hashCode = 31 * hashCode + Objects.hashCode(tags()); 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()); return hashCode; } @Override public boolean equals(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(additionalInfo(), other.additionalInfo()) && Objects.equals(amiVersion(), other.amiVersion()) && Objects.equals(releaseLabel(), other.releaseLabel()) && Objects.equals(instances(), other.instances()) && Objects.equals(steps(), other.steps()) && Objects.equals(bootstrapActions(), other.bootstrapActions()) && Objects.equals(supportedProducts(), other.supportedProducts()) && Objects.equals(newSupportedProducts(), other.newSupportedProducts()) && Objects.equals(applications(), other.applications()) && Objects.equals(configurations(), other.configurations()) && Objects.equals(visibleToAllUsers(), other.visibleToAllUsers()) && Objects.equals(jobFlowRole(), other.jobFlowRole()) && Objects.equals(serviceRole(), other.serviceRole()) && 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()); } /** * 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 String toString() { return ToString.builder("RunJobFlowRequest").add("Name", name()).add("LogUri", logUri()) .add("AdditionalInfo", additionalInfo()).add("AmiVersion", amiVersion()).add("ReleaseLabel", releaseLabel()) .add("Instances", instances()).add("Steps", steps()).add("BootstrapActions", bootstrapActions()) .add("SupportedProducts", supportedProducts()).add("NewSupportedProducts", newSupportedProducts()) .add("Applications", applications()).add("Configurations", configurations()) .add("VisibleToAllUsers", visibleToAllUsers()).add("JobFlowRole", jobFlowRole()) .add("ServiceRole", serviceRole()).add("Tags", tags()).add("SecurityConfiguration", securityConfiguration()) .add("AutoScalingRole", autoScalingRole()).add("ScaleDownBehavior", scaleDownBehaviorAsString()) .add("CustomAmiId", customAmiId()).add("EbsRootVolumeSize", ebsRootVolumeSize()) .add("RepoUpgradeOnBoot", repoUpgradeOnBootAsString()).add("KerberosAttributes", kerberosAttributes()).build(); } public 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 "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())); default: return Optional.empty(); } } @Override public 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); /** *

      * 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, for example, 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 versions 4.x 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, for example, 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 versions 4.x 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 Analtics 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 Analtics 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 Analtics 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 Analtics 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 Analtics 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); /** *

              * Whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value * is set to true, all IAM users of that AWS account can view and (if they have the proper policy * permissions set) manage the cluster. If it is set to false, only the IAM user that created the * cluster can view and manage it. *

              * * @param visibleToAllUsers * Whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If * this value is set to true, all IAM users of that AWS account can view and (if they have * the proper policy permissions set) manage the cluster. If it is set to false, only the * IAM user that created the cluster can view and manage it. * @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 will be assumed by the Amazon EMR service to access AWS resources on your behalf. *

              * * @param serviceRole * The IAM role that will be assumed by the Amazon EMR service to access AWS 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 blacklists 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 blacklists 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 blacklists 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 blacklists 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 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 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 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 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 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()); } @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 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 BuilderImpl() { } private BuilderImpl(RunJobFlowRequest model) { super(model); name(model.name); logUri(model.logUri); 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); } public final String getName() { return name; } @Override public final Builder name(String name) { this.name = name; return this; } public final void setName(String name) { this.name = name; } public final String getLogUri() { return logUri; } @Override public final Builder logUri(String logUri) { this.logUri = logUri; return this; } public final void setLogUri(String logUri) { this.logUri = logUri; } public final String getAdditionalInfo() { return additionalInfo; } @Override public final Builder additionalInfo(String additionalInfo) { this.additionalInfo = additionalInfo; return this; } public final void setAdditionalInfo(String additionalInfo) { this.additionalInfo = additionalInfo; } public final String getAmiVersion() { return amiVersion; } @Override public final Builder amiVersion(String amiVersion) { this.amiVersion = amiVersion; return this; } public final void setAmiVersion(String amiVersion) { this.amiVersion = amiVersion; } public final String getReleaseLabel() { return releaseLabel; } @Override public final Builder releaseLabel(String releaseLabel) { this.releaseLabel = releaseLabel; return this; } public final void setReleaseLabel(String releaseLabel) { this.releaseLabel = releaseLabel; } public final JobFlowInstancesConfig.Builder getInstances() { return instances != null ? instances.toBuilder() : null; } @Override public final Builder instances(JobFlowInstancesConfig instances) { this.instances = instances; return this; } public final void setInstances(JobFlowInstancesConfig.BuilderImpl instances) { this.instances = instances != null ? instances.build() : null; } public final Collection getSteps() { return steps != null ? steps.stream().map(StepConfig::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder steps(Collection steps) { this.steps = StepConfigListCopier.copy(steps); return this; } @Override @SafeVarargs public final Builder steps(StepConfig... steps) { steps(Arrays.asList(steps)); return this; } @Override @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 void setSteps(Collection steps) { this.steps = StepConfigListCopier.copyFromBuilder(steps); } public final Collection getBootstrapActions() { return bootstrapActions != null ? bootstrapActions.stream().map(BootstrapActionConfig::toBuilder) .collect(Collectors.toList()) : null; } @Override public final Builder bootstrapActions(Collection bootstrapActions) { this.bootstrapActions = BootstrapActionConfigListCopier.copy(bootstrapActions); return this; } @Override @SafeVarargs public final Builder bootstrapActions(BootstrapActionConfig... bootstrapActions) { bootstrapActions(Arrays.asList(bootstrapActions)); return this; } @Override @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 void setBootstrapActions(Collection bootstrapActions) { this.bootstrapActions = BootstrapActionConfigListCopier.copyFromBuilder(bootstrapActions); } public final Collection getSupportedProducts() { return supportedProducts; } @Override public final Builder supportedProducts(Collection supportedProducts) { this.supportedProducts = SupportedProductsListCopier.copy(supportedProducts); return this; } @Override @SafeVarargs public final Builder supportedProducts(String... supportedProducts) { supportedProducts(Arrays.asList(supportedProducts)); return this; } public final void setSupportedProducts(Collection supportedProducts) { this.supportedProducts = SupportedProductsListCopier.copy(supportedProducts); } public final Collection getNewSupportedProducts() { return newSupportedProducts != null ? newSupportedProducts.stream().map(SupportedProductConfig::toBuilder) .collect(Collectors.toList()) : null; } @Override public final Builder newSupportedProducts(Collection newSupportedProducts) { this.newSupportedProducts = NewSupportedProductsListCopier.copy(newSupportedProducts); return this; } @Override @SafeVarargs public final Builder newSupportedProducts(SupportedProductConfig... newSupportedProducts) { newSupportedProducts(Arrays.asList(newSupportedProducts)); return this; } @Override @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 void setNewSupportedProducts(Collection newSupportedProducts) { this.newSupportedProducts = NewSupportedProductsListCopier.copyFromBuilder(newSupportedProducts); } public final Collection getApplications() { return applications != null ? applications.stream().map(Application::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder applications(Collection applications) { this.applications = ApplicationListCopier.copy(applications); return this; } @Override @SafeVarargs public final Builder applications(Application... applications) { applications(Arrays.asList(applications)); return this; } @Override @SafeVarargs public final Builder applications(Consumer... applications) { applications(Stream.of(applications).map(c -> Application.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setApplications(Collection applications) { this.applications = ApplicationListCopier.copyFromBuilder(applications); } public final Collection getConfigurations() { return configurations != null ? configurations.stream().map(Configuration::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder configurations(Collection configurations) { this.configurations = ConfigurationListCopier.copy(configurations); return this; } @Override @SafeVarargs public final Builder configurations(Configuration... configurations) { configurations(Arrays.asList(configurations)); return this; } @Override @SafeVarargs public final Builder configurations(Consumer... configurations) { configurations(Stream.of(configurations).map(c -> Configuration.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setConfigurations(Collection configurations) { this.configurations = ConfigurationListCopier.copyFromBuilder(configurations); } public final Boolean getVisibleToAllUsers() { return visibleToAllUsers; } @Override public final Builder visibleToAllUsers(Boolean visibleToAllUsers) { this.visibleToAllUsers = visibleToAllUsers; return this; } public final void setVisibleToAllUsers(Boolean visibleToAllUsers) { this.visibleToAllUsers = visibleToAllUsers; } public final String getJobFlowRole() { return jobFlowRole; } @Override public final Builder jobFlowRole(String jobFlowRole) { this.jobFlowRole = jobFlowRole; return this; } public final void setJobFlowRole(String jobFlowRole) { this.jobFlowRole = jobFlowRole; } public final String getServiceRole() { return serviceRole; } @Override public final Builder serviceRole(String serviceRole) { this.serviceRole = serviceRole; return this; } public final void setServiceRole(String serviceRole) { this.serviceRole = serviceRole; } public final Collection getTags() { return tags != null ? tags.stream().map(Tag::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } public final String getSecurityConfiguration() { return securityConfiguration; } @Override public final Builder securityConfiguration(String securityConfiguration) { this.securityConfiguration = securityConfiguration; return this; } public final void setSecurityConfiguration(String securityConfiguration) { this.securityConfiguration = securityConfiguration; } public final String getAutoScalingRole() { return autoScalingRole; } @Override public final Builder autoScalingRole(String autoScalingRole) { this.autoScalingRole = autoScalingRole; return this; } public final void setAutoScalingRole(String autoScalingRole) { this.autoScalingRole = autoScalingRole; } public final String getScaleDownBehaviorAsString() { return scaleDownBehavior; } @Override public final Builder scaleDownBehavior(String scaleDownBehavior) { this.scaleDownBehavior = scaleDownBehavior; return this; } @Override public final Builder scaleDownBehavior(ScaleDownBehavior scaleDownBehavior) { this.scaleDownBehavior(scaleDownBehavior.toString()); return this; } public final void setScaleDownBehavior(String scaleDownBehavior) { this.scaleDownBehavior = scaleDownBehavior; } public final String getCustomAmiId() { return customAmiId; } @Override public final Builder customAmiId(String customAmiId) { this.customAmiId = customAmiId; return this; } public final void setCustomAmiId(String customAmiId) { this.customAmiId = customAmiId; } public final Integer getEbsRootVolumeSize() { return ebsRootVolumeSize; } @Override public final Builder ebsRootVolumeSize(Integer ebsRootVolumeSize) { this.ebsRootVolumeSize = ebsRootVolumeSize; return this; } public final void setEbsRootVolumeSize(Integer ebsRootVolumeSize) { this.ebsRootVolumeSize = ebsRootVolumeSize; } public final String getRepoUpgradeOnBootAsString() { return repoUpgradeOnBoot; } @Override public final Builder repoUpgradeOnBoot(String repoUpgradeOnBoot) { this.repoUpgradeOnBoot = repoUpgradeOnBoot; return this; } @Override public final Builder repoUpgradeOnBoot(RepoUpgradeOnBoot repoUpgradeOnBoot) { this.repoUpgradeOnBoot(repoUpgradeOnBoot.toString()); return this; } public final void setRepoUpgradeOnBoot(String repoUpgradeOnBoot) { this.repoUpgradeOnBoot = repoUpgradeOnBoot; } public final KerberosAttributes.Builder getKerberosAttributes() { return kerberosAttributes != null ? kerberosAttributes.toBuilder() : null; } @Override public final Builder kerberosAttributes(KerberosAttributes kerberosAttributes) { this.kerberosAttributes = kerberosAttributes; return this; } public final void setKerberosAttributes(KerberosAttributes.BuilderImpl kerberosAttributes) { this.kerberosAttributes = kerberosAttributes != null ? kerberosAttributes.build() : null; } @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