/* * 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; /** *
* Represents a single data quality requirement that should be validated in the scope of this dataset. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Rule implements Serializable, Cloneable, StructuredPojo { /** ** The name of the rule. *
*/ private String name; /** ** A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not validate it * during a job run. Default value is false. *
*/ private Boolean disabled; /** *
* The expression which includes column references, condition names followed by variable references, possibly
* grouped and combined with other conditions. For example,
* (:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
* . Column and value references are substitution variables that should start with the ':' symbol. Depending on the
* context, substitution variables' values can be either an actual value or a column name. These values are defined
* in the SubstitutionMap. If a CheckExpression starts with a column reference, then ColumnSelectors in the rule
* should be null. If ColumnSelectors has been defined, then there should be no column reference in the left side of
* a condition, for example, is_between :val1 and :val2
.
*
* For more information, see Available * checks *
*/ private String checkExpression; /** *
* The map of substitution variable names to their values used in a check expression. Variable names should start
* with a ':' (colon). Variable values can either be actual values or column names. To differentiate between the
* two, column names should be enclosed in backticks, for example, ":col1": "`Column A`".
*
* The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied to each * row in a specific column, and the threshold will be used to determine whether the validation succeeds. *
*/ private Threshold threshold; /** ** List of column selectors. Selectors can be used to select columns using a name or regular expression from the * dataset. Rule will be applied to selected columns. *
*/ private java.util.List* The name of the rule. *
* * @param name * The name of the rule. */ public void setName(String name) { this.name = name; } /** ** The name of the rule. *
* * @return The name of the rule. */ public String getName() { return this.name; } /** ** The name of the rule. *
* * @param name * The name of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withName(String name) { setName(name); return this; } /** ** A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not validate it * during a job run. Default value is false. *
* * @param disabled * A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not * validate it during a job run. Default value is false. */ public void setDisabled(Boolean disabled) { this.disabled = disabled; } /** ** A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not validate it * during a job run. Default value is false. *
* * @return A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not * validate it during a job run. Default value is false. */ public Boolean getDisabled() { return this.disabled; } /** ** A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not validate it * during a job run. Default value is false. *
* * @param disabled * A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not * validate it during a job run. Default value is false. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withDisabled(Boolean disabled) { setDisabled(disabled); return this; } /** ** A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not validate it * during a job run. Default value is false. *
* * @return A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not * validate it during a job run. Default value is false. */ public Boolean isDisabled() { return this.disabled; } /** *
* The expression which includes column references, condition names followed by variable references, possibly
* grouped and combined with other conditions. For example,
* (:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
* . Column and value references are substitution variables that should start with the ':' symbol. Depending on the
* context, substitution variables' values can be either an actual value or a column name. These values are defined
* in the SubstitutionMap. If a CheckExpression starts with a column reference, then ColumnSelectors in the rule
* should be null. If ColumnSelectors has been defined, then there should be no column reference in the left side of
* a condition, for example, is_between :val1 and :val2
.
*
* For more information, see Available * checks *
* * @param checkExpression * The expression which includes column references, condition names followed by variable references, possibly * grouped and combined with other conditions. For example, *(:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
* . Column and value references are substitution variables that should start with the ':' symbol. Depending
* on the context, substitution variables' values can be either an actual value or a column name. These
* values are defined in the SubstitutionMap. If a CheckExpression starts with a column reference, then
* ColumnSelectors in the rule should be null. If ColumnSelectors has been defined, then there should be no
* column reference in the left side of a condition, for example, is_between :val1 and :val2
* .
* * For more information, see Available * checks */ public void setCheckExpression(String checkExpression) { this.checkExpression = checkExpression; } /** *
* The expression which includes column references, condition names followed by variable references, possibly
* grouped and combined with other conditions. For example,
* (:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
* . Column and value references are substitution variables that should start with the ':' symbol. Depending on the
* context, substitution variables' values can be either an actual value or a column name. These values are defined
* in the SubstitutionMap. If a CheckExpression starts with a column reference, then ColumnSelectors in the rule
* should be null. If ColumnSelectors has been defined, then there should be no column reference in the left side of
* a condition, for example, is_between :val1 and :val2
.
*
* For more information, see Available * checks *
* * @return The expression which includes column references, condition names followed by variable references, * possibly grouped and combined with other conditions. For example, *(:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
* . Column and value references are substitution variables that should start with the ':' symbol. Depending
* on the context, substitution variables' values can be either an actual value or a column name. These
* values are defined in the SubstitutionMap. If a CheckExpression starts with a column reference, then
* ColumnSelectors in the rule should be null. If ColumnSelectors has been defined, then there should be no
* column reference in the left side of a condition, for example, is_between :val1 and :val2
* .
* * For more information, see Available checks */ public String getCheckExpression() { return this.checkExpression; } /** *
* The expression which includes column references, condition names followed by variable references, possibly
* grouped and combined with other conditions. For example,
* (:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
* . Column and value references are substitution variables that should start with the ':' symbol. Depending on the
* context, substitution variables' values can be either an actual value or a column name. These values are defined
* in the SubstitutionMap. If a CheckExpression starts with a column reference, then ColumnSelectors in the rule
* should be null. If ColumnSelectors has been defined, then there should be no column reference in the left side of
* a condition, for example, is_between :val1 and :val2
.
*
* For more information, see Available * checks *
* * @param checkExpression * The expression which includes column references, condition names followed by variable references, possibly * grouped and combined with other conditions. For example, *(:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
* . Column and value references are substitution variables that should start with the ':' symbol. Depending
* on the context, substitution variables' values can be either an actual value or a column name. These
* values are defined in the SubstitutionMap. If a CheckExpression starts with a column reference, then
* ColumnSelectors in the rule should be null. If ColumnSelectors has been defined, then there should be no
* column reference in the left side of a condition, for example, is_between :val1 and :val2
* .
* * For more information, see Available * checks * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withCheckExpression(String checkExpression) { setCheckExpression(checkExpression); return this; } /** *
* The map of substitution variable names to their values used in a check expression. Variable names should start
* with a ':' (colon). Variable values can either be actual values or column names. To differentiate between the
* two, column names should be enclosed in backticks, for example, ":col1": "`Column A`".
*
":col1": "`Column A`".
*/
public java.util.Map
* The map of substitution variable names to their values used in a check expression. Variable names should start
* with a ':' (colon). Variable values can either be actual values or column names. To differentiate between the
* two, column names should be enclosed in backticks, for example, ":col1": "`Column A`".
*
":col1": "`Column A`".
*/
public void setSubstitutionMap(java.util.Map
* The map of substitution variable names to their values used in a check expression. Variable names should start
* with a ':' (colon). Variable values can either be actual values or column names. To differentiate between the
* two, column names should be enclosed in backticks, for example, ":col1": "`Column A`".
*
":col1": "`Column A`".
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Rule withSubstitutionMap(java.util.Map* The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied to each * row in a specific column, and the threshold will be used to determine whether the validation succeeds. *
* * @param threshold * The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied * to each row in a specific column, and the threshold will be used to determine whether the validation * succeeds. */ public void setThreshold(Threshold threshold) { this.threshold = threshold; } /** ** The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied to each * row in a specific column, and the threshold will be used to determine whether the validation succeeds. *
* * @return The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied * to each row in a specific column, and the threshold will be used to determine whether the validation * succeeds. */ public Threshold getThreshold() { return this.threshold; } /** ** The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied to each * row in a specific column, and the threshold will be used to determine whether the validation succeeds. *
* * @param threshold * The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied * to each row in a specific column, and the threshold will be used to determine whether the validation * succeeds. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withThreshold(Threshold threshold) { setThreshold(threshold); return this; } /** ** List of column selectors. Selectors can be used to select columns using a name or regular expression from the * dataset. Rule will be applied to selected columns. *
* * @return List of column selectors. Selectors can be used to select columns using a name or regular expression from * the dataset. Rule will be applied to selected columns. */ public java.util.List* List of column selectors. Selectors can be used to select columns using a name or regular expression from the * dataset. Rule will be applied to selected columns. *
* * @param columnSelectors * List of column selectors. Selectors can be used to select columns using a name or regular expression from * the dataset. Rule will be applied to selected columns. */ public void setColumnSelectors(java.util.Collection* List of column selectors. Selectors can be used to select columns using a name or regular expression from the * dataset. Rule will be applied to selected columns. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setColumnSelectors(java.util.Collection)} or {@link #withColumnSelectors(java.util.Collection)} if you * want to override the existing values. *
* * @param columnSelectors * List of column selectors. Selectors can be used to select columns using a name or regular expression from * the dataset. Rule will be applied to selected columns. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withColumnSelectors(ColumnSelector... columnSelectors) { if (this.columnSelectors == null) { setColumnSelectors(new java.util.ArrayList* List of column selectors. Selectors can be used to select columns using a name or regular expression from the * dataset. Rule will be applied to selected columns. *
* * @param columnSelectors * List of column selectors. Selectors can be used to select columns using a name or regular expression from * the dataset. Rule will be applied to selected columns. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withColumnSelectors(java.util.Collection