Class Sleep.SleepStage.Builder (0.2.0)

public static final class Sleep.SleepStage.Builder extends GeneratedMessage.Builder<Sleep.SleepStage.Builder> implements Sleep.SleepStageOrBuilder

Sleep stage segment.

Protobuf type google.devicesandservices.health.v4.Sleep.SleepStage

Static Methods

getDescriptor()

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

Methods

build()

public Sleep.SleepStage build()
Returns
Type Description
Sleep.SleepStage

buildPartial()

public Sleep.SleepStage buildPartial()
Returns
Type Description
Sleep.SleepStage

clear()

public Sleep.SleepStage.Builder clear()
Returns
Type Description
Sleep.SleepStage.Builder
Overrides

clearCreateTime()

public Sleep.SleepStage.Builder clearCreateTime()

Output only. Creation time of this sleep stages segment.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sleep.SleepStage.Builder

clearEndTime()

public Sleep.SleepStage.Builder clearEndTime()

Required. Sleep stage end time.

.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Sleep.SleepStage.Builder

clearEndUtcOffset()

public Sleep.SleepStage.Builder clearEndUtcOffset()

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Sleep.SleepStage.Builder

clearStartTime()

public Sleep.SleepStage.Builder clearStartTime()

Required. Sleep stage start time.

.google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Sleep.SleepStage.Builder

clearStartUtcOffset()

public Sleep.SleepStage.Builder clearStartUtcOffset()

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Sleep.SleepStage.Builder

clearType()

public Sleep.SleepStage.Builder clearType()

Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

.google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Sleep.SleepStage.Builder

This builder for chaining.

clearUpdateTime()

public Sleep.SleepStage.Builder clearUpdateTime()

Output only. Last update time of this sleep stages segment.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sleep.SleepStage.Builder

getCreateTime()

public Timestamp getCreateTime()

Output only. Creation time of this sleep stages segment.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Creation time of this sleep stages segment.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Creation time of this sleep stages segment.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Sleep.SleepStage getDefaultInstanceForType()
Returns
Type Description
Sleep.SleepStage

getDescriptorForType()

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

getEndTime()

public Timestamp getEndTime()

Required. Sleep stage end time.

.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Timestamp

The endTime.

getEndTimeBuilder()

public Timestamp.Builder getEndTimeBuilder()

Required. Sleep stage end time.

.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Builder

getEndTimeOrBuilder()

public TimestampOrBuilder getEndTimeOrBuilder()

Required. Sleep stage end time.

.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TimestampOrBuilder

getEndUtcOffset()

public Duration getEndUtcOffset()

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Duration

The endUtcOffset.

getEndUtcOffsetBuilder()

public Duration.Builder getEndUtcOffsetBuilder()

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Builder

getEndUtcOffsetOrBuilder()

public DurationOrBuilder getEndUtcOffsetOrBuilder()

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DurationOrBuilder

getStartTime()

public Timestamp getStartTime()

Required. Sleep stage start time.

.google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Timestamp

The startTime.

getStartTimeBuilder()

public Timestamp.Builder getStartTimeBuilder()

Required. Sleep stage start time.

.google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Builder

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Required. Sleep stage start time.

.google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TimestampOrBuilder

getStartUtcOffset()

public Duration getStartUtcOffset()

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Duration

The startUtcOffset.

getStartUtcOffsetBuilder()

public Duration.Builder getStartUtcOffsetBuilder()

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Builder

getStartUtcOffsetOrBuilder()

public DurationOrBuilder getStartUtcOffsetOrBuilder()

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DurationOrBuilder

getType()

public Sleep.SleepStageType getType()

Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

.google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Sleep.SleepStageType

The type.

getTypeValue()

public int getTypeValue()

Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

.google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for type.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Last update time of this sleep stages segment.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Last update time of this sleep stages segment.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Last update time of this sleep stages segment.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Creation time of this sleep stages segment.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasEndTime()

public boolean hasEndTime()

Required. Sleep stage end time.

.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the endTime field is set.

hasEndUtcOffset()

public boolean hasEndUtcOffset()

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the endUtcOffset field is set.

