/* * Copyright 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. */ /* * Do not modify this file. This file is generated from the databrew-2017-07-25.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.GlueDataBrew.Model { /// /// Represents a single data quality requirement that should be validated in the scope /// of this dataset. /// public partial class Rule { private string _checkExpression; private List _columnSelectors = new List(); private bool? _disabled; private string _name; private Dictionary _substitutionMap = new Dictionary(); private Threshold _threshold; /// /// Gets and sets the property 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 /// /// [AWSProperty(Required=true, Min=4, Max=1024)] public string CheckExpression { get { return this._checkExpression; } set { this._checkExpression = value; } } // Check to see if CheckExpression property is set internal bool IsSetCheckExpression() { return this._checkExpression != null; } /// /// Gets and sets the property 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. /// /// [AWSProperty(Min=1)] public List ColumnSelectors { get { return this._columnSelectors; } set { this._columnSelectors = value; } } // Check to see if ColumnSelectors property is set internal bool IsSetColumnSelectors() { return this._columnSelectors != null && this._columnSelectors.Count > 0; } /// /// Gets and sets the property 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 bool Disabled { get { return this._disabled.GetValueOrDefault(); } set { this._disabled = value; } } // Check to see if Disabled property is set internal bool IsSetDisabled() { return this._disabled.HasValue; } /// /// Gets and sets the property Name. /// /// The name of the rule. /// /// [AWSProperty(Required=true, Min=1, Max=128)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// /// Gets and sets the property 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`". /// /// public Dictionary SubstitutionMap { get { return this._substitutionMap; } set { this._substitutionMap = value; } } // Check to see if SubstitutionMap property is set internal bool IsSetSubstitutionMap() { return this._substitutionMap != null && this._substitutionMap.Count > 0; } /// /// Gets and sets the property 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 Threshold Threshold { get { return this._threshold; } set { this._threshold = value; } } // Check to see if Threshold property is set internal bool IsSetThreshold() { return this._threshold != null; } } }