Class Struct.Builder

  • All Implemented Interfaces:
    MessageLite.Builder, MessageLiteOrBuilder, StructOrBuilder, java.lang.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 Detail

      • Builder

        private Builder()
    • Method Detail

      • 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​(java.lang.String key)
         Unordered map of dynamically typed values.
         
        map<string, .google.protobuf.Value> fields = 1;
        Specified by:
        containsFields in interface StructOrBuilder
      • removeFields

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

        public java.util.Map<java.lang.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​(java.lang.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​(java.lang.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​(java.lang.String key,
                                        Value value)
         Unordered map of dynamically typed values.
         
        map<string, .google.protobuf.Value> fields = 1;
      • putAllFields

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