
com.amazonaws.services.sagemaker.model.CreateModelCardRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-sagemaker Show documentation
/*
* 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 CreateModelCardRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The unique name of the model card.
*
*/
private String modelCardName;
/**
*
* An optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for regulated
* workloads with highly sensitive data.
*
*/
private ModelCardSecurityConfig securityConfig;
/**
*
* The content of the model card. Content must be in model card JSON
* schema and provided as a string.
*
*/
private String content;
/**
*
* The approval status of the model card within your organization. Different organizations might have different
* criteria for model card review and approval.
*
*
* -
*
* Draft
: The model card is a work in progress.
*
*
* -
*
* PendingReview
: The model card is pending review.
*
*
* -
*
* Approved
: The model card is approved.
*
*
* -
*
* Archived
: The model card is archived. No more updates should be made to the model card, but it can
* still be exported.
*
*
*
*/
private String modelCardStatus;
/**
*
* Key-value pairs used to manage metadata for model cards.
*
*/
private java.util.List tags;
/**
*
* The unique name of the model card.
*
*
* @param modelCardName
* The unique name of the model card.
*/
public void setModelCardName(String modelCardName) {
this.modelCardName = modelCardName;
}
/**
*
* The unique name of the model card.
*
*
* @return The unique name of the model card.
*/
public String getModelCardName() {
return this.modelCardName;
}
/**
*
* The unique name of the model card.
*
*
* @param modelCardName
* The unique name of the model card.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateModelCardRequest withModelCardName(String modelCardName) {
setModelCardName(modelCardName);
return this;
}
/**
*
* An optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for regulated
* workloads with highly sensitive data.
*
*
* @param securityConfig
* An optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for
* regulated workloads with highly sensitive data.
*/
public void setSecurityConfig(ModelCardSecurityConfig securityConfig) {
this.securityConfig = securityConfig;
}
/**
*
* An optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for regulated
* workloads with highly sensitive data.
*
*
* @return An optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for
* regulated workloads with highly sensitive data.
*/
public ModelCardSecurityConfig getSecurityConfig() {
return this.securityConfig;
}
/**
*
* An optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for regulated
* workloads with highly sensitive data.
*
*
* @param securityConfig
* An optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for
* regulated workloads with highly sensitive data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateModelCardRequest withSecurityConfig(ModelCardSecurityConfig securityConfig) {
setSecurityConfig(securityConfig);
return this;
}
/**
*
* The content of the model card. Content must be in model card JSON
* schema and provided as a string.
*
*
* @param content
* The content of the model card. Content must be in model card
* JSON schema and provided as a string.
*/
public void setContent(String content) {
this.content = content;
}
/**
*
* The content of the model card. Content must be in model card JSON
* schema and provided as a string.
*
*
* @return The content of the model card. Content must be in model
* card JSON schema and provided as a string.
*/
public String getContent() {
return this.content;
}
/**
*
* The content of the model card. Content must be in model card JSON
* schema and provided as a string.
*
*
* @param content
* The content of the model card. Content must be in model card
* JSON schema and provided as a string.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateModelCardRequest withContent(String content) {
setContent(content);
return this;
}
/**
*
* The approval status of the model card within your organization. Different organizations might have different
* criteria for model card review and approval.
*
*
* -
*
* Draft
: The model card is a work in progress.
*
*
* -
*
* PendingReview
: The model card is pending review.
*
*
* -
*
* Approved
: The model card is approved.
*
*
* -
*
* Archived
: The model card is archived. No more updates should be made to the model card, but it can
* still be exported.
*
*
*
*
* @param modelCardStatus
* The approval status of the model card within your organization. Different organizations might have
* different criteria for model card review and approval.
*
* -
*
* Draft
: The model card is a work in progress.
*
*
* -
*
* PendingReview
: The model card is pending review.
*
*
* -
*
* Approved
: The model card is approved.
*
*
* -
*
* Archived
: The model card is archived. No more updates should be made to the model card, but
* it can still be exported.
*
*
* @see ModelCardStatus
*/
public void setModelCardStatus(String modelCardStatus) {
this.modelCardStatus = modelCardStatus;
}
/**
*
* The approval status of the model card within your organization. Different organizations might have different
* criteria for model card review and approval.
*
*
* -
*
* Draft
: The model card is a work in progress.
*
*
* -
*
* PendingReview
: The model card is pending review.
*
*
* -
*
* Approved
: The model card is approved.
*
*
* -
*
* Archived
: The model card is archived. No more updates should be made to the model card, but it can
* still be exported.
*
*
*
*
* @return The approval status of the model card within your organization. Different organizations might have
* different criteria for model card review and approval.
*
* -
*
* Draft
: The model card is a work in progress.
*
*
* -
*
* PendingReview
: The model card is pending review.
*
*
* -
*
* Approved
: The model card is approved.
*
*
* -
*
* Archived
: The model card is archived. No more updates should be made to the model card, but
* it can still be exported.
*
*
* @see ModelCardStatus
*/
public String getModelCardStatus() {
return this.modelCardStatus;
}
/**
*
* The approval status of the model card within your organization. Different organizations might have different
* criteria for model card review and approval.
*
*
* -
*
* Draft
: The model card is a work in progress.
*
*
* -
*
* PendingReview
: The model card is pending review.
*
*
* -
*
* Approved
: The model card is approved.
*
*
* -
*
* Archived
: The model card is archived. No more updates should be made to the model card, but it can
* still be exported.
*
*
*
*
* @param modelCardStatus
* The approval status of the model card within your organization. Different organizations might have
* different criteria for model card review and approval.
*
* -
*
* Draft
: The model card is a work in progress.
*
*
* -
*
* PendingReview
: The model card is pending review.
*
*
* -
*
* Approved
: The model card is approved.
*
*
* -
*
* Archived
: The model card is archived. No more updates should be made to the model card, but
* it can still be exported.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ModelCardStatus
*/
public CreateModelCardRequest withModelCardStatus(String modelCardStatus) {
setModelCardStatus(modelCardStatus);
return this;
}
/**
*
* The approval status of the model card within your organization. Different organizations might have different
* criteria for model card review and approval.
*
*
* -
*
* Draft
: The model card is a work in progress.
*
*
* -
*
* PendingReview
: The model card is pending review.
*
*
* -
*
* Approved
: The model card is approved.
*
*
* -
*
* Archived
: The model card is archived. No more updates should be made to the model card, but it can
* still be exported.
*
*
*
*
* @param modelCardStatus
* The approval status of the model card within your organization. Different organizations might have
* different criteria for model card review and approval.
*
* -
*
* Draft
: The model card is a work in progress.
*
*
* -
*
* PendingReview
: The model card is pending review.
*
*
* -
*
* Approved
: The model card is approved.
*
*
* -
*
* Archived
: The model card is archived. No more updates should be made to the model card, but
* it can still be exported.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ModelCardStatus
*/
public CreateModelCardRequest withModelCardStatus(ModelCardStatus modelCardStatus) {
this.modelCardStatus = modelCardStatus.toString();
return this;
}
/**
*
* Key-value pairs used to manage metadata for model cards.
*
*
* @return Key-value pairs used to manage metadata for model cards.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* Key-value pairs used to manage metadata for model cards.
*
*
* @param tags
* Key-value pairs used to manage metadata for model cards.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* Key-value pairs used to manage metadata for model cards.
*
*
* 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
* Key-value pairs used to manage metadata for model cards.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateModelCardRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* Key-value pairs used to manage metadata for model cards.
*
*
* @param tags
* Key-value pairs used to manage metadata for model cards.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateModelCardRequest 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 (getModelCardName() != null)
sb.append("ModelCardName: ").append(getModelCardName()).append(",");
if (getSecurityConfig() != null)
sb.append("SecurityConfig: ").append(getSecurityConfig()).append(",");
if (getContent() != null)
sb.append("Content: ").append("***Sensitive Data Redacted***").append(",");
if (getModelCardStatus() != null)
sb.append("ModelCardStatus: ").append(getModelCardStatus()).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 CreateModelCardRequest == false)
return false;
CreateModelCardRequest other = (CreateModelCardRequest) obj;
if (other.getModelCardName() == null ^ this.getModelCardName() == null)
return false;
if (other.getModelCardName() != null && other.getModelCardName().equals(this.getModelCardName()) == false)
return false;
if (other.getSecurityConfig() == null ^ this.getSecurityConfig() == null)
return false;
if (other.getSecurityConfig() != null && other.getSecurityConfig().equals(this.getSecurityConfig()) == false)
return false;
if (other.getContent() == null ^ this.getContent() == null)
return false;
if (other.getContent() != null && other.getContent().equals(this.getContent()) == false)
return false;
if (other.getModelCardStatus() == null ^ this.getModelCardStatus() == null)
return false;
if (other.getModelCardStatus() != null && other.getModelCardStatus().equals(this.getModelCardStatus()) == 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 + ((getModelCardName() == null) ? 0 : getModelCardName().hashCode());
hashCode = prime * hashCode + ((getSecurityConfig() == null) ? 0 : getSecurityConfig().hashCode());
hashCode = prime * hashCode + ((getContent() == null) ? 0 : getContent().hashCode());
hashCode = prime * hashCode + ((getModelCardStatus() == null) ? 0 : getModelCardStatus().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateModelCardRequest clone() {
return (CreateModelCardRequest) super.clone();
}
}