<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dataplex/v1/logs.proto

namespace Google\Cloud\Dataplex\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Information about the result of a data quality rule for data quality scan.
 * The monitored resource is 'DataScan'.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.DataQualityScanRuleResult</code>
 */
class DataQualityScanRuleResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier of the specific data scan job this log entry is for.
     *
     * Generated from protobuf field <code>string job_id = 1;</code>
     */
    protected $job_id = '';
    /**
     * The data source of the data scan (e.g. BigQuery table name).
     *
     * Generated from protobuf field <code>string data_source = 2;</code>
     */
    protected $data_source = '';
    /**
     * The column which this rule is evaluated against.
     *
     * Generated from protobuf field <code>string column = 3;</code>
     */
    protected $column = '';
    /**
     * The name of the data quality rule.
     *
     * Generated from protobuf field <code>string rule_name = 4;</code>
     */
    protected $rule_name = '';
    /**
     * The type of the data quality rule.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5;</code>
     */
    protected $rule_type = 0;
    /**
     * The evaluation type of the data quality rule.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6;</code>
     */
    protected $evalution_type = 0;
    /**
     * The dimension of the data quality rule.
     *
     * Generated from protobuf field <code>string rule_dimension = 7;</code>
     */
    protected $rule_dimension = '';
    /**
     * The passing threshold ([0.0, 100.0]) of the data quality rule.
     *
     * Generated from protobuf field <code>double threshold_percent = 8;</code>
     */
    protected $threshold_percent = 0.0;
    /**
     * The result of the data quality rule.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9;</code>
     */
    protected $result = 0;
    /**
     * The number of rows evaluated against the data quality rule.
     * This field is only valid for rules of PER_ROW evaluation type.
     *
     * Generated from protobuf field <code>int64 evaluated_row_count = 10;</code>
     */
    protected $evaluated_row_count = 0;
    /**
     * The number of rows which passed a rule evaluation.
     * This field is only valid for rules of PER_ROW evaluation type.
     *
     * Generated from protobuf field <code>int64 passed_row_count = 11;</code>
     */
    protected $passed_row_count = 0;
    /**
     * The number of rows with null values in the specified column.
     *
     * Generated from protobuf field <code>int64 null_row_count = 12;</code>
     */
    protected $null_row_count = 0;
    /**
     * The number of rows returned by the SQL statement in a SQL assertion rule.
     * This field is only valid for SQL assertion rules.
     *
     * Generated from protobuf field <code>int64 assertion_row_count = 13;</code>
     */
    protected $assertion_row_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $job_id
     *           Identifier of the specific data scan job this log entry is for.
     *     @type string $data_source
     *           The data source of the data scan (e.g. BigQuery table name).
     *     @type string $column
     *           The column which this rule is evaluated against.
     *     @type string $rule_name
     *           The name of the data quality rule.
     *     @type int $rule_type
     *           The type of the data quality rule.
     *     @type int $evalution_type
     *           The evaluation type of the data quality rule.
     *     @type string $rule_dimension
     *           The dimension of the data quality rule.
     *     @type float $threshold_percent
     *           The passing threshold ([0.0, 100.0]) of the data quality rule.
     *     @type int $result
     *           The result of the data quality rule.
     *     @type int|string $evaluated_row_count
     *           The number of rows evaluated against the data quality rule.
     *           This field is only valid for rules of PER_ROW evaluation type.
     *     @type int|string $passed_row_count
     *           The number of rows which passed a rule evaluation.
     *           This field is only valid for rules of PER_ROW evaluation type.
     *     @type int|string $null_row_count
     *           The number of rows with null values in the specified column.
     *     @type int|string $assertion_row_count
     *           The number of rows returned by the SQL statement in a SQL assertion rule.
     *           This field is only valid for SQL assertion rules.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier of the specific data scan job this log entry is for.
     *
     * Generated from protobuf field <code>string job_id = 1;</code>
     * @return string
     */
    public function getJobId()
    {
        return $this->job_id;
    }

    /**
     * Identifier of the specific data scan job this log entry is for.
     *
     * Generated from protobuf field <code>string job_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setJobId($var)
    {
        GPBUtil::checkString($var, True);
        $this->job_id = $var;

        return $this;
    }

    /**
     * The data source of the data scan (e.g. BigQuery table name).
     *
     * Generated from protobuf field <code>string data_source = 2;</code>
     * @return string
     */
    public function getDataSource()
    {
        return $this->data_source;
    }

    /**
     * The data source of the data scan (e.g. BigQuery table name).
     *
     * Generated from protobuf field <code>string data_source = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDataSource($var)
    {
        GPBUtil::checkString($var, True);
        $this->data_source = $var;

        return $this;
    }

    /**
     * The column which this rule is evaluated against.
     *
     * Generated from protobuf field <code>string column = 3;</code>
     * @return string
     */
    public function getColumn()
    {
        return $this->column;
    }

    /**
     * The column which this rule is evaluated against.
     *
     * Generated from protobuf field <code>string column = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setColumn($var)
    {
        GPBUtil::checkString($var, True);
        $this->column = $var;

        return $this;
    }

    /**
     * The name of the data quality rule.
     *
     * Generated from protobuf field <code>string rule_name = 4;</code>
     * @return string
     */
    public function getRuleName()
    {
        return $this->rule_name;
    }

    /**
     * The name of the data quality rule.
     *
     * Generated from protobuf field <code>string rule_name = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setRuleName($var)
    {
        GPBUtil::checkString($var, True);
        $this->rule_name = $var;

        return $this;
    }

    /**
     * The type of the data quality rule.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5;</code>
     * @return int
     */
    public function getRuleType()
    {
        return $this->rule_type;
    }

    /**
     * The type of the data quality rule.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setRuleType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\RuleType::class);
        $this->rule_type = $var;

        return $this;
    }

    /**
     * The evaluation type of the data quality rule.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6;</code>
     * @return int
     */
    public function getEvalutionType()
    {
        return $this->evalution_type;
    }

    /**
     * The evaluation type of the data quality rule.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setEvalutionType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\EvaluationType::class);
        $this->evalution_type = $var;

        return $this;
    }

    /**
     * The dimension of the data quality rule.
     *
     * Generated from protobuf field <code>string rule_dimension = 7;</code>
     * @return string
     */
    public function getRuleDimension()
    {
        return $this->rule_dimension;
    }

    /**
     * The dimension of the data quality rule.
     *
     * Generated from protobuf field <code>string rule_dimension = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setRuleDimension($var)
    {
        GPBUtil::checkString($var, True);
        $this->rule_dimension = $var;

        return $this;
    }

    /**
     * The passing threshold ([0.0, 100.0]) of the data quality rule.
     *
     * Generated from protobuf field <code>double threshold_percent = 8;</code>
     * @return float
     */
    public function getThresholdPercent()
    {
        return $this->threshold_percent;
    }

    /**
     * The passing threshold ([0.0, 100.0]) of the data quality rule.
     *
     * Generated from protobuf field <code>double threshold_percent = 8;</code>
     * @param float $var
     * @return $this
     */
    public function setThresholdPercent($var)
    {
        GPBUtil::checkDouble($var);
        $this->threshold_percent = $var;

        return $this;
    }

    /**
     * The result of the data quality rule.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9;</code>
     * @return int
     */
    public function getResult()
    {
        return $this->result;
    }

    /**
     * The result of the data quality rule.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setResult($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\Result::class);
        $this->result = $var;

        return $this;
    }

    /**
     * The number of rows evaluated against the data quality rule.
     * This field is only valid for rules of PER_ROW evaluation type.
     *
     * Generated from protobuf field <code>int64 evaluated_row_count = 10;</code>
     * @return int|string
     */
    public function getEvaluatedRowCount()
    {
        return $this->evaluated_row_count;
    }

    /**
     * The number of rows evaluated against the data quality rule.
     * This field is only valid for rules of PER_ROW evaluation type.
     *
     * Generated from protobuf field <code>int64 evaluated_row_count = 10;</code>
     * @param int|string $var
     * @return $this
     */
    public function setEvaluatedRowCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->evaluated_row_count = $var;

        return $this;
    }

    /**
     * The number of rows which passed a rule evaluation.
     * This field is only valid for rules of PER_ROW evaluation type.
     *
     * Generated from protobuf field <code>int64 passed_row_count = 11;</code>
     * @return int|string
     */
    public function getPassedRowCount()
    {
        return $this->passed_row_count;
    }

    /**
     * The number of rows which passed a rule evaluation.
     * This field is only valid for rules of PER_ROW evaluation type.
     *
     * Generated from protobuf field <code>int64 passed_row_count = 11;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPassedRowCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->passed_row_count = $var;

        return $this;
    }

    /**
     * The number of rows with null values in the specified column.
     *
     * Generated from protobuf field <code>int64 null_row_count = 12;</code>
     * @return int|string
     */
    public function getNullRowCount()
    {
        return $this->null_row_count;
    }

    /**
     * The number of rows with null values in the specified column.
     *
     * Generated from protobuf field <code>int64 null_row_count = 12;</code>
     * @param int|string $var
     * @return $this
     */
    public function setNullRowCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->null_row_count = $var;

        return $this;
    }

    /**
     * The number of rows returned by the SQL statement in a SQL assertion rule.
     * This field is only valid for SQL assertion rules.
     *
     * Generated from protobuf field <code>int64 assertion_row_count = 13;</code>
     * @return int|string
     */
    public function getAssertionRowCount()
    {
        return $this->assertion_row_count;
    }

    /**
     * The number of rows returned by the SQL statement in a SQL assertion rule.
     * This field is only valid for SQL assertion rules.
     *
     * Generated from protobuf field <code>int64 assertion_row_count = 13;</code>
     * @param int|string $var
     * @return $this
     */
    public function setAssertionRowCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->assertion_row_count = $var;

        return $this;
    }

}

