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

* Configuration of entity detection for a profile job. When undefined, entity detection is disabled. *

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

* Entity types to detect. Can be any of the following: *

* *

* The Entity type group USA_ALL is also supported, and includes all of the above entity types except PERSON_NAME * and DATE. *

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

* Configuration of statistics that are allowed to be run on columns that contain detected entities. When undefined, * no statistics will be computed on columns that contain detected entities. *

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

* Entity types to detect. Can be any of the following: *

* *

* The Entity type group USA_ALL is also supported, and includes all of the above entity types except PERSON_NAME * and DATE. *

* * @return Entity types to detect. Can be any of the following:

* *

* The Entity type group USA_ALL is also supported, and includes all of the above entity types except * PERSON_NAME and DATE. */ public java.util.List getEntityTypes() { return entityTypes; } /** *

* Entity types to detect. Can be any of the following: *

* *

* The Entity type group USA_ALL is also supported, and includes all of the above entity types except PERSON_NAME * and DATE. *

* * @param entityTypes * Entity types to detect. Can be any of the following:

* *

* The Entity type group USA_ALL is also supported, and includes all of the above entity types except * PERSON_NAME and DATE. */ public void setEntityTypes(java.util.Collection entityTypes) { if (entityTypes == null) { this.entityTypes = null; return; } this.entityTypes = new java.util.ArrayList(entityTypes); } /** *

* Entity types to detect. Can be any of the following: *

* *

* The Entity type group USA_ALL is also supported, and includes all of the above entity types except PERSON_NAME * and DATE. *

*

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

* * @param entityTypes * Entity types to detect. Can be any of the following:

* *

* The Entity type group USA_ALL is also supported, and includes all of the above entity types except * PERSON_NAME and DATE. * @return Returns a reference to this object so that method calls can be chained together. */ public EntityDetectorConfiguration withEntityTypes(String... entityTypes) { if (this.entityTypes == null) { setEntityTypes(new java.util.ArrayList(entityTypes.length)); } for (String ele : entityTypes) { this.entityTypes.add(ele); } return this; } /** *

* Entity types to detect. Can be any of the following: *

* *

* The Entity type group USA_ALL is also supported, and includes all of the above entity types except PERSON_NAME * and DATE. *

* * @param entityTypes * Entity types to detect. Can be any of the following:

* *

* The Entity type group USA_ALL is also supported, and includes all of the above entity types except * PERSON_NAME and DATE. * @return Returns a reference to this object so that method calls can be chained together. */ public EntityDetectorConfiguration withEntityTypes(java.util.Collection entityTypes) { setEntityTypes(entityTypes); return this; } /** *

* Configuration of statistics that are allowed to be run on columns that contain detected entities. When undefined, * no statistics will be computed on columns that contain detected entities. *

* * @return Configuration of statistics that are allowed to be run on columns that contain detected entities. When * undefined, no statistics will be computed on columns that contain detected entities. */ public java.util.List getAllowedStatistics() { return allowedStatistics; } /** *

* Configuration of statistics that are allowed to be run on columns that contain detected entities. When undefined, * no statistics will be computed on columns that contain detected entities. *

* * @param allowedStatistics * Configuration of statistics that are allowed to be run on columns that contain detected entities. When * undefined, no statistics will be computed on columns that contain detected entities. */ public void setAllowedStatistics(java.util.Collection allowedStatistics) { if (allowedStatistics == null) { this.allowedStatistics = null; return; } this.allowedStatistics = new java.util.ArrayList(allowedStatistics); } /** *

* Configuration of statistics that are allowed to be run on columns that contain detected entities. When undefined, * no statistics will be computed on columns that contain detected entities. *

*

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

* * @param allowedStatistics * Configuration of statistics that are allowed to be run on columns that contain detected entities. When * undefined, no statistics will be computed on columns that contain detected entities. * @return Returns a reference to this object so that method calls can be chained together. */ public EntityDetectorConfiguration withAllowedStatistics(AllowedStatistics... allowedStatistics) { if (this.allowedStatistics == null) { setAllowedStatistics(new java.util.ArrayList(allowedStatistics.length)); } for (AllowedStatistics ele : allowedStatistics) { this.allowedStatistics.add(ele); } return this; } /** *

* Configuration of statistics that are allowed to be run on columns that contain detected entities. When undefined, * no statistics will be computed on columns that contain detected entities. *

* * @param allowedStatistics * Configuration of statistics that are allowed to be run on columns that contain detected entities. When * undefined, no statistics will be computed on columns that contain detected entities. * @return Returns a reference to this object so that method calls can be chained together. */ public EntityDetectorConfiguration withAllowedStatistics(java.util.Collection allowedStatistics) { setAllowedStatistics(allowedStatistics); 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 (getEntityTypes() != null) sb.append("EntityTypes: ").append(getEntityTypes()).append(","); if (getAllowedStatistics() != null) sb.append("AllowedStatistics: ").append(getAllowedStatistics()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EntityDetectorConfiguration == false) return false; EntityDetectorConfiguration other = (EntityDetectorConfiguration) obj; if (other.getEntityTypes() == null ^ this.getEntityTypes() == null) return false; if (other.getEntityTypes() != null && other.getEntityTypes().equals(this.getEntityTypes()) == false) return false; if (other.getAllowedStatistics() == null ^ this.getAllowedStatistics() == null) return false; if (other.getAllowedStatistics() != null && other.getAllowedStatistics().equals(this.getAllowedStatistics()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEntityTypes() == null) ? 0 : getEntityTypes().hashCode()); hashCode = prime * hashCode + ((getAllowedStatistics() == null) ? 0 : getAllowedStatistics().hashCode()); return hashCode; } @Override public EntityDetectorConfiguration clone() { try { return (EntityDetectorConfiguration) 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.gluedatabrew.model.transform.EntityDetectorConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }