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

namespace Couchbase\Protostellar\Generated\Admin\Search\V1;

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

/**
 * Generated from protobuf message <code>couchbase.admin.search.v1.GetIndexResponse</code>
 */
class GetIndexResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.couchbase.admin.search.v1.Index index = 1;</code>
     */
    protected $index = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Couchbase\Protostellar\Generated\Admin\Search\V1\Index $index
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Couchbase\Admin\Search\V1\Search::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.couchbase.admin.search.v1.Index index = 1;</code>
     * @return \Couchbase\Protostellar\Generated\Admin\Search\V1\Index|null
     */
    public function getIndex()
    {
        return $this->index;
    }

    public function hasIndex()
    {
        return isset($this->index);
    }

    public function clearIndex()
    {
        unset($this->index);
    }

    /**
     * Generated from protobuf field <code>.couchbase.admin.search.v1.Index index = 1;</code>
     * @param \Couchbase\Protostellar\Generated\Admin\Search\V1\Index $var
     * @return $this
     */
    public function setIndex($var)
    {
        GPBUtil::checkMessage($var, \Couchbase\Protostellar\Generated\Admin\Search\V1\Index::class);
        $this->index = $var;

        return $this;
    }

}

