/* * 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 for profile jobs. Configuration can be used to select columns, do evaluations, and override default * parameters of evaluations. When configuration is undefined, the profile job will apply default settings to all * supported columns. *

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

* Configuration for inter-column evaluations. Configuration can be used to select evaluations and override * parameters of evaluations. When configuration is undefined, the profile job will run all supported inter-column * evaluations. *

*/ private StatisticsConfiguration datasetStatisticsConfiguration; /** *

* List of column selectors. ProfileColumns can be used to select columns from the dataset. When ProfileColumns is * undefined, the profile job will profile all supported columns. *

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

* List of configurations for column evaluations. ColumnStatisticsConfigurations are used to select evaluations and * override parameters of evaluations for particular columns. When ColumnStatisticsConfigurations is undefined, the * profile job will profile all supported columns and run all supported evaluations. *

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

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

*/ private EntityDetectorConfiguration entityDetectorConfiguration; /** *

* Configuration for inter-column evaluations. Configuration can be used to select evaluations and override * parameters of evaluations. When configuration is undefined, the profile job will run all supported inter-column * evaluations. *

* * @param datasetStatisticsConfiguration * Configuration for inter-column evaluations. Configuration can be used to select evaluations and override * parameters of evaluations. When configuration is undefined, the profile job will run all supported * inter-column evaluations. */ public void setDatasetStatisticsConfiguration(StatisticsConfiguration datasetStatisticsConfiguration) { this.datasetStatisticsConfiguration = datasetStatisticsConfiguration; } /** *

* Configuration for inter-column evaluations. Configuration can be used to select evaluations and override * parameters of evaluations. When configuration is undefined, the profile job will run all supported inter-column * evaluations. *

* * @return Configuration for inter-column evaluations. Configuration can be used to select evaluations and override * parameters of evaluations. When configuration is undefined, the profile job will run all supported * inter-column evaluations. */ public StatisticsConfiguration getDatasetStatisticsConfiguration() { return this.datasetStatisticsConfiguration; } /** *

* Configuration for inter-column evaluations. Configuration can be used to select evaluations and override * parameters of evaluations. When configuration is undefined, the profile job will run all supported inter-column * evaluations. *

* * @param datasetStatisticsConfiguration * Configuration for inter-column evaluations. Configuration can be used to select evaluations and override * parameters of evaluations. When configuration is undefined, the profile job will run all supported * inter-column evaluations. * @return Returns a reference to this object so that method calls can be chained together. */ public ProfileConfiguration withDatasetStatisticsConfiguration(StatisticsConfiguration datasetStatisticsConfiguration) { setDatasetStatisticsConfiguration(datasetStatisticsConfiguration); return this; } /** *

* List of column selectors. ProfileColumns can be used to select columns from the dataset. When ProfileColumns is * undefined, the profile job will profile all supported columns. *

* * @return List of column selectors. ProfileColumns can be used to select columns from the dataset. When * ProfileColumns is undefined, the profile job will profile all supported columns. */ public java.util.List getProfileColumns() { return profileColumns; } /** *

* List of column selectors. ProfileColumns can be used to select columns from the dataset. When ProfileColumns is * undefined, the profile job will profile all supported columns. *

* * @param profileColumns * List of column selectors. ProfileColumns can be used to select columns from the dataset. When * ProfileColumns is undefined, the profile job will profile all supported columns. */ public void setProfileColumns(java.util.Collection profileColumns) { if (profileColumns == null) { this.profileColumns = null; return; } this.profileColumns = new java.util.ArrayList(profileColumns); } /** *

* List of column selectors. ProfileColumns can be used to select columns from the dataset. When ProfileColumns is * undefined, the profile job will profile all supported columns. *

*

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

* * @param profileColumns * List of column selectors. ProfileColumns can be used to select columns from the dataset. When * ProfileColumns is undefined, the profile job will profile all supported columns. * @return Returns a reference to this object so that method calls can be chained together. */ public ProfileConfiguration withProfileColumns(ColumnSelector... profileColumns) { if (this.profileColumns == null) { setProfileColumns(new java.util.ArrayList(profileColumns.length)); } for (ColumnSelector ele : profileColumns) { this.profileColumns.add(ele); } return this; } /** *

* List of column selectors. ProfileColumns can be used to select columns from the dataset. When ProfileColumns is * undefined, the profile job will profile all supported columns. *

* * @param profileColumns * List of column selectors. ProfileColumns can be used to select columns from the dataset. When * ProfileColumns is undefined, the profile job will profile all supported columns. * @return Returns a reference to this object so that method calls can be chained together. */ public ProfileConfiguration withProfileColumns(java.util.Collection profileColumns) { setProfileColumns(profileColumns); return this; } /** *

* List of configurations for column evaluations. ColumnStatisticsConfigurations are used to select evaluations and * override parameters of evaluations for particular columns. When ColumnStatisticsConfigurations is undefined, the * profile job will profile all supported columns and run all supported evaluations. *

* * @return List of configurations for column evaluations. ColumnStatisticsConfigurations are used to select * evaluations and override parameters of evaluations for particular columns. When * ColumnStatisticsConfigurations is undefined, the profile job will profile all supported columns and run * all supported evaluations. */ public java.util.List getColumnStatisticsConfigurations() { return columnStatisticsConfigurations; } /** *

* List of configurations for column evaluations. ColumnStatisticsConfigurations are used to select evaluations and * override parameters of evaluations for particular columns. When ColumnStatisticsConfigurations is undefined, the * profile job will profile all supported columns and run all supported evaluations. *

* * @param columnStatisticsConfigurations * List of configurations for column evaluations. ColumnStatisticsConfigurations are used to select * evaluations and override parameters of evaluations for particular columns. When * ColumnStatisticsConfigurations is undefined, the profile job will profile all supported columns and run * all supported evaluations. */ public void setColumnStatisticsConfigurations(java.util.Collection columnStatisticsConfigurations) { if (columnStatisticsConfigurations == null) { this.columnStatisticsConfigurations = null; return; } this.columnStatisticsConfigurations = new java.util.ArrayList(columnStatisticsConfigurations); } /** *

* List of configurations for column evaluations. ColumnStatisticsConfigurations are used to select evaluations and * override parameters of evaluations for particular columns. When ColumnStatisticsConfigurations is undefined, the * profile job will profile all supported columns and run all supported evaluations. *

*

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

* * @param columnStatisticsConfigurations * List of configurations for column evaluations. ColumnStatisticsConfigurations are used to select * evaluations and override parameters of evaluations for particular columns. When * ColumnStatisticsConfigurations is undefined, the profile job will profile all supported columns and run * all supported evaluations. * @return Returns a reference to this object so that method calls can be chained together. */ public ProfileConfiguration withColumnStatisticsConfigurations(ColumnStatisticsConfiguration... columnStatisticsConfigurations) { if (this.columnStatisticsConfigurations == null) { setColumnStatisticsConfigurations(new java.util.ArrayList(columnStatisticsConfigurations.length)); } for (ColumnStatisticsConfiguration ele : columnStatisticsConfigurations) { this.columnStatisticsConfigurations.add(ele); } return this; } /** *

* List of configurations for column evaluations. ColumnStatisticsConfigurations are used to select evaluations and * override parameters of evaluations for particular columns. When ColumnStatisticsConfigurations is undefined, the * profile job will profile all supported columns and run all supported evaluations. *

* * @param columnStatisticsConfigurations * List of configurations for column evaluations. ColumnStatisticsConfigurations are used to select * evaluations and override parameters of evaluations for particular columns. When * ColumnStatisticsConfigurations is undefined, the profile job will profile all supported columns and run * all supported evaluations. * @return Returns a reference to this object so that method calls can be chained together. */ public ProfileConfiguration withColumnStatisticsConfigurations(java.util.Collection columnStatisticsConfigurations) { setColumnStatisticsConfigurations(columnStatisticsConfigurations); return this; } /** *

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

* * @param entityDetectorConfiguration * Configuration of entity detection for a profile job. When undefined, entity detection is disabled. */ public void setEntityDetectorConfiguration(EntityDetectorConfiguration entityDetectorConfiguration) { this.entityDetectorConfiguration = entityDetectorConfiguration; } /** *

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

* * @return Configuration of entity detection for a profile job. When undefined, entity detection is disabled. */ public EntityDetectorConfiguration getEntityDetectorConfiguration() { return this.entityDetectorConfiguration; } /** *

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

* * @param entityDetectorConfiguration * Configuration of entity detection for a profile job. When undefined, entity detection is disabled. * @return Returns a reference to this object so that method calls can be chained together. */ public ProfileConfiguration withEntityDetectorConfiguration(EntityDetectorConfiguration entityDetectorConfiguration) { setEntityDetectorConfiguration(entityDetectorConfiguration); 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 (getDatasetStatisticsConfiguration() != null) sb.append("DatasetStatisticsConfiguration: ").append(getDatasetStatisticsConfiguration()).append(","); if (getProfileColumns() != null) sb.append("ProfileColumns: ").append(getProfileColumns()).append(","); if (getColumnStatisticsConfigurations() != null) sb.append("ColumnStatisticsConfigurations: ").append(getColumnStatisticsConfigurations()).append(","); if (getEntityDetectorConfiguration() != null) sb.append("EntityDetectorConfiguration: ").append(getEntityDetectorConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProfileConfiguration == false) return false; ProfileConfiguration other = (ProfileConfiguration) obj; if (other.getDatasetStatisticsConfiguration() == null ^ this.getDatasetStatisticsConfiguration() == null) return false; if (other.getDatasetStatisticsConfiguration() != null && other.getDatasetStatisticsConfiguration().equals(this.getDatasetStatisticsConfiguration()) == false) return false; if (other.getProfileColumns() == null ^ this.getProfileColumns() == null) return false; if (other.getProfileColumns() != null && other.getProfileColumns().equals(this.getProfileColumns()) == false) return false; if (other.getColumnStatisticsConfigurations() == null ^ this.getColumnStatisticsConfigurations() == null) return false; if (other.getColumnStatisticsConfigurations() != null && other.getColumnStatisticsConfigurations().equals(this.getColumnStatisticsConfigurations()) == false) return false; if (other.getEntityDetectorConfiguration() == null ^ this.getEntityDetectorConfiguration() == null) return false; if (other.getEntityDetectorConfiguration() != null && other.getEntityDetectorConfiguration().equals(this.getEntityDetectorConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDatasetStatisticsConfiguration() == null) ? 0 : getDatasetStatisticsConfiguration().hashCode()); hashCode = prime * hashCode + ((getProfileColumns() == null) ? 0 : getProfileColumns().hashCode()); hashCode = prime * hashCode + ((getColumnStatisticsConfigurations() == null) ? 0 : getColumnStatisticsConfigurations().hashCode()); hashCode = prime * hashCode + ((getEntityDetectorConfiguration() == null) ? 0 : getEntityDetectorConfiguration().hashCode()); return hashCode; } @Override public ProfileConfiguration clone() { try { return (ProfileConfiguration) 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.ProfileConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }