blob: 501015061d32e0512928101308d51b50c7ce71fa [file] [log] [blame]
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: google/protobuf/struct.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;
/**
* Represents an unordered key-value map, intending to perfectly
* capture the semantics of a JSON object. This enables parsing any arbitrary
* JSON payload as a message field in ProtoJSON format.
* This type cannot represent large Int64 values or `NaN`/`Infinity` numbers,
* since JSON format generally does not support them in its number type.
* If you do not intend to parse arbitrary JSON into your message, a custom
* typed message should be preferred instead.
*
* Generated from protobuf message <code>google.protobuf.Struct</code>
*/
class Struct extends \Google\Protobuf\Internal\Message
{
/**
* Unordered map of dynamically typed values.
*
* Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
*/
private $fields;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array|\Google\Protobuf\Internal\MapField $fields
* Unordered map of dynamically typed values.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Struct::initOnce();
parent::__construct($data);
}
/**
* Unordered map of dynamically typed values.
*
* Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getFields()
{
return $this->fields;
}
/**
* Unordered map of dynamically typed values.
*
* Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setFields(array|\Google\Protobuf\Internal\MapField $var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class);
$this->fields = $arr;
return $this;
}
}