text:
package com.amazonaws.services.elasticmapreduce.model;

import java.io.Serializable;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * Container for the parameters to the {@link com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduce#runJobFlow(RunJobFlowRequest) RunJobFlow operation}.
 *

 * RunJobFlow creates and starts running a new job flow. The job flow
 * will run the steps specified. Once the job flow completes, the cluster
 * is stopped and the HDFS partition is lost. To prevent loss of data,
 * configure the last step of the job flow to store results in Amazon S3.
 * If the JobFlowInstancesConfig KeepJobFlowAliveWhenNoSteps
 * parameter is set to TRUE , the job flow will transition
 * to the WAITING state rather than shutting down once the steps have
 * completed.
 *

 *

 * For additional protection, you can set the JobFlowInstancesConfig
 * TerminationProtected parameter to TRUE to
 * lock the job flow and prevent it from being terminated by API call,
 * user intervention, or in the event of a job flow error.
 *

 *

 * A maximum of 256 steps are allowed in each job flow.
 *

 *

 * If your job flow is long-running (such as a Hive data warehouse) or
 * complex, you may require more than 256 steps to process your data. You
 * can bypass the 256-step limitation in various ways, including using
 * the SSH shell to connect to the master node and submitting queries
 * directly to the software running on the master node, such as Hive and
 * Hadoop. For more information on how to do this, go to
 *  Add More than 256 Steps to a Job Flow
 * in the Amazon Elastic MapReduce Developer's Guide .
 *

 *

 * For long running job flows, we recommend that you periodically store
 * your results.
 *

 *
 * @see com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduce#runJobFlow(RunJobFlowRequest)
 */
public class RunJobFlowRequest extends AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * The name of the job flow.
     *

     * Constraints:

     * Length: 0 - 256

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

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

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     */
    private String logUri;

    /**
     * A JSON string for selecting additional features.
     *

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     */
    private String additionalInfo;

    /**
     * The version of the Amazon Machine Image (AMI) to use when launching
     * Amazon EC2 instances in the job flow. The following values are valid:
     *

"latest" (uses the latest AMI)

The version number of
     * the AMI to use, for example, "2.0"

If the AMI supports
     * multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop
     * 0.18 and 0.20) you can use the JobFlowInstancesConfig
     * HadoopVersion parameter to modify the version of Hadoop
     * from the defaults shown above.
For details about the AMI versions
     * currently supported by Amazon Elastic MapReduce, go to AMI
     * Versions Supported in Elastic MapReduce in the Amazon Elastic
     * MapReduce Developer's Guide.
     *

     * Constraints:

     * Length: 0 - 256

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     */
    private String amiVersion;

    /**
     * A specification of the number and type of Amazon EC2 instances on
     * which to run the job flow.
     */
    private JobFlowInstancesConfig instances;

    /**
     * A list of steps to be executed by the job flow.
     */
    private com.amazonaws.internal.ListWithAutoConstructFlag<StepConfig> steps;

    /**
     * A list of bootstrap actions that will be run before Hadoop is started
     * on the cluster nodes.
     */
    private com.amazonaws.internal.ListWithAutoConstructFlag<BootstrapActionConfig> bootstrapActions;

    /**
     * A list of strings that indicates third-party software to use with the
     * job flow. For more information, go to Use
     * Third Party Applications with Amazon EMR. Currently supported
     * values are:

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

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

     */
    private com.amazonaws.internal.ListWithAutoConstructFlag<String> supportedProducts;

    /**
     * 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. Currently
     * supported values are:

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

"mapr-m5" - launch the job flow 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.

     */
    private com.amazonaws.internal.ListWithAutoConstructFlag<SupportedProductConfig> newSupportedProducts;

    /**
     * Whether the job flow is visible to all IAM users of the AWS account
     * associated with the job flow. 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 job flow. If
     * it is set to false, only the IAM user that created the
     * job flow can view and manage it.
     */
    private Boolean visibleToAllUsers;

    /**
     * An IAM role for the job flow. The EC2 instances of the job flow assume
     * this role. The default role is EMRJobflowDefault. In
     * order to use the default role, you must have already created it using
     * the CLI.
     *

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     */
    private String jobFlowRole;

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

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     */
    private String serviceRole;

    /**
     * A list of tags to associate with a cluster and propagate to Amazon EC2
     * instances.
     */
    private com.amazonaws.internal.ListWithAutoConstructFlag<Tag> tags;

    /**
     * Default constructor for a new RunJobFlowRequest object.  Callers should use the
     * setter or fluent setter (with...) methods to initialize this object after creating it.
     */
    public RunJobFlowRequest() {}

    /**
     * Constructs a new RunJobFlowRequest object.
     * Callers should use the setter or fluent setter (with...) methods to
     * initialize any additional object members.
     *
     * @param name The name of the job flow.
     * @param instances A specification of the number and type of Amazon EC2
     * instances on which to run the job flow.
     */
    public RunJobFlowRequest(String name, JobFlowInstancesConfig instances) {
        setName(name);
        setInstances(instances);
    }

    /**
     * The name of the job flow.
     *

     * Constraints:

     * Length: 0 - 256

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

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

    /**
     * The name of the job flow.
     *

     * Constraints:

     * Length: 0 - 256

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @param name The name of the job flow.
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * The name of the job flow.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *

     * Constraints:

     * Length: 0 - 256

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @param name The name of the job flow.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withName(String name) {
        this.name = name;
        return this;
    }

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

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @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 getLogUri() {
        return 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.
     *

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @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.
     */
    public void setLogUri(String logUri) {
        this.logUri = 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.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @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 A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withLogUri(String logUri) {
        this.logUri = logUri;
        return this;
    }

    /**
     * A JSON string for selecting additional features.
     *

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

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

    /**
     * A JSON string for selecting additional features.
     *

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @param additionalInfo A JSON string for selecting additional features.
     */
    public void setAdditionalInfo(String additionalInfo) {
        this.additionalInfo = additionalInfo;
    }

    /**
     * A JSON string for selecting additional features.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @param additionalInfo A JSON string for selecting additional features.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withAdditionalInfo(String additionalInfo) {
        this.additionalInfo = additionalInfo;
        return this;
    }

    /**
     * The version of the Amazon Machine Image (AMI) to use when launching
     * Amazon EC2 instances in the job flow. The following values are valid:
     *

"latest" (uses the latest AMI)

The version number of
     * the AMI to use, for example, "2.0"

If the AMI supports
     * multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop
     * 0.18 and 0.20) you can use the JobFlowInstancesConfig
     * HadoopVersion parameter to modify the version of Hadoop
     * from the defaults shown above.
For details about the AMI versions
     * currently supported by Amazon Elastic MapReduce, go to AMI
     * Versions Supported in Elastic MapReduce in the Amazon Elastic
     * MapReduce Developer's Guide.
     *

     * Constraints:

     * Length: 0 - 256

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @return The version of the Amazon Machine Image (AMI) to use when launching
     *         Amazon EC2 instances in the job flow. The following values are valid:
     *

"latest" (uses the latest AMI)

The version number of
     *         the AMI to use, for example, "2.0"

If the AMI supports
     *         multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop
     *         0.18 and 0.20) you can use the JobFlowInstancesConfig
     *         HadoopVersion parameter to modify the version of Hadoop
     *         from the defaults shown above.
For details about the AMI versions
     *         currently supported by Amazon Elastic MapReduce, go to AMI
     *         Versions Supported in Elastic MapReduce in the Amazon Elastic
     *         MapReduce Developer's Guide.
     */
    public String getAmiVersion() {
        return amiVersion;
    }

    /**
     * The version of the Amazon Machine Image (AMI) to use when launching
     * Amazon EC2 instances in the job flow. The following values are valid:
     *

"latest" (uses the latest AMI)

The version number of
     * the AMI to use, for example, "2.0"

If the AMI supports
     * multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop
     * 0.18 and 0.20) you can use the JobFlowInstancesConfig
     * HadoopVersion parameter to modify the version of Hadoop
     * from the defaults shown above.
For details about the AMI versions
     * currently supported by Amazon Elastic MapReduce, go to AMI
     * Versions Supported in Elastic MapReduce in the Amazon Elastic
     * MapReduce Developer's Guide.
     *

     * Constraints:

     * Length: 0 - 256

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @param amiVersion The version of the Amazon Machine Image (AMI) to use when launching
     *         Amazon EC2 instances in the job flow. The following values are valid:
     *

"latest" (uses the latest AMI)

The version number of
     *         the AMI to use, for example, "2.0"

If the AMI supports
     *         multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop
     *         0.18 and 0.20) you can use the JobFlowInstancesConfig
     *         HadoopVersion parameter to modify the version of Hadoop
     *         from the defaults shown above.
For details about the AMI versions
     *         currently supported by Amazon Elastic MapReduce, go to AMI
     *         Versions Supported in Elastic MapReduce in the Amazon Elastic
     *         MapReduce Developer's Guide.
     */
    public void setAmiVersion(String amiVersion) {
        this.amiVersion = amiVersion;
    }

    /**
     * The version of the Amazon Machine Image (AMI) to use when launching
     * Amazon EC2 instances in the job flow. The following values are valid:
     *

"latest" (uses the latest AMI)

The version number of
     * the AMI to use, for example, "2.0"

If the AMI supports
     * multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop
     * 0.18 and 0.20) you can use the JobFlowInstancesConfig
     * HadoopVersion parameter to modify the version of Hadoop
     * from the defaults shown above.
For details about the AMI versions
     * currently supported by Amazon Elastic MapReduce, go to AMI
     * Versions Supported in Elastic MapReduce in the Amazon Elastic
     * MapReduce Developer's Guide.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *

     * Constraints:

     * Length: 0 - 256

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @param amiVersion The version of the Amazon Machine Image (AMI) to use when launching
     *         Amazon EC2 instances in the job flow. The following values are valid:
     *

"latest" (uses the latest AMI)

The version number of
     *         the AMI to use, for example, "2.0"

If the AMI supports
     *         multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop
     *         0.18 and 0.20) you can use the JobFlowInstancesConfig
     *         HadoopVersion parameter to modify the version of Hadoop
     *         from the defaults shown above.
For details about the AMI versions
     *         currently supported by Amazon Elastic MapReduce, go to AMI
     *         Versions Supported in Elastic MapReduce in the Amazon Elastic
     *         MapReduce Developer's Guide.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withAmiVersion(String amiVersion) {
        this.amiVersion = amiVersion;
        return this;
    }

    /**
     * A specification of the number and type of Amazon EC2 instances on
     * which to run the job flow.
     *
     * @return A specification of the number and type of Amazon EC2 instances on
     *         which to run the job flow.
     */
    public JobFlowInstancesConfig getInstances() {
        return instances;
    }

    /**
     * A specification of the number and type of Amazon EC2 instances on
     * which to run the job flow.
     *
     * @param instances A specification of the number and type of Amazon EC2 instances on
     *         which to run the job flow.
     */
    public void setInstances(JobFlowInstancesConfig instances) {
        this.instances = instances;
    }

    /**
     * A specification of the number and type of Amazon EC2 instances on
     * which to run the job flow.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param instances A specification of the number and type of Amazon EC2 instances on
     *         which to run the job flow.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withInstances(JobFlowInstancesConfig instances) {
        this.instances = instances;
        return this;
    }

    /**
     * A list of steps to be executed by the job flow.
     *
     * @return A list of steps to be executed by the job flow.
     */
    public java.util.List<StepConfig> getSteps() {
        if (steps == null) {
              steps = new com.amazonaws.internal.ListWithAutoConstructFlag<StepConfig>();
              steps.setAutoConstruct(true);
        }
        return steps;
    }

    /**
     * A list of steps to be executed by the job flow.
     *
     * @param steps A list of steps to be executed by the job flow.
     */
    public void setSteps(java.util.Collection<StepConfig> steps) {
        if (steps == null) {
            this.steps = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StepConfig> stepsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<StepConfig>(steps.size());
        stepsCopy.addAll(steps);
        this.steps = stepsCopy;
    }

    /**
     * A list of steps to be executed by the job flow.
     *

     * NOTE: This method appends the values to the existing list (if
     * any). Use {@link #setSteps(java.util.Collection)} or {@link
     * #withSteps(java.util.Collection)} if you want to override the existing
     * values.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param steps A list of steps to be executed by the job flow.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withSteps(StepConfig... steps) {
        if (getSteps() == null) setSteps(new java.util.ArrayList<StepConfig>(steps.length));
        for (StepConfig value : steps) {
            getSteps().add(value);
        }
        return this;
    }

    /**
     * A list of steps to be executed by the job flow.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param steps A list of steps to be executed by the job flow.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withSteps(java.util.Collection<StepConfig> steps) {
        if (steps == null) {
            this.steps = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StepConfig> stepsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<StepConfig>(steps.size());
            stepsCopy.addAll(steps);
            this.steps = stepsCopy;
        }

        return this;
    }

    /**
     * A list of bootstrap actions that will be run before Hadoop is started
     * on the cluster nodes.
     *
     * @return A list of bootstrap actions that will be run before Hadoop is started
     *         on the cluster nodes.
     */
    public java.util.List<BootstrapActionConfig> getBootstrapActions() {
        if (bootstrapActions == null) {
              bootstrapActions = new com.amazonaws.internal.ListWithAutoConstructFlag<BootstrapActionConfig>();
              bootstrapActions.setAutoConstruct(true);
        }
        return bootstrapActions;
    }

    /**
     * A list of bootstrap actions that will be run before Hadoop is started
     * on the cluster nodes.
     *
     * @param bootstrapActions A list of bootstrap actions that will be run before Hadoop is started
     *         on the cluster nodes.
     */
    public void setBootstrapActions(java.util.Collection<BootstrapActionConfig> bootstrapActions) {
        if (bootstrapActions == null) {
            this.bootstrapActions = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<BootstrapActionConfig> bootstrapActionsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<BootstrapActionConfig>(bootstrapActions.size());
        bootstrapActionsCopy.addAll(bootstrapActions);
        this.bootstrapActions = bootstrapActionsCopy;
    }

    /**
     * A list of bootstrap actions that will be run before Hadoop is started
     * on the cluster nodes.
     *

     * NOTE: This method appends the values to the existing list (if
     * any). Use {@link #setBootstrapActions(java.util.Collection)} or {@link
     * #withBootstrapActions(java.util.Collection)} if you want to override
     * the existing values.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param bootstrapActions A list of bootstrap actions that will be run before Hadoop is started
     *         on the cluster nodes.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withBootstrapActions(BootstrapActionConfig... bootstrapActions) {
        if (getBootstrapActions() == null) setBootstrapActions(new java.util.ArrayList<BootstrapActionConfig>(bootstrapActions.length));
        for (BootstrapActionConfig value : bootstrapActions) {
            getBootstrapActions().add(value);
        }
        return this;
    }

    /**
     * A list of bootstrap actions that will be run before Hadoop is started
     * on the cluster nodes.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param bootstrapActions A list of bootstrap actions that will be run before Hadoop is started
     *         on the cluster nodes.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withBootstrapActions(java.util.Collection<BootstrapActionConfig> bootstrapActions) {
        if (bootstrapActions == null) {
            this.bootstrapActions = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<BootstrapActionConfig> bootstrapActionsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<BootstrapActionConfig>(bootstrapActions.size());
            bootstrapActionsCopy.addAll(bootstrapActions);
            this.bootstrapActions = bootstrapActionsCopy;
        }

        return this;
    }

    /**
     * A list of strings that indicates third-party software to use with the
     * job flow. For more information, go to Use
     * Third Party Applications with Amazon EMR. 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 A list of strings that indicates third-party software to use with the
     *         job flow. For more information, go to Use
     *         Third Party Applications with Amazon EMR. 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 java.util.List<String> getSupportedProducts() {
        if (supportedProducts == null) {
              supportedProducts = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              supportedProducts.setAutoConstruct(true);
        }
        return supportedProducts;
    }

    /**
     * A list of strings that indicates third-party software to use with the
     * job flow. For more information, go to Use
     * Third Party Applications with Amazon EMR. 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 A list of strings that indicates third-party software to use with the
     *         job flow. For more information, go to Use
     *         Third Party Applications with Amazon EMR. 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 void setSupportedProducts(java.util.Collection<String> supportedProducts) {
        if (supportedProducts == null) {
            this.supportedProducts = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<String> supportedProductsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(supportedProducts.size());
        supportedProductsCopy.addAll(supportedProducts);
        this.supportedProducts = supportedProductsCopy;
    }

    /**
     * A list of strings that indicates third-party software to use with the
     * job flow. For more information, go to Use
     * Third Party Applications with Amazon EMR. Currently supported
     * values are:

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

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

     *

     * NOTE: This method appends the values to the existing list (if
     * any). Use {@link #setSupportedProducts(java.util.Collection)} or
     * {@link #withSupportedProducts(java.util.Collection)} if you want to
     * override the existing values.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param supportedProducts A list of strings that indicates third-party software to use with the
     *         job flow. For more information, go to Use
     *         Third Party Applications with Amazon EMR. 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 A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withSupportedProducts(String... supportedProducts) {
        if (getSupportedProducts() == null) setSupportedProducts(new java.util.ArrayList<String>(supportedProducts.length));
        for (String value : supportedProducts) {
            getSupportedProducts().add(value);
        }
        return this;
    }

    /**
     * A list of strings that indicates third-party software to use with the
     * job flow. For more information, go to Use
     * Third Party Applications with Amazon EMR. Currently supported
     * values are:

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

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

     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param supportedProducts A list of strings that indicates third-party software to use with the
     *         job flow. For more information, go to Use
     *         Third Party Applications with Amazon EMR. 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 A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withSupportedProducts(java.util.Collection<String> supportedProducts) {
        if (supportedProducts == null) {
            this.supportedProducts = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<String> supportedProductsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(supportedProducts.size());
            supportedProductsCopy.addAll(supportedProducts);
            this.supportedProducts = supportedProductsCopy;
        }

        return this;
    }

    /**
     * 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. Currently
     * supported values are:

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

"mapr-m5" - launch the job flow 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.

     *
     * @return 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. Currently
     *         supported values are:

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

"mapr-m5" - launch the job flow 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.

     */
    public java.util.List<SupportedProductConfig> getNewSupportedProducts() {
        if (newSupportedProducts == null) {
              newSupportedProducts = new com.amazonaws.internal.ListWithAutoConstructFlag<SupportedProductConfig>();
              newSupportedProducts.setAutoConstruct(true);
        }
        return newSupportedProducts;
    }

    /**
     * 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. Currently
     * supported values are:

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

"mapr-m5" - launch the job flow 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.

     *
     * @param newSupportedProducts 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. Currently
     *         supported values are:

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

"mapr-m5" - launch the job flow 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.

     */
    public void setNewSupportedProducts(java.util.Collection<SupportedProductConfig> newSupportedProducts) {
        if (newSupportedProducts == null) {
            this.newSupportedProducts = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<SupportedProductConfig> newSupportedProductsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<SupportedProductConfig>(newSupportedProducts.size());
        newSupportedProductsCopy.addAll(newSupportedProducts);
        this.newSupportedProducts = newSupportedProductsCopy;
    }

    /**
     * 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. Currently
     * supported values are:

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

"mapr-m5" - launch the job flow 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.

     *

     * NOTE: This method appends the values to the existing list (if
     * any). Use {@link #setNewSupportedProducts(java.util.Collection)} or
     * {@link #withNewSupportedProducts(java.util.Collection)} if you want to
     * override the existing values.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param newSupportedProducts 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. Currently
     *         supported values are:

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

"mapr-m5" - launch the job flow 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.

     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withNewSupportedProducts(SupportedProductConfig... newSupportedProducts) {
        if (getNewSupportedProducts() == null) setNewSupportedProducts(new java.util.ArrayList<SupportedProductConfig>(newSupportedProducts.length));
        for (SupportedProductConfig value : newSupportedProducts) {
            getNewSupportedProducts().add(value);
        }
        return this;
    }

    /**
     * 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. Currently
     * supported values are:

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

"mapr-m5" - launch the job flow 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.

     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param newSupportedProducts 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. Currently
     *         supported values are:

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

"mapr-m5" - launch the job flow 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.

     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withNewSupportedProducts(java.util.Collection<SupportedProductConfig> newSupportedProducts) {
        if (newSupportedProducts == null) {
            this.newSupportedProducts = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<SupportedProductConfig> newSupportedProductsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<SupportedProductConfig>(newSupportedProducts.size());
            newSupportedProductsCopy.addAll(newSupportedProducts);
            this.newSupportedProducts = newSupportedProductsCopy;
        }

        return this;
    }

    /**
     * Whether the job flow is visible to all IAM users of the AWS account
     * associated with the job flow. 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 job flow. If
     * it is set to false, only the IAM user that created the
     * job flow can view and manage it.
     *
     * @return Whether the job flow is visible to all IAM users of the AWS account
     *         associated with the job flow. 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 job flow. If
     *         it is set to false, only the IAM user that created the
     *         job flow can view and manage it.
     */
    public Boolean isVisibleToAllUsers() {
        return visibleToAllUsers;
    }

    /**
     * Whether the job flow is visible to all IAM users of the AWS account
     * associated with the job flow. 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 job flow. If
     * it is set to false, only the IAM user that created the
     * job flow can view and manage it.
     *
     * @param visibleToAllUsers Whether the job flow is visible to all IAM users of the AWS account
     *         associated with the job flow. 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 job flow. If
     *         it is set to false, only the IAM user that created the
     *         job flow can view and manage it.
     */
    public void setVisibleToAllUsers(Boolean visibleToAllUsers) {
        this.visibleToAllUsers = visibleToAllUsers;
    }

    /**
     * Whether the job flow is visible to all IAM users of the AWS account
     * associated with the job flow. 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 job flow. If
     * it is set to false, only the IAM user that created the
     * job flow can view and manage it.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param visibleToAllUsers Whether the job flow is visible to all IAM users of the AWS account
     *         associated with the job flow. 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 job flow. If
     *         it is set to false, only the IAM user that created the
     *         job flow can view and manage it.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withVisibleToAllUsers(Boolean visibleToAllUsers) {
        this.visibleToAllUsers = visibleToAllUsers;
        return this;
    }

    /**
     * Whether the job flow is visible to all IAM users of the AWS account
     * associated with the job flow. 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 job flow. If
     * it is set to false, only the IAM user that created the
     * job flow can view and manage it.
     *
     * @return Whether the job flow is visible to all IAM users of the AWS account
     *         associated with the job flow. 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 job flow. If
     *         it is set to false, only the IAM user that created the
     *         job flow can view and manage it.
     */
    public Boolean getVisibleToAllUsers() {
        return visibleToAllUsers;
    }

    /**
     * An IAM role for the job flow. The EC2 instances of the job flow assume
     * this role. The default role is EMRJobflowDefault. In
     * order to use the default role, you must have already created it using
     * the CLI.
     *

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @return An IAM role for the job flow. The EC2 instances of the job flow assume
     *         this role. The default role is EMRJobflowDefault. In
     *         order to use the default role, you must have already created it using
     *         the CLI.
     */
    public String getJobFlowRole() {
        return jobFlowRole;
    }

    /**
     * An IAM role for the job flow. The EC2 instances of the job flow assume
     * this role. The default role is EMRJobflowDefault. In
     * order to use the default role, you must have already created it using
     * the CLI.
     *

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @param jobFlowRole An IAM role for the job flow. The EC2 instances of the job flow assume
     *         this role. The default role is EMRJobflowDefault. In
     *         order to use the default role, you must have already created it using
     *         the CLI.
     */
    public void setJobFlowRole(String jobFlowRole) {
        this.jobFlowRole = jobFlowRole;
    }

    /**
     * An IAM role for the job flow. The EC2 instances of the job flow assume
     * this role. The default role is EMRJobflowDefault. In
     * order to use the default role, you must have already created it using
     * the CLI.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @param jobFlowRole An IAM role for the job flow. The EC2 instances of the job flow assume
     *         this role. The default role is EMRJobflowDefault. In
     *         order to use the default role, you must have already created it using
     *         the CLI.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withJobFlowRole(String jobFlowRole) {
        this.jobFlowRole = jobFlowRole;
        return this;
    }

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

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

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

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

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

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

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

     * Returns a reference to this object so that method calls can be chained together.
     *

     * Constraints:

     * Length: 0 - 10280

     * Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

     *
     * @param serviceRole The IAM role that will be assumed by the Amazon EMR service to access
     *         AWS resources on your behalf.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withServiceRole(String serviceRole) {
        this.serviceRole = serviceRole;
        return this;
    }

    /**
     * A list of tags to associate with a cluster and propagate to Amazon EC2
     * instances.
     *
     * @return A list of tags to associate with a cluster and propagate to Amazon EC2
     *         instances.
     */
    public java.util.List<Tag> getTags() {
        if (tags == null) {
              tags = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>();
              tags.setAutoConstruct(true);
        }
        return 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.
     */
    public void setTags(java.util.Collection<Tag> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<Tag> tagsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>(tags.size());
        tagsCopy.addAll(tags);
        this.tags = tagsCopy;
    }

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

     * NOTE: This method appends the values to the existing list (if
     * any). Use {@link #setTags(java.util.Collection)} or {@link
     * #withTags(java.util.Collection)} if you want to override the existing
     * values.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param tags A list of tags to associate with a cluster and propagate to Amazon EC2
     *         instances.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withTags(Tag... tags) {
        if (getTags() == null) setTags(new java.util.ArrayList<Tag>(tags.length));
        for (Tag value : tags) {
            getTags().add(value);
        }
        return this;
    }

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

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param tags A list of tags to associate with a cluster and propagate to Amazon EC2
     *         instances.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RunJobFlowRequest withTags(java.util.Collection<Tag> tags) {
        if (tags == null) {
            this.tags = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<Tag> tagsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>(tags.size());
            tagsCopy.addAll(tags);
            this.tags = tagsCopy;
        }

        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getName() != null) sb.append("Name: " + getName() + ",");
        if (getLogUri() != null) sb.append("LogUri: " + getLogUri() + ",");
        if (getAdditionalInfo() != null) sb.append("AdditionalInfo: " + getAdditionalInfo() + ",");
        if (getAmiVersion() != null) sb.append("AmiVersion: " + getAmiVersion() + ",");
        if (getInstances() != null) sb.append("Instances: " + getInstances() + ",");
        if (getSteps() != null) sb.append("Steps: " + getSteps() + ",");
        if (getBootstrapActions() != null) sb.append("BootstrapActions: " + getBootstrapActions() + ",");
        if (getSupportedProducts() != null) sb.append("SupportedProducts: " + getSupportedProducts() + ",");
        if (getNewSupportedProducts() != null) sb.append("NewSupportedProducts: " + getNewSupportedProducts() + ",");
        if (isVisibleToAllUsers() != null) sb.append("VisibleToAllUsers: " + isVisibleToAllUsers() + ",");
        if (getJobFlowRole() != null) sb.append("JobFlowRole: " + getJobFlowRole() + ",");
        if (getServiceRole() != null) sb.append("ServiceRole: " + getServiceRole() + ",");
        if (getTags() != null) sb.append("Tags: " + getTags() );
        sb.append("}");
        return sb.toString();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
        hashCode = prime * hashCode + ((getLogUri() == null) ? 0 : getLogUri().hashCode());
        hashCode = prime * hashCode + ((getAdditionalInfo() == null) ? 0 : getAdditionalInfo().hashCode());
        hashCode = prime * hashCode + ((getAmiVersion() == null) ? 0 : getAmiVersion().hashCode());
        hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode());
        hashCode = prime * hashCode + ((getSteps() == null) ? 0 : getSteps().hashCode());
        hashCode = prime * hashCode + ((getBootstrapActions() == null) ? 0 : getBootstrapActions().hashCode());
        hashCode = prime * hashCode + ((getSupportedProducts() == null) ? 0 : getSupportedProducts().hashCode());
        hashCode = prime * hashCode + ((getNewSupportedProducts() == null) ? 0 : getNewSupportedProducts().hashCode());
        hashCode = prime * hashCode + ((isVisibleToAllUsers() == null) ? 0 : isVisibleToAllUsers().hashCode());
        hashCode = prime * hashCode + ((getJobFlowRole() == null) ? 0 : getJobFlowRole().hashCode());
        hashCode = prime * hashCode + ((getServiceRole() == null) ? 0 : getServiceRole().hashCode());
        hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
        return hashCode;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null) return false;

        if (obj instanceof RunJobFlowRequest == false) return false;
        RunJobFlowRequest other = (RunJobFlowRequest)obj;

        if (other.getName() == null ^ this.getName() == null) return false;
        if (other.getName() != null && other.getName().equals(this.getName()) == false) return false;
        if (other.getLogUri() == null ^ this.getLogUri() == null) return false;
        if (other.getLogUri() != null && other.getLogUri().equals(this.getLogUri()) == false) return false;
        if (other.getAdditionalInfo() == null ^ this.getAdditionalInfo() == null) return false;
        if (other.getAdditionalInfo() != null && other.getAdditionalInfo().equals(this.getAdditionalInfo()) == false) return false;
        if (other.getAmiVersion() == null ^ this.getAmiVersion() == null) return false;
        if (other.getAmiVersion() != null && other.getAmiVersion().equals(this.getAmiVersion()) == false) return false;
        if (other.getInstances() == null ^ this.getInstances() == null) return false;
        if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false) return false;
        if (other.getSteps() == null ^ this.getSteps() == null) return false;
        if (other.getSteps() != null && other.getSteps().equals(this.getSteps()) == false) return false;
        if (other.getBootstrapActions() == null ^ this.getBootstrapActions() == null) return false;
        if (other.getBootstrapActions() != null && other.getBootstrapActions().equals(this.getBootstrapActions()) == false) return false;
        if (other.getSupportedProducts() == null ^ this.getSupportedProducts() == null) return false;
        if (other.getSupportedProducts() != null && other.getSupportedProducts().equals(this.getSupportedProducts()) == false) return false;
        if (other.getNewSupportedProducts() == null ^ this.getNewSupportedProducts() == null) return false;
        if (other.getNewSupportedProducts() != null && other.getNewSupportedProducts().equals(this.getNewSupportedProducts()) == false) return false;
        if (other.isVisibleToAllUsers() == null ^ this.isVisibleToAllUsers() == null) return false;
        if (other.isVisibleToAllUsers() != null && other.isVisibleToAllUsers().equals(this.isVisibleToAllUsers()) == false) return false;
        if (other.getJobFlowRole() == null ^ this.getJobFlowRole() == null) return false;
        if (other.getJobFlowRole() != null && other.getJobFlowRole().equals(this.getJobFlowRole()) == false) return false;
        if (other.getServiceRole() == null ^ this.getServiceRole() == null) return false;
        if (other.getServiceRole() != null && other.getServiceRole().equals(this.getServiceRole()) == false) return false;
        if (other.getTags() == null ^ this.getTags() == null) return false;
        if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false;
        return true;
    }

    @Override
    public RunJobFlowRequest clone() {

            return (RunJobFlowRequest) super.clone();
    }

}


text:
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>

<!--

Copyright (c) 2001-2004 World Wide Web Consortium,
(Massachusetts Institute of Technology, Institut National de
Recherche en Informatique et en Automatique, Keio University).  All
Rights Reserved.  This program is distributed under the W3C's Software
Intellectual Property License.  This program is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

See W3C License http://www.w3.org/Consortium/Legal/ for more details.

-->

<!DOCTYPE test SYSTEM "dom3.dtd">
<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace16">
<metadata>
<title>nodeisdefaultnamespace16</title>
<creator>IBM</creator>
<description>
	Using isDefaultNamespace on a new Attribute node with with a namespace URI
	and no prefix and  verify if the value returned is false since default namespaces
	do not apply directly to attributes.
</description>
<contributor>Neil Delima</contributor>
<date qualifier="created">2002-06-10</date>
<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/>
</metadata>
<var name="doc" type="Document"/>
<var name="attr" type="Attr"/>
<var name="isDefault" type="boolean"/>
<load var="doc" href="barfoo" willBeModified="false"/>
<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"lang"'/>
<isDefaultNamespace var="isDefault" obj="attr" namespaceURI='"http://www.w3.org/XML/1998/namespace"'/>
<assertFalse  actual="isDefault" id="nodeisdefaultnamespace16"/>
</test>

redpajama_set_name: RedPajamaGithub


text:
package com.gs.fw.common.mithra.test.domain;

public interface ReadOnlyOrderStatusWi extends ReadOnlyOrderStatusWiAbstract
{
}


text:
class PasswordGroupsController < ApplicationController

  skip_before_action :verify_authenticity_token

  def index
    @password_groups = PasswordGroup.all
    render json: @password_groups
  end

  def create
    @password_group = PasswordGroup.create(password_group_params)

    respond_to do |format|
      format.json do
        if @password_group.save
          render :json => @password_group.as_json({only: [:id, :name]});
        else
          render :json => { :errors => @password_group.errors.messages }, :status => 422
        end
      end
    end
  end

  private

  def password_group_params
    params.require(:password_group).permit(:name)
  end

end


text:
layout: single
title: Geek Test
categories: whatever
tags: geek
---

So I'm currently listening to the [Harry Potter and the Methods of Rationality](http://www.hpmorpodcast.com/?page_id=56) audiobook while working,
mostly because a) I didn't know it existed before and b) it's very amusing.

So amusing, that in the 30-something chapter I managed not to laugh when there were to be armies of students and one of them was to be a Dragon Army.
I managed not to laugh at the assigning the callsigns of Red Leader, Green Leader etc to the broomstick fighters, and I somehow managed not to laugh at
the Chaos army's song which was the Imperial March with the appropriately added words of "Doom Doom Doom DoomDoomDomm". I managed not to laugh at the
Lovercraftian battle shouts and the more obvious "why are you upside down?" question being asked with all the implications that follow it.

I lost it and had to retreat from the office for a short while, when the incantation to the drill hex was revealed to be "Lagann".

And yes, it is a geek test and I am old enough to pass it.


text:
@interface LPSLepayBaseModel : NSObject

@end


text:
#ifndef INTENT_INTENTSTORYSERVICE_HPP
#define INTENT_INTENTSTORYSERVICE_HPP

#include "intent/intent_service/IntentService.hpp"

#include "intent/intent_service/DictionaryModel.hpp"
#include "intent/intent_service/IntentService.hpp"
#include "IntentStoryModel.hpp"
#include "IntentStoryServiceModel.hpp"

namespace intent {
/**
 * \brief The service uses a finite state automaton to match user successive
 * intents. We call it an intent story.
 */
class IntentStoryService : protected IntentService {
 public:
  typedef IntentMatcher::Intent Intent;
  typedef IntentMatcher::EntityMatch EntityMatch;
  typedef IntentMatcher::EntityMatches EntityMatches;

  /**
   * \brief The result of one transition of the finite state automaton after
   * evaluating a single user intent.
   */
  struct Result {
    Result() : found(true) {}

    bool found;
    std::string actionId;
    std::string nextStateId;
    Intent intent;

    bool operator==(const Result& that) const {
      return this->found == that.found && this->actionId == that.actionId &&
             this->intent == that.intent &&
             this->nextStateId == that.nextStateId;
    }
  };

  /**
   * \param intentStoryServiceModel   The intent story service data model
   * containing the finite state automaton.
   */
  IntentStoryService(const IntentStoryServiceModel& intentStoryServiceModel);

  /**
   * \brief Evaluate a user intent and try to find a transition to move on in
   * the following state.
   *
   * \param stateId   The state ID to evaluate the intent from.
   * \param message   The user intent.
   * \return The result of the intent matching.
   */
  Result evaluate(const std::string& stateId, const std::string& message) const;

  inline IntentStoryServiceModel getIntentStoryServiceModel() const {
    IntentStoryServiceModel intentStoryServiceModel;
    intentStoryServiceModel.intentServiceModel = getIntentServiceModel();
    intentStoryServiceModel.intentStoryModel = m_intentStoryModel;
    return intentStoryServiceModel;
  }

 private:
  IntentStoryModel::SharedPtr m_intentStoryModel;
};

std::ostream& operator<<(std::ostream& os,
                         const IntentStoryService::Result& result);
}

#endif  // INTENT_INTENTSTORYSERVICE_HPP


text:
package org.apache.camel.core.xml.util.jsse;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlTransient;

import org.apache.camel.spi.Metadata;
import org.apache.camel.support.jsse.SSLContextServerParameters;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlTransient
public abstract class AbstractSSLContextServerParametersFactoryBean
        extends AbstractBaseSSLContextParametersFactoryBean<SSLContextServerParameters> {

    @XmlAttribute
    @Metadata(description = "The optional configuration options for server-side client-authentication requirements.")
    protected String clientAuthentication;

    public String getClientAuthentication() {
        return clientAuthentication;
    }

    public void setClientAuthentication(String clientAuthentication) {
        this.clientAuthentication = clientAuthentication;
    }

    @Override
    protected SSLContextServerParameters createInstance() {
        SSLContextServerParameters newInstance = new SSLContextServerParameters();
        newInstance.setClientAuthentication(clientAuthentication);
        newInstance.setCamelContext(getCamelContext());
        return newInstance;
    }

    @Override
    public Class<SSLContextServerParameters> getObjectType() {
        return SSLContextServerParameters.class;
    }
}


text:
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
from msrestazure.azure_operation import AzureOperationPoller

from .. import models

class OperationalizationClustersOperations(object):
    """OperationalizationClustersOperations operations.

    :param client: Client for service requests.
    :param config: Configuration of service client.
    :param serializer: An object model serializer.
    :param deserializer: An objec model deserializer.
    :ivar api_version: The version of the Microsoft.MachineLearningCompute resource provider API to use. Constant value: "2017-08-01-preview".
    """

    models = models

    def __init__(self, client, config, serializer, deserializer):

        self._client = client
        self._serialize = serializer
        self._deserialize = deserializer
        self.api_version = "2017-08-01-preview"

        self.config = config

    def create_or_update(
            self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config):
        """Create or update an operationalization cluster.

        :param resource_group_name: Name of the resource group in which the
         cluster is located.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster.
        :type cluster_name: str
        :param parameters: Parameters supplied to create or update an
         Operationalization cluster.
        :type parameters:
         ~azure.mgmt.machinelearningcompute.models.OperationalizationCluster
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :return: An instance of AzureOperationPoller that returns
         OperationalizationCluster or ClientRawResponse if raw=true
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseWrapperException<azure.mgmt.machinelearningcompute.models.ErrorResponseWrapperException>`
        """
        # Construct URL
        url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
            'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if self.config.generate_client_request_id:
            header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
        if custom_headers:
            header_parameters.update(custom_headers)
        if self.config.accept_language is not None:
            header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

        # Construct body
        body_content = self._serialize.body(parameters, 'OperationalizationCluster')

        # Construct and send request
        def long_running_send():

            request = self._client.put(url, query_parameters)
            return self._client.send(
                request, header_parameters, body_content, **operation_config)

        def get_long_running_status(status_link, headers=None):

            request = self._client.get(status_link)
            if headers:
                request.headers.update(headers)
            return self._client.send(
                request, header_parameters, **operation_config)

        def get_long_running_output(response):

            if response.status_code not in [200, 201]:
                raise models.ErrorResponseWrapperException(self._deserialize, response)

            deserialized = None

            if response.status_code == 200:
                deserialized = self._deserialize('OperationalizationCluster', response)
            if response.status_code == 201:
                deserialized = self._deserialize('OperationalizationCluster', response)

            if raw:
                client_raw_response = ClientRawResponse(deserialized, response)
                return client_raw_response

            return deserialized

        if raw:
            response = long_running_send()
            return get_long_running_output(response)

        long_running_operation_timeout = operation_config.get(
            'long_running_operation_timeout',
            self.config.long_running_operation_timeout)
        return AzureOperationPoller(
            long_running_send, get_long_running_output,
            get_long_running_status, long_running_operation_timeout)

    def get(
            self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config):
        """Gets the operationalization cluster resource view. Note that the
        credentials are not returned by this call. Call ListKeys to get them.

        :param resource_group_name: Name of the resource group in which the
         cluster is located.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster.
        :type cluster_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: OperationalizationCluster or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.machinelearningcompute.models.OperationalizationCluster or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseWrapperException<azure.mgmt.machinelearningcompute.models.ErrorResponseWrapperException>`
        """
        # Construct URL
        url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
            'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if self.config.generate_client_request_id:
            header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
        if custom_headers:
            header_parameters.update(custom_headers)
        if self.config.accept_language is not None:
            header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

        # Construct and send request
        request = self._client.get(url, query_parameters)
        response = self._client.send(request, header_parameters, **operation_config)

        if response.status_code not in [200]:
            raise models.ErrorResponseWrapperException(self._deserialize, response)

        deserialized = None

        if response.status_code == 200:
            deserialized = self._deserialize('OperationalizationCluster', response)

        if raw:
            client_raw_response = ClientRawResponse(deserialized, response)
            return client_raw_response

        return deserialized

    def update(
            self, resource_group_name, cluster_name, tags=None, custom_headers=None, raw=False, **operation_config):
        """The PATCH operation can be used to update only the tags for a cluster.
        Use PUT operation to update other properties.

        :param resource_group_name: Name of the resource group in which the
         cluster is located.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster.
        :type cluster_name: str
        :param tags: Gets or sets a list of key value pairs that describe the
         resource. These tags can be used in viewing and grouping this resource
         (across resource groups). A maximum of 15 tags can be provided for a
         resource. Each tag must have a key no greater in length than 128
         characters and a value no greater in length than 256 characters.
        :type tags: dict[str, str]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: OperationalizationCluster or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.machinelearningcompute.models.OperationalizationCluster or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseWrapperException<azure.mgmt.machinelearningcompute.models.ErrorResponseWrapperException>`
        """
        parameters = models.OperationalizationClusterUpdateParameters(tags=tags)

        # Construct URL
        url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
            'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if self.config.generate_client_request_id:
            header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
        if custom_headers:
            header_parameters.update(custom_headers)
        if self.config.accept_language is not None:
            header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

        # Construct body
        body_content = self._serialize.body(parameters, 'OperationalizationClusterUpdateParameters')

        # Construct and send request
        request = self._client.patch(url, query_parameters)
        response = self._client.send(
            request, header_parameters, body_content, **operation_config)

        if response.status_code not in [200]:
            raise models.ErrorResponseWrapperException(self._deserialize, response)

        deserialized = None

        if response.status_code == 200:
            deserialized = self._deserialize('OperationalizationCluster', response)

        if raw:
            client_raw_response = ClientRawResponse(deserialized, response)
            return client_raw_response

        return deserialized

    def delete(
            self, resource_group_name, cluster_name, delete_all=None, custom_headers=None, raw=False, **operation_config):
        """Deletes the specified cluster.

        :param resource_group_name: Name of the resource group in which the
         cluster is located.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster.
        :type cluster_name: str
        :param delete_all: If true, deletes all resources associated with this
         cluster.
        :type delete_all: bool
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :return: An instance of AzureOperationPoller that returns None or
         ClientRawResponse if raw=true
        :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseWrapperException<azure.mgmt.machinelearningcompute.models.ErrorResponseWrapperException>`
        """
        # Construct URL
        url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
            'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
        if delete_all is not None:
            query_parameters['deleteAll'] = self._serialize.query("delete_all", delete_all, 'bool')

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if self.config.generate_client_request_id:
            header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
        if custom_headers:
            header_parameters.update(custom_headers)
        if self.config.accept_language is not None:
            header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

        # Construct and send request
        def long_running_send():

            request = self._client.delete(url, query_parameters)
            return self._client.send(request, header_parameters, **operation_config)

        def get_long_running_status(status_link, headers=None):

            request = self._client.get(status_link)
            if headers:
                request.headers.update(headers)
            return self._client.send(
                request, header_parameters, **operation_config)

        def get_long_running_output(response):

            if response.status_code not in [202, 204]:
                raise models.ErrorResponseWrapperException(self._deserialize, response)

            if raw:
                client_raw_response = ClientRawResponse(None, response)
                client_raw_response.add_headers({
                    'Location': 'str',
                })
                return client_raw_response

        if raw:
            response = long_running_send()
            return get_long_running_output(response)

        long_running_operation_timeout = operation_config.get(
            'long_running_operation_timeout',
            self.config.long_running_operation_timeout)
        return AzureOperationPoller(
            long_running_send, get_long_running_output,
            get_long_running_status, long_running_operation_timeout)

    def list_keys(
            self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config):
        """Gets the credentials for the specified cluster such as Storage, ACR and
        ACS credentials. This is a long running operation because it fetches
        keys from dependencies.

        :param resource_group_name: Name of the resource group in which the
         cluster is located.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster.
        :type cluster_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: OperationalizationClusterCredentials or ClientRawResponse if
         raw=true
        :rtype:
         ~azure.mgmt.machinelearningcompute.models.OperationalizationClusterCredentials
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        # Construct URL
        url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/listKeys'
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
            'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if self.config.generate_client_request_id:
            header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
        if custom_headers:
            header_parameters.update(custom_headers)
        if self.config.accept_language is not None:
            header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

        # Construct and send request
        request = self._client.post(url, query_parameters)
        response = self._client.send(request, header_parameters, **operation_config)

        if response.status_code not in [200]:
            exp = CloudError(response)
            exp.request_id = response.headers.get('x-ms-request-id')
            raise exp

        deserialized = None

        if response.status_code == 200:
            deserialized = self._deserialize('OperationalizationClusterCredentials', response)

        if raw:
            client_raw_response = ClientRawResponse(deserialized, response)
            return client_raw_response

        return deserialized

    def check_system_services_updates_available(
            self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config):
        """Checks if updates are available for system services in the cluster.

        :param resource_group_name: Name of the resource group in which the
         cluster is located.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster.
        :type cluster_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: CheckSystemServicesUpdatesAvailableResponse or
         ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.machinelearningcompute.models.CheckSystemServicesUpdatesAvailableResponse
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        # Construct URL
        url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/checkSystemServicesUpdatesAvailable'
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
            'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if self.config.generate_client_request_id:
            header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
        if custom_headers:
            header_parameters.update(custom_headers)
        if self.config.accept_language is not None:
            header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

        # Construct and send request
        request = self._client.post(url, query_parameters)
        response = self._client.send(request, header_parameters, **operation_config)

        if response.status_code not in [200]:
            exp = CloudError(response)
            exp.request_id = response.headers.get('x-ms-request-id')
            raise exp

        deserialized = None

        if response.status_code == 200:
            deserialized = self._deserialize('CheckSystemServicesUpdatesAvailableResponse', response)

        if raw:
            client_raw_response = ClientRawResponse(deserialized, response)
            return client_raw_response

        return deserialized

    def update_system_services(
            self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config):
        """Updates system services in a cluster.

        :param resource_group_name: Name of the resource group in which the
         cluster is located.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster.
        :type cluster_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :return: An instance of AzureOperationPoller that returns
         UpdateSystemServicesResponse or ClientRawResponse if raw=true
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.machinelearningcompute.models.UpdateSystemServicesResponse]
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        # Construct URL
        url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/updateSystemServices'
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
            'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if self.config.generate_client_request_id:
            header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
        if custom_headers:
            header_parameters.update(custom_headers)
        if self.config.accept_language is not None:
            header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

        # Construct and send request
        def long_running_send():

            request = self._client.post(url, query_parameters)
            return self._client.send(request, header_parameters, **operation_config)

        def get_long_running_status(status_link, headers=None):

            request = self._client.get(status_link)
            if headers:
                request.headers.update(headers)
            return self._client.send(
                request, header_parameters, **operation_config)

        def get_long_running_output(response):

            if response.status_code not in [200, 202]:
                exp = CloudError(response)
                exp.request_id = response.headers.get('x-ms-request-id')
                raise exp

            deserialized = None
            header_dict = {}

            if response.status_code == 200:
                deserialized = self._deserialize('UpdateSystemServicesResponse', response)
                header_dict = {
                    'Location': 'str',
                }

            if raw:
                client_raw_response = ClientRawResponse(deserialized, response)
                client_raw_response.add_headers(header_dict)
                return client_raw_response

            return deserialized

        if raw:
            response = long_running_send()
            return get_long_running_output(response)

        long_running_operation_timeout = operation_config.get(
            'long_running_operation_timeout',
            self.config.long_running_operation_timeout)
        return AzureOperationPoller(
            long_running_send, get_long_running_output,
            get_long_running_status, long_running_operation_timeout)

    def list_by_resource_group(
            self, resource_group_name, skiptoken=None, custom_headers=None, raw=False, **operation_config):
        """Gets the clusters in the specified resource group.

        :param resource_group_name: Name of the resource group in which the
         cluster is located.
        :type resource_group_name: str
        :param skiptoken: Continuation token for pagination.
        :type skiptoken: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of OperationalizationCluster
        :rtype:
         ~azure.mgmt.machinelearningcompute.models.OperationalizationClusterPaged[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        def internal_paging(next_link=None, raw=False):

            if not next_link:
                # Construct URL
                url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters'
                path_format_arguments = {
                    'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
                    'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$')
                }
                url = self._client.format_url(url, **path_format_arguments)

                # Construct parameters
                query_parameters = {}
                query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
                if skiptoken is not None:
                    query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')

            else:
                url = next_link
                query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Content-Type'] = 'application/json; charset=utf-8'
            if self.config.generate_client_request_id:
                header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
            if custom_headers:
                header_parameters.update(custom_headers)
            if self.config.accept_language is not None:
                header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

            # Construct and send request
            request = self._client.get(url, query_parameters)
            response = self._client.send(
                request, header_parameters, **operation_config)

            if response.status_code not in [200]:
                exp = CloudError(response)
                exp.request_id = response.headers.get('x-ms-request-id')
                raise exp

            return response

        # Deserialize response
        deserialized = models.OperationalizationClusterPaged(internal_paging, self._deserialize.dependencies)

        if raw:
            header_dict = {}
            client_raw_response = models.OperationalizationClusterPaged(internal_paging, self._deserialize.dependencies, header_dict)
            return client_raw_response

        return deserialized

    def list_by_subscription_id(
            self, skiptoken=None, custom_headers=None, raw=False, **operation_config):
        """Gets the operationalization clusters in the specified subscription.

        :param skiptoken: Continuation token for pagination.
        :type skiptoken: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of OperationalizationCluster
        :rtype:
         ~azure.mgmt.machinelearningcompute.models.OperationalizationClusterPaged[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        def internal_paging(next_link=None, raw=False):

            if not next_link:
                # Construct URL
                url = '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningCompute/operationalizationClusters'
                path_format_arguments = {
                    'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
                }
                url = self._client.format_url(url, **path_format_arguments)

                # Construct parameters
                query_parameters = {}
                query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
                if skiptoken is not None:
                    query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')

            else:
                url = next_link
                query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Content-Type'] = 'application/json; charset=utf-8'
            if self.config.generate_client_request_id:
                header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
            if custom_headers:
                header_parameters.update(custom_headers)
            if self.config.accept_language is not None:
                header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

            # Construct and send request
            request = self._client.get(url, query_parameters)
            response = self._client.send(
                request, header_parameters, **operation_config)

            if response.status_code not in [200]:
                exp = CloudError(response)
                exp.request_id = response.headers.get('x-ms-request-id')
                raise exp

            return response

        # Deserialize response
        deserialized = models.OperationalizationClusterPaged(internal_paging, self._deserialize.dependencies)

        if raw:
            header_dict = {}
            client_raw_response = models.OperationalizationClusterPaged(internal_paging, self._deserialize.dependencies, header_dict)
            return client_raw_response

        return deserialized