Class Value.Builder (0.42.0)

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

Value represents a dynamically typed value which can be either be a float, a integer, a string, or a datetime value. A producer of value is expected to set one of these variants. Absence of any variant indicates an error.

Protobuf type google.cloud.contentwarehouse.v1.Value

Implements

ValueOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Value.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Value.Builder
Overrides

build()

public Value build()
Returns
Type Description
Value

buildPartial()

public Value buildPartial()
Returns
Type Description
Value

clear()

public Value.Builder clear()
Returns
Type Description
Value.Builder
Overrides

clearBooleanValue()

public Value.Builder clearBooleanValue()

Represents a boolean value.

bool boolean_value = 7;

Returns
Type Description
Value.Builder

This builder for chaining.

clearDatetimeValue()

public Value.Builder clearDatetimeValue()

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Returns
Type Description
Value.Builder

clearEnumValue()

public Value.Builder clearEnumValue()

Represents an enum value.

.google.cloud.contentwarehouse.v1.EnumValue enum_value = 4;

Returns
Type Description
Value.Builder

clearField(Descriptors.FieldDescriptor field)

public Value.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Value.Builder
Overrides

clearFloatValue()

public Value.Builder clearFloatValue()

Represents a float value.

float float_value = 1;

Returns
Type Description
Value.Builder

This builder for chaining.

clearIntValue()

public Value.Builder clearIntValue()

Represents a integer value.

int32 int_value = 2;

Returns
Type Description
Value.Builder

This builder for chaining.

clearKind()

public Value.Builder clearKind()
Returns
Type Description
Value.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Value.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Value.Builder
Overrides

clearStringValue()

public Value.Builder clearStringValue()

Represents a string value.

string string_value = 3;

Returns
Type Description
Value.Builder

This builder for chaining.

clearTimestampValue()

public Value.Builder clearTimestampValue()

Represents a timestamp value.

.google.cloud.contentwarehouse.v1.TimestampValue timestamp_value = 6;

Returns
Type Description
Value.Builder

clone()

public Value.Builder clone()
Returns
Type Description
Value.Builder
Overrides

getBooleanValue()

public boolean getBooleanValue()

Represents a boolean value.

bool boolean_value = 7;

Returns
Type Description
boolean

The booleanValue.

getDatetimeValue()

public DateTime getDatetimeValue()

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Returns
Type Description
com.google.type.DateTime

The datetimeValue.

getDatetimeValueBuilder()

public DateTime.Builder getDatetimeValueBuilder()

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Returns
Type Description
com.google.type.DateTime.Builder

getDatetimeValueOrBuilder()

public DateTimeOrBuilder getDatetimeValueOrBuilder()

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Returns
Type Description
com.google.type.DateTimeOrBuilder

getDefaultInstanceForType()

public Value getDefaultInstanceForType()
Returns
Type Description
Value

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEnumValue()

public EnumValue getEnumValue()

Represents an enum value.

.google.cloud.contentwarehouse.v1.EnumValue enum_value = 4;

Returns
Type Description
EnumValue

The enumValue.

getEnumValueBuilder()

public EnumValue.Builder getEnumValueBuilder()

Represents an enum value.

.google.cloud.contentwarehouse.v1.EnumValue enum_value = 4;

Returns
Type Description
EnumValue.Builder

getEnumValueOrBuilder()

public EnumValueOrBuilder getEnumValueOrBuilder()

Represents an enum value.

.google.cloud.contentwarehouse.v1.EnumValue enum_value = 4;

Returns
Type Description
EnumValueOrBuilder

getFloatValue()

public float getFloatValue()

Represents a float value.

float float_value = 1;

Returns
Type Description
float

The floatValue.

getIntValue()

public int getIntValue()

Represents a integer value.

int32 int_value = 2;

Returns
Type Description
int

The intValue.

getKindCase()

public Value.KindCase getKindCase()
Returns
Type Description
Value.KindCase

getStringValue()

public String getStringValue()

Represents a string value.

string string_value = 3;

Returns
Type Description
String

The stringValue.

getStringValueBytes()

public ByteString getStringValueBytes()

Represents a string value.

string string_value = 3;

Returns
Type Description
ByteString

The bytes for stringValue.

getTimestampValue()

public TimestampValue getTimestampValue()

Represents a timestamp value.

.google.cloud.contentwarehouse.v1.TimestampValue timestamp_value = 6;

Returns
Type Description
TimestampValue

The timestampValue.

getTimestampValueBuilder()

public TimestampValue.Builder getTimestampValueBuilder()

Represents a timestamp value.

.google.cloud.contentwarehouse.v1.TimestampValue timestamp_value = 6;

Returns
Type Description
TimestampValue.Builder

getTimestampValueOrBuilder()

public TimestampValueOrBuilder getTimestampValueOrBuilder()

Represents a timestamp value.

.google.cloud.contentwarehouse.v1.TimestampValue timestamp_value = 6;

Returns
Type Description
TimestampValueOrBuilder

hasBooleanValue()

public boolean hasBooleanValue()

Represents a boolean value.

bool boolean_value = 7;

Returns
Type Description
boolean

Whether the booleanValue field is set.

