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

namespace Google\Cloud\DataCatalog\V1;

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

/**
 * Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`.
 * Context:
 * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding
 *
 * Generated from protobuf message <code>google.cloud.datacatalog.v1.BigQueryDateShardedSpec</code>
 */
class BigQueryDateShardedSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The Data Catalog resource name of the dataset entry the current table
     * belongs to, for example,
     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
     *
     * Generated from protobuf field <code>string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    private $dataset = '';
    /**
     * Output only. The table name prefix of the shards. The name of any given shard is
     * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
     * `table_prefix` is `MyTable`.
     *
     * Generated from protobuf field <code>string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $table_prefix = '';
    /**
     * Output only. Total number of shards.
     *
     * Generated from protobuf field <code>int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $shard_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $dataset
     *           Output only. The Data Catalog resource name of the dataset entry the current table
     *           belongs to, for example,
     *           `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
     *     @type string $table_prefix
     *           Output only. The table name prefix of the shards. The name of any given shard is
     *           `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
     *           `table_prefix` is `MyTable`.
     *     @type int|string $shard_count
     *           Output only. Total number of shards.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datacatalog\V1\TableSpec::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The Data Catalog resource name of the dataset entry the current table
     * belongs to, for example,
     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
     *
     * Generated from protobuf field <code>string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getDataset()
    {
        return $this->dataset;
    }

    /**
     * Output only. The Data Catalog resource name of the dataset entry the current table
     * belongs to, for example,
     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
     *
     * Generated from protobuf field <code>string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setDataset($var)
    {
        GPBUtil::checkString($var, True);
        $this->dataset = $var;

        return $this;
    }

    /**
     * Output only. The table name prefix of the shards. The name of any given shard is
     * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
     * `table_prefix` is `MyTable`.
     *
     * Generated from protobuf field <code>string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getTablePrefix()
    {
        return $this->table_prefix;
    }

    /**
     * Output only. The table name prefix of the shards. The name of any given shard is
     * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
     * `table_prefix` is `MyTable`.
     *
     * Generated from protobuf field <code>string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setTablePrefix($var)
    {
        GPBUtil::checkString($var, True);
        $this->table_prefix = $var;

        return $this;
    }

    /**
     * Output only. Total number of shards.
     *
     * Generated from protobuf field <code>int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getShardCount()
    {
        return $this->shard_count;
    }

    /**
     * Output only. Total number of shards.
     *
     * Generated from protobuf field <code>int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setShardCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->shard_count = $var;

        return $this;
    }

}

