Class Sleep.SleepSummary.StageSummary.Builder (0.2.0)

public static final class Sleep.SleepSummary.StageSummary.Builder extends GeneratedMessage.Builder<Sleep.SleepSummary.StageSummary.Builder> implements Sleep.SleepSummary.StageSummaryOrBuilder

Total duration and segment count for a stage.

Protobuf type google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary

Static Methods

getDescriptor()

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

Methods

build()

public Sleep.SleepSummary.StageSummary build()
Returns
Type Description
Sleep.SleepSummary.StageSummary

buildPartial()

public Sleep.SleepSummary.StageSummary buildPartial()
Returns
Type Description
Sleep.SleepSummary.StageSummary

clear()

public Sleep.SleepSummary.StageSummary.Builder clear()
Returns
Type Description
Sleep.SleepSummary.StageSummary.Builder
Overrides

clearCount()

public Sleep.SleepSummary.StageSummary.Builder clearCount()

Output only. Number of sleep stages segments.

optional int64 count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sleep.SleepSummary.StageSummary.Builder

This builder for chaining.

clearMinutes()

public Sleep.SleepSummary.StageSummary.Builder clearMinutes()

Output only. Total duration in minutes of a sleep stage.

optional int64 minutes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sleep.SleepSummary.StageSummary.Builder

This builder for chaining.

clearType()

public Sleep.SleepSummary.StageSummary.Builder clearType()

Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

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

Returns
Type Description
Sleep.SleepSummary.StageSummary.Builder

This builder for chaining.

getCount()

public long getCount()

Output only. Number of sleep stages segments.

optional int64 count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The count.

getDefaultInstanceForType()

public Sleep.SleepSummary.StageSummary getDefaultInstanceForType()
Returns
Type Description
Sleep.SleepSummary.StageSummary

getDescriptorForType()

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

getMinutes()

public long getMinutes()

Output only. Total duration in minutes of a sleep stage.

optional int64 minutes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The minutes.

getType()

public Sleep.SleepStageType getType()

Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

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

Returns
Type Description
Sleep.SleepStageType

The type.

getTypeValue()

public int getTypeValue()

Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

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

Returns
Type Description
int

The enum numeric value on the wire for type.

hasCount()

public boolean hasCount()

Output only. Number of sleep stages segments.

optional int64 count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the count field is set.

hasMinutes()

public boolean hasMinutes()

Output only. Total duration in minutes of a sleep stage.

optional int64 minutes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the minutes field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Sleep.SleepSummary.StageSummary other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setCount(long value)

public Sleep.SleepSummary.StageSummary.Builder setCount(long value)

Output only. Number of sleep stages segments.

optional int64 count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The count to set.

Returns
Type Description
Sleep.SleepSummary.StageSummary.Builder

This builder for chaining.

setMinutes(long value)

public Sleep.SleepSummary.StageSummary.Builder setMinutes(long value)

Output only. Total duration in minutes of a sleep stage.

optional int64 minutes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The minutes to set.

Returns
Type Description
Sleep.SleepSummary.StageSummary.Builder

This builder for chaining.

setType(Sleep.SleepStageType value)

public Sleep.SleepSummary.StageSummary.Builder setType(Sleep.SleepStageType value)

Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

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

Parameter
Name Description
value Sleep.SleepStageType

The type to set.

Returns
Type Description
Sleep.SleepSummary.StageSummary.Builder

This builder for chaining.

setTypeValue(int value)

public Sleep.SleepSummary.StageSummary.Builder setTypeValue(int value)

Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

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

Parameter
Name Description
value int

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

Returns
Type Description
Sleep.SleepSummary.StageSummary.Builder

This builder for chaining.