Class Value.Builder (3.19.4)

public static final class Value.Builder extends GeneratedMessageLite.Builder<Value,Value.Builder> implements ValueOrBuilder

Value represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for Value is JSON value.

Protobuf type google.protobuf.Value

Implements

ValueOrBuilder

Methods

clearBoolValue()

public Value.Builder clearBoolValue()

Represents a boolean value.

bool bool_value = 4;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearKind()

public Value.Builder clearKind()
Returns
TypeDescription
Value.Builder

clearListValue()

public Value.Builder clearListValue()

Represents a repeated Value.

.google.protobuf.ListValue list_value = 6;

Returns
TypeDescription
Value.Builder

clearNullValue()

public Value.Builder clearNullValue()

Represents a null value.

.google.protobuf.NullValue null_value = 1;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearNumberValue()

public Value.Builder clearNumberValue()

Represents a double value.

double number_value = 2;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearStringValue()

public Value.Builder clearStringValue()

Represents a string value.

string string_value = 3;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearStructValue()

public Value.Builder clearStructValue()

Represents a structured value.

.google.protobuf.Struct struct_value = 5;

Returns
TypeDescription
Value.Builder

getBoolValue()

public boolean getBoolValue()

Represents a boolean value.

bool bool_value = 4;

Returns
TypeDescription
boolean

The boolValue.

getKindCase()

public Value.KindCase getKindCase()
Returns
TypeDescription
Value.KindCase

getListValue()

public ListValue getListValue()

Represents a repeated Value.

.google.protobuf.ListValue list_value = 6;

Returns
TypeDescription
ListValue

getNullValue()

public NullValue getNullValue()

Represents a null value.

.google.protobuf.NullValue null_value = 1;

Returns
TypeDescription
NullValue

The nullValue.

getNullValueValue()

public int getNullValueValue()

Represents a null value.

.google.protobuf.NullValue null_value = 1;

Returns
TypeDescription
int

The enum numeric value on the wire for nullValue.

getNumberValue()

public double getNumberValue()

Represents a double value.

double number_value = 2;

Returns
TypeDescription
double

The numberValue.

getStringValue()

public String getStringValue()

Represents a string value.

string string_value = 3;

Returns
TypeDescription
String

The stringValue.

getStringValueBytes()

public ByteString getStringValueBytes()

Represents a string value.

string string_value = 3;

Returns
TypeDescription
ByteString

The bytes for stringValue.

getStructValue()

public Struct getStructValue()

Represents a structured value.

.google.protobuf.Struct struct_value = 5;

Returns
TypeDescription
Struct

hasBoolValue()

public boolean hasBoolValue()

Represents a boolean value.

bool bool_value = 4;

Returns
TypeDescription
boolean

Whether the boolValue field is set.

hasListValue()

public boolean hasListValue()

Represents a repeated Value.

.google.protobuf.ListValue list_value = 6;

Returns
TypeDescription
boolean

hasNullValue()

public boolean hasNullValue()

Represents a null value.

.google.protobuf.NullValue null_value = 1;

Returns
TypeDescription
boolean

Whether the nullValue field is set.

hasNumberValue()

public boolean hasNumberValue()

Represents a double value.

double number_value = 2;

Returns
TypeDescription
boolean

Whether the numberValue field is set.

hasStringValue()

public boolean hasStringValue()

Represents a string value.

string string_value = 3;

Returns
TypeDescription
boolean

Whether the stringValue field is set.

hasStructValue()

public boolean hasStructValue()

Represents a structured value.

.google.protobuf.Struct struct_value = 5;

Returns
TypeDescription
boolean

mergeListValue(ListValue value)

public Value.Builder mergeListValue(ListValue value)

Represents a repeated Value.

.google.protobuf.ListValue list_value = 6;

Parameter
NameDescription
valueListValue
Returns
TypeDescription
Value.Builder

mergeStructValue(Struct value)

public Value.Builder mergeStructValue(Struct value)

Represents a structured value.

.google.protobuf.Struct struct_value = 5;

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Value.Builder

setBoolValue(boolean value)

public Value.Builder setBoolValue(boolean value)

Represents a boolean value.

bool bool_value = 4;

Parameter
NameDescription
valueboolean

The boolValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setListValue(ListValue value)

public Value.Builder setListValue(ListValue value)

Represents a repeated Value.

.google.protobuf.ListValue list_value = 6;

Parameter
NameDescription
valueListValue
Returns
TypeDescription
Value.Builder

setListValue(ListValue.Builder builderForValue)

public Value.Builder setListValue(ListValue.Builder builderForValue)

Represents a repeated Value.

.google.protobuf.ListValue list_value = 6;

Parameter
NameDescription
builderForValueListValue.Builder
Returns
TypeDescription
Value.Builder

setNullValue(NullValue value)

public Value.Builder setNullValue(NullValue value)

Represents a null value.

.google.protobuf.NullValue null_value = 1;

Parameter
NameDescription
valueNullValue

The nullValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setNullValueValue(int value)

public Value.Builder setNullValueValue(int value)

Represents a null value.

.google.protobuf.NullValue null_value = 1;

Parameter
NameDescription
valueint

The enum numeric value on the wire for nullValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setNumberValue(double value)

public Value.Builder setNumberValue(double value)

Represents a double value.

double number_value = 2;

Parameter
NameDescription
valuedouble

The numberValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setStringValue(String value)

public Value.Builder setStringValue(String value)

Represents a string value.

string string_value = 3;

Parameter
NameDescription
valueString

The stringValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setStringValueBytes(ByteString value)

public Value.Builder setStringValueBytes(ByteString value)

Represents a string value.

string string_value = 3;

Parameter
NameDescription
valueByteString

The bytes for stringValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setStructValue(Struct value)

public Value.Builder setStructValue(Struct value)

Represents a structured value.

.google.protobuf.Struct struct_value = 5;

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Value.Builder

setStructValue(Struct.Builder builderForValue)

public Value.Builder setStructValue(Struct.Builder builderForValue)

Represents a structured value.

.google.protobuf.Struct struct_value = 5;

Parameter
NameDescription
builderForValueStruct.Builder
Returns
TypeDescription
Value.Builder