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

namespace Google\Cloud\Bigtable\Admin\V2\Type;

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

/**
 * An ordered list of elements of a given type.
 * Values of type `Array` are stored in `Value.array_value`.
 *
 * Generated from protobuf message <code>google.bigtable.admin.v2.Type.Array</code>
 */
class PBArray extends \Google\Protobuf\Internal\Message
{
    /**
     * The type of the elements in the array. This must not be `Array`.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.Type element_type = 1;</code>
     */
    protected $element_type = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Bigtable\Admin\V2\Type $element_type
     *           The type of the elements in the array. This must not be `Array`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce();
        parent::__construct($data);
    }

    /**
     * The type of the elements in the array. This must not be `Array`.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.Type element_type = 1;</code>
     * @return \Google\Cloud\Bigtable\Admin\V2\Type|null
     */
    public function getElementType()
    {
        return $this->element_type;
    }

    public function hasElementType()
    {
        return isset($this->element_type);
    }

    public function clearElementType()
    {
        unset($this->element_type);
    }

    /**
     * The type of the elements in the array. This must not be `Array`.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.Type element_type = 1;</code>
     * @param \Google\Cloud\Bigtable\Admin\V2\Type $var
     * @return $this
     */
    public function setElementType($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class);
        $this->element_type = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PBArray::class, \Google\Cloud\Bigtable\Admin\V2\Type_Array::class);

