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

namespace Google\Cloud\Dataplex\V1;

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

/**
 * The output of a DataQualityScan.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.DataQualityResult</code>
 */
class DataQualityResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Overall data quality result -- `true` if all rules passed.
     *
     * Generated from protobuf field <code>bool passed = 5;</code>
     */
    private $passed = false;
    /**
     * A list of results at the dimension-level.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2;</code>
     */
    private $dimensions;
    /**
     * A list of all the rules in a job, and their results.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3;</code>
     */
    private $rules;
    /**
     * The count of rows processed.
     *
     * Generated from protobuf field <code>int64 row_count = 4;</code>
     */
    private $row_count = 0;
    /**
     * The data scanned for this result.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.ScannedData scanned_data = 7;</code>
     */
    private $scanned_data = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $passed
     *           Overall data quality result -- `true` if all rules passed.
     *     @type array<\Google\Cloud\Dataplex\V1\DataQualityDimensionResult>|\Google\Protobuf\Internal\RepeatedField $dimensions
     *           A list of results at the dimension-level.
     *     @type array<\Google\Cloud\Dataplex\V1\DataQualityRuleResult>|\Google\Protobuf\Internal\RepeatedField $rules
     *           A list of all the rules in a job, and their results.
     *     @type int|string $row_count
     *           The count of rows processed.
     *     @type \Google\Cloud\Dataplex\V1\ScannedData $scanned_data
     *           The data scanned for this result.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce();
        parent::__construct($data);
    }

    /**
     * Overall data quality result -- `true` if all rules passed.
     *
     * Generated from protobuf field <code>bool passed = 5;</code>
     * @return bool
     */
    public function getPassed()
    {
        return $this->passed;
    }

    /**
     * Overall data quality result -- `true` if all rules passed.
     *
     * Generated from protobuf field <code>bool passed = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setPassed($var)
    {
        GPBUtil::checkBool($var);
        $this->passed = $var;

        return $this;
    }

    /**
     * A list of results at the dimension-level.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDimensions()
    {
        return $this->dimensions;
    }

    /**
     * A list of results at the dimension-level.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2;</code>
     * @param array<\Google\Cloud\Dataplex\V1\DataQualityDimensionResult>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDimensions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityDimensionResult::class);
        $this->dimensions = $arr;

        return $this;
    }

    /**
     * A list of all the rules in a job, and their results.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRules()
    {
        return $this->rules;
    }

    /**
     * A list of all the rules in a job, and their results.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3;</code>
     * @param array<\Google\Cloud\Dataplex\V1\DataQualityRuleResult>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRules($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityRuleResult::class);
        $this->rules = $arr;

        return $this;
    }

    /**
     * The count of rows processed.
     *
     * Generated from protobuf field <code>int64 row_count = 4;</code>
     * @return int|string
     */
    public function getRowCount()
    {
        return $this->row_count;
    }

    /**
     * The count of rows processed.
     *
     * Generated from protobuf field <code>int64 row_count = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setRowCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->row_count = $var;

        return $this;
    }

    /**
     * The data scanned for this result.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.ScannedData scanned_data = 7;</code>
     * @return \Google\Cloud\Dataplex\V1\ScannedData|null
     */
    public function getScannedData()
    {
        return $this->scanned_data;
    }

    public function hasScannedData()
    {
        return isset($this->scanned_data);
    }

    public function clearScannedData()
    {
        unset($this->scanned_data);
    }

    /**
     * The data scanned for this result.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.ScannedData scanned_data = 7;</code>
     * @param \Google\Cloud\Dataplex\V1\ScannedData $var
     * @return $this
     */
    public function setScannedData($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ScannedData::class);
        $this->scanned_data = $var;

        return $this;
    }

}

