com.amazonaws.services.frauddetector.model.LogOddsMetric 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 log odds metric details.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class LogOddsMetric implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the variable.
*
*/
private String variableName;
/**
*
* The type of variable.
*
*/
private String variableType;
/**
*
* The relative importance of the variable. For more information, see Model variable
* importance.
*
*/
private Float variableImportance;
/**
*
* The name of the variable.
*
*
* @param variableName
* The name of the variable.
*/
public void setVariableName(String variableName) {
this.variableName = variableName;
}
/**
*
* The name of the variable.
*
*
* @return The name of the variable.
*/
public String getVariableName() {
return this.variableName;
}
/**
*
* The name of the variable.
*
*
* @param variableName
* The name of the variable.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LogOddsMetric withVariableName(String variableName) {
setVariableName(variableName);
return this;
}
/**
*
* The type of variable.
*
*
* @param variableType
* The type of variable.
*/
public void setVariableType(String variableType) {
this.variableType = variableType;
}
/**
*
* The type of variable.
*
*
* @return The type of variable.
*/
public String getVariableType() {
return this.variableType;
}
/**
*
* The type of variable.
*
*
* @param variableType
* The type of variable.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LogOddsMetric withVariableType(String variableType) {
setVariableType(variableType);
return this;
}
/**
*
* The relative importance of the variable. For more information, see Model variable
* importance.
*
*
* @param variableImportance
* The relative importance of the variable. For more information, see Model variable
* importance.
*/
public void setVariableImportance(Float variableImportance) {
this.variableImportance = variableImportance;
}
/**
*
* The relative importance of the variable. For more information, see Model variable
* importance.
*
*
* @return The relative importance of the variable. For more information, see Model variable
* importance.
*/
public Float getVariableImportance() {
return this.variableImportance;
}
/**
*
* The relative importance of the variable. For more information, see Model variable
* importance.
*
*
* @param variableImportance
* The relative importance of the variable. For more information, see Model variable
* importance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LogOddsMetric withVariableImportance(Float variableImportance) {
setVariableImportance(variableImportance);
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 (getVariableName() != null)
sb.append("VariableName: ").append(getVariableName()).append(",");
if (getVariableType() != null)
sb.append("VariableType: ").append(getVariableType()).append(",");
if (getVariableImportance() != null)
sb.append("VariableImportance: ").append(getVariableImportance());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof LogOddsMetric == false)
return false;
LogOddsMetric other = (LogOddsMetric) obj;
if (other.getVariableName() == null ^ this.getVariableName() == null)
return false;
if (other.getVariableName() != null && other.getVariableName().equals(this.getVariableName()) == false)
return false;
if (other.getVariableType() == null ^ this.getVariableType() == null)
return false;
if (other.getVariableType() != null && other.getVariableType().equals(this.getVariableType()) == false)
return false;
if (other.getVariableImportance() == null ^ this.getVariableImportance() == null)
return false;
if (other.getVariableImportance() != null && other.getVariableImportance().equals(this.getVariableImportance()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getVariableName() == null) ? 0 : getVariableName().hashCode());
hashCode = prime * hashCode + ((getVariableType() == null) ? 0 : getVariableType().hashCode());
hashCode = prime * hashCode + ((getVariableImportance() == null) ? 0 : getVariableImportance().hashCode());
return hashCode;
}
@Override
public LogOddsMetric clone() {
try {
return (LogOddsMetric) 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.LogOddsMetricMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}