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

namespace Google\Cloud\Bigtable\V2\Type;

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

/**
 * A structured data value, consisting of fields which map to dynamically
 * typed values.
 * Values of type `Struct` are stored in `Value.array_value` where entries are
 * in the same order and number as `field_types`.
 *
 * Generated from protobuf message <code>google.bigtable.v2.Type.Struct</code>
 */
class Struct extends \Google\Protobuf\Internal\Message
{
    /**
     * The names and types of the fields in this struct.
     *
     * Generated from protobuf field <code>repeated .google.bigtable.v2.Type.Struct.Field fields = 1;</code>
     */
    private $fields;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Bigtable\V2\Type\Struct\Field>|\Google\Protobuf\Internal\RepeatedField $fields
     *           The names and types of the fields in this struct.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\V2\Types::initOnce();
        parent::__construct($data);
    }

    /**
     * The names and types of the fields in this struct.
     *
     * Generated from protobuf field <code>repeated .google.bigtable.v2.Type.Struct.Field fields = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFields()
    {
        return $this->fields;
    }

    /**
     * The names and types of the fields in this struct.
     *
     * Generated from protobuf field <code>repeated .google.bigtable.v2.Type.Struct.Field fields = 1;</code>
     * @param array<\Google\Cloud\Bigtable\V2\Type\Struct\Field>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFields($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Type\Struct\Field::class);
        $this->fields = $arr;

        return $this;
    }

}

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