hasStartTime()

public boolean hasStartTime()

Required. Sleep stage start time.

.google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the startTime field is set.

hasStartUtcOffset()

public boolean hasStartUtcOffset()

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the startUtcOffset field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Last update time of this sleep stages segment.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Sleep.SleepStage.Builder mergeCreateTime(Timestamp value)

Output only. Creation time of this sleep stages segment.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Sleep.SleepStage.Builder

mergeEndTime(Timestamp value)

public Sleep.SleepStage.Builder mergeEndTime(Timestamp value)

Required. Sleep stage end time.

.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
Sleep.SleepStage.Builder

mergeEndUtcOffset(Duration value)

public Sleep.SleepStage.Builder mergeEndUtcOffset(Duration value)

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Duration
Returns
Type Description
Sleep.SleepStage.Builder

mergeFrom(Sleep.SleepStage other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeStartTime(Timestamp value)

public Sleep.SleepStage.Builder mergeStartTime(Timestamp value)

Required. Sleep stage start time.

.google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
Sleep.SleepStage.Builder

mergeStartUtcOffset(Duration value)

public Sleep.SleepStage.Builder mergeStartUtcOffset(Duration value)

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Duration
Returns
Type Description
Sleep.SleepStage.Builder

mergeUpdateTime(Timestamp value)

public Sleep.SleepStage.Builder mergeUpdateTime(Timestamp value)

Output only. Last update time of this sleep stages segment.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Sleep.SleepStage.Builder

setCreateTime(Timestamp value)

public Sleep.SleepStage.Builder setCreateTime(Timestamp value)

Output only. Creation time of this sleep stages segment.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Sleep.SleepStage.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Sleep.SleepStage.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Creation time of this sleep stages segment.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Sleep.SleepStage.Builder

setEndTime(Timestamp value)

public Sleep.SleepStage.Builder setEndTime(Timestamp value)

Required. Sleep stage end time.

.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
Sleep.SleepStage.Builder

setEndTime(Timestamp.Builder builderForValue)

public Sleep.SleepStage.Builder setEndTime(Timestamp.Builder builderForValue)

Required. Sleep stage end time.

.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Sleep.SleepStage.Builder

setEndUtcOffset(Duration value)

public Sleep.SleepStage.Builder setEndUtcOffset(Duration value)

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Duration
Returns
Type Description
Sleep.SleepStage.Builder

setEndUtcOffset(Duration.Builder builderForValue)

public Sleep.SleepStage.Builder setEndUtcOffset(Duration.Builder builderForValue)

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Sleep.SleepStage.Builder

setStartTime(Timestamp value)

public Sleep.SleepStage.Builder setStartTime(Timestamp value)

Required. Sleep stage start time.

.google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
Sleep.SleepStage.Builder

setStartTime(Timestamp.Builder builderForValue)

public Sleep.SleepStage.Builder setStartTime(Timestamp.Builder builderForValue)

Required. Sleep stage start time.

.google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Sleep.SleepStage.Builder

setStartUtcOffset(Duration value)

public Sleep.SleepStage.Builder setStartUtcOffset(Duration value)

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Duration
Returns
Type Description
Sleep.SleepStage.Builder

setStartUtcOffset(Duration.Builder builderForValue)

public Sleep.SleepStage.Builder setStartUtcOffset(Duration.Builder builderForValue)

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Sleep.SleepStage.Builder

setType(Sleep.SleepStageType value)

public Sleep.SleepStage.Builder setType(Sleep.SleepStageType value)

Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

.google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Sleep.SleepStageType

The type to set.

Returns
Type Description
Sleep.SleepStage.Builder

This builder for chaining.

setTypeValue(int value)

public Sleep.SleepStage.Builder setTypeValue(int value)

Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

.google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
Sleep.SleepStage.Builder

This builder for chaining.

setUpdateTime(Timestamp value)

public Sleep.SleepStage.Builder setUpdateTime(Timestamp value)

Output only. Last update time of this sleep stages segment.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Sleep.SleepStage.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Sleep.SleepStage.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Last update time of this sleep stages segment.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Sleep.SleepStage.Builder