Retail V2 API - Class Google::Protobuf::Struct (v0.7.0)

Reference documentation and code samples for the Retail V2 API class Google::Protobuf::Struct.

Struct represents a structured data value, consisting of fieldswhich map to dynamically typed values. In some languages,Structmight be supported by a native representation. For example, inscripting languages like JS a struct is represented as anobject. The details of that representation are described togetherwith the proto support for the language.

The JSON representation forStruct is JSON object.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#fields

deffields()->::Google::Protobuf::Map{::String=>::Google::Protobuf::Value}
Returns
  • (::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}) — Unordered map of dynamically typed values.

#fields=

deffields=(value)->::Google::Protobuf::Map{::String=>::Google::Protobuf::Value}
Parameter
  • value (::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}) — Unordered map of dynamically typed values.
Returns
  • (::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}) — Unordered map of dynamically typed values.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.