blob: 0456541cbd2c9ce3f0eee7c1b7c9b4a59421b803 [file] [log] [blame]
avm9996399bb77c2020-01-27 03:15:08 +01001<?php
2# Generated by the protocol buffer compiler. DO NOT EDIT!
3# source: google/protobuf/struct.proto
4
5namespace Google\Protobuf;
6
7use Google\Protobuf\Internal\GPBType;
8use Google\Protobuf\Internal\RepeatedField;
9use Google\Protobuf\Internal\GPBUtil;
10
11/**
12 * `Struct` represents a structured data value, consisting of fields
13 * which map to dynamically typed values. In some languages, `Struct`
14 * might be supported by a native representation. For example, in
15 * scripting languages like JS a struct is represented as an
16 * object. The details of that representation are described together
17 * with the proto support for the language.
18 * The JSON representation for `Struct` is JSON object.
19 *
20 * Generated from protobuf message <code>google.protobuf.Struct</code>
21 */
22class Struct extends \Google\Protobuf\Internal\Message
23{
24 /**
25 * Unordered map of dynamically typed values.
26 *
27 * Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
28 */
29 private $fields;
30
31 /**
32 * Constructor.
33 *
34 * @param array $data {
35 * Optional. Data for populating the Message object.
36 *
37 * @type array|\Google\Protobuf\Internal\MapField $fields
38 * Unordered map of dynamically typed values.
39 * }
40 */
41 public function __construct($data = NULL) {
42 \GPBMetadata\Google\Protobuf\Struct::initOnce();
43 parent::__construct($data);
44 }
45
46 /**
47 * Unordered map of dynamically typed values.
48 *
49 * Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
50 * @return \Google\Protobuf\Internal\MapField
51 */
52 public function getFields()
53 {
54 return $this->fields;
55 }
56
57 /**
58 * Unordered map of dynamically typed values.
59 *
60 * Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
61 * @param array|\Google\Protobuf\Internal\MapField $var
62 * @return $this
63 */
64 public function setFields($var)
65 {
66 $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class);
67 $this->fields = $arr;
68
69 return $this;
70 }
71
72}
73