• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?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 * `ListValue` is a wrapper around a repeated field of values.
13 * The JSON representation for `ListValue` is JSON array.
14 *
15 * Generated from protobuf message <code>google.protobuf.ListValue</code>
16 */
17class ListValue extends \Google\Protobuf\Internal\Message
18{
19    /**
20     * Repeated field of dynamically typed values.
21     *
22     * Generated from protobuf field <code>repeated .google.protobuf.Value values = 1;</code>
23     */
24    private $values;
25
26    /**
27     * Constructor.
28     *
29     * @param array $data {
30     *     Optional. Data for populating the Message object.
31     *
32     *     @type \Google\Protobuf\Value[]|\Google\Protobuf\Internal\RepeatedField $values
33     *           Repeated field of dynamically typed values.
34     * }
35     */
36    public function __construct($data = NULL) {
37        \GPBMetadata\Google\Protobuf\Struct::initOnce();
38        parent::__construct($data);
39    }
40
41    /**
42     * Repeated field of dynamically typed values.
43     *
44     * Generated from protobuf field <code>repeated .google.protobuf.Value values = 1;</code>
45     * @return \Google\Protobuf\Internal\RepeatedField
46     */
47    public function getValues()
48    {
49        return $this->values;
50    }
51
52    /**
53     * Repeated field of dynamically typed values.
54     *
55     * Generated from protobuf field <code>repeated .google.protobuf.Value values = 1;</code>
56     * @param \Google\Protobuf\Value[]|\Google\Protobuf\Internal\RepeatedField $var
57     * @return $this
58     */
59    public function setValues($var)
60    {
61        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class);
62        $this->values = $arr;
63
64        return $this;
65    }
66
67}
68
69