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

namespace Google\Cloud\Bigtable\Admin\V2;

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

/**
 * The metadata for the Operation returned by CreateCluster.
 *
 * Generated from protobuf message <code>google.bigtable.admin.v2.CreateClusterMetadata</code>
 */
class CreateClusterMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * The request that prompted the initiation of this CreateCluster operation.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.CreateClusterRequest original_request = 1;</code>
     */
    private $original_request = null;
    /**
     * The time at which the original request was received.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp request_time = 2;</code>
     */
    private $request_time = null;
    /**
     * The time at which the operation failed or was completed successfully.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp finish_time = 3;</code>
     */
    private $finish_time = null;
    /**
     * Keys: the full `name` of each table that existed in the instance when
     * CreateCluster was first called, i.e.
     * `projects/<project>/instances/<instance>/tables/<table>`. Any table added
     * to the instance by a later API call will be created in the new cluster by
     * that API call, not this one.
     * Values: information on how much of a table's data has been copied to the
     * newly-created cluster so far.
     *
     * Generated from protobuf field <code>map<string, .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress> tables = 4;</code>
     */
    private $tables;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest $original_request
     *           The request that prompted the initiation of this CreateCluster operation.
     *     @type \Google\Protobuf\Timestamp $request_time
     *           The time at which the original request was received.
     *     @type \Google\Protobuf\Timestamp $finish_time
     *           The time at which the operation failed or was completed successfully.
     *     @type array|\Google\Protobuf\Internal\MapField $tables
     *           Keys: the full `name` of each table that existed in the instance when
     *           CreateCluster was first called, i.e.
     *           `projects/<project>/instances/<instance>/tables/<table>`. Any table added
     *           to the instance by a later API call will be created in the new cluster by
     *           that API call, not this one.
     *           Values: information on how much of a table's data has been copied to the
     *           newly-created cluster so far.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce();
        parent::__construct($data);
    }

    /**
     * The request that prompted the initiation of this CreateCluster operation.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.CreateClusterRequest original_request = 1;</code>
     * @return \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest|null
     */
    public function getOriginalRequest()
    {
        return $this->original_request;
    }

    public function hasOriginalRequest()
    {
        return isset($this->original_request);
    }

    public function clearOriginalRequest()
    {
        unset($this->original_request);
    }

    /**
     * The request that prompted the initiation of this CreateCluster operation.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.CreateClusterRequest original_request = 1;</code>
     * @param \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest $var
     * @return $this
     */
    public function setOriginalRequest($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest::class);
        $this->original_request = $var;

        return $this;
    }

    /**
     * The time at which the original request was received.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp request_time = 2;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getRequestTime()
    {
        return $this->request_time;
    }

    public function hasRequestTime()
    {
        return isset($this->request_time);
    }

    public function clearRequestTime()
    {
        unset($this->request_time);
    }

    /**
     * The time at which the original request was received.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp request_time = 2;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setRequestTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->request_time = $var;

        return $this;
    }

    /**
     * The time at which the operation failed or was completed successfully.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp finish_time = 3;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getFinishTime()
    {
        return $this->finish_time;
    }

    public function hasFinishTime()
    {
        return isset($this->finish_time);
    }

    public function clearFinishTime()
    {
        unset($this->finish_time);
    }

    /**
     * The time at which the operation failed or was completed successfully.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp finish_time = 3;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setFinishTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->finish_time = $var;

        return $this;
    }

    /**
     * Keys: the full `name` of each table that existed in the instance when
     * CreateCluster was first called, i.e.
     * `projects/<project>/instances/<instance>/tables/<table>`. Any table added
     * to the instance by a later API call will be created in the new cluster by
     * that API call, not this one.
     * Values: information on how much of a table's data has been copied to the
     * newly-created cluster so far.
     *
     * Generated from protobuf field <code>map<string, .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress> tables = 4;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getTables()
    {
        return $this->tables;
    }

    /**
     * Keys: the full `name` of each table that existed in the instance when
     * CreateCluster was first called, i.e.
     * `projects/<project>/instances/<instance>/tables/<table>`. Any table added
     * to the instance by a later API call will be created in the new cluster by
     * that API call, not this one.
     * Values: information on how much of a table's data has been copied to the
     * newly-created cluster so far.
     *
     * Generated from protobuf field <code>map<string, .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress> tables = 4;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setTables($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata\TableProgress::class);
        $this->tables = $arr;

        return $this;
    }

}