hasDatetimeValue()

public boolean hasDatetimeValue()

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Returns
Type Description
boolean

Whether the datetimeValue field is set.

hasEnumValue()

public boolean hasEnumValue()

Represents an enum value.

.google.cloud.contentwarehouse.v1.EnumValue enum_value = 4;

Returns
Type Description
boolean

Whether the enumValue field is set.

hasFloatValue()

public boolean hasFloatValue()

Represents a float value.

float float_value = 1;

Returns
Type Description
boolean

Whether the floatValue field is set.

hasIntValue()

public boolean hasIntValue()

Represents a integer value.

int32 int_value = 2;

Returns
Type Description
boolean

Whether the intValue field is set.

hasStringValue()

public boolean hasStringValue()

Represents a string value.

string string_value = 3;

Returns
Type Description
boolean

Whether the stringValue field is set.

hasTimestampValue()

public boolean hasTimestampValue()

Represents a timestamp value.

.google.cloud.contentwarehouse.v1.TimestampValue timestamp_value = 6;

Returns
Type Description
boolean

Whether the timestampValue field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDatetimeValue(DateTime value)

public Value.Builder mergeDatetimeValue(DateTime value)

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Parameter
Name Description
value com.google.type.DateTime
Returns
Type Description
Value.Builder

mergeEnumValue(EnumValue value)

public Value.Builder mergeEnumValue(EnumValue value)

Represents an enum value.

.google.cloud.contentwarehouse.v1.EnumValue enum_value = 4;

Parameter
Name Description
value EnumValue
Returns
Type Description
Value.Builder

mergeFrom(Value other)

public Value.Builder mergeFrom(Value other)
Parameter
Name Description
other Value
Returns
Type Description
Value.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Value.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Value.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Value.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Value.Builder
Overrides

mergeTimestampValue(TimestampValue value)

public Value.Builder mergeTimestampValue(TimestampValue value)

Represents a timestamp value.

.google.cloud.contentwarehouse.v1.TimestampValue timestamp_value = 6;

Parameter
Name Description
value TimestampValue
Returns
Type Description
Value.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Value.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Value.Builder
Overrides

setBooleanValue(boolean value)

public Value.Builder setBooleanValue(boolean value)

Represents a boolean value.

bool boolean_value = 7;

Parameter
Name Description
value boolean

The booleanValue to set.

Returns
Type Description
Value.Builder

This builder for chaining.

setDatetimeValue(DateTime value)

public Value.Builder setDatetimeValue(DateTime value)

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Parameter
Name Description
value com.google.type.DateTime
Returns
Type Description
Value.Builder

setDatetimeValue(DateTime.Builder builderForValue)

public Value.Builder setDatetimeValue(DateTime.Builder builderForValue)

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Parameter
Name Description
builderForValue com.google.type.DateTime.Builder
Returns
Type Description
Value.Builder

setEnumValue(EnumValue value)

public Value.Builder setEnumValue(EnumValue value)

Represents an enum value.

.google.cloud.contentwarehouse.v1.EnumValue enum_value = 4;

Parameter
Name Description
value EnumValue
Returns
Type Description
Value.Builder

setEnumValue(EnumValue.Builder builderForValue)

public Value.Builder setEnumValue(EnumValue.Builder builderForValue)

Represents an enum value.

.google.cloud.contentwarehouse.v1.EnumValue enum_value = 4;

Parameter
Name Description
builderForValue EnumValue.Builder
Returns
Type Description
Value.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Value.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Value.Builder
Overrides

setFloatValue(float value)

public Value.Builder setFloatValue(float value)

Represents a float value.

float float_value = 1;

Parameter
Name Description
value float

The floatValue to set.

Returns
Type Description
Value.Builder

This builder for chaining.

setIntValue(int value)

public Value.Builder setIntValue(int value)

Represents a integer value.

int32 int_value = 2;

Parameter
Name Description
value int

The intValue to set.

Returns
Type Description
Value.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Value.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Value.Builder
Overrides

setStringValue(String value)

public Value.Builder setStringValue(String value)

Represents a string value.

string string_value = 3;

Parameter
Name Description
value String

The stringValue to set.

Returns
Type Description
Value.Builder

This builder for chaining.

setStringValueBytes(ByteString value)

public Value.Builder setStringValueBytes(ByteString value)

Represents a string value.

string string_value = 3;

Parameter
Name Description
value ByteString

The bytes for stringValue to set.

Returns
Type Description
Value.Builder

This builder for chaining.

setTimestampValue(TimestampValue value)

public Value.Builder setTimestampValue(TimestampValue value)

Represents a timestamp value.

.google.cloud.contentwarehouse.v1.TimestampValue timestamp_value = 6;

Parameter
Name Description
value TimestampValue
Returns
Type Description
Value.Builder

setTimestampValue(TimestampValue.Builder builderForValue)

public Value.Builder setTimestampValue(TimestampValue.Builder builderForValue)

Represents a timestamp value.

.google.cloud.contentwarehouse.v1.TimestampValue timestamp_value = 6;

Parameter
Name Description
builderForValue TimestampValue.Builder
Returns
Type Description
Value.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Value.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Value.Builder
Overrides