Class CivilDateTime.Builder (0.2.0)

public static final class CivilDateTime.Builder extends GeneratedMessage.Builder<CivilDateTime.Builder> implements CivilDateTimeOrBuilder

Civil time representation similar to google.type.DateTime, but ensures that neither the timezone nor the UTC offset can be set to avoid confusion between civil and physical time queries.

Protobuf type google.devicesandservices.health.v4.CivilDateTime

Static Methods

getDescriptor()

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

Methods

build()

public CivilDateTime build()
Returns
Type Description
CivilDateTime

buildPartial()

public CivilDateTime buildPartial()
Returns
Type Description
CivilDateTime

clear()

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

clearDate()

public CivilDateTime.Builder clearDate()

Required. Calendar date.

.google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CivilDateTime.Builder

clearTime()

public CivilDateTime.Builder clearTime()

Optional. Time of day. Defaults to the start of the day, at midnight if omitted.

.google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CivilDateTime.Builder

getDate()

public Date getDate()

Required. Calendar date.

.google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.Date

The date.

getDateBuilder()

public Date.Builder getDateBuilder()

Required. Calendar date.

.google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED];

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

getDateOrBuilder()

public DateOrBuilder getDateOrBuilder()

Required. Calendar date.

.google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.DateOrBuilder

getDefaultInstanceForType()

public CivilDateTime getDefaultInstanceForType()
Returns
Type Description
CivilDateTime

getDescriptorForType()

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

getTime()

public TimeOfDay getTime()

Optional. Time of day. Defaults to the start of the day, at midnight if omitted.

.google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.type.TimeOfDay

The time.

getTimeBuilder()

public TimeOfDay.Builder getTimeBuilder()

Optional. Time of day. Defaults to the start of the day, at midnight if omitted.

.google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL];

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

getTimeOrBuilder()

public TimeOfDayOrBuilder getTimeOrBuilder()

Optional. Time of day. Defaults to the start of the day, at midnight if omitted.

.google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
com.google.type.TimeOfDayOrBuilder

hasDate()

public boolean hasDate()

Required. Calendar date.

.google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the date field is set.

hasTime()

public boolean hasTime()

Optional. Time of day. Defaults to the start of the day, at midnight if omitted.

.google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the time field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDate(Date value)

public CivilDateTime.Builder mergeDate(Date value)

Required. Calendar date.

.google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.Date
Returns
Type Description
CivilDateTime.Builder

mergeFrom(CivilDateTime other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeTime(TimeOfDay value)

public CivilDateTime.Builder mergeTime(TimeOfDay value)

Optional. Time of day. Defaults to the start of the day, at midnight if omitted.

.google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL];

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

setDate(Date value)

public CivilDateTime.Builder setDate(Date value)

Required. Calendar date.

.google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.Date
Returns
Type Description
CivilDateTime.Builder

setDate(Date.Builder builderForValue)

public CivilDateTime.Builder setDate(Date.Builder builderForValue)

Required. Calendar date.

.google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue com.google.type.Date.Builder
Returns
Type Description
CivilDateTime.Builder

setTime(TimeOfDay value)

public CivilDateTime.Builder setTime(TimeOfDay value)

Optional. Time of day. Defaults to the start of the day, at midnight if omitted.

.google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL];

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

setTime(TimeOfDay.Builder builderForValue)

public CivilDateTime.Builder setTime(TimeOfDay.Builder builderForValue)

Optional. Time of day. Defaults to the start of the day, at midnight if omitted.

.google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue com.google.type.TimeOfDay.Builder
Returns
Type Description
CivilDateTime.Builder