Class Struct.Builder (3.19.4)

  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

Implements

StructOrBuilder

Methods

clearFields()

  public 
  
 Struct 
 . 
 Builder 
  
 clearFields 
 () 
 
Returns
Type
Description

containsFields(String key)

  public 
  
 boolean 
  
 containsFields 
 ( 
 String 
  
 key 
 ) 
 

Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameter
Name
Description
key
Returns
Type
Description

getFields()

  public 
  
 Map<String 
 , 
 Value 
>  
 getFields 
 () 
 

Use #getFieldsMap() instead.

Returns
Type
Description
Map < String , Value >

getFieldsCount()

  public 
  
 int 
  
 getFieldsCount 
 () 
 

Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Returns
Type
Description
int

getFieldsMap()

  public 
  
 Map<String 
 , 
 Value 
>  
 getFieldsMap 
 () 
 

Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Returns
Type
Description
Map < String , Value >

getFieldsOrDefault(String key, Value defaultValue)

  public 
  
 Value 
  
 getFieldsOrDefault 
 ( 
 String 
  
 key 
 , 
  
 Value 
  
 defaultValue 
 ) 
 

Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameters
Name
Description
key
defaultValue
Returns
Type
Description

getFieldsOrThrow(String key)

  public 
  
 Value 
  
 getFieldsOrThrow 
 ( 
 String 
  
 key 
 ) 
 

Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameter
Name
Description
key
Returns
Type
Description

putAllFields(Map<String,Value> values)

  public 
  
 Struct 
 . 
 Builder 
  
 putAllFields 
 ( 
 Map<String 
 , 
 Value 
>  
 values 
 ) 
 

Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameter
Name
Description
values
Map < String , Value >
Returns
Type
Description

putFields(String key, Value value)

  public 
  
 Struct 
 . 
 Builder 
  
 putFields 
 ( 
 String 
  
 key 
 , 
  
 Value 
  
 value 
 ) 
 

Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameters
Name
Description
key
value
Returns
Type
Description

removeFields(String key)

  public 
  
 Struct 
 . 
 Builder 
  
 removeFields 
 ( 
 String 
  
 key 
 ) 
 

Unordered map of dynamically typed values.

map<string, .google.protobuf.Value> fields = 1;

Parameter
Name
Description
key
Returns
Type
Description
Design a Mobile Site
View Site in Mobile | Classic
Share by: