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

namespace Google\Cloud\Audit\BigQueryAuditMetadata\JobStats;

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

/**
 * Query job statistics.
 *
 * Generated from protobuf message <code>google.cloud.audit.BigQueryAuditMetadata.JobStats.Query</code>
 */
class Query extends \Google\Protobuf\Internal\Message
{
    /**
     * Total bytes processed by the query job.
     *
     * Generated from protobuf field <code>int64 total_processed_bytes = 1;</code>
     */
    protected $total_processed_bytes = 0;
    /**
     * Total bytes billed by the query job.
     *
     * Generated from protobuf field <code>int64 total_billed_bytes = 2;</code>
     */
    protected $total_billed_bytes = 0;
    /**
     * The tier assigned by the CPU-based billing.
     *
     * Generated from protobuf field <code>int32 billing_tier = 3;</code>
     */
    protected $billing_tier = 0;
    /**
     * Tables accessed by the query job.
     *
     * Generated from protobuf field <code>repeated string referenced_tables = 6;</code>
     */
    private $referenced_tables;
    /**
     * Views accessed by the query job.
     *
     * Generated from protobuf field <code>repeated string referenced_views = 7;</code>
     */
    private $referenced_views;
    /**
     * Routines accessed by the query job.
     *
     * Generated from protobuf field <code>repeated string referenced_routines = 10;</code>
     */
    private $referenced_routines;
    /**
     * Number of output rows produced by the query job.
     *
     * Generated from protobuf field <code>int64 output_row_count = 8;</code>
     */
    protected $output_row_count = 0;
    /**
     * True if the query job results were read from the query cache.
     *
     * Generated from protobuf field <code>bool cache_hit = 9;</code>
     */
    protected $cache_hit = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $total_processed_bytes
     *           Total bytes processed by the query job.
     *     @type int|string $total_billed_bytes
     *           Total bytes billed by the query job.
     *     @type int $billing_tier
     *           The tier assigned by the CPU-based billing.
     *     @type string[] $referenced_tables
     *           Tables accessed by the query job.
     *     @type string[] $referenced_views
     *           Views accessed by the query job.
     *     @type string[] $referenced_routines
     *           Routines accessed by the query job.
     *     @type int|string $output_row_count
     *           Number of output rows produced by the query job.
     *     @type bool $cache_hit
     *           True if the query job results were read from the query cache.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Audit\BigqueryAuditMetadata::initOnce();
        parent::__construct($data);
    }

    /**
     * Total bytes processed by the query job.
     *
     * Generated from protobuf field <code>int64 total_processed_bytes = 1;</code>
     * @return int|string
     */
    public function getTotalProcessedBytes()
    {
        return $this->total_processed_bytes;
    }

    /**
     * Total bytes processed by the query job.
     *
     * Generated from protobuf field <code>int64 total_processed_bytes = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setTotalProcessedBytes($var)
    {
        GPBUtil::checkInt64($var);
        $this->total_processed_bytes = $var;

        return $this;
    }

    /**
     * Total bytes billed by the query job.
     *
     * Generated from protobuf field <code>int64 total_billed_bytes = 2;</code>
     * @return int|string
     */
    public function getTotalBilledBytes()
    {
        return $this->total_billed_bytes;
    }

    /**
     * Total bytes billed by the query job.
     *
     * Generated from protobuf field <code>int64 total_billed_bytes = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setTotalBilledBytes($var)
    {
        GPBUtil::checkInt64($var);
        $this->total_billed_bytes = $var;

        return $this;
    }

    /**
     * The tier assigned by the CPU-based billing.
     *
     * Generated from protobuf field <code>int32 billing_tier = 3;</code>
     * @return int
     */
    public function getBillingTier()
    {
        return $this->billing_tier;
    }

    /**
     * The tier assigned by the CPU-based billing.
     *
     * Generated from protobuf field <code>int32 billing_tier = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setBillingTier($var)
    {
        GPBUtil::checkInt32($var);
        $this->billing_tier = $var;

        return $this;
    }

    /**
     * Tables accessed by the query job.
     *
     * Generated from protobuf field <code>repeated string referenced_tables = 6;</code>
     * @return RepeatedField<string>
     */
    public function getReferencedTables()
    {
        return $this->referenced_tables;
    }

    /**
     * Tables accessed by the query job.
     *
     * Generated from protobuf field <code>repeated string referenced_tables = 6;</code>
     * @param string[] $var
     * @return $this
     */
    public function setReferencedTables($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->referenced_tables = $arr;

        return $this;
    }

    /**
     * Views accessed by the query job.
     *
     * Generated from protobuf field <code>repeated string referenced_views = 7;</code>
     * @return RepeatedField<string>
     */
    public function getReferencedViews()
    {
        return $this->referenced_views;
    }

    /**
     * Views accessed by the query job.
     *
     * Generated from protobuf field <code>repeated string referenced_views = 7;</code>
     * @param string[] $var
     * @return $this
     */
    public function setReferencedViews($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->referenced_views = $arr;

        return $this;
    }

    /**
     * Routines accessed by the query job.
     *
     * Generated from protobuf field <code>repeated string referenced_routines = 10;</code>
     * @return RepeatedField<string>
     */
    public function getReferencedRoutines()
    {
        return $this->referenced_routines;
    }

    /**
     * Routines accessed by the query job.
     *
     * Generated from protobuf field <code>repeated string referenced_routines = 10;</code>
     * @param string[] $var
     * @return $this
     */
    public function setReferencedRoutines($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->referenced_routines = $arr;

        return $this;
    }

    /**
     * Number of output rows produced by the query job.
     *
     * Generated from protobuf field <code>int64 output_row_count = 8;</code>
     * @return int|string
     */
    public function getOutputRowCount()
    {
        return $this->output_row_count;
    }

    /**
     * Number of output rows produced by the query job.
     *
     * Generated from protobuf field <code>int64 output_row_count = 8;</code>
     * @param int|string $var
     * @return $this
     */
    public function setOutputRowCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->output_row_count = $var;

        return $this;
    }

    /**
     * True if the query job results were read from the query cache.
     *
     * Generated from protobuf field <code>bool cache_hit = 9;</code>
     * @return bool
     */
    public function getCacheHit()
    {
        return $this->cache_hit;
    }

    /**
     * True if the query job results were read from the query cache.
     *
     * Generated from protobuf field <code>bool cache_hit = 9;</code>
     * @param bool $var
     * @return $this
     */
    public function setCacheHit($var)
    {
        GPBUtil::checkBool($var);
        $this->cache_hit = $var;

        return $this;
    }

}

