com.amazonaws.services.comprehend.model.StartTopicsDetectionJobRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-comprehend Show documentation
/*
* 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.comprehend.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 StartTopicsDetectionJobRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* Specifies the format and location of the input data for the job.
*
*/
private InputDataConfig inputDataConfig;
/**
*
* Specifies where to send the output files. The output is a compressed archive with two files,
* topic-terms.csv
that lists the terms associated with each topic, and doc-topics.csv
* that lists the documents associated with each topic
*
*/
private OutputDataConfig outputDataConfig;
/**
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. For
* more information, see Role-based permissions.
*
*/
private String dataAccessRoleArn;
/**
*
* The identifier of the job.
*
*/
private String jobName;
/**
*
* The number of topics to detect.
*
*/
private Integer numberOfTopics;
/**
*
* A unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
*
*/
private String clientRequestToken;
/**
*
* ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on
* the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can
* be either of the following formats:
*
*
* -
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
* -
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
*
*/
private String volumeKmsKeyId;
/**
*
* Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are
* using for your topic detection job. For more information, see Amazon VPC.
*
*/
private VpcConfig vpcConfig;
/**
*
* Tags to associate with the topics 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 tags;
/**
*
* Specifies the format and location of the input data for the job.
*
*
* @param inputDataConfig
* Specifies the format and location of the input data for the job.
*/
public void setInputDataConfig(InputDataConfig inputDataConfig) {
this.inputDataConfig = inputDataConfig;
}
/**
*
* Specifies the format and location of the input data for the job.
*
*
* @return Specifies the format and location of the input data for the job.
*/
public InputDataConfig getInputDataConfig() {
return this.inputDataConfig;
}
/**
*
* Specifies the format and location of the input data for the job.
*
*
* @param inputDataConfig
* Specifies the format and location of the input data for the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTopicsDetectionJobRequest withInputDataConfig(InputDataConfig inputDataConfig) {
setInputDataConfig(inputDataConfig);
return this;
}
/**
*
* Specifies where to send the output files. The output is a compressed archive with two files,
* topic-terms.csv
that lists the terms associated with each topic, and doc-topics.csv
* that lists the documents associated with each topic
*
*
* @param outputDataConfig
* Specifies where to send the output files. The output is a compressed archive with two files,
* topic-terms.csv
that lists the terms associated with each topic, and
* doc-topics.csv
that lists the documents associated with each topic
*/
public void setOutputDataConfig(OutputDataConfig outputDataConfig) {
this.outputDataConfig = outputDataConfig;
}
/**
*
* Specifies where to send the output files. The output is a compressed archive with two files,
* topic-terms.csv
that lists the terms associated with each topic, and doc-topics.csv
* that lists the documents associated with each topic
*
*
* @return Specifies where to send the output files. The output is a compressed archive with two files,
* topic-terms.csv
that lists the terms associated with each topic, and
* doc-topics.csv
that lists the documents associated with each topic
*/
public OutputDataConfig getOutputDataConfig() {
return this.outputDataConfig;
}
/**
*
* Specifies where to send the output files. The output is a compressed archive with two files,
* topic-terms.csv
that lists the terms associated with each topic, and doc-topics.csv
* that lists the documents associated with each topic
*
*
* @param outputDataConfig
* Specifies where to send the output files. The output is a compressed archive with two files,
* topic-terms.csv
that lists the terms associated with each topic, and
* doc-topics.csv
that lists the documents associated with each topic
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTopicsDetectionJobRequest withOutputDataConfig(OutputDataConfig outputDataConfig) {
setOutputDataConfig(outputDataConfig);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. For
* more information, see Role-based permissions.
*
*
* @param dataAccessRoleArn
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input
* data. For more information, see Role-based permissions.
*/
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. For
* more information, see Role-based permissions.
*
*
* @return The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input
* data. For more information, see Role-based permissions.
*/
public String getDataAccessRoleArn() {
return this.dataAccessRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. For
* more information, see Role-based permissions.
*
*
* @param dataAccessRoleArn
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input
* data. For more information, see Role-based permissions.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTopicsDetectionJobRequest withDataAccessRoleArn(String dataAccessRoleArn) {
setDataAccessRoleArn(dataAccessRoleArn);
return this;
}
/**
*
* The identifier of the job.
*
*
* @param jobName
* The identifier of the job.
*/
public void setJobName(String jobName) {
this.jobName = jobName;
}
/**
*
* The identifier of the job.
*
*
* @return The identifier of the job.
*/
public String getJobName() {
return this.jobName;
}
/**
*
* The identifier of the job.
*
*
* @param jobName
* The identifier of the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTopicsDetectionJobRequest withJobName(String jobName) {
setJobName(jobName);
return this;
}
/**
*
* The number of topics to detect.
*
*
* @param numberOfTopics
* The number of topics to detect.
*/
public void setNumberOfTopics(Integer numberOfTopics) {
this.numberOfTopics = numberOfTopics;
}
/**
*
* The number of topics to detect.
*
*
* @return The number of topics to detect.
*/
public Integer getNumberOfTopics() {
return this.numberOfTopics;
}
/**
*
* The number of topics to detect.
*
*
* @param numberOfTopics
* The number of topics to detect.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTopicsDetectionJobRequest withNumberOfTopics(Integer numberOfTopics) {
setNumberOfTopics(numberOfTopics);
return this;
}
/**
*
* A unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
*
*
* @param clientRequestToken
* A unique identifier for the request. If you do not 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 do not set the client request token, Amazon Comprehend generates one.
*
*
* @return A unique identifier for the request. If you do not set the client request token, Amazon Comprehend
* generates one.
*/
public String getClientRequestToken() {
return this.clientRequestToken;
}
/**
*
* A unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
*
*
* @param clientRequestToken
* A unique identifier for the request. If you do not set the client request token, Amazon Comprehend
* generates one.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTopicsDetectionJobRequest withClientRequestToken(String clientRequestToken) {
setClientRequestToken(clientRequestToken);
return this;
}
/**
*
* ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on
* the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can
* be either of the following formats:
*
*
* -
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
* -
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
*
*
* @param volumeKmsKeyId
* ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt
* data on the storage volume attached to the ML compute instance(s) that process the analysis job. The
* VolumeKmsKeyId can be either of the following formats:
*
* -
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
* -
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
*/
public void setVolumeKmsKeyId(String volumeKmsKeyId) {
this.volumeKmsKeyId = volumeKmsKeyId;
}
/**
*
* ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on
* the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can
* be either of the following formats:
*
*
* -
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
* -
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
*
*
* @return ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt
* data on the storage volume attached to the ML compute instance(s) that process the analysis job. The
* VolumeKmsKeyId can be either of the following formats:
*
* -
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
* -
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
*/
public String getVolumeKmsKeyId() {
return this.volumeKmsKeyId;
}
/**
*
* ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on
* the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can
* be either of the following formats:
*
*
* -
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
* -
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
*
*
* @param volumeKmsKeyId
* ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt
* data on the storage volume attached to the ML compute instance(s) that process the analysis job. The
* VolumeKmsKeyId can be either of the following formats:
*
* -
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
* -
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTopicsDetectionJobRequest withVolumeKmsKeyId(String volumeKmsKeyId) {
setVolumeKmsKeyId(volumeKmsKeyId);
return this;
}
/**
*
* Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are
* using for your topic detection job. For more information, see Amazon VPC.
*
*
* @param vpcConfig
* Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you
* are using for your topic detection job. For more information, see Amazon VPC.
*/
public void setVpcConfig(VpcConfig vpcConfig) {
this.vpcConfig = vpcConfig;
}
/**
*
* Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are
* using for your topic detection job. For more information, see Amazon VPC.
*
*
* @return Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you
* are using for your topic detection job. For more information, see Amazon VPC.
*/
public VpcConfig getVpcConfig() {
return this.vpcConfig;
}
/**
*
* Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are
* using for your topic detection job. For more information, see Amazon VPC.
*
*
* @param vpcConfig
* Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you
* are using for your topic detection job. For more information, see Amazon VPC.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTopicsDetectionJobRequest withVpcConfig(VpcConfig vpcConfig) {
setVpcConfig(vpcConfig);
return this;
}
/**
*
* Tags to associate with the topics 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 topics 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 getTags() {
return tags;
}
/**
*
* Tags to associate with the topics 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 topics 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) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* Tags to associate with the topics 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.
*
*
* 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.
*
*
* @param tags
* Tags to associate with the topics 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 Returns a reference to this object so that method calls can be chained together.
*/
public StartTopicsDetectionJobRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* Tags to associate with the topics 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 topics 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 Returns a reference to this object so that method calls can be chained together.
*/
public StartTopicsDetectionJobRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getInputDataConfig() != null)
sb.append("InputDataConfig: ").append(getInputDataConfig()).append(",");
if (getOutputDataConfig() != null)
sb.append("OutputDataConfig: ").append(getOutputDataConfig()).append(",");
if (getDataAccessRoleArn() != null)
sb.append("DataAccessRoleArn: ").append(getDataAccessRoleArn()).append(",");
if (getJobName() != null)
sb.append("JobName: ").append(getJobName()).append(",");
if (getNumberOfTopics() != null)
sb.append("NumberOfTopics: ").append(getNumberOfTopics()).append(",");
if (getClientRequestToken() != null)
sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(",");
if (getVolumeKmsKeyId() != null)
sb.append("VolumeKmsKeyId: ").append(getVolumeKmsKeyId()).append(",");
if (getVpcConfig() != null)
sb.append("VpcConfig: ").append(getVpcConfig()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof StartTopicsDetectionJobRequest == false)
return false;
StartTopicsDetectionJobRequest other = (StartTopicsDetectionJobRequest) obj;
if (other.getInputDataConfig() == null ^ this.getInputDataConfig() == null)
return false;
if (other.getInputDataConfig() != null && other.getInputDataConfig().equals(this.getInputDataConfig()) == false)
return false;
if (other.getOutputDataConfig() == null ^ this.getOutputDataConfig() == null)
return false;
if (other.getOutputDataConfig() != null && other.getOutputDataConfig().equals(this.getOutputDataConfig()) == false)
return false;
if (other.getDataAccessRoleArn() == null ^ this.getDataAccessRoleArn() == null)
return false;
if (other.getDataAccessRoleArn() != null && other.getDataAccessRoleArn().equals(this.getDataAccessRoleArn()) == false)
return false;
if (other.getJobName() == null ^ this.getJobName() == null)
return false;
if (other.getJobName() != null && other.getJobName().equals(this.getJobName()) == false)
return false;
if (other.getNumberOfTopics() == null ^ this.getNumberOfTopics() == null)
return false;
if (other.getNumberOfTopics() != null && other.getNumberOfTopics().equals(this.getNumberOfTopics()) == false)
return false;
if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null)
return false;
if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false)
return false;
if (other.getVolumeKmsKeyId() == null ^ this.getVolumeKmsKeyId() == null)
return false;
if (other.getVolumeKmsKeyId() != null && other.getVolumeKmsKeyId().equals(this.getVolumeKmsKeyId()) == false)
return false;
if (other.getVpcConfig() == null ^ this.getVpcConfig() == null)
return false;
if (other.getVpcConfig() != null && other.getVpcConfig().equals(this.getVpcConfig()) == 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 int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getInputDataConfig() == null) ? 0 : getInputDataConfig().hashCode());
hashCode = prime * hashCode + ((getOutputDataConfig() == null) ? 0 : getOutputDataConfig().hashCode());
hashCode = prime * hashCode + ((getDataAccessRoleArn() == null) ? 0 : getDataAccessRoleArn().hashCode());
hashCode = prime * hashCode + ((getJobName() == null) ? 0 : getJobName().hashCode());
hashCode = prime * hashCode + ((getNumberOfTopics() == null) ? 0 : getNumberOfTopics().hashCode());
hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode());
hashCode = prime * hashCode + ((getVolumeKmsKeyId() == null) ? 0 : getVolumeKmsKeyId().hashCode());
hashCode = prime * hashCode + ((getVpcConfig() == null) ? 0 : getVpcConfig().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public StartTopicsDetectionJobRequest clone() {
return (StartTopicsDetectionJobRequest) super.clone();
}
}