/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace GlueDataBrew { namespace Model { /** *

Represents a single data quality requirement that should be validated in the * scope of this dataset.

See Also:

AWS API * Reference

*/ class Rule { public: AWS_GLUEDATABREW_API Rule(); AWS_GLUEDATABREW_API Rule(Aws::Utils::Json::JsonView jsonValue); AWS_GLUEDATABREW_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_GLUEDATABREW_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the rule.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the rule.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the rule.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the rule.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the rule.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the rule.

*/ inline Rule& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the rule.

*/ inline Rule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the rule.

*/ inline Rule& WithName(const char* value) { SetName(value); 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.

*/ inline bool GetDisabled() const{ return m_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.

*/ inline bool DisabledHasBeenSet() const { return m_disabledHasBeenSet; } /** *

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.

*/ inline void SetDisabled(bool value) { m_disabledHasBeenSet = true; m_disabled = value; } /** *

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.

*/ inline Rule& WithDisabled(bool value) { SetDisabled(value); return *this;} /** *

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

*/ inline const Aws::String& GetCheckExpression() const{ return m_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

*/ inline bool CheckExpressionHasBeenSet() const { return m_checkExpressionHasBeenSet; } /** *

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

*/ inline void SetCheckExpression(const Aws::String& value) { m_checkExpressionHasBeenSet = true; m_checkExpression = value; } /** *

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

*/ inline void SetCheckExpression(Aws::String&& value) { m_checkExpressionHasBeenSet = true; m_checkExpression = std::move(value); } /** *

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

*/ inline void SetCheckExpression(const char* value) { m_checkExpressionHasBeenSet = true; m_checkExpression.assign(value); } /** *

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

*/ inline Rule& WithCheckExpression(const Aws::String& value) { SetCheckExpression(value); return *this;} /** *

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

*/ inline Rule& WithCheckExpression(Aws::String&& value) { SetCheckExpression(std::move(value)); return *this;} /** *

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

*/ inline Rule& WithCheckExpression(const char* value) { SetCheckExpression(value); 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`".

*/ inline const Aws::Map& GetSubstitutionMap() const{ return m_substitutionMap; } /** *

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`".

*/ inline bool SubstitutionMapHasBeenSet() const { return m_substitutionMapHasBeenSet; } /** *

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`".

*/ inline void SetSubstitutionMap(const Aws::Map& value) { m_substitutionMapHasBeenSet = true; m_substitutionMap = value; } /** *

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`".

*/ inline void SetSubstitutionMap(Aws::Map&& value) { m_substitutionMapHasBeenSet = true; m_substitutionMap = std::move(value); } /** *

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`".

*/ inline Rule& WithSubstitutionMap(const Aws::Map& value) { SetSubstitutionMap(value); 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`".

*/ inline Rule& WithSubstitutionMap(Aws::Map&& value) { SetSubstitutionMap(std::move(value)); 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`".

*/ inline Rule& AddSubstitutionMap(const Aws::String& key, const Aws::String& value) { m_substitutionMapHasBeenSet = true; m_substitutionMap.emplace(key, value); 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`".

*/ inline Rule& AddSubstitutionMap(Aws::String&& key, const Aws::String& value) { m_substitutionMapHasBeenSet = true; m_substitutionMap.emplace(std::move(key), value); 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`".

*/ inline Rule& AddSubstitutionMap(const Aws::String& key, Aws::String&& value) { m_substitutionMapHasBeenSet = true; m_substitutionMap.emplace(key, std::move(value)); 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`".

*/ inline Rule& AddSubstitutionMap(Aws::String&& key, Aws::String&& value) { m_substitutionMapHasBeenSet = true; m_substitutionMap.emplace(std::move(key), std::move(value)); 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`".

*/ inline Rule& AddSubstitutionMap(const char* key, Aws::String&& value) { m_substitutionMapHasBeenSet = true; m_substitutionMap.emplace(key, std::move(value)); 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`".

*/ inline Rule& AddSubstitutionMap(Aws::String&& key, const char* value) { m_substitutionMapHasBeenSet = true; m_substitutionMap.emplace(std::move(key), value); 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`".

*/ inline Rule& AddSubstitutionMap(const char* key, const char* value) { m_substitutionMapHasBeenSet = true; m_substitutionMap.emplace(key, value); return *this; } /** *

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.

*/ inline const Threshold& GetThreshold() const{ return m_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.

*/ inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; } /** *

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.

*/ inline void SetThreshold(const Threshold& value) { m_thresholdHasBeenSet = true; m_threshold = value; } /** *

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.

*/ inline void SetThreshold(Threshold&& value) { m_thresholdHasBeenSet = true; m_threshold = std::move(value); } /** *

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.

*/ inline Rule& WithThreshold(const Threshold& value) { SetThreshold(value); return *this;} /** *

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.

*/ inline Rule& WithThreshold(Threshold&& value) { SetThreshold(std::move(value)); 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.

*/ inline const Aws::Vector& GetColumnSelectors() const{ return m_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.

*/ inline bool ColumnSelectorsHasBeenSet() const { return m_columnSelectorsHasBeenSet; } /** *

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.

*/ inline void SetColumnSelectors(const Aws::Vector& value) { m_columnSelectorsHasBeenSet = true; m_columnSelectors = value; } /** *

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.

*/ inline void SetColumnSelectors(Aws::Vector&& value) { m_columnSelectorsHasBeenSet = true; m_columnSelectors = std::move(value); } /** *

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.

*/ inline Rule& WithColumnSelectors(const Aws::Vector& value) { SetColumnSelectors(value); 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.

*/ inline Rule& WithColumnSelectors(Aws::Vector&& value) { SetColumnSelectors(std::move(value)); 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.

*/ inline Rule& AddColumnSelectors(const ColumnSelector& value) { m_columnSelectorsHasBeenSet = true; m_columnSelectors.push_back(value); 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.

*/ inline Rule& AddColumnSelectors(ColumnSelector&& value) { m_columnSelectorsHasBeenSet = true; m_columnSelectors.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; bool m_disabled; bool m_disabledHasBeenSet = false; Aws::String m_checkExpression; bool m_checkExpressionHasBeenSet = false; Aws::Map m_substitutionMap; bool m_substitutionMapHasBeenSet = false; Threshold m_threshold; bool m_thresholdHasBeenSet = false; Aws::Vector m_columnSelectors; bool m_columnSelectorsHasBeenSet = false; }; } // namespace Model } // namespace GlueDataBrew } // namespace Aws