com.amazonaws.services.sagemaker.model.UpdateTrialComponentRequest 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 UpdateTrialComponentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the component to update.
*
*/
private String trialComponentName;
/**
*
* The name of the component as displayed. The name doesn't need to be unique. If DisplayName
isn't
* specified, TrialComponentName
is displayed.
*
*/
private String displayName;
/**
*
* The new status of the component.
*
*/
private TrialComponentStatus status;
/**
*
* When the component started.
*
*/
private java.util.Date startTime;
/**
*
* When the component ended.
*
*/
private java.util.Date endTime;
/**
*
* Replaces all of the component's hyperparameters with the specified hyperparameters or add new hyperparameters.
* Existing hyperparameters are replaced if the trial component is updated with an identical hyperparameter key.
*
*/
private java.util.Map parameters;
/**
*
* The hyperparameters to remove from the component.
*
*/
private java.util.List parametersToRemove;
/**
*
* Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts.
* Existing input artifacts are replaced if the trial component is updated with an identical input artifact key.
*
*/
private java.util.Map inputArtifacts;
/**
*
* The input artifacts to remove from the component.
*
*/
private java.util.List inputArtifactsToRemove;
/**
*
* Replaces all of the component's output artifacts with the specified artifacts or adds new output artifacts.
* Existing output artifacts are replaced if the trial component is updated with an identical output artifact key.
*
*/
private java.util.Map outputArtifacts;
/**
*
* The output artifacts to remove from the component.
*
*/
private java.util.List outputArtifactsToRemove;
/**
*
* The name of the component to update.
*
*
* @param trialComponentName
* The name of the component to update.
*/
public void setTrialComponentName(String trialComponentName) {
this.trialComponentName = trialComponentName;
}
/**
*
* The name of the component to update.
*
*
* @return The name of the component to update.
*/
public String getTrialComponentName() {
return this.trialComponentName;
}
/**
*
* The name of the component to update.
*
*
* @param trialComponentName
* The name of the component to update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withTrialComponentName(String trialComponentName) {
setTrialComponentName(trialComponentName);
return this;
}
/**
*
* The name of the component as displayed. The name doesn't need to be unique. If DisplayName
isn't
* specified, TrialComponentName
is displayed.
*
*
* @param displayName
* The name of the component as displayed. The name doesn't need to be unique. If DisplayName
* isn't specified, TrialComponentName
is displayed.
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
*
* The name of the component as displayed. The name doesn't need to be unique. If DisplayName
isn't
* specified, TrialComponentName
is displayed.
*
*
* @return The name of the component as displayed. The name doesn't need to be unique. If DisplayName
* isn't specified, TrialComponentName
is displayed.
*/
public String getDisplayName() {
return this.displayName;
}
/**
*
* The name of the component as displayed. The name doesn't need to be unique. If DisplayName
isn't
* specified, TrialComponentName
is displayed.
*
*
* @param displayName
* The name of the component as displayed. The name doesn't need to be unique. If DisplayName
* isn't specified, TrialComponentName
is displayed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withDisplayName(String displayName) {
setDisplayName(displayName);
return this;
}
/**
*
* The new status of the component.
*
*
* @param status
* The new status of the component.
*/
public void setStatus(TrialComponentStatus status) {
this.status = status;
}
/**
*
* The new status of the component.
*
*
* @return The new status of the component.
*/
public TrialComponentStatus getStatus() {
return this.status;
}
/**
*
* The new status of the component.
*
*
* @param status
* The new status of the component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withStatus(TrialComponentStatus status) {
setStatus(status);
return this;
}
/**
*
* When the component started.
*
*
* @param startTime
* When the component started.
*/
public void setStartTime(java.util.Date startTime) {
this.startTime = startTime;
}
/**
*
* When the component started.
*
*
* @return When the component started.
*/
public java.util.Date getStartTime() {
return this.startTime;
}
/**
*
* When the component started.
*
*
* @param startTime
* When the component started.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withStartTime(java.util.Date startTime) {
setStartTime(startTime);
return this;
}
/**
*
* When the component ended.
*
*
* @param endTime
* When the component ended.
*/
public void setEndTime(java.util.Date endTime) {
this.endTime = endTime;
}
/**
*
* When the component ended.
*
*
* @return When the component ended.
*/
public java.util.Date getEndTime() {
return this.endTime;
}
/**
*
* When the component ended.
*
*
* @param endTime
* When the component ended.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withEndTime(java.util.Date endTime) {
setEndTime(endTime);
return this;
}
/**
*
* Replaces all of the component's hyperparameters with the specified hyperparameters or add new hyperparameters.
* Existing hyperparameters are replaced if the trial component is updated with an identical hyperparameter key.
*
*
* @return Replaces all of the component's hyperparameters with the specified hyperparameters or add new
* hyperparameters. Existing hyperparameters are replaced if the trial component is updated with an
* identical hyperparameter key.
*/
public java.util.Map getParameters() {
return parameters;
}
/**
*
* Replaces all of the component's hyperparameters with the specified hyperparameters or add new hyperparameters.
* Existing hyperparameters are replaced if the trial component is updated with an identical hyperparameter key.
*
*
* @param parameters
* Replaces all of the component's hyperparameters with the specified hyperparameters or add new
* hyperparameters. Existing hyperparameters are replaced if the trial component is updated with an identical
* hyperparameter key.
*/
public void setParameters(java.util.Map parameters) {
this.parameters = parameters;
}
/**
*
* Replaces all of the component's hyperparameters with the specified hyperparameters or add new hyperparameters.
* Existing hyperparameters are replaced if the trial component is updated with an identical hyperparameter key.
*
*
* @param parameters
* Replaces all of the component's hyperparameters with the specified hyperparameters or add new
* hyperparameters. Existing hyperparameters are replaced if the trial component is updated with an identical
* hyperparameter key.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withParameters(java.util.Map parameters) {
setParameters(parameters);
return this;
}
/**
* Add a single Parameters entry
*
* @see UpdateTrialComponentRequest#withParameters
* @returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest addParametersEntry(String key, TrialComponentParameterValue value) {
if (null == this.parameters) {
this.parameters = new java.util.HashMap();
}
if (this.parameters.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.parameters.put(key, value);
return this;
}
/**
* Removes all the entries added into Parameters.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest clearParametersEntries() {
this.parameters = null;
return this;
}
/**
*
* The hyperparameters to remove from the component.
*
*
* @return The hyperparameters to remove from the component.
*/
public java.util.List getParametersToRemove() {
return parametersToRemove;
}
/**
*
* The hyperparameters to remove from the component.
*
*
* @param parametersToRemove
* The hyperparameters to remove from the component.
*/
public void setParametersToRemove(java.util.Collection parametersToRemove) {
if (parametersToRemove == null) {
this.parametersToRemove = null;
return;
}
this.parametersToRemove = new java.util.ArrayList(parametersToRemove);
}
/**
*
* The hyperparameters to remove from the component.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setParametersToRemove(java.util.Collection)} or {@link #withParametersToRemove(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param parametersToRemove
* The hyperparameters to remove from the component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withParametersToRemove(String... parametersToRemove) {
if (this.parametersToRemove == null) {
setParametersToRemove(new java.util.ArrayList(parametersToRemove.length));
}
for (String ele : parametersToRemove) {
this.parametersToRemove.add(ele);
}
return this;
}
/**
*
* The hyperparameters to remove from the component.
*
*
* @param parametersToRemove
* The hyperparameters to remove from the component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withParametersToRemove(java.util.Collection parametersToRemove) {
setParametersToRemove(parametersToRemove);
return this;
}
/**
*
* Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts.
* Existing input artifacts are replaced if the trial component is updated with an identical input artifact key.
*
*
* @return Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts.
* Existing input artifacts are replaced if the trial component is updated with an identical input artifact
* key.
*/
public java.util.Map getInputArtifacts() {
return inputArtifacts;
}
/**
*
* Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts.
* Existing input artifacts are replaced if the trial component is updated with an identical input artifact key.
*
*
* @param inputArtifacts
* Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts.
* Existing input artifacts are replaced if the trial component is updated with an identical input artifact
* key.
*/
public void setInputArtifacts(java.util.Map inputArtifacts) {
this.inputArtifacts = inputArtifacts;
}
/**
*
* Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts.
* Existing input artifacts are replaced if the trial component is updated with an identical input artifact key.
*
*
* @param inputArtifacts
* Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts.
* Existing input artifacts are replaced if the trial component is updated with an identical input artifact
* key.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withInputArtifacts(java.util.Map inputArtifacts) {
setInputArtifacts(inputArtifacts);
return this;
}
/**
* Add a single InputArtifacts entry
*
* @see UpdateTrialComponentRequest#withInputArtifacts
* @returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest addInputArtifactsEntry(String key, TrialComponentArtifact value) {
if (null == this.inputArtifacts) {
this.inputArtifacts = new java.util.HashMap();
}
if (this.inputArtifacts.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.inputArtifacts.put(key, value);
return this;
}
/**
* Removes all the entries added into InputArtifacts.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest clearInputArtifactsEntries() {
this.inputArtifacts = null;
return this;
}
/**
*
* The input artifacts to remove from the component.
*
*
* @return The input artifacts to remove from the component.
*/
public java.util.List getInputArtifactsToRemove() {
return inputArtifactsToRemove;
}
/**
*
* The input artifacts to remove from the component.
*
*
* @param inputArtifactsToRemove
* The input artifacts to remove from the component.
*/
public void setInputArtifactsToRemove(java.util.Collection inputArtifactsToRemove) {
if (inputArtifactsToRemove == null) {
this.inputArtifactsToRemove = null;
return;
}
this.inputArtifactsToRemove = new java.util.ArrayList(inputArtifactsToRemove);
}
/**
*
* The input artifacts to remove from the component.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInputArtifactsToRemove(java.util.Collection)} or
* {@link #withInputArtifactsToRemove(java.util.Collection)} if you want to override the existing values.
*
*
* @param inputArtifactsToRemove
* The input artifacts to remove from the component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withInputArtifactsToRemove(String... inputArtifactsToRemove) {
if (this.inputArtifactsToRemove == null) {
setInputArtifactsToRemove(new java.util.ArrayList(inputArtifactsToRemove.length));
}
for (String ele : inputArtifactsToRemove) {
this.inputArtifactsToRemove.add(ele);
}
return this;
}
/**
*
* The input artifacts to remove from the component.
*
*
* @param inputArtifactsToRemove
* The input artifacts to remove from the component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withInputArtifactsToRemove(java.util.Collection inputArtifactsToRemove) {
setInputArtifactsToRemove(inputArtifactsToRemove);
return this;
}
/**
*
* Replaces all of the component's output artifacts with the specified artifacts or adds new output artifacts.
* Existing output artifacts are replaced if the trial component is updated with an identical output artifact key.
*
*
* @return Replaces all of the component's output artifacts with the specified artifacts or adds new output
* artifacts. Existing output artifacts are replaced if the trial component is updated with an identical
* output artifact key.
*/
public java.util.Map getOutputArtifacts() {
return outputArtifacts;
}
/**
*
* Replaces all of the component's output artifacts with the specified artifacts or adds new output artifacts.
* Existing output artifacts are replaced if the trial component is updated with an identical output artifact key.
*
*
* @param outputArtifacts
* Replaces all of the component's output artifacts with the specified artifacts or adds new output
* artifacts. Existing output artifacts are replaced if the trial component is updated with an identical
* output artifact key.
*/
public void setOutputArtifacts(java.util.Map outputArtifacts) {
this.outputArtifacts = outputArtifacts;
}
/**
*
* Replaces all of the component's output artifacts with the specified artifacts or adds new output artifacts.
* Existing output artifacts are replaced if the trial component is updated with an identical output artifact key.
*
*
* @param outputArtifacts
* Replaces all of the component's output artifacts with the specified artifacts or adds new output
* artifacts. Existing output artifacts are replaced if the trial component is updated with an identical
* output artifact key.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withOutputArtifacts(java.util.Map outputArtifacts) {
setOutputArtifacts(outputArtifacts);
return this;
}
/**
* Add a single OutputArtifacts entry
*
* @see UpdateTrialComponentRequest#withOutputArtifacts
* @returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest addOutputArtifactsEntry(String key, TrialComponentArtifact value) {
if (null == this.outputArtifacts) {
this.outputArtifacts = new java.util.HashMap();
}
if (this.outputArtifacts.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.outputArtifacts.put(key, value);
return this;
}
/**
* Removes all the entries added into OutputArtifacts.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest clearOutputArtifactsEntries() {
this.outputArtifacts = null;
return this;
}
/**
*
* The output artifacts to remove from the component.
*
*
* @return The output artifacts to remove from the component.
*/
public java.util.List getOutputArtifactsToRemove() {
return outputArtifactsToRemove;
}
/**
*
* The output artifacts to remove from the component.
*
*
* @param outputArtifactsToRemove
* The output artifacts to remove from the component.
*/
public void setOutputArtifactsToRemove(java.util.Collection outputArtifactsToRemove) {
if (outputArtifactsToRemove == null) {
this.outputArtifactsToRemove = null;
return;
}
this.outputArtifactsToRemove = new java.util.ArrayList(outputArtifactsToRemove);
}
/**
*
* The output artifacts to remove from the component.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setOutputArtifactsToRemove(java.util.Collection)} or
* {@link #withOutputArtifactsToRemove(java.util.Collection)} if you want to override the existing values.
*
*
* @param outputArtifactsToRemove
* The output artifacts to remove from the component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withOutputArtifactsToRemove(String... outputArtifactsToRemove) {
if (this.outputArtifactsToRemove == null) {
setOutputArtifactsToRemove(new java.util.ArrayList(outputArtifactsToRemove.length));
}
for (String ele : outputArtifactsToRemove) {
this.outputArtifactsToRemove.add(ele);
}
return this;
}
/**
*
* The output artifacts to remove from the component.
*
*
* @param outputArtifactsToRemove
* The output artifacts to remove from the component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTrialComponentRequest withOutputArtifactsToRemove(java.util.Collection outputArtifactsToRemove) {
setOutputArtifactsToRemove(outputArtifactsToRemove);
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 (getTrialComponentName() != null)
sb.append("TrialComponentName: ").append(getTrialComponentName()).append(",");
if (getDisplayName() != null)
sb.append("DisplayName: ").append(getDisplayName()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getStartTime() != null)
sb.append("StartTime: ").append(getStartTime()).append(",");
if (getEndTime() != null)
sb.append("EndTime: ").append(getEndTime()).append(",");
if (getParameters() != null)
sb.append("Parameters: ").append(getParameters()).append(",");
if (getParametersToRemove() != null)
sb.append("ParametersToRemove: ").append(getParametersToRemove()).append(",");
if (getInputArtifacts() != null)
sb.append("InputArtifacts: ").append(getInputArtifacts()).append(",");
if (getInputArtifactsToRemove() != null)
sb.append("InputArtifactsToRemove: ").append(getInputArtifactsToRemove()).append(",");
if (getOutputArtifacts() != null)
sb.append("OutputArtifacts: ").append(getOutputArtifacts()).append(",");
if (getOutputArtifactsToRemove() != null)
sb.append("OutputArtifactsToRemove: ").append(getOutputArtifactsToRemove());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateTrialComponentRequest == false)
return false;
UpdateTrialComponentRequest other = (UpdateTrialComponentRequest) obj;
if (other.getTrialComponentName() == null ^ this.getTrialComponentName() == null)
return false;
if (other.getTrialComponentName() != null && other.getTrialComponentName().equals(this.getTrialComponentName()) == false)
return false;
if (other.getDisplayName() == null ^ this.getDisplayName() == null)
return false;
if (other.getDisplayName() != null && other.getDisplayName().equals(this.getDisplayName()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getStartTime() == null ^ this.getStartTime() == null)
return false;
if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false)
return false;
if (other.getEndTime() == null ^ this.getEndTime() == null)
return false;
if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false)
return false;
if (other.getParameters() == null ^ this.getParameters() == null)
return false;
if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == false)
return false;
if (other.getParametersToRemove() == null ^ this.getParametersToRemove() == null)
return false;
if (other.getParametersToRemove() != null && other.getParametersToRemove().equals(this.getParametersToRemove()) == false)
return false;
if (other.getInputArtifacts() == null ^ this.getInputArtifacts() == null)
return false;
if (other.getInputArtifacts() != null && other.getInputArtifacts().equals(this.getInputArtifacts()) == false)
return false;
if (other.getInputArtifactsToRemove() == null ^ this.getInputArtifactsToRemove() == null)
return false;
if (other.getInputArtifactsToRemove() != null && other.getInputArtifactsToRemove().equals(this.getInputArtifactsToRemove()) == false)
return false;
if (other.getOutputArtifacts() == null ^ this.getOutputArtifacts() == null)
return false;
if (other.getOutputArtifacts() != null && other.getOutputArtifacts().equals(this.getOutputArtifacts()) == false)
return false;
if (other.getOutputArtifactsToRemove() == null ^ this.getOutputArtifactsToRemove() == null)
return false;
if (other.getOutputArtifactsToRemove() != null && other.getOutputArtifactsToRemove().equals(this.getOutputArtifactsToRemove()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTrialComponentName() == null) ? 0 : getTrialComponentName().hashCode());
hashCode = prime * hashCode + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode());
hashCode = prime * hashCode + ((getParametersToRemove() == null) ? 0 : getParametersToRemove().hashCode());
hashCode = prime * hashCode + ((getInputArtifacts() == null) ? 0 : getInputArtifacts().hashCode());
hashCode = prime * hashCode + ((getInputArtifactsToRemove() == null) ? 0 : getInputArtifactsToRemove().hashCode());
hashCode = prime * hashCode + ((getOutputArtifacts() == null) ? 0 : getOutputArtifacts().hashCode());
hashCode = prime * hashCode + ((getOutputArtifactsToRemove() == null) ? 0 : getOutputArtifactsToRemove().hashCode());
return hashCode;
}
@Override
public UpdateTrialComponentRequest clone() {
return (UpdateTrialComponentRequest) super.clone();
}
}