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

namespace Google\Cloud\Bigtable\Admin\V2;

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

/**
 * Metadata type for the long-running operation used to track the progress
 * of optimizations performed on a newly restored table. This long-running
 * operation is automatically created by the system after the successful
 * completion of a table restore, and cannot be cancelled.
 *
 * Generated from protobuf message <code>google.bigtable.admin.v2.OptimizeRestoredTableMetadata</code>
 */
class OptimizeRestoredTableMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the restored table being optimized.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The progress of the post-restore optimizations.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.OperationProgress progress = 2;</code>
     */
    private $progress = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Name of the restored table being optimized.
     *     @type \Google\Cloud\Bigtable\Admin\V2\OperationProgress $progress
     *           The progress of the post-restore optimizations.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of the restored table being optimized.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Name of the restored table being optimized.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The progress of the post-restore optimizations.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.OperationProgress progress = 2;</code>
     * @return \Google\Cloud\Bigtable\Admin\V2\OperationProgress|null
     */
    public function getProgress()
    {
        return $this->progress;
    }

    public function hasProgress()
    {
        return isset($this->progress);
    }

    public function clearProgress()
    {
        unset($this->progress);
    }

    /**
     * The progress of the post-restore optimizations.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.OperationProgress progress = 2;</code>
     * @param \Google\Cloud\Bigtable\Admin\V2\OperationProgress $var
     * @return $this
     */
    public function setProgress($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\OperationProgress::class);
        $this->progress = $var;

        return $this;
    }

}

