<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/bigtable/admin/v2/instance.proto

namespace Google\Cloud\Bigtable\Admin\V2;

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

/**
 * A SQL logical view object that can be referenced in SQL queries.
 *
 * Generated from protobuf message <code>google.bigtable.admin.v2.LogicalView</code>
 */
class LogicalView extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The unique name of the logical view.
     * Format:
     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Required. The logical view's select query.
     *
     * Generated from protobuf field <code>string query = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $query = '';
    /**
     * Optional. The etag for this logical view.
     * This may be sent on update requests to ensure that the client has an
     * up-to-date value before proceeding. The server returns an ABORTED error on
     * a mismatched etag.
     *
     * Generated from protobuf field <code>string etag = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $etag = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The unique name of the logical view.
     *           Format:
     *           `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
     *     @type string $query
     *           Required. The logical view's select query.
     *     @type string $etag
     *           Optional. The etag for this logical view.
     *           This may be sent on update requests to ensure that the client has an
     *           up-to-date value before proceeding. The server returns an ABORTED error on
     *           a mismatched etag.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The unique name of the logical view.
     * Format:
     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The unique name of the logical view.
     * Format:
     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The logical view's select query.
     *
     * Generated from protobuf field <code>string query = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getQuery()
    {
        return $this->query;
    }

    /**
     * Required. The logical view's select query.
     *
     * Generated from protobuf field <code>string query = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setQuery($var)
    {
        GPBUtil::checkString($var, True);
        $this->query = $var;

        return $this;
    }

    /**
     * Optional. The etag for this logical view.
     * This may be sent on update requests to ensure that the client has an
     * up-to-date value before proceeding. The server returns an ABORTED error on
     * a mismatched etag.
     *
     * Generated from protobuf field <code>string etag = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * Optional. The etag for this logical view.
     * This may be sent on update requests to ensure that the client has an
     * up-to-date value before proceeding. The server returns an ABORTED error on
     * a mismatched etag.
     *
     * Generated from protobuf field <code>string etag = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

}

