All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.sagemaker.model.UpdateArtifactRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon SageMaker module holds the client classes that are used for communicating with Amazon SageMaker Service

The newest version!
/*
 * 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 UpdateArtifactRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The Amazon Resource Name (ARN) of the artifact to update. *

*/ private String artifactArn; /** *

* The new name for the artifact. *

*/ private String artifactName; /** *

* The new list of properties. Overwrites the current property list. *

*/ private java.util.Map properties; /** *

* A list of properties to remove. *

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

* The Amazon Resource Name (ARN) of the artifact to update. *

* * @param artifactArn * The Amazon Resource Name (ARN) of the artifact to update. */ public void setArtifactArn(String artifactArn) { this.artifactArn = artifactArn; } /** *

* The Amazon Resource Name (ARN) of the artifact to update. *

* * @return The Amazon Resource Name (ARN) of the artifact to update. */ public String getArtifactArn() { return this.artifactArn; } /** *

* The Amazon Resource Name (ARN) of the artifact to update. *

* * @param artifactArn * The Amazon Resource Name (ARN) of the artifact to update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateArtifactRequest withArtifactArn(String artifactArn) { setArtifactArn(artifactArn); return this; } /** *

* The new name for the artifact. *

* * @param artifactName * The new name for the artifact. */ public void setArtifactName(String artifactName) { this.artifactName = artifactName; } /** *

* The new name for the artifact. *

* * @return The new name for the artifact. */ public String getArtifactName() { return this.artifactName; } /** *

* The new name for the artifact. *

* * @param artifactName * The new name for the artifact. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateArtifactRequest withArtifactName(String artifactName) { setArtifactName(artifactName); return this; } /** *

* The new list of properties. Overwrites the current property list. *

* * @return The new list of properties. Overwrites the current property list. */ public java.util.Map getProperties() { return properties; } /** *

* The new list of properties. Overwrites the current property list. *

* * @param properties * The new list of properties. Overwrites the current property list. */ public void setProperties(java.util.Map properties) { this.properties = properties; } /** *

* The new list of properties. Overwrites the current property list. *

* * @param properties * The new list of properties. Overwrites the current property list. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateArtifactRequest withProperties(java.util.Map properties) { setProperties(properties); return this; } /** * Add a single Properties entry * * @see UpdateArtifactRequest#withProperties * @returns a reference to this object so that method calls can be chained together. */ public UpdateArtifactRequest addPropertiesEntry(String key, String value) { if (null == this.properties) { this.properties = new java.util.HashMap(); } if (this.properties.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.properties.put(key, value); return this; } /** * Removes all the entries added into Properties. * * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateArtifactRequest clearPropertiesEntries() { this.properties = null; return this; } /** *

* A list of properties to remove. *

* * @return A list of properties to remove. */ public java.util.List getPropertiesToRemove() { return propertiesToRemove; } /** *

* A list of properties to remove. *

* * @param propertiesToRemove * A list of properties to remove. */ public void setPropertiesToRemove(java.util.Collection propertiesToRemove) { if (propertiesToRemove == null) { this.propertiesToRemove = null; return; } this.propertiesToRemove = new java.util.ArrayList(propertiesToRemove); } /** *

* A list of properties to remove. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setPropertiesToRemove(java.util.Collection)} or {@link #withPropertiesToRemove(java.util.Collection)} if * you want to override the existing values. *

* * @param propertiesToRemove * A list of properties to remove. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateArtifactRequest withPropertiesToRemove(String... propertiesToRemove) { if (this.propertiesToRemove == null) { setPropertiesToRemove(new java.util.ArrayList(propertiesToRemove.length)); } for (String ele : propertiesToRemove) { this.propertiesToRemove.add(ele); } return this; } /** *

* A list of properties to remove. *

* * @param propertiesToRemove * A list of properties to remove. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateArtifactRequest withPropertiesToRemove(java.util.Collection propertiesToRemove) { setPropertiesToRemove(propertiesToRemove); 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 (getArtifactArn() != null) sb.append("ArtifactArn: ").append(getArtifactArn()).append(","); if (getArtifactName() != null) sb.append("ArtifactName: ").append(getArtifactName()).append(","); if (getProperties() != null) sb.append("Properties: ").append(getProperties()).append(","); if (getPropertiesToRemove() != null) sb.append("PropertiesToRemove: ").append(getPropertiesToRemove()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateArtifactRequest == false) return false; UpdateArtifactRequest other = (UpdateArtifactRequest) obj; if (other.getArtifactArn() == null ^ this.getArtifactArn() == null) return false; if (other.getArtifactArn() != null && other.getArtifactArn().equals(this.getArtifactArn()) == false) return false; if (other.getArtifactName() == null ^ this.getArtifactName() == null) return false; if (other.getArtifactName() != null && other.getArtifactName().equals(this.getArtifactName()) == false) return false; if (other.getProperties() == null ^ this.getProperties() == null) return false; if (other.getProperties() != null && other.getProperties().equals(this.getProperties()) == false) return false; if (other.getPropertiesToRemove() == null ^ this.getPropertiesToRemove() == null) return false; if (other.getPropertiesToRemove() != null && other.getPropertiesToRemove().equals(this.getPropertiesToRemove()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArtifactArn() == null) ? 0 : getArtifactArn().hashCode()); hashCode = prime * hashCode + ((getArtifactName() == null) ? 0 : getArtifactName().hashCode()); hashCode = prime * hashCode + ((getProperties() == null) ? 0 : getProperties().hashCode()); hashCode = prime * hashCode + ((getPropertiesToRemove() == null) ? 0 : getPropertiesToRemove().hashCode()); return hashCode; } @Override public UpdateArtifactRequest clone() { return (UpdateArtifactRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy