Class Value.Builder (0.29.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Value.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Value.Builder
Overrides

build()

public Value build()
Returns
TypeDescription
Value

buildPartial()

public Value buildPartial()
Returns
TypeDescription
Value

clear()

public Value.Builder clear()
Returns
TypeDescription
Value.Builder
Overrides

clearBooleanValue()

public Value.Builder clearBooleanValue()

Represents a boolean value.

bool boolean_value = 7;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearDatetimeValue()

public Value.Builder clearDatetimeValue()

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Returns
TypeDescription
Value.Builder

clearEnumValue()

public Value.Builder clearEnumValue()

Represents an enum value.

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

Returns
TypeDescription
Value.Builder

clearField(Descriptors.FieldDescriptor field)

public Value.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Value.Builder
Overrides

clearFloatValue()

public Value.Builder clearFloatValue()

Represents a float value.

float float_value = 1;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearIntValue()

public Value.Builder clearIntValue()

Represents a integer value.

int32 int_value = 2;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearKind()

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

clearOneof(Descriptors.OneofDescriptor oneof)

public Value.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Value.Builder
Overrides

clearStringValue()

public Value.Builder clearStringValue()

Represents a string value.

string string_value = 3;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearTimestampValue()

public Value.Builder clearTimestampValue()

Represents a timestamp value.

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

Returns
TypeDescription
Value.Builder

clone()

public Value.Builder clone()
Returns
TypeDescription
Value.Builder
Overrides

getBooleanValue()

public boolean getBooleanValue()

Represents a boolean value.

bool boolean_value = 7;

Returns
TypeDescription
boolean

The booleanValue.

getDatetimeValue()

public DateTime getDatetimeValue()

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Returns
TypeDescription
com.google.type.DateTime

The datetimeValue.

getDatetimeValueBuilder()

public DateTime.Builder getDatetimeValueBuilder()

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Returns
TypeDescription
com.google.type.DateTime.Builder

getDatetimeValueOrBuilder()

public DateTimeOrBuilder getDatetimeValueOrBuilder()

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Returns
TypeDescription
com.google.type.DateTimeOrBuilder

getDefaultInstanceForType()

public Value getDefaultInstanceForType()
Returns
TypeDescription
Value

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEnumValue()

public EnumValue getEnumValue()

Represents an enum value.

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

Returns
TypeDescription
EnumValue

The enumValue.

getEnumValueBuilder()

public EnumValue.Builder getEnumValueBuilder()

Represents an enum value.

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

Returns
TypeDescription
EnumValue.Builder

getEnumValueOrBuilder()

public EnumValueOrBuilder getEnumValueOrBuilder()

Represents an enum value.

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

Returns
TypeDescription
EnumValueOrBuilder

getFloatValue()

public float getFloatValue()

Represents a float value.

float float_value = 1;

Returns
TypeDescription
float

The floatValue.

getIntValue()

public int getIntValue()

Represents a integer value.

int32 int_value = 2;

Returns
TypeDescription
int

The intValue.

getKindCase()

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

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.

getTimestampValue()

public TimestampValue getTimestampValue()

Represents a timestamp value.

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

Returns
TypeDescription
TimestampValue

The timestampValue.

getTimestampValueBuilder()

public TimestampValue.Builder getTimestampValueBuilder()

Represents a timestamp value.

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

Returns
TypeDescription
TimestampValue.Builder

getTimestampValueOrBuilder()

public TimestampValueOrBuilder getTimestampValueOrBuilder()

Represents a timestamp value.

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

Returns
TypeDescription
TimestampValueOrBuilder

hasBooleanValue()

public boolean hasBooleanValue()

Represents a boolean value.

bool boolean_value = 7;

Returns
TypeDescription
boolean

Whether the booleanValue field is set.

hasDatetimeValue()

public boolean hasDatetimeValue()

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Returns
TypeDescription
boolean

Whether the datetimeValue field is set.

hasEnumValue()

public boolean hasEnumValue()

Represents an enum value.

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

Returns
TypeDescription
boolean

Whether the enumValue field is set.

hasFloatValue()

public boolean hasFloatValue()

Represents a float value.

float float_value = 1;

Returns
TypeDescription
boolean

Whether the floatValue field is set.

hasIntValue()

public boolean hasIntValue()

Represents a integer value.

int32 int_value = 2;

Returns
TypeDescription
boolean

Whether the intValue field is set.

hasStringValue()

public boolean hasStringValue()

Represents a string value.

string string_value = 3;

Returns
TypeDescription
boolean

Whether the stringValue field is set.

hasTimestampValue()

public boolean hasTimestampValue()

Represents a timestamp value.

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

Returns
TypeDescription
boolean

Whether the timestampValue field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeDatetimeValue(DateTime value)

public Value.Builder mergeDatetimeValue(DateTime value)

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Parameter
NameDescription
valuecom.google.type.DateTime
Returns
TypeDescription
Value.Builder

mergeEnumValue(EnumValue value)

public Value.Builder mergeEnumValue(EnumValue value)

Represents an enum value.

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

Parameter
NameDescription
valueEnumValue
Returns
TypeDescription
Value.Builder

mergeFrom(Value other)

public Value.Builder mergeFrom(Value other)
Parameter
NameDescription
otherValue
Returns
TypeDescription
Value.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Value.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Value.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Value.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueTimestampValue
Returns
TypeDescription
Value.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Value.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Value.Builder
Overrides

setBooleanValue(boolean value)

public Value.Builder setBooleanValue(boolean value)

Represents a boolean value.

bool boolean_value = 7;

Parameter
NameDescription
valueboolean

The booleanValue to set.

Returns
TypeDescription
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
NameDescription
valuecom.google.type.DateTime
Returns
TypeDescription
Value.Builder

setDatetimeValue(DateTime.Builder builderForValue)

public Value.Builder setDatetimeValue(DateTime.Builder builderForValue)

Represents a datetime value.

.google.type.DateTime datetime_value = 5;

Parameter
NameDescription
builderForValuecom.google.type.DateTime.Builder
Returns
TypeDescription
Value.Builder

setEnumValue(EnumValue value)

public Value.Builder setEnumValue(EnumValue value)

Represents an enum value.

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

Parameter
NameDescription
valueEnumValue
Returns
TypeDescription
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
NameDescription
builderForValueEnumValue.Builder
Returns
TypeDescription
Value.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Value.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Value.Builder
Overrides

setFloatValue(float value)

public Value.Builder setFloatValue(float value)

Represents a float value.

float float_value = 1;

Parameter
NameDescription
valuefloat

The floatValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setIntValue(int value)

public Value.Builder setIntValue(int value)

Represents a integer value.

int32 int_value = 2;

Parameter
NameDescription
valueint

The intValue to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Value.Builder
Overrides

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.

setTimestampValue(TimestampValue value)

public Value.Builder setTimestampValue(TimestampValue value)

Represents a timestamp value.

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

Parameter
NameDescription
valueTimestampValue
Returns
TypeDescription
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
NameDescription
builderForValueTimestampValue.Builder
Returns
TypeDescription
Value.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Value.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Value.Builder
Overrides