Class DateTime.Builder (3.5.0)

public static final class DateTime.Builder extends GeneratedMessageV3.Builder<DateTime.Builder> implements DateTimeOrBuilder

Message for a date time object. e.g. 2018-01-01, 5th August.

Protobuf type google.privacy.dlp.v2.DateTime

Implements

DateTimeOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public DateTime build()
Returns
TypeDescription
DateTime

buildPartial()

public DateTime buildPartial()
Returns
TypeDescription
DateTime

clear()

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

clearDate()

public DateTime.Builder clearDate()

One or more of the following must be set. Must be a valid date or time value.

.google.type.Date date = 1;

Returns
TypeDescription
DateTime.Builder

clearDayOfWeek()

public DateTime.Builder clearDayOfWeek()

Day of week

.google.type.DayOfWeek day_of_week = 2;

Returns
TypeDescription
DateTime.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTime()

public DateTime.Builder clearTime()

Time of day

.google.type.TimeOfDay time = 3;

Returns
TypeDescription
DateTime.Builder

clearTimeZone()

public DateTime.Builder clearTimeZone()

Time zone

.google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4;

Returns
TypeDescription
DateTime.Builder

clone()

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

getDate()

public Date getDate()

One or more of the following must be set. Must be a valid date or time value.

.google.type.Date date = 1;

Returns
TypeDescription
com.google.type.Date

The date.

getDateBuilder()

public Date.Builder getDateBuilder()

One or more of the following must be set. Must be a valid date or time value.

.google.type.Date date = 1;

Returns
TypeDescription
com.google.type.Date.Builder

getDateOrBuilder()

public DateOrBuilder getDateOrBuilder()

One or more of the following must be set. Must be a valid date or time value.

.google.type.Date date = 1;

Returns
TypeDescription
com.google.type.DateOrBuilder

getDayOfWeek()

public DayOfWeek getDayOfWeek()

Day of week

.google.type.DayOfWeek day_of_week = 2;

Returns
TypeDescription
com.google.type.DayOfWeek

The dayOfWeek.

getDayOfWeekValue()

public int getDayOfWeekValue()

Day of week

.google.type.DayOfWeek day_of_week = 2;

Returns
TypeDescription
int

The enum numeric value on the wire for dayOfWeek.

getDefaultInstanceForType()

public DateTime getDefaultInstanceForType()
Returns
TypeDescription
DateTime

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getTime()

public TimeOfDay getTime()

Time of day

.google.type.TimeOfDay time = 3;

Returns
TypeDescription
com.google.type.TimeOfDay

The time.

getTimeBuilder()

public TimeOfDay.Builder getTimeBuilder()

Time of day

.google.type.TimeOfDay time = 3;

Returns
TypeDescription
com.google.type.TimeOfDay.Builder

getTimeOrBuilder()

public TimeOfDayOrBuilder getTimeOrBuilder()

Time of day

.google.type.TimeOfDay time = 3;

Returns
TypeDescription
com.google.type.TimeOfDayOrBuilder

getTimeZone()

public DateTime.TimeZone getTimeZone()

Time zone

.google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4;

Returns
TypeDescription
DateTime.TimeZone

The timeZone.

getTimeZoneBuilder()

public DateTime.TimeZone.Builder getTimeZoneBuilder()

Time zone

.google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4;

Returns
TypeDescription
DateTime.TimeZone.Builder

getTimeZoneOrBuilder()

public DateTime.TimeZoneOrBuilder getTimeZoneOrBuilder()

Time zone

.google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4;

Returns
TypeDescription
DateTime.TimeZoneOrBuilder

hasDate()

public boolean hasDate()

One or more of the following must be set. Must be a valid date or time value.

.google.type.Date date = 1;

Returns
TypeDescription
boolean

Whether the date field is set.

hasTime()

public boolean hasTime()

Time of day

.google.type.TimeOfDay time = 3;

Returns
TypeDescription
boolean

Whether the time field is set.

hasTimeZone()

public boolean hasTimeZone()

Time zone

.google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4;

Returns
TypeDescription
boolean

Whether the timeZone field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeDate(Date value)

public DateTime.Builder mergeDate(Date value)

One or more of the following must be set. Must be a valid date or time value.

.google.type.Date date = 1;

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

mergeFrom(DateTime other)

public DateTime.Builder mergeFrom(DateTime other)
Parameter
NameDescription
otherDateTime
Returns
TypeDescription
DateTime.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public DateTime.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
DateTime.Builder
Overrides

mergeTime(TimeOfDay value)

public DateTime.Builder mergeTime(TimeOfDay value)

Time of day

.google.type.TimeOfDay time = 3;

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

mergeTimeZone(DateTime.TimeZone value)

public DateTime.Builder mergeTimeZone(DateTime.TimeZone value)

Time zone

.google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4;

Parameter
NameDescription
valueDateTime.TimeZone
Returns
TypeDescription
DateTime.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDate(Date value)

public DateTime.Builder setDate(Date value)

One or more of the following must be set. Must be a valid date or time value.

.google.type.Date date = 1;

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

setDate(Date.Builder builderForValue)

public DateTime.Builder setDate(Date.Builder builderForValue)

One or more of the following must be set. Must be a valid date or time value.

.google.type.Date date = 1;

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

setDayOfWeek(DayOfWeek value)

public DateTime.Builder setDayOfWeek(DayOfWeek value)

Day of week

.google.type.DayOfWeek day_of_week = 2;

Parameter
NameDescription
valuecom.google.type.DayOfWeek

The dayOfWeek to set.

Returns
TypeDescription
DateTime.Builder

This builder for chaining.

setDayOfWeekValue(int value)

public DateTime.Builder setDayOfWeekValue(int value)

Day of week

.google.type.DayOfWeek day_of_week = 2;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
DateTime.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public DateTime.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DateTime.Builder
Overrides

setTime(TimeOfDay value)

public DateTime.Builder setTime(TimeOfDay value)

Time of day

.google.type.TimeOfDay time = 3;

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

setTime(TimeOfDay.Builder builderForValue)

public DateTime.Builder setTime(TimeOfDay.Builder builderForValue)

Time of day

.google.type.TimeOfDay time = 3;

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

setTimeZone(DateTime.TimeZone value)

public DateTime.Builder setTimeZone(DateTime.TimeZone value)

Time zone

.google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4;

Parameter
NameDescription
valueDateTime.TimeZone
Returns
TypeDescription
DateTime.Builder

setTimeZone(DateTime.TimeZone.Builder builderForValue)

public DateTime.Builder setTimeZone(DateTime.TimeZone.Builder builderForValue)

Time zone

.google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4;

Parameter
NameDescription
builderForValueDateTime.TimeZone.Builder
Returns
TypeDescription
DateTime.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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