com.amazonaws.services.frauddetector.model.ModelOutputConfiguration 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;
/**
*
* Provides the Amazon Sagemaker model output configuration.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ModelOutputConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* The format of the model output configuration.
*
*/
private String format;
/**
*
* A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.
*
*/
private java.util.Map jsonKeyToVariableMap;
/**
*
* A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
*
*/
private java.util.Map csvIndexToVariableMap;
/**
*
* The format of the model output configuration.
*
*
* @param format
* The format of the model output configuration.
* @see ModelOutputDataFormat
*/
public void setFormat(String format) {
this.format = format;
}
/**
*
* The format of the model output configuration.
*
*
* @return The format of the model output configuration.
* @see ModelOutputDataFormat
*/
public String getFormat() {
return this.format;
}
/**
*
* The format of the model output configuration.
*
*
* @param format
* The format of the model output configuration.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ModelOutputDataFormat
*/
public ModelOutputConfiguration withFormat(String format) {
setFormat(format);
return this;
}
/**
*
* The format of the model output configuration.
*
*
* @param format
* The format of the model output configuration.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ModelOutputDataFormat
*/
public ModelOutputConfiguration withFormat(ModelOutputDataFormat format) {
this.format = format.toString();
return this;
}
/**
*
* A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.
*
*
* @return A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.
*/
public java.util.Map getJsonKeyToVariableMap() {
return jsonKeyToVariableMap;
}
/**
*
* A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.
*
*
* @param jsonKeyToVariableMap
* A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.
*/
public void setJsonKeyToVariableMap(java.util.Map jsonKeyToVariableMap) {
this.jsonKeyToVariableMap = jsonKeyToVariableMap;
}
/**
*
* A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.
*
*
* @param jsonKeyToVariableMap
* A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModelOutputConfiguration withJsonKeyToVariableMap(java.util.Map jsonKeyToVariableMap) {
setJsonKeyToVariableMap(jsonKeyToVariableMap);
return this;
}
/**
* Add a single JsonKeyToVariableMap entry
*
* @see ModelOutputConfiguration#withJsonKeyToVariableMap
* @returns a reference to this object so that method calls can be chained together.
*/
public ModelOutputConfiguration addJsonKeyToVariableMapEntry(String key, String value) {
if (null == this.jsonKeyToVariableMap) {
this.jsonKeyToVariableMap = new java.util.HashMap();
}
if (this.jsonKeyToVariableMap.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.jsonKeyToVariableMap.put(key, value);
return this;
}
/**
* Removes all the entries added into JsonKeyToVariableMap.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModelOutputConfiguration clearJsonKeyToVariableMapEntries() {
this.jsonKeyToVariableMap = null;
return this;
}
/**
*
* A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
*
*
* @return A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
*/
public java.util.Map getCsvIndexToVariableMap() {
return csvIndexToVariableMap;
}
/**
*
* A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
*
*
* @param csvIndexToVariableMap
* A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
*/
public void setCsvIndexToVariableMap(java.util.Map csvIndexToVariableMap) {
this.csvIndexToVariableMap = csvIndexToVariableMap;
}
/**
*
* A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
*
*
* @param csvIndexToVariableMap
* A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModelOutputConfiguration withCsvIndexToVariableMap(java.util.Map csvIndexToVariableMap) {
setCsvIndexToVariableMap(csvIndexToVariableMap);
return this;
}
/**
* Add a single CsvIndexToVariableMap entry
*
* @see ModelOutputConfiguration#withCsvIndexToVariableMap
* @returns a reference to this object so that method calls can be chained together.
*/
public ModelOutputConfiguration addCsvIndexToVariableMapEntry(String key, String value) {
if (null == this.csvIndexToVariableMap) {
this.csvIndexToVariableMap = new java.util.HashMap();
}
if (this.csvIndexToVariableMap.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.csvIndexToVariableMap.put(key, value);
return this;
}
/**
* Removes all the entries added into CsvIndexToVariableMap.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModelOutputConfiguration clearCsvIndexToVariableMapEntries() {
this.csvIndexToVariableMap = null;
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 (getFormat() != null)
sb.append("Format: ").append(getFormat()).append(",");
if (getJsonKeyToVariableMap() != null)
sb.append("JsonKeyToVariableMap: ").append(getJsonKeyToVariableMap()).append(",");
if (getCsvIndexToVariableMap() != null)
sb.append("CsvIndexToVariableMap: ").append(getCsvIndexToVariableMap());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ModelOutputConfiguration == false)
return false;
ModelOutputConfiguration other = (ModelOutputConfiguration) obj;
if (other.getFormat() == null ^ this.getFormat() == null)
return false;
if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == false)
return false;
if (other.getJsonKeyToVariableMap() == null ^ this.getJsonKeyToVariableMap() == null)
return false;
if (other.getJsonKeyToVariableMap() != null && other.getJsonKeyToVariableMap().equals(this.getJsonKeyToVariableMap()) == false)
return false;
if (other.getCsvIndexToVariableMap() == null ^ this.getCsvIndexToVariableMap() == null)
return false;
if (other.getCsvIndexToVariableMap() != null && other.getCsvIndexToVariableMap().equals(this.getCsvIndexToVariableMap()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode());
hashCode = prime * hashCode + ((getJsonKeyToVariableMap() == null) ? 0 : getJsonKeyToVariableMap().hashCode());
hashCode = prime * hashCode + ((getCsvIndexToVariableMap() == null) ? 0 : getCsvIndexToVariableMap().hashCode());
return hashCode;
}
@Override
public ModelOutputConfiguration clone() {
try {
return (ModelOutputConfiguration) 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.ModelOutputConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}