/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.sagemaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateLabelingJobRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the labeling job. This name is used to identify the job in a list of labeling jobs. Labeling job * names must be unique within an Amazon Web Services account and region. LabelingJobName is not case * sensitive. For example, Example-job and example-job are considered the same labeling job name by Ground Truth. *

*/ private String labelingJobName; /** *

* The attribute name to use for the label in the output manifest file. This is the key for the key/value pair * formed with the label that a worker assigns to the object. The LabelAttributeName must meet the * following requirements. *

* *

* *

* If you are creating an adjustment or verification labeling job, you must use a different * LabelAttributeName than the one used in the original labeling job. The original labeling job is the * Ground Truth labeling job that produced the labels that you want verified or adjusted. To learn more about * adjustment and verification labeling jobs, see Verify and Adjust Labels. *

* */ private String labelAttributeName; /** *

* Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of the * manifest file that describes the data objects. *

*

* You must specify at least one of the following: S3DataSource or SnsDataSource. *

* *

* If you use the Amazon Mechanical Turk workforce, your input data should not include confidential information, * personal information or protected health information. Use ContentClassifiers to specify that your * data is free of personally identifiable information and adult content. *

*/ private LabelingJobInputConfig inputConfig; /** *

* The location of the output data and the Amazon Web Services Key Management Service key ID for the key used to * encrypt the output data, if any. *

*/ private LabelingJobOutputConfig outputConfig; /** *

* The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data * labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete * data labeling. *

*/ private String roleArn; /** *

* The S3 URI of the file, referred to as a label category configuration file, that defines the categories * used to label the data objects. *

*

* For 3D point cloud and video frame task types, you can add label category attributes and frame attributes to your * label category configuration file. To learn how, see Create a * Labeling Category Configuration File for 3D Point Cloud Labeling Jobs. *

*

* For named entity recognition jobs, in addition to "labels", you must provide worker instructions in * the label category configuration file using the "instructions" parameter: * "instructions": {"shortInstruction":"<h1>Add header</h1><p>Add Instructions</p>", "fullInstruction":"<p>Add additional instructions.</p>"} * . For details and an example, see Create a * Named Entity Recognition Labeling Job (API) . *

*

* For all other built-in task * types and custom * tasks, your label category configuration file must be a JSON file in the following format. Identify the * labels you want to use by replacing label_1, label_2,..., * label_n with your label categories. *

*

* { *

*

* "document-version": "2018-11-28", *

*

* "labels": [{"label": "label_1"},{"label": "label_2"},...{"label": "label_n"}] *

*

* } *

*

* Note the following about the label category configuration file: *

* */ private String labelCategoryConfigS3Uri; /** *

* A set of conditions for stopping the labeling job. If any of the conditions are met, the job is automatically * stopped. You can use these conditions to control the cost of data labeling. *

*/ private LabelingJobStoppingConditions stoppingConditions; /** *

* Configures the information required to perform automated data labeling. *

*/ private LabelingJobAlgorithmsConfig labelingJobAlgorithmsConfig; /** *

* Configures the labeling task and how it is presented to workers; including, but not limited to price, keywords, * and batch size (task count). *

*/ private HumanTaskConfig humanTaskConfig; /** *

* An array of key/value pairs. For more information, see Using * Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide. *

*/ private java.util.List tags; /** *

* The name of the labeling job. This name is used to identify the job in a list of labeling jobs. Labeling job * names must be unique within an Amazon Web Services account and region. LabelingJobName is not case * sensitive. For example, Example-job and example-job are considered the same labeling job name by Ground Truth. *

* * @param labelingJobName * The name of the labeling job. This name is used to identify the job in a list of labeling jobs. Labeling * job names must be unique within an Amazon Web Services account and region. LabelingJobName is * not case sensitive. For example, Example-job and example-job are considered the same labeling job name by * Ground Truth. */ public void setLabelingJobName(String labelingJobName) { this.labelingJobName = labelingJobName; } /** *

* The name of the labeling job. This name is used to identify the job in a list of labeling jobs. Labeling job * names must be unique within an Amazon Web Services account and region. LabelingJobName is not case * sensitive. For example, Example-job and example-job are considered the same labeling job name by Ground Truth. *

* * @return The name of the labeling job. This name is used to identify the job in a list of labeling jobs. Labeling * job names must be unique within an Amazon Web Services account and region. LabelingJobName * is not case sensitive. For example, Example-job and example-job are considered the same labeling job name * by Ground Truth. */ public String getLabelingJobName() { return this.labelingJobName; } /** *

* The name of the labeling job. This name is used to identify the job in a list of labeling jobs. Labeling job * names must be unique within an Amazon Web Services account and region. LabelingJobName is not case * sensitive. For example, Example-job and example-job are considered the same labeling job name by Ground Truth. *

* * @param labelingJobName * The name of the labeling job. This name is used to identify the job in a list of labeling jobs. Labeling * job names must be unique within an Amazon Web Services account and region. LabelingJobName is * not case sensitive. For example, Example-job and example-job are considered the same labeling job name by * Ground Truth. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelingJobRequest withLabelingJobName(String labelingJobName) { setLabelingJobName(labelingJobName); return this; } /** *

* The attribute name to use for the label in the output manifest file. This is the key for the key/value pair * formed with the label that a worker assigns to the object. The LabelAttributeName must meet the * following requirements. *

* *

* *

* If you are creating an adjustment or verification labeling job, you must use a different * LabelAttributeName than the one used in the original labeling job. The original labeling job is the * Ground Truth labeling job that produced the labels that you want verified or adjusted. To learn more about * adjustment and verification labeling jobs, see Verify and Adjust Labels. *

* * * @param labelAttributeName * The attribute name to use for the label in the output manifest file. This is the key for the key/value * pair formed with the label that a worker assigns to the object. The LabelAttributeName must * meet the following requirements.

* *

* *

* If you are creating an adjustment or verification labeling job, you must use a different * LabelAttributeName than the one used in the original labeling job. The original labeling job * is the Ground Truth labeling job that produced the labels that you want verified or adjusted. To learn * more about adjustment and verification labeling jobs, see Verify and Adjust * Labels. *

*/ public void setLabelAttributeName(String labelAttributeName) { this.labelAttributeName = labelAttributeName; } /** *

* The attribute name to use for the label in the output manifest file. This is the key for the key/value pair * formed with the label that a worker assigns to the object. The LabelAttributeName must meet the * following requirements. *

* *

* *

* If you are creating an adjustment or verification labeling job, you must use a different * LabelAttributeName than the one used in the original labeling job. The original labeling job is the * Ground Truth labeling job that produced the labels that you want verified or adjusted. To learn more about * adjustment and verification labeling jobs, see Verify and Adjust Labels. *

* * * @return The attribute name to use for the label in the output manifest file. This is the key for the key/value * pair formed with the label that a worker assigns to the object. The LabelAttributeName must * meet the following requirements.

* *

* *

* If you are creating an adjustment or verification labeling job, you must use a different * LabelAttributeName than the one used in the original labeling job. The original labeling job * is the Ground Truth labeling job that produced the labels that you want verified or adjusted. To learn * more about adjustment and verification labeling jobs, see Verify and Adjust * Labels. *

*/ public String getLabelAttributeName() { return this.labelAttributeName; } /** *

* The attribute name to use for the label in the output manifest file. This is the key for the key/value pair * formed with the label that a worker assigns to the object. The LabelAttributeName must meet the * following requirements. *

* *

* *

* If you are creating an adjustment or verification labeling job, you must use a different * LabelAttributeName than the one used in the original labeling job. The original labeling job is the * Ground Truth labeling job that produced the labels that you want verified or adjusted. To learn more about * adjustment and verification labeling jobs, see Verify and Adjust Labels. *

* * * @param labelAttributeName * The attribute name to use for the label in the output manifest file. This is the key for the key/value * pair formed with the label that a worker assigns to the object. The LabelAttributeName must * meet the following requirements.

* *

* *

* If you are creating an adjustment or verification labeling job, you must use a different * LabelAttributeName than the one used in the original labeling job. The original labeling job * is the Ground Truth labeling job that produced the labels that you want verified or adjusted. To learn * more about adjustment and verification labeling jobs, see Verify and Adjust * Labels. *

* @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelingJobRequest withLabelAttributeName(String labelAttributeName) { setLabelAttributeName(labelAttributeName); return this; } /** *

* Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of the * manifest file that describes the data objects. *

*

* You must specify at least one of the following: S3DataSource or SnsDataSource. *

* *

* If you use the Amazon Mechanical Turk workforce, your input data should not include confidential information, * personal information or protected health information. Use ContentClassifiers to specify that your * data is free of personally identifiable information and adult content. *

* * @param inputConfig * Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of * the manifest file that describes the data objects.

*

* You must specify at least one of the following: S3DataSource or SnsDataSource. *

* *

* If you use the Amazon Mechanical Turk workforce, your input data should not include confidential * information, personal information or protected health information. Use ContentClassifiers to * specify that your data is free of personally identifiable information and adult content. */ public void setInputConfig(LabelingJobInputConfig inputConfig) { this.inputConfig = inputConfig; } /** *

* Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of the * manifest file that describes the data objects. *

*

* You must specify at least one of the following: S3DataSource or SnsDataSource. *

* *

* If you use the Amazon Mechanical Turk workforce, your input data should not include confidential information, * personal information or protected health information. Use ContentClassifiers to specify that your * data is free of personally identifiable information and adult content. *

* * @return Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of * the manifest file that describes the data objects.

*

* You must specify at least one of the following: S3DataSource or SnsDataSource. *

* *

* If you use the Amazon Mechanical Turk workforce, your input data should not include confidential * information, personal information or protected health information. Use ContentClassifiers to * specify that your data is free of personally identifiable information and adult content. */ public LabelingJobInputConfig getInputConfig() { return this.inputConfig; } /** *

* Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of the * manifest file that describes the data objects. *

*

* You must specify at least one of the following: S3DataSource or SnsDataSource. *

* *

* If you use the Amazon Mechanical Turk workforce, your input data should not include confidential information, * personal information or protected health information. Use ContentClassifiers to specify that your * data is free of personally identifiable information and adult content. *

* * @param inputConfig * Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of * the manifest file that describes the data objects.

*

* You must specify at least one of the following: S3DataSource or SnsDataSource. *

* *

* If you use the Amazon Mechanical Turk workforce, your input data should not include confidential * information, personal information or protected health information. Use ContentClassifiers to * specify that your data is free of personally identifiable information and adult content. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelingJobRequest withInputConfig(LabelingJobInputConfig inputConfig) { setInputConfig(inputConfig); return this; } /** *

* The location of the output data and the Amazon Web Services Key Management Service key ID for the key used to * encrypt the output data, if any. *

* * @param outputConfig * The location of the output data and the Amazon Web Services Key Management Service key ID for the key used * to encrypt the output data, if any. */ public void setOutputConfig(LabelingJobOutputConfig outputConfig) { this.outputConfig = outputConfig; } /** *

* The location of the output data and the Amazon Web Services Key Management Service key ID for the key used to * encrypt the output data, if any. *

* * @return The location of the output data and the Amazon Web Services Key Management Service key ID for the key * used to encrypt the output data, if any. */ public LabelingJobOutputConfig getOutputConfig() { return this.outputConfig; } /** *

* The location of the output data and the Amazon Web Services Key Management Service key ID for the key used to * encrypt the output data, if any. *

* * @param outputConfig * The location of the output data and the Amazon Web Services Key Management Service key ID for the key used * to encrypt the output data, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelingJobRequest withOutputConfig(LabelingJobOutputConfig outputConfig) { setOutputConfig(outputConfig); return this; } /** *

* The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data * labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete * data labeling. *

* * @param roleArn * The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data * labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully * complete data labeling. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data * labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete * data labeling. *

* * @return The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during * data labeling. You must grant this role the necessary permissions so that Amazon SageMaker can * successfully complete data labeling. */ public String getRoleArn() { return this.roleArn; } /** *

* The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data * labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete * data labeling. *

* * @param roleArn * The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data * labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully * complete data labeling. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelingJobRequest withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *

* The S3 URI of the file, referred to as a label category configuration file, that defines the categories * used to label the data objects. *

*

* For 3D point cloud and video frame task types, you can add label category attributes and frame attributes to your * label category configuration file. To learn how, see Create a * Labeling Category Configuration File for 3D Point Cloud Labeling Jobs. *

*

* For named entity recognition jobs, in addition to "labels", you must provide worker instructions in * the label category configuration file using the "instructions" parameter: * "instructions": {"shortInstruction":"<h1>Add header</h1><p>Add Instructions</p>", "fullInstruction":"<p>Add additional instructions.</p>"} * . For details and an example, see Create a * Named Entity Recognition Labeling Job (API) . *

*

* For all other built-in task * types and custom * tasks, your label category configuration file must be a JSON file in the following format. Identify the * labels you want to use by replacing label_1, label_2,..., * label_n with your label categories. *

*

* { *

*

* "document-version": "2018-11-28", *

*

* "labels": [{"label": "label_1"},{"label": "label_2"},...{"label": "label_n"}] *

*

* } *

*

* Note the following about the label category configuration file: *

* * * @param labelCategoryConfigS3Uri * The S3 URI of the file, referred to as a label category configuration file, that defines the * categories used to label the data objects.

*

* For 3D point cloud and video frame task types, you can add label category attributes and frame attributes * to your label category configuration file. To learn how, see Create a * Labeling Category Configuration File for 3D Point Cloud Labeling Jobs. *

*

* For named entity recognition jobs, in addition to "labels", you must provide worker * instructions in the label category configuration file using the "instructions" parameter: * "instructions": {"shortInstruction":"<h1>Add header</h1><p>Add Instructions</p>", "fullInstruction":"<p>Add additional instructions.</p>"} * . For details and an example, see Create a Named Entity Recognition Labeling Job (API) . *

*

* For all other built-in task * types and custom * tasks, your label category configuration file must be a JSON file in the following format. Identify * the labels you want to use by replacing label_1, label_2,..., * label_n with your label categories. *

*

* { *

*

* "document-version": "2018-11-28", *

*

* "labels": [{"label": "label_1"},{"label": "label_2"},...{"label": "label_n"}] *

*

* } *

*

* Note the following about the label category configuration file: *

*