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

namespace Google\Cloud\Audit\BigQueryAuditMetadata;

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

/**
 * View definition.
 *
 * Generated from protobuf message <code>google.cloud.audit.BigQueryAuditMetadata.TableViewDefinition</code>
 */
class TableViewDefinition extends \Google\Protobuf\Internal\Message
{
    /**
     * SQL query defining the view. Truncated if exceeds 40K.
     *
     * Generated from protobuf field <code>string query = 1;</code>
     */
    protected $query = '';
    /**
     * True if the schema_json field was truncated.
     *
     * Generated from protobuf field <code>bool query_truncated = 2;</code>
     */
    protected $query_truncated = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $query
     *           SQL query defining the view. Truncated if exceeds 40K.
     *     @type bool $query_truncated
     *           True if the schema_json field was truncated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Audit\BigqueryAuditMetadata::initOnce();
        parent::__construct($data);
    }

    /**
     * SQL query defining the view. Truncated if exceeds 40K.
     *
     * Generated from protobuf field <code>string query = 1;</code>
     * @return string
     */
    public function getQuery()
    {
        return $this->query;
    }

    /**
     * SQL query defining the view. Truncated if exceeds 40K.
     *
     * Generated from protobuf field <code>string query = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setQuery($var)
    {
        GPBUtil::checkString($var, True);
        $this->query = $var;

        return $this;
    }

    /**
     * True if the schema_json field was truncated.
     *
     * Generated from protobuf field <code>bool query_truncated = 2;</code>
     * @return bool
     */
    public function getQueryTruncated()
    {
        return $this->query_truncated;
    }

    /**
     * True if the schema_json field was truncated.
     *
     * Generated from protobuf field <code>bool query_truncated = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setQueryTruncated($var)
    {
        GPBUtil::checkBool($var);
        $this->query_truncated = $var;

        return $this;
    }

}


