
com.amazonaws.services.sagemaker.model.FeatureDefinition 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A list of features. You must include FeatureName
and FeatureType
. Valid feature
* FeatureType
s are Integral
, Fractional
and String
.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class FeatureDefinition implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of a feature. The type must be a string. FeatureName
cannot be any of the following:
* is_deleted
, write_time
, api_invocation_time
.
*
*
* The name:
*
*
* -
*
* Must start with an alphanumeric character.
*
*
* -
*
* Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed.
*
*
*
*/
private String featureName;
/**
*
* The value type of a feature. Valid values are Integral, Fractional, or String.
*
*/
private String featureType;
/**
*
* A grouping of elements where each element within the collection must have the same feature type (
* String
, Integral
, or Fractional
).
*
*
* -
*
* List
: An ordered collection of elements.
*
*
* -
*
* Set
: An unordered collection of unique elements.
*
*
* -
*
* Vector
: A specialized list that represents a fixed-size array of elements. The vector dimension is
* determined by you. Must have elements with fractional feature types.
*
*
*
*/
private String collectionType;
/**
*
* Configuration for your collection.
*
*/
private CollectionConfig collectionConfig;
/**
*
* The name of a feature. The type must be a string. FeatureName
cannot be any of the following:
* is_deleted
, write_time
, api_invocation_time
.
*
*
* The name:
*
*
* -
*
* Must start with an alphanumeric character.
*
*
* -
*
* Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed.
*
*
*
*
* @param featureName
* The name of a feature. The type must be a string. FeatureName
cannot be any of the following:
* is_deleted
, write_time
, api_invocation_time
.
*
* The name:
*
*
* -
*
* Must start with an alphanumeric character.
*
*
* -
*
* Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed.
*
*
*/
public void setFeatureName(String featureName) {
this.featureName = featureName;
}
/**
*
* The name of a feature. The type must be a string. FeatureName
cannot be any of the following:
* is_deleted
, write_time
, api_invocation_time
.
*
*
* The name:
*
*
* -
*
* Must start with an alphanumeric character.
*
*
* -
*
* Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed.
*
*
*
*
* @return The name of a feature. The type must be a string. FeatureName
cannot be any of the
* following: is_deleted
, write_time
, api_invocation_time
.
*
* The name:
*
*
* -
*
* Must start with an alphanumeric character.
*
*
* -
*
* Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed.
*
*
*/
public String getFeatureName() {
return this.featureName;
}
/**
*
* The name of a feature. The type must be a string. FeatureName
cannot be any of the following:
* is_deleted
, write_time
, api_invocation_time
.
*
*
* The name:
*
*
* -
*
* Must start with an alphanumeric character.
*
*
* -
*
* Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed.
*
*
*
*
* @param featureName
* The name of a feature. The type must be a string. FeatureName
cannot be any of the following:
* is_deleted
, write_time
, api_invocation_time
.
*
* The name:
*
*
* -
*
* Must start with an alphanumeric character.
*
*
* -
*
* Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FeatureDefinition withFeatureName(String featureName) {
setFeatureName(featureName);
return this;
}
/**
*
* The value type of a feature. Valid values are Integral, Fractional, or String.
*
*
* @param featureType
* The value type of a feature. Valid values are Integral, Fractional, or String.
* @see FeatureType
*/
public void setFeatureType(String featureType) {
this.featureType = featureType;
}
/**
*
* The value type of a feature. Valid values are Integral, Fractional, or String.
*
*
* @return The value type of a feature. Valid values are Integral, Fractional, or String.
* @see FeatureType
*/
public String getFeatureType() {
return this.featureType;
}
/**
*
* The value type of a feature. Valid values are Integral, Fractional, or String.
*
*
* @param featureType
* The value type of a feature. Valid values are Integral, Fractional, or String.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FeatureType
*/
public FeatureDefinition withFeatureType(String featureType) {
setFeatureType(featureType);
return this;
}
/**
*
* The value type of a feature. Valid values are Integral, Fractional, or String.
*
*
* @param featureType
* The value type of a feature. Valid values are Integral, Fractional, or String.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FeatureType
*/
public FeatureDefinition withFeatureType(FeatureType featureType) {
this.featureType = featureType.toString();
return this;
}
/**
*
* A grouping of elements where each element within the collection must have the same feature type (
* String
, Integral
, or Fractional
).
*
*
* -
*
* List
: An ordered collection of elements.
*
*
* -
*
* Set
: An unordered collection of unique elements.
*
*
* -
*
* Vector
: A specialized list that represents a fixed-size array of elements. The vector dimension is
* determined by you. Must have elements with fractional feature types.
*
*
*
*
* @param collectionType
* A grouping of elements where each element within the collection must have the same feature type (
* String
, Integral
, or Fractional
).
*
* -
*
* List
: An ordered collection of elements.
*
*
* -
*
* Set
: An unordered collection of unique elements.
*
*
* -
*
* Vector
: A specialized list that represents a fixed-size array of elements. The vector
* dimension is determined by you. Must have elements with fractional feature types.
*
*
* @see CollectionType
*/
public void setCollectionType(String collectionType) {
this.collectionType = collectionType;
}
/**
*
* A grouping of elements where each element within the collection must have the same feature type (
* String
, Integral
, or Fractional
).
*
*
* -
*
* List
: An ordered collection of elements.
*
*
* -
*
* Set
: An unordered collection of unique elements.
*
*
* -
*
* Vector
: A specialized list that represents a fixed-size array of elements. The vector dimension is
* determined by you. Must have elements with fractional feature types.
*
*
*
*
* @return A grouping of elements where each element within the collection must have the same feature type (
* String
, Integral
, or Fractional
).
*
* -
*
* List
: An ordered collection of elements.
*
*
* -
*
* Set
: An unordered collection of unique elements.
*
*
* -
*
* Vector
: A specialized list that represents a fixed-size array of elements. The vector
* dimension is determined by you. Must have elements with fractional feature types.
*
*
* @see CollectionType
*/
public String getCollectionType() {
return this.collectionType;
}
/**
*
* A grouping of elements where each element within the collection must have the same feature type (
* String
, Integral
, or Fractional
).
*
*
* -
*
* List
: An ordered collection of elements.
*
*
* -
*
* Set
: An unordered collection of unique elements.
*
*
* -
*
* Vector
: A specialized list that represents a fixed-size array of elements. The vector dimension is
* determined by you. Must have elements with fractional feature types.
*
*
*
*
* @param collectionType
* A grouping of elements where each element within the collection must have the same feature type (
* String
, Integral
, or Fractional
).
*
* -
*
* List
: An ordered collection of elements.
*
*
* -
*
* Set
: An unordered collection of unique elements.
*
*
* -
*
* Vector
: A specialized list that represents a fixed-size array of elements. The vector
* dimension is determined by you. Must have elements with fractional feature types.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see CollectionType
*/
public FeatureDefinition withCollectionType(String collectionType) {
setCollectionType(collectionType);
return this;
}
/**
*
* A grouping of elements where each element within the collection must have the same feature type (
* String
, Integral
, or Fractional
).
*
*
* -
*
* List
: An ordered collection of elements.
*
*
* -
*
* Set
: An unordered collection of unique elements.
*
*
* -
*
* Vector
: A specialized list that represents a fixed-size array of elements. The vector dimension is
* determined by you. Must have elements with fractional feature types.
*
*
*
*
* @param collectionType
* A grouping of elements where each element within the collection must have the same feature type (
* String
, Integral
, or Fractional
).
*
* -
*
* List
: An ordered collection of elements.
*
*
* -
*
* Set
: An unordered collection of unique elements.
*
*
* -
*
* Vector
: A specialized list that represents a fixed-size array of elements. The vector
* dimension is determined by you. Must have elements with fractional feature types.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see CollectionType
*/
public FeatureDefinition withCollectionType(CollectionType collectionType) {
this.collectionType = collectionType.toString();
return this;
}
/**
*
* Configuration for your collection.
*
*
* @param collectionConfig
* Configuration for your collection.
*/
public void setCollectionConfig(CollectionConfig collectionConfig) {
this.collectionConfig = collectionConfig;
}
/**
*
* Configuration for your collection.
*
*
* @return Configuration for your collection.
*/
public CollectionConfig getCollectionConfig() {
return this.collectionConfig;
}
/**
*
* Configuration for your collection.
*
*
* @param collectionConfig
* Configuration for your collection.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FeatureDefinition withCollectionConfig(CollectionConfig collectionConfig) {
setCollectionConfig(collectionConfig);
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 (getFeatureName() != null)
sb.append("FeatureName: ").append(getFeatureName()).append(",");
if (getFeatureType() != null)
sb.append("FeatureType: ").append(getFeatureType()).append(",");
if (getCollectionType() != null)
sb.append("CollectionType: ").append(getCollectionType()).append(",");
if (getCollectionConfig() != null)
sb.append("CollectionConfig: ").append(getCollectionConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof FeatureDefinition == false)
return false;
FeatureDefinition other = (FeatureDefinition) obj;
if (other.getFeatureName() == null ^ this.getFeatureName() == null)
return false;
if (other.getFeatureName() != null && other.getFeatureName().equals(this.getFeatureName()) == false)
return false;
if (other.getFeatureType() == null ^ this.getFeatureType() == null)
return false;
if (other.getFeatureType() != null && other.getFeatureType().equals(this.getFeatureType()) == false)
return false;
if (other.getCollectionType() == null ^ this.getCollectionType() == null)
return false;
if (other.getCollectionType() != null && other.getCollectionType().equals(this.getCollectionType()) == false)
return false;
if (other.getCollectionConfig() == null ^ this.getCollectionConfig() == null)
return false;
if (other.getCollectionConfig() != null && other.getCollectionConfig().equals(this.getCollectionConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFeatureName() == null) ? 0 : getFeatureName().hashCode());
hashCode = prime * hashCode + ((getFeatureType() == null) ? 0 : getFeatureType().hashCode());
hashCode = prime * hashCode + ((getCollectionType() == null) ? 0 : getCollectionType().hashCode());
hashCode = prime * hashCode + ((getCollectionConfig() == null) ? 0 : getCollectionConfig().hashCode());
return hashCode;
}
@Override
public FeatureDefinition clone() {
try {
return (FeatureDefinition) 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.FeatureDefinitionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}