com.amazonaws.services.frauddetector.model.EvaluatedModelVersion Maven / Gradle / Ivy
Show all versions of aws-java-sdk-frauddetector 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.frauddetector.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The model version evaluated for generating prediction.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class EvaluatedModelVersion implements Serializable, Cloneable, StructuredPojo {
/**
*
* The model ID.
*
*/
private String modelId;
/**
*
* The model version.
*
*/
private String modelVersion;
/**
*
* The model type.
*
*
* Valid values: ONLINE_FRAUD_INSIGHTS
| TRANSACTION_FRAUD_INSIGHTS
*
*/
private String modelType;
/**
*
* Evaluations generated for the model version.
*
*/
private java.util.List evaluations;
/**
*
* The model ID.
*
*
* @param modelId
* The model ID.
*/
public void setModelId(String modelId) {
this.modelId = modelId;
}
/**
*
* The model ID.
*
*
* @return The model ID.
*/
public String getModelId() {
return this.modelId;
}
/**
*
* The model ID.
*
*
* @param modelId
* The model ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EvaluatedModelVersion withModelId(String modelId) {
setModelId(modelId);
return this;
}
/**
*
* The model version.
*
*
* @param modelVersion
* The model version.
*/
public void setModelVersion(String modelVersion) {
this.modelVersion = modelVersion;
}
/**
*
* The model version.
*
*
* @return The model version.
*/
public String getModelVersion() {
return this.modelVersion;
}
/**
*
* The model version.
*
*
* @param modelVersion
* The model version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EvaluatedModelVersion withModelVersion(String modelVersion) {
setModelVersion(modelVersion);
return this;
}
/**
*
* The model type.
*
*
* Valid values: ONLINE_FRAUD_INSIGHTS
| TRANSACTION_FRAUD_INSIGHTS
*
*
* @param modelType
* The model type.
*
* Valid values: ONLINE_FRAUD_INSIGHTS
| TRANSACTION_FRAUD_INSIGHTS
*/
public void setModelType(String modelType) {
this.modelType = modelType;
}
/**
*
* The model type.
*
*
* Valid values: ONLINE_FRAUD_INSIGHTS
| TRANSACTION_FRAUD_INSIGHTS
*
*
* @return The model type.
*
* Valid values: ONLINE_FRAUD_INSIGHTS
| TRANSACTION_FRAUD_INSIGHTS
*/
public String getModelType() {
return this.modelType;
}
/**
*
* The model type.
*
*
* Valid values: ONLINE_FRAUD_INSIGHTS
| TRANSACTION_FRAUD_INSIGHTS
*
*
* @param modelType
* The model type.
*
* Valid values: ONLINE_FRAUD_INSIGHTS
| TRANSACTION_FRAUD_INSIGHTS
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EvaluatedModelVersion withModelType(String modelType) {
setModelType(modelType);
return this;
}
/**
*
* Evaluations generated for the model version.
*
*
* @return Evaluations generated for the model version.
*/
public java.util.List getEvaluations() {
return evaluations;
}
/**
*
* Evaluations generated for the model version.
*
*
* @param evaluations
* Evaluations generated for the model version.
*/
public void setEvaluations(java.util.Collection evaluations) {
if (evaluations == null) {
this.evaluations = null;
return;
}
this.evaluations = new java.util.ArrayList(evaluations);
}
/**
*
* Evaluations generated for the model version.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEvaluations(java.util.Collection)} or {@link #withEvaluations(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param evaluations
* Evaluations generated for the model version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EvaluatedModelVersion withEvaluations(ModelVersionEvaluation... evaluations) {
if (this.evaluations == null) {
setEvaluations(new java.util.ArrayList(evaluations.length));
}
for (ModelVersionEvaluation ele : evaluations) {
this.evaluations.add(ele);
}
return this;
}
/**
*
* Evaluations generated for the model version.
*
*
* @param evaluations
* Evaluations generated for the model version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EvaluatedModelVersion withEvaluations(java.util.Collection evaluations) {
setEvaluations(evaluations);
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 (getModelId() != null)
sb.append("ModelId: ").append(getModelId()).append(",");
if (getModelVersion() != null)
sb.append("ModelVersion: ").append(getModelVersion()).append(",");
if (getModelType() != null)
sb.append("ModelType: ").append(getModelType()).append(",");
if (getEvaluations() != null)
sb.append("Evaluations: ").append(getEvaluations());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof EvaluatedModelVersion == false)
return false;
EvaluatedModelVersion other = (EvaluatedModelVersion) obj;
if (other.getModelId() == null ^ this.getModelId() == null)
return false;
if (other.getModelId() != null && other.getModelId().equals(this.getModelId()) == false)
return false;
if (other.getModelVersion() == null ^ this.getModelVersion() == null)
return false;
if (other.getModelVersion() != null && other.getModelVersion().equals(this.getModelVersion()) == false)
return false;
if (other.getModelType() == null ^ this.getModelType() == null)
return false;
if (other.getModelType() != null && other.getModelType().equals(this.getModelType()) == false)
return false;
if (other.getEvaluations() == null ^ this.getEvaluations() == null)
return false;
if (other.getEvaluations() != null && other.getEvaluations().equals(this.getEvaluations()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getModelId() == null) ? 0 : getModelId().hashCode());
hashCode = prime * hashCode + ((getModelVersion() == null) ? 0 : getModelVersion().hashCode());
hashCode = prime * hashCode + ((getModelType() == null) ? 0 : getModelType().hashCode());
hashCode = prime * hashCode + ((getEvaluations() == null) ? 0 : getEvaluations().hashCode());
return hashCode;
}
@Override
public EvaluatedModelVersion clone() {
try {
return (EvaluatedModelVersion) 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.frauddetector.model.transform.EvaluatedModelVersionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}