function Struct::setFields
Unordered map of dynamically typed values.
Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
Parameters
array|\Google\Protobuf\Internal\MapField $var:
Return value
$this
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Struct.php, line 64
Class
- Struct
- `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as…
Namespace
Google\ProtobufCode
public function setFields($var) {
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class);
$this->fields = $arr;
return $this;
}