Class DateTime.Builder (3.59.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public DateTime build()
Returns
Type Description
DateTime

buildPartial()

public DateTime buildPartial()
Returns
Type Description
DateTime

clear()

public DateTime.Builder clear()
Returns
Type Description
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
Type Description
DateTime.Builder

clearDayOfWeek()

public DateTime.Builder clearDayOfWeek()

Day of week

.google.type.DayOfWeek day_of_week = 2;

Returns
Type Description
DateTime.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTime()

public DateTime.Builder clearTime()

Time of day

.google.type.TimeOfDay time = 3;

Returns
Type Description
DateTime.Builder

clearTimeZone()

public DateTime.Builder clearTimeZone()

Time zone

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

Returns
Type Description
DateTime.Builder

clone()

public DateTime.Builder clone()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
com.google.type.DateOrBuilder

getDayOfWeek()

public DayOfWeek getDayOfWeek()

Day of week

.google.type.DayOfWeek day_of_week = 2;

Returns
Type Description
com.google.type.DayOfWeek

The dayOfWeek.

getDayOfWeekValue()

public int getDayOfWeekValue()

Day of week

.google.type.DayOfWeek day_of_week = 2;

Returns
Type Description
int

The enum numeric value on the wire for dayOfWeek.

getDefaultInstanceForType()

public DateTime getDefaultInstanceForType()
Returns
Type Description
DateTime

getDescriptorForType()

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

getTime()

public TimeOfDay getTime()

Time of day

.google.type.TimeOfDay time = 3;

Returns
Type Description
com.google.type.TimeOfDay

The time.

getTimeBuilder()

public TimeOfDay.Builder getTimeBuilder()

Time of day

.google.type.TimeOfDay time = 3;

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

getTimeOrBuilder()

public TimeOfDayOrBuilder getTimeOrBuilder()

Time of day

.google.type.TimeOfDay time = 3;

Returns
Type Description
com.google.type.TimeOfDayOrBuilder

getTimeZone()

public DateTime.TimeZone getTimeZone()

Time zone

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

Returns
Type Description
DateTime.TimeZone

The timeZone.

getTimeZoneBuilder()

public DateTime.TimeZone.Builder getTimeZoneBuilder()

Time zone

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

Returns
Type Description
DateTime.TimeZone.Builder

getTimeZoneOrBuilder()

public DateTime.TimeZoneOrBuilder getTimeZoneOrBuilder()

Time zone

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

Returns
Type Description
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
Type Description
boolean

Whether the date field is set.

hasTime()

public boolean hasTime()

Time of day

.google.type.TimeOfDay time = 3;

Returns
Type Description
boolean

Whether the time field is set.

hasTimeZone()

public boolean hasTimeZone()

Time zone

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

Returns
Type Description
boolean

Whether the timeZone field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
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
Name Description
value com.google.type.Date
Returns
Type Description
DateTime.Builder

mergeFrom(DateTime other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeTime(TimeOfDay value)

public DateTime.Builder mergeTime(TimeOfDay value)

Time of day

.google.type.TimeOfDay time = 3;

Parameter
Name Description
value com.google.type.TimeOfDay
Returns
Type Description
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
Name Description
value DateTime.TimeZone
Returns
Type Description
DateTime.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DateTime.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value com.google.type.Date
Returns
Type Description
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
Name Description
builderForValue com.google.type.Date.Builder
Returns
Type Description
DateTime.Builder

setDayOfWeek(DayOfWeek value)

public DateTime.Builder setDayOfWeek(DayOfWeek value)

Day of week

.google.type.DayOfWeek day_of_week = 2;

Parameter
Name Description
value com.google.type.DayOfWeek

The dayOfWeek to set.

Returns
Type Description
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
Name Description
value int

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

Returns
Type Description
DateTime.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setTime(TimeOfDay value)

public DateTime.Builder setTime(TimeOfDay value)

Time of day

.google.type.TimeOfDay time = 3;

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

setTime(TimeOfDay.Builder builderForValue)

public DateTime.Builder setTime(TimeOfDay.Builder builderForValue)

Time of day

.google.type.TimeOfDay time = 3;

Parameter
Name Description
builderForValue com.google.type.TimeOfDay.Builder
Returns
Type Description
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
Name Description
value DateTime.TimeZone
Returns
Type Description
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
Name Description
builderForValue DateTime.TimeZone.Builder
Returns
Type Description
DateTime.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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