
com.amazonaws.services.sagemaker.model.TrialComponentArtifact Maven / Gradle / Ivy
/*
* Copyright 2015-2020 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Represents an input or output artifact of a trial component. You specify TrialComponentArtifact
as part
* of the InputArtifacts
and OutputArtifacts
parameters in the CreateTrialComponent
* request.
*
*
* Examples of input artifacts are datasets, algorithms, hyperparameters, source code, and instance types. Examples of
* output artifacts are metrics, snapshots, logs, and images.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class TrialComponentArtifact implements Serializable, Cloneable, StructuredPojo {
/**
*
* The media type of the artifact, which indicates the type of data in the artifact file. The media type consists of
* a type and a subtype concatenated with a slash (/) character, for example, text/csv, image/jpeg,
* and s3/uri. The type specifies the category of the media. The subtype specifies the kind of data.
*
*/
private String mediaType;
/**
*
* The location of the artifact.
*
*/
private String value;
/**
*
* The media type of the artifact, which indicates the type of data in the artifact file. The media type consists of
* a type and a subtype concatenated with a slash (/) character, for example, text/csv, image/jpeg,
* and s3/uri. The type specifies the category of the media. The subtype specifies the kind of data.
*
*
* @param mediaType
* The media type of the artifact, which indicates the type of data in the artifact file. The media type
* consists of a type and a subtype concatenated with a slash (/) character, for example,
* text/csv, image/jpeg, and s3/uri. The type specifies the category of the media. The subtype specifies the
* kind of data.
*/
public void setMediaType(String mediaType) {
this.mediaType = mediaType;
}
/**
*
* The media type of the artifact, which indicates the type of data in the artifact file. The media type consists of
* a type and a subtype concatenated with a slash (/) character, for example, text/csv, image/jpeg,
* and s3/uri. The type specifies the category of the media. The subtype specifies the kind of data.
*
*
* @return The media type of the artifact, which indicates the type of data in the artifact file. The media type
* consists of a type and a subtype concatenated with a slash (/) character, for example,
* text/csv, image/jpeg, and s3/uri. The type specifies the category of the media. The subtype specifies the
* kind of data.
*/
public String getMediaType() {
return this.mediaType;
}
/**
*
* The media type of the artifact, which indicates the type of data in the artifact file. The media type consists of
* a type and a subtype concatenated with a slash (/) character, for example, text/csv, image/jpeg,
* and s3/uri. The type specifies the category of the media. The subtype specifies the kind of data.
*
*
* @param mediaType
* The media type of the artifact, which indicates the type of data in the artifact file. The media type
* consists of a type and a subtype concatenated with a slash (/) character, for example,
* text/csv, image/jpeg, and s3/uri. The type specifies the category of the media. The subtype specifies the
* kind of data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrialComponentArtifact withMediaType(String mediaType) {
setMediaType(mediaType);
return this;
}
/**
*
* The location of the artifact.
*
*
* @param value
* The location of the artifact.
*/
public void setValue(String value) {
this.value = value;
}
/**
*
* The location of the artifact.
*
*
* @return The location of the artifact.
*/
public String getValue() {
return this.value;
}
/**
*
* The location of the artifact.
*
*
* @param value
* The location of the artifact.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TrialComponentArtifact withValue(String value) {
setValue(value);
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 (getMediaType() != null)
sb.append("MediaType: ").append(getMediaType()).append(",");
if (getValue() != null)
sb.append("Value: ").append(getValue());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof TrialComponentArtifact == false)
return false;
TrialComponentArtifact other = (TrialComponentArtifact) obj;
if (other.getMediaType() == null ^ this.getMediaType() == null)
return false;
if (other.getMediaType() != null && other.getMediaType().equals(this.getMediaType()) == false)
return false;
if (other.getValue() == null ^ this.getValue() == null)
return false;
if (other.getValue() != null && other.getValue().equals(this.getValue()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getMediaType() == null) ? 0 : getMediaType().hashCode());
hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode());
return hashCode;
}
@Override
public TrialComponentArtifact clone() {
try {
return (TrialComponentArtifact) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.sagemaker.model.transform.TrialComponentArtifactMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}