com.amazonaws.services.sagemaker.model.CreateInferenceRecommendationsJobRequest Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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 CreateInferenceRecommendationsJobRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A name for the recommendation job. The name must be unique within the Amazon Web Services Region and within your
* Amazon Web Services account. The job name is passed down to the resources created by the recommendation job. The
* names of resources (such as the model, endpoint configuration, endpoint, and compilation) that are prefixed with
* the job name are truncated at 40 characters.
*
*/
private String jobName;
/**
*
* Defines the type of recommendation job. Specify Default
to initiate an instance recommendation and
* Advanced
to initiate a load test. If left unspecified, Amazon SageMaker Inference Recommender will
* run an instance recommendation (DEFAULT
) job.
*
*/
private String jobType;
/**
*
* The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
*
*/
private String roleArn;
/**
*
* Provides information about the versioned model package Amazon Resource Name (ARN), the traffic pattern, and
* endpoint configurations.
*
*/
private RecommendationJobInputConfig inputConfig;
/**
*
* Description of the recommendation job.
*
*/
private String jobDescription;
/**
*
* A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is automatically
* stopped.
*
*/
private RecommendationJobStoppingConditions stoppingConditions;
/**
*
* Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side encryption.
*
*/
private RecommendationJobOutputConfig outputConfig;
/**
*
* The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag
* consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services Resources
* in the Amazon Web Services General Reference.
*
*/
private java.util.List tags;
/**
*
* A name for the recommendation job. The name must be unique within the Amazon Web Services Region and within your
* Amazon Web Services account. The job name is passed down to the resources created by the recommendation job. The
* names of resources (such as the model, endpoint configuration, endpoint, and compilation) that are prefixed with
* the job name are truncated at 40 characters.
*
*
* @param jobName
* A name for the recommendation job. The name must be unique within the Amazon Web Services Region and
* within your Amazon Web Services account. The job name is passed down to the resources created by the
* recommendation job. The names of resources (such as the model, endpoint configuration, endpoint, and
* compilation) that are prefixed with the job name are truncated at 40 characters.
*/
public void setJobName(String jobName) {
this.jobName = jobName;
}
/**
*
* A name for the recommendation job. The name must be unique within the Amazon Web Services Region and within your
* Amazon Web Services account. The job name is passed down to the resources created by the recommendation job. The
* names of resources (such as the model, endpoint configuration, endpoint, and compilation) that are prefixed with
* the job name are truncated at 40 characters.
*
*
* @return A name for the recommendation job. The name must be unique within the Amazon Web Services Region and
* within your Amazon Web Services account. The job name is passed down to the resources created by the
* recommendation job. The names of resources (such as the model, endpoint configuration, endpoint, and
* compilation) that are prefixed with the job name are truncated at 40 characters.
*/
public String getJobName() {
return this.jobName;
}
/**
*
* A name for the recommendation job. The name must be unique within the Amazon Web Services Region and within your
* Amazon Web Services account. The job name is passed down to the resources created by the recommendation job. The
* names of resources (such as the model, endpoint configuration, endpoint, and compilation) that are prefixed with
* the job name are truncated at 40 characters.
*
*
* @param jobName
* A name for the recommendation job. The name must be unique within the Amazon Web Services Region and
* within your Amazon Web Services account. The job name is passed down to the resources created by the
* recommendation job. The names of resources (such as the model, endpoint configuration, endpoint, and
* compilation) that are prefixed with the job name are truncated at 40 characters.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInferenceRecommendationsJobRequest withJobName(String jobName) {
setJobName(jobName);
return this;
}
/**
*
* Defines the type of recommendation job. Specify Default
to initiate an instance recommendation and
* Advanced
to initiate a load test. If left unspecified, Amazon SageMaker Inference Recommender will
* run an instance recommendation (DEFAULT
) job.
*
*
* @param jobType
* Defines the type of recommendation job. Specify Default
to initiate an instance
* recommendation and Advanced
to initiate a load test. If left unspecified, Amazon SageMaker
* Inference Recommender will run an instance recommendation (DEFAULT
) job.
* @see RecommendationJobType
*/
public void setJobType(String jobType) {
this.jobType = jobType;
}
/**
*
* Defines the type of recommendation job. Specify Default
to initiate an instance recommendation and
* Advanced
to initiate a load test. If left unspecified, Amazon SageMaker Inference Recommender will
* run an instance recommendation (DEFAULT
) job.
*
*
* @return Defines the type of recommendation job. Specify Default
to initiate an instance
* recommendation and Advanced
to initiate a load test. If left unspecified, Amazon SageMaker
* Inference Recommender will run an instance recommendation (DEFAULT
) job.
* @see RecommendationJobType
*/
public String getJobType() {
return this.jobType;
}
/**
*
* Defines the type of recommendation job. Specify Default
to initiate an instance recommendation and
* Advanced
to initiate a load test. If left unspecified, Amazon SageMaker Inference Recommender will
* run an instance recommendation (DEFAULT
) job.
*
*
* @param jobType
* Defines the type of recommendation job. Specify Default
to initiate an instance
* recommendation and Advanced
to initiate a load test. If left unspecified, Amazon SageMaker
* Inference Recommender will run an instance recommendation (DEFAULT
) job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecommendationJobType
*/
public CreateInferenceRecommendationsJobRequest withJobType(String jobType) {
setJobType(jobType);
return this;
}
/**
*
* Defines the type of recommendation job. Specify Default
to initiate an instance recommendation and
* Advanced
to initiate a load test. If left unspecified, Amazon SageMaker Inference Recommender will
* run an instance recommendation (DEFAULT
) job.
*
*
* @param jobType
* Defines the type of recommendation job. Specify Default
to initiate an instance
* recommendation and Advanced
to initiate a load test. If left unspecified, Amazon SageMaker
* Inference Recommender will run an instance recommendation (DEFAULT
) job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecommendationJobType
*/
public CreateInferenceRecommendationsJobRequest withJobType(RecommendationJobType jobType) {
this.jobType = jobType.toString();
return this;
}
/**
*
* The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
*
*
* @param roleArn
* The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your
* behalf.
*/
public void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
/**
*
* The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
*
*
* @return The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your
* behalf.
*/
public String getRoleArn() {
return this.roleArn;
}
/**
*
* The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
*
*
* @param roleArn
* The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your
* behalf.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInferenceRecommendationsJobRequest withRoleArn(String roleArn) {
setRoleArn(roleArn);
return this;
}
/**
*
* Provides information about the versioned model package Amazon Resource Name (ARN), the traffic pattern, and
* endpoint configurations.
*
*
* @param inputConfig
* Provides information about the versioned model package Amazon Resource Name (ARN), the traffic pattern,
* and endpoint configurations.
*/
public void setInputConfig(RecommendationJobInputConfig inputConfig) {
this.inputConfig = inputConfig;
}
/**
*
* Provides information about the versioned model package Amazon Resource Name (ARN), the traffic pattern, and
* endpoint configurations.
*
*
* @return Provides information about the versioned model package Amazon Resource Name (ARN), the traffic pattern,
* and endpoint configurations.
*/
public RecommendationJobInputConfig getInputConfig() {
return this.inputConfig;
}
/**
*
* Provides information about the versioned model package Amazon Resource Name (ARN), the traffic pattern, and
* endpoint configurations.
*
*
* @param inputConfig
* Provides information about the versioned model package Amazon Resource Name (ARN), the traffic pattern,
* and endpoint configurations.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInferenceRecommendationsJobRequest withInputConfig(RecommendationJobInputConfig inputConfig) {
setInputConfig(inputConfig);
return this;
}
/**
*
* Description of the recommendation job.
*
*
* @param jobDescription
* Description of the recommendation job.
*/
public void setJobDescription(String jobDescription) {
this.jobDescription = jobDescription;
}
/**
*
* Description of the recommendation job.
*
*
* @return Description of the recommendation job.
*/
public String getJobDescription() {
return this.jobDescription;
}
/**
*
* Description of the recommendation job.
*
*
* @param jobDescription
* Description of the recommendation job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInferenceRecommendationsJobRequest withJobDescription(String jobDescription) {
setJobDescription(jobDescription);
return this;
}
/**
*
* A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is automatically
* stopped.
*
*
* @param stoppingConditions
* A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is
* automatically stopped.
*/
public void setStoppingConditions(RecommendationJobStoppingConditions stoppingConditions) {
this.stoppingConditions = stoppingConditions;
}
/**
*
* A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is automatically
* stopped.
*
*
* @return A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is
* automatically stopped.
*/
public RecommendationJobStoppingConditions getStoppingConditions() {
return this.stoppingConditions;
}
/**
*
* A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is automatically
* stopped.
*
*
* @param stoppingConditions
* A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is
* automatically stopped.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInferenceRecommendationsJobRequest withStoppingConditions(RecommendationJobStoppingConditions stoppingConditions) {
setStoppingConditions(stoppingConditions);
return this;
}
/**
*
* Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side encryption.
*
*
* @param outputConfig
* Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side
* encryption.
*/
public void setOutputConfig(RecommendationJobOutputConfig outputConfig) {
this.outputConfig = outputConfig;
}
/**
*
* Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side encryption.
*
*
* @return Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side
* encryption.
*/
public RecommendationJobOutputConfig getOutputConfig() {
return this.outputConfig;
}
/**
*
* Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side encryption.
*
*
* @param outputConfig
* Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side
* encryption.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInferenceRecommendationsJobRequest withOutputConfig(RecommendationJobOutputConfig outputConfig) {
setOutputConfig(outputConfig);
return this;
}
/**
*
* The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag
* consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services Resources
* in the Amazon Web Services General Reference.
*
*
* @return The metadata that you apply to Amazon Web Services resources to help you categorize and organize them.
* Each tag consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services
* Resources in the Amazon Web Services General Reference.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag
* consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services Resources
* in the Amazon Web Services General Reference.
*
*
* @param tags
* The metadata that you apply to Amazon Web Services resources to help you categorize and organize them.
* Each tag consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services
* Resources in the Amazon Web Services General Reference.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag
* consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services Resources
* in the Amazon Web Services General Reference.
*
*
* 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
* The metadata that you apply to Amazon Web Services resources to help you categorize and organize them.
* Each tag consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services
* Resources in the Amazon Web Services General Reference.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInferenceRecommendationsJobRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag
* consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services Resources
* in the Amazon Web Services General Reference.
*
*
* @param tags
* The metadata that you apply to Amazon Web Services resources to help you categorize and organize them.
* Each tag consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services
* Resources in the Amazon Web Services General Reference.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInferenceRecommendationsJobRequest 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 (getJobName() != null)
sb.append("JobName: ").append(getJobName()).append(",");
if (getJobType() != null)
sb.append("JobType: ").append(getJobType()).append(",");
if (getRoleArn() != null)
sb.append("RoleArn: ").append(getRoleArn()).append(",");
if (getInputConfig() != null)
sb.append("InputConfig: ").append(getInputConfig()).append(",");
if (getJobDescription() != null)
sb.append("JobDescription: ").append(getJobDescription()).append(",");
if (getStoppingConditions() != null)
sb.append("StoppingConditions: ").append(getStoppingConditions()).append(",");
if (getOutputConfig() != null)
sb.append("OutputConfig: ").append(getOutputConfig()).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 CreateInferenceRecommendationsJobRequest == false)
return false;
CreateInferenceRecommendationsJobRequest other = (CreateInferenceRecommendationsJobRequest) obj;
if (other.getJobName() == null ^ this.getJobName() == null)
return false;
if (other.getJobName() != null && other.getJobName().equals(this.getJobName()) == false)
return false;
if (other.getJobType() == null ^ this.getJobType() == null)
return false;
if (other.getJobType() != null && other.getJobType().equals(this.getJobType()) == false)
return false;
if (other.getRoleArn() == null ^ this.getRoleArn() == null)
return false;
if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
return false;
if (other.getInputConfig() == null ^ this.getInputConfig() == null)
return false;
if (other.getInputConfig() != null && other.getInputConfig().equals(this.getInputConfig()) == false)
return false;
if (other.getJobDescription() == null ^ this.getJobDescription() == null)
return false;
if (other.getJobDescription() != null && other.getJobDescription().equals(this.getJobDescription()) == false)
return false;
if (other.getStoppingConditions() == null ^ this.getStoppingConditions() == null)
return false;
if (other.getStoppingConditions() != null && other.getStoppingConditions().equals(this.getStoppingConditions()) == false)
return false;
if (other.getOutputConfig() == null ^ this.getOutputConfig() == null)
return false;
if (other.getOutputConfig() != null && other.getOutputConfig().equals(this.getOutputConfig()) == 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 + ((getJobName() == null) ? 0 : getJobName().hashCode());
hashCode = prime * hashCode + ((getJobType() == null) ? 0 : getJobType().hashCode());
hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
hashCode = prime * hashCode + ((getInputConfig() == null) ? 0 : getInputConfig().hashCode());
hashCode = prime * hashCode + ((getJobDescription() == null) ? 0 : getJobDescription().hashCode());
hashCode = prime * hashCode + ((getStoppingConditions() == null) ? 0 : getStoppingConditions().hashCode());
hashCode = prime * hashCode + ((getOutputConfig() == null) ? 0 : getOutputConfig().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateInferenceRecommendationsJobRequest clone() {
return (CreateInferenceRecommendationsJobRequest) super.clone();
}
}