<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/datastore/admin/v1/datastore_admin.proto

namespace Google\Cloud\Datastore\Admin\V1;

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

/**
 * Metadata for Index operations.
 *
 * Generated from protobuf message <code>google.datastore.admin.v1.IndexOperationMetadata</code>
 */
class IndexOperationMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Metadata common to all Datastore Admin operations.
     *
     * Generated from protobuf field <code>.google.datastore.admin.v1.CommonMetadata common = 1;</code>
     */
    private $common = null;
    /**
     * An estimate of the number of entities processed.
     *
     * Generated from protobuf field <code>.google.datastore.admin.v1.Progress progress_entities = 2;</code>
     */
    private $progress_entities = null;
    /**
     * The index resource ID that this operation is acting on.
     *
     * Generated from protobuf field <code>string index_id = 3;</code>
     */
    private $index_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Datastore\Admin\V1\CommonMetadata $common
     *           Metadata common to all Datastore Admin operations.
     *     @type \Google\Cloud\Datastore\Admin\V1\Progress $progress_entities
     *           An estimate of the number of entities processed.
     *     @type string $index_id
     *           The index resource ID that this operation is acting on.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Datastore\Admin\V1\DatastoreAdmin::initOnce();
        parent::__construct($data);
    }

    /**
     * Metadata common to all Datastore Admin operations.
     *
     * Generated from protobuf field <code>.google.datastore.admin.v1.CommonMetadata common = 1;</code>
     * @return \Google\Cloud\Datastore\Admin\V1\CommonMetadata|null
     */
    public function getCommon()
    {
        return $this->common;
    }

    public function hasCommon()
    {
        return isset($this->common);
    }

    public function clearCommon()
    {
        unset($this->common);
    }

    /**
     * Metadata common to all Datastore Admin operations.
     *
     * Generated from protobuf field <code>.google.datastore.admin.v1.CommonMetadata common = 1;</code>
     * @param \Google\Cloud\Datastore\Admin\V1\CommonMetadata $var
     * @return $this
     */
    public function setCommon($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Datastore\Admin\V1\CommonMetadata::class);
        $this->common = $var;

        return $this;
    }

    /**
     * An estimate of the number of entities processed.
     *
     * Generated from protobuf field <code>.google.datastore.admin.v1.Progress progress_entities = 2;</code>
     * @return \Google\Cloud\Datastore\Admin\V1\Progress|null
     */
    public function getProgressEntities()
    {
        return $this->progress_entities;
    }

    public function hasProgressEntities()
    {
        return isset($this->progress_entities);
    }

    public function clearProgressEntities()
    {
        unset($this->progress_entities);
    }

    /**
     * An estimate of the number of entities processed.
     *
     * Generated from protobuf field <code>.google.datastore.admin.v1.Progress progress_entities = 2;</code>
     * @param \Google\Cloud\Datastore\Admin\V1\Progress $var
     * @return $this
     */
    public function setProgressEntities($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Datastore\Admin\V1\Progress::class);
        $this->progress_entities = $var;

        return $this;
    }

    /**
     * The index resource ID that this operation is acting on.
     *
     * Generated from protobuf field <code>string index_id = 3;</code>
     * @return string
     */
    public function getIndexId()
    {
        return $this->index_id;
    }

    /**
     * The index resource ID that this operation is acting on.
     *
     * Generated from protobuf field <code>string index_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setIndexId($var)
    {
        GPBUtil::checkString($var, True);
        $this->index_id = $var;

        return $this;
    }

}

