/* * Copyright 2010-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.comprehend.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* Starts an asynchronous PII entity detection job for a collection of * documents. *
*/ public class StartPiiEntitiesDetectionJobRequest extends AmazonWebServiceRequest implements Serializable { /** ** The input properties for a PII entities detection job. *
*/ private InputDataConfig inputDataConfig; /** ** Provides configuration parameters for the output of PII entity detection * jobs. *
*/ private OutputDataConfig outputDataConfig; /** ** Specifies whether the output provides the locations (offsets) of PII * entities or a file in which PII entities are redacted. *
*
* Constraints:
* Allowed Values: ONLY_REDACTION, ONLY_OFFSETS
*/
private String mode;
/**
*
* Provides configuration parameters for PII entity redaction. *
*
* This parameter is required if you set the Mode
parameter to
* ONLY_REDACTION
. In that case, you must provide a
* RedactionConfig
definition that includes the
* PiiEntityTypes
parameter.
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend read access to your input data. *
*
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*/
private String dataAccessRoleArn;
/**
*
* The identifier of the job. *
*
* Constraints:
* Length: 1 - 256
* Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$
*/
private String jobName;
/**
*
* The language of the input documents. Currently, English is the only valid * language. *
*
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*/
private String languageCode;
/**
*
* A unique identifier for the request. If you don't set the client request * token, Amazon Comprehend generates one. *
*
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-]+$
*/
private String clientRequestToken;
/**
*
* Tags to associate with the PII entities detection job. A tag is a * key-value pair that adds metadata to a resource used by Amazon * Comprehend. For example, a tag with "Sales" as the key might be added to * a resource to indicate its use by the sales department. *
*/ private java.util.List* The input properties for a PII entities detection job. *
* * @return* The input properties for a PII entities detection job. *
*/ public InputDataConfig getInputDataConfig() { return inputDataConfig; } /** ** The input properties for a PII entities detection job. *
* * @param inputDataConfig* The input properties for a PII entities detection job. *
*/ public void setInputDataConfig(InputDataConfig inputDataConfig) { this.inputDataConfig = inputDataConfig; } /** ** The input properties for a PII entities detection job. *
** Returns a reference to this object so that method calls can be chained * together. * * @param inputDataConfig
* The input properties for a PII entities detection job. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartPiiEntitiesDetectionJobRequest withInputDataConfig(InputDataConfig inputDataConfig) { this.inputDataConfig = inputDataConfig; return this; } /** ** Provides configuration parameters for the output of PII entity detection * jobs. *
* * @return* Provides configuration parameters for the output of PII entity * detection jobs. *
*/ public OutputDataConfig getOutputDataConfig() { return outputDataConfig; } /** ** Provides configuration parameters for the output of PII entity detection * jobs. *
* * @param outputDataConfig* Provides configuration parameters for the output of PII entity * detection jobs. *
*/ public void setOutputDataConfig(OutputDataConfig outputDataConfig) { this.outputDataConfig = outputDataConfig; } /** ** Provides configuration parameters for the output of PII entity detection * jobs. *
** Returns a reference to this object so that method calls can be chained * together. * * @param outputDataConfig
* Provides configuration parameters for the output of PII entity * detection jobs. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartPiiEntitiesDetectionJobRequest withOutputDataConfig( OutputDataConfig outputDataConfig) { this.outputDataConfig = outputDataConfig; return this; } /** ** Specifies whether the output provides the locations (offsets) of PII * entities or a file in which PII entities are redacted. *
*
* Constraints:
* Allowed Values: ONLY_REDACTION, ONLY_OFFSETS
*
* @return
* Specifies whether the output provides the locations (offsets) of * PII entities or a file in which PII entities are redacted. *
* @see PiiEntitiesDetectionMode */ public String getMode() { return mode; } /** ** Specifies whether the output provides the locations (offsets) of PII * entities or a file in which PII entities are redacted. *
*
* Constraints:
* Allowed Values: ONLY_REDACTION, ONLY_OFFSETS
*
* @param mode
* Specifies whether the output provides the locations (offsets) * of PII entities or a file in which PII entities are redacted. *
* @see PiiEntitiesDetectionMode */ public void setMode(String mode) { this.mode = mode; } /** ** Specifies whether the output provides the locations (offsets) of PII * entities or a file in which PII entities are redacted. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: ONLY_REDACTION, ONLY_OFFSETS
*
* @param mode
* Specifies whether the output provides the locations (offsets) * of PII entities or a file in which PII entities are redacted. *
* @return A reference to this updated object so that method calls can be * chained together. * @see PiiEntitiesDetectionMode */ public StartPiiEntitiesDetectionJobRequest withMode(String mode) { this.mode = mode; return this; } /** ** Specifies whether the output provides the locations (offsets) of PII * entities or a file in which PII entities are redacted. *
*
* Constraints:
* Allowed Values: ONLY_REDACTION, ONLY_OFFSETS
*
* @param mode
* Specifies whether the output provides the locations (offsets) * of PII entities or a file in which PII entities are redacted. *
* @see PiiEntitiesDetectionMode */ public void setMode(PiiEntitiesDetectionMode mode) { this.mode = mode.toString(); } /** ** Specifies whether the output provides the locations (offsets) of PII * entities or a file in which PII entities are redacted. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: ONLY_REDACTION, ONLY_OFFSETS
*
* @param mode
* Specifies whether the output provides the locations (offsets) * of PII entities or a file in which PII entities are redacted. *
* @return A reference to this updated object so that method calls can be * chained together. * @see PiiEntitiesDetectionMode */ public StartPiiEntitiesDetectionJobRequest withMode(PiiEntitiesDetectionMode mode) { this.mode = mode.toString(); return this; } /** ** Provides configuration parameters for PII entity redaction. *
*
* This parameter is required if you set the Mode
parameter to
* ONLY_REDACTION
. In that case, you must provide a
* RedactionConfig
definition that includes the
* PiiEntityTypes
parameter.
*
* Provides configuration parameters for PII entity redaction. *
*
* This parameter is required if you set the Mode
* parameter to ONLY_REDACTION
. In that case, you must
* provide a RedactionConfig
definition that includes
* the PiiEntityTypes
parameter.
*
* Provides configuration parameters for PII entity redaction. *
*
* This parameter is required if you set the Mode
parameter to
* ONLY_REDACTION
. In that case, you must provide a
* RedactionConfig
definition that includes the
* PiiEntityTypes
parameter.
*
* Provides configuration parameters for PII entity redaction. *
*
* This parameter is required if you set the Mode
* parameter to ONLY_REDACTION
. In that case, you
* must provide a RedactionConfig
definition that
* includes the PiiEntityTypes
parameter.
*
* Provides configuration parameters for PII entity redaction. *
*
* This parameter is required if you set the Mode
parameter to
* ONLY_REDACTION
. In that case, you must provide a
* RedactionConfig
definition that includes the
* PiiEntityTypes
parameter.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param redactionConfig
* Provides configuration parameters for PII entity redaction. *
*
* This parameter is required if you set the Mode
* parameter to ONLY_REDACTION
. In that case, you
* must provide a RedactionConfig
definition that
* includes the PiiEntityTypes
parameter.
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend read access to your input data. *
*
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*
* @return
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend read access to your input data. *
*/ public String getDataAccessRoleArn() { return dataAccessRoleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend read access to your input data. *
*
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*
* @param dataAccessRoleArn
* The Amazon Resource Name (ARN) of the IAM role that grants * Amazon Comprehend read access to your input data. *
*/ public void setDataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend read access to your input data. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*
* @param dataAccessRoleArn
* The Amazon Resource Name (ARN) of the IAM role that grants * Amazon Comprehend read access to your input data. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartPiiEntitiesDetectionJobRequest withDataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; return this; } /** ** The identifier of the job. *
*
* Constraints:
* Length: 1 - 256
* Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$
*
* @return
* The identifier of the job. *
*/ public String getJobName() { return jobName; } /** ** The identifier of the job. *
*
* Constraints:
* Length: 1 - 256
* Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$
*
* @param jobName
* The identifier of the job. *
*/ public void setJobName(String jobName) { this.jobName = jobName; } /** ** The identifier of the job. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 256
* Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$
*
* @param jobName
* The identifier of the job. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartPiiEntitiesDetectionJobRequest withJobName(String jobName) { this.jobName = jobName; return this; } /** ** The language of the input documents. Currently, English is the only valid * language. *
*
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*
* @return
* The language of the input documents. Currently, English is the * only valid language. *
* @see LanguageCode */ public String getLanguageCode() { return languageCode; } /** ** The language of the input documents. Currently, English is the only valid * language. *
*
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*
* @param languageCode
* The language of the input documents. Currently, English is the * only valid language. *
* @see LanguageCode */ public void setLanguageCode(String languageCode) { this.languageCode = languageCode; } /** ** The language of the input documents. Currently, English is the only valid * language. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*
* @param languageCode
* The language of the input documents. Currently, English is the * only valid language. *
* @return A reference to this updated object so that method calls can be * chained together. * @see LanguageCode */ public StartPiiEntitiesDetectionJobRequest withLanguageCode(String languageCode) { this.languageCode = languageCode; return this; } /** ** The language of the input documents. Currently, English is the only valid * language. *
*
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*
* @param languageCode
* The language of the input documents. Currently, English is the * only valid language. *
* @see LanguageCode */ public void setLanguageCode(LanguageCode languageCode) { this.languageCode = languageCode.toString(); } /** ** The language of the input documents. Currently, English is the only valid * language. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*
* @param languageCode
* The language of the input documents. Currently, English is the * only valid language. *
* @return A reference to this updated object so that method calls can be * chained together. * @see LanguageCode */ public StartPiiEntitiesDetectionJobRequest withLanguageCode(LanguageCode languageCode) { this.languageCode = languageCode.toString(); return this; } /** ** A unique identifier for the request. If you don't set the client request * token, Amazon Comprehend generates one. *
*
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-]+$
*
* @return
* A unique identifier for the request. If you don't set the client * request token, Amazon Comprehend generates one. *
*/ public String getClientRequestToken() { return clientRequestToken; } /** ** A unique identifier for the request. If you don't set the client request * token, Amazon Comprehend generates one. *
*
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-]+$
*
* @param clientRequestToken
* A unique identifier for the request. If you don't set the * client request token, Amazon Comprehend generates one. *
*/ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** ** A unique identifier for the request. If you don't set the client request * token, Amazon Comprehend generates one. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-]+$
*
* @param clientRequestToken
* A unique identifier for the request. If you don't set the * client request token, Amazon Comprehend generates one. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartPiiEntitiesDetectionJobRequest withClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; return this; } /** ** Tags to associate with the PII entities detection job. A tag is a * key-value pair that adds metadata to a resource used by Amazon * Comprehend. For example, a tag with "Sales" as the key might be added to * a resource to indicate its use by the sales department. *
* * @return* Tags to associate with the PII entities detection job. A tag is a * key-value pair that adds metadata to a resource used by Amazon * Comprehend. For example, a tag with "Sales" as the key might be * added to a resource to indicate its use by the sales department. *
*/ public java.util.List* Tags to associate with the PII entities detection job. A tag is a * key-value pair that adds metadata to a resource used by Amazon * Comprehend. For example, a tag with "Sales" as the key might be added to * a resource to indicate its use by the sales department. *
* * @param tags* Tags to associate with the PII entities detection job. A tag * is a key-value pair that adds metadata to a resource used by * Amazon Comprehend. For example, a tag with "Sales" as the key * might be added to a resource to indicate its use by the sales * department. *
*/ public void setTags(java.util.Collection* Tags to associate with the PII entities detection job. A tag is a * key-value pair that adds metadata to a resource used by Amazon * Comprehend. For example, a tag with "Sales" as the key might be added to * a resource to indicate its use by the sales department. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tags
* Tags to associate with the PII entities detection job. A tag * is a key-value pair that adds metadata to a resource used by * Amazon Comprehend. For example, a tag with "Sales" as the key * might be added to a resource to indicate its use by the sales * department. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartPiiEntitiesDetectionJobRequest withTags(Tag... tags) { if (getTags() == null) { this.tags = new java.util.ArrayList* Tags to associate with the PII entities detection job. A tag is a * key-value pair that adds metadata to a resource used by Amazon * Comprehend. For example, a tag with "Sales" as the key might be added to * a resource to indicate its use by the sales department. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tags
* Tags to associate with the PII entities detection job. A tag * is a key-value pair that adds metadata to a resource used by * Amazon Comprehend. For example, a tag with "Sales" as the key * might be added to a resource to indicate its use by the sales * department. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartPiiEntitiesDetectionJobRequest withTags(java.util.Collection