/* * Copyright 2018-2023 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.voiceid.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* The registration configuration to be used during the batch fraudster registration job. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RegistrationConfig implements Serializable, Cloneable, StructuredPojo { /** *

* The action to take when a fraudster is identified as a duplicate. The default action is SKIP, which * skips registering the duplicate fraudster. Setting the value to REGISTER_AS_NEW always registers a * new fraudster into the specified domain. *

*/ private String duplicateRegistrationAction; /** *

* The minimum similarity score between the new and old fraudsters in order to consider the new fraudster a * duplicate. *

*/ private Integer fraudsterSimilarityThreshold; /** *

* The identifiers of watchlists that a fraudster is registered to. If a watchlist isn't provided, the fraudsters * are registered to the default watchlist. *

*/ private java.util.List watchlistIds; /** *

* The action to take when a fraudster is identified as a duplicate. The default action is SKIP, which * skips registering the duplicate fraudster. Setting the value to REGISTER_AS_NEW always registers a * new fraudster into the specified domain. *

* * @param duplicateRegistrationAction * The action to take when a fraudster is identified as a duplicate. The default action is SKIP, * which skips registering the duplicate fraudster. Setting the value to REGISTER_AS_NEW always * registers a new fraudster into the specified domain. * @see DuplicateRegistrationAction */ public void setDuplicateRegistrationAction(String duplicateRegistrationAction) { this.duplicateRegistrationAction = duplicateRegistrationAction; } /** *

* The action to take when a fraudster is identified as a duplicate. The default action is SKIP, which * skips registering the duplicate fraudster. Setting the value to REGISTER_AS_NEW always registers a * new fraudster into the specified domain. *

* * @return The action to take when a fraudster is identified as a duplicate. The default action is SKIP * , which skips registering the duplicate fraudster. Setting the value to REGISTER_AS_NEW * always registers a new fraudster into the specified domain. * @see DuplicateRegistrationAction */ public String getDuplicateRegistrationAction() { return this.duplicateRegistrationAction; } /** *

* The action to take when a fraudster is identified as a duplicate. The default action is SKIP, which * skips registering the duplicate fraudster. Setting the value to REGISTER_AS_NEW always registers a * new fraudster into the specified domain. *

* * @param duplicateRegistrationAction * The action to take when a fraudster is identified as a duplicate. The default action is SKIP, * which skips registering the duplicate fraudster. Setting the value to REGISTER_AS_NEW always * registers a new fraudster into the specified domain. * @return Returns a reference to this object so that method calls can be chained together. * @see DuplicateRegistrationAction */ public RegistrationConfig withDuplicateRegistrationAction(String duplicateRegistrationAction) { setDuplicateRegistrationAction(duplicateRegistrationAction); return this; } /** *

* The action to take when a fraudster is identified as a duplicate. The default action is SKIP, which * skips registering the duplicate fraudster. Setting the value to REGISTER_AS_NEW always registers a * new fraudster into the specified domain. *

* * @param duplicateRegistrationAction * The action to take when a fraudster is identified as a duplicate. The default action is SKIP, * which skips registering the duplicate fraudster. Setting the value to REGISTER_AS_NEW always * registers a new fraudster into the specified domain. * @return Returns a reference to this object so that method calls can be chained together. * @see DuplicateRegistrationAction */ public RegistrationConfig withDuplicateRegistrationAction(DuplicateRegistrationAction duplicateRegistrationAction) { this.duplicateRegistrationAction = duplicateRegistrationAction.toString(); return this; } /** *

* The minimum similarity score between the new and old fraudsters in order to consider the new fraudster a * duplicate. *

* * @param fraudsterSimilarityThreshold * The minimum similarity score between the new and old fraudsters in order to consider the new fraudster a * duplicate. */ public void setFraudsterSimilarityThreshold(Integer fraudsterSimilarityThreshold) { this.fraudsterSimilarityThreshold = fraudsterSimilarityThreshold; } /** *

* The minimum similarity score between the new and old fraudsters in order to consider the new fraudster a * duplicate. *

* * @return The minimum similarity score between the new and old fraudsters in order to consider the new fraudster a * duplicate. */ public Integer getFraudsterSimilarityThreshold() { return this.fraudsterSimilarityThreshold; } /** *

* The minimum similarity score between the new and old fraudsters in order to consider the new fraudster a * duplicate. *

* * @param fraudsterSimilarityThreshold * The minimum similarity score between the new and old fraudsters in order to consider the new fraudster a * duplicate. * @return Returns a reference to this object so that method calls can be chained together. */ public RegistrationConfig withFraudsterSimilarityThreshold(Integer fraudsterSimilarityThreshold) { setFraudsterSimilarityThreshold(fraudsterSimilarityThreshold); return this; } /** *

* The identifiers of watchlists that a fraudster is registered to. If a watchlist isn't provided, the fraudsters * are registered to the default watchlist. *

* * @return The identifiers of watchlists that a fraudster is registered to. If a watchlist isn't provided, the * fraudsters are registered to the default watchlist. */ public java.util.List getWatchlistIds() { return watchlistIds; } /** *

* The identifiers of watchlists that a fraudster is registered to. If a watchlist isn't provided, the fraudsters * are registered to the default watchlist. *

* * @param watchlistIds * The identifiers of watchlists that a fraudster is registered to. If a watchlist isn't provided, the * fraudsters are registered to the default watchlist. */ public void setWatchlistIds(java.util.Collection watchlistIds) { if (watchlistIds == null) { this.watchlistIds = null; return; } this.watchlistIds = new java.util.ArrayList(watchlistIds); } /** *

* The identifiers of watchlists that a fraudster is registered to. If a watchlist isn't provided, the fraudsters * are registered to the default watchlist. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setWatchlistIds(java.util.Collection)} or {@link #withWatchlistIds(java.util.Collection)} if you want to * override the existing values. *

* * @param watchlistIds * The identifiers of watchlists that a fraudster is registered to. If a watchlist isn't provided, the * fraudsters are registered to the default watchlist. * @return Returns a reference to this object so that method calls can be chained together. */ public RegistrationConfig withWatchlistIds(String... watchlistIds) { if (this.watchlistIds == null) { setWatchlistIds(new java.util.ArrayList(watchlistIds.length)); } for (String ele : watchlistIds) { this.watchlistIds.add(ele); } return this; } /** *

* The identifiers of watchlists that a fraudster is registered to. If a watchlist isn't provided, the fraudsters * are registered to the default watchlist. *

* * @param watchlistIds * The identifiers of watchlists that a fraudster is registered to. If a watchlist isn't provided, the * fraudsters are registered to the default watchlist. * @return Returns a reference to this object so that method calls can be chained together. */ public RegistrationConfig withWatchlistIds(java.util.Collection watchlistIds) { setWatchlistIds(watchlistIds); 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 (getDuplicateRegistrationAction() != null) sb.append("DuplicateRegistrationAction: ").append(getDuplicateRegistrationAction()).append(","); if (getFraudsterSimilarityThreshold() != null) sb.append("FraudsterSimilarityThreshold: ").append(getFraudsterSimilarityThreshold()).append(","); if (getWatchlistIds() != null) sb.append("WatchlistIds: ").append(getWatchlistIds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RegistrationConfig == false) return false; RegistrationConfig other = (RegistrationConfig) obj; if (other.getDuplicateRegistrationAction() == null ^ this.getDuplicateRegistrationAction() == null) return false; if (other.getDuplicateRegistrationAction() != null && other.getDuplicateRegistrationAction().equals(this.getDuplicateRegistrationAction()) == false) return false; if (other.getFraudsterSimilarityThreshold() == null ^ this.getFraudsterSimilarityThreshold() == null) return false; if (other.getFraudsterSimilarityThreshold() != null && other.getFraudsterSimilarityThreshold().equals(this.getFraudsterSimilarityThreshold()) == false) return false; if (other.getWatchlistIds() == null ^ this.getWatchlistIds() == null) return false; if (other.getWatchlistIds() != null && other.getWatchlistIds().equals(this.getWatchlistIds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDuplicateRegistrationAction() == null) ? 0 : getDuplicateRegistrationAction().hashCode()); hashCode = prime * hashCode + ((getFraudsterSimilarityThreshold() == null) ? 0 : getFraudsterSimilarityThreshold().hashCode()); hashCode = prime * hashCode + ((getWatchlistIds() == null) ? 0 : getWatchlistIds().hashCode()); return hashCode; } @Override public RegistrationConfig clone() { try { return (RegistrationConfig) 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.voiceid.model.transform.RegistrationConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }