Class Struct.Builder

All Implemented Interfaces:
MessageLite.Builder, MessageLiteOrBuilder, StructOrBuilder, Cloneable
Enclosing class:
Struct

public static final class Struct.Builder extends GeneratedMessageLite.Builder<Struct,Struct.Builder> implements StructOrBuilder
 `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 an
 object. The details of that representation are described together
 with the proto support for the language.

 The JSON representation for `Struct` is JSON object.
 
Protobuf type google.protobuf.Struct
  • Constructor Details

    • Builder

      private Builder()
  • Method Details

    • getFieldsCount

      public int getFieldsCount()
      Description copied from interface: StructOrBuilder
       Unordered map of dynamically typed values.
       
      map<string, .google.protobuf.Value> fields = 1;
      Specified by:
      getFieldsCount in interface StructOrBuilder
    • containsFields

      public boolean containsFields(String key)
       Unordered map of dynamically typed values.
       
      map<string, .google.protobuf.Value> fields = 1;
      Specified by:
      containsFields in interface StructOrBuilder
    • clearFields

      public Struct.Builder clearFields()
    • removeFields

      public Struct.Builder removeFields(String key)
       Unordered map of dynamically typed values.
       
      map<string, .google.protobuf.Value> fields = 1;
    • getFields

      @Deprecated public Map<String,Value> getFields()
      Deprecated.
      Use getFieldsMap() instead.
      Specified by:
      getFields in interface StructOrBuilder
    • getFieldsMap

      public Map<String,Value> getFieldsMap()
       Unordered map of dynamically typed values.
       
      map<string, .google.protobuf.Value> fields = 1;
      Specified by:
      getFieldsMap in interface StructOrBuilder
    • getFieldsOrDefault

      public Value getFieldsOrDefault(String key, Value defaultValue)
       Unordered map of dynamically typed values.
       
      map<string, .google.protobuf.Value> fields = 1;
      Specified by:
      getFieldsOrDefault in interface StructOrBuilder
    • getFieldsOrThrow

      public Value getFieldsOrThrow(String key)
       Unordered map of dynamically typed values.
       
      map<string, .google.protobuf.Value> fields = 1;
      Specified by:
      getFieldsOrThrow in interface StructOrBuilder
    • putFields

      public Struct.Builder putFields(String key, Value value)
       Unordered map of dynamically typed values.
       
      map<string, .google.protobuf.Value> fields = 1;
    • putAllFields

      public Struct.Builder putAllFields(Map<String,Value> values)
       Unordered map of dynamically typed values.
       
      map<string, .google.protobuf.Value> fields = 1;