Class Sleep.SleepSummary (0.2.0)

public static final class Sleep.SleepSummary extends GeneratedMessage implements Sleep.SleepSummaryOrBuilder

Sleep summary: metrics and stages summary.

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

Static Fields

MINUTES_AFTER_WAKE_UP_FIELD_NUMBER

public static final int MINUTES_AFTER_WAKE_UP_FIELD_NUMBER
Field Value
Type Description
int

MINUTES_ASLEEP_FIELD_NUMBER

public static final int MINUTES_ASLEEP_FIELD_NUMBER
Field Value
Type Description
int

MINUTES_AWAKE_FIELD_NUMBER

public static final int MINUTES_AWAKE_FIELD_NUMBER
Field Value
Type Description
int

MINUTES_IN_SLEEP_PERIOD_FIELD_NUMBER

public static final int MINUTES_IN_SLEEP_PERIOD_FIELD_NUMBER
Field Value
Type Description
int

MINUTES_TO_FALL_ASLEEP_FIELD_NUMBER

public static final int MINUTES_TO_FALL_ASLEEP_FIELD_NUMBER
Field Value
Type Description
int

STAGES_SUMMARY_FIELD_NUMBER

public static final int STAGES_SUMMARY_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Sleep.SleepSummary getDefaultInstance()
Returns
Type Description
Sleep.SleepSummary

getDescriptor()

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

newBuilder()

public static Sleep.SleepSummary.Builder newBuilder()
Returns
Type Description
Sleep.SleepSummary.Builder

newBuilder(Sleep.SleepSummary prototype)

public static Sleep.SleepSummary.Builder newBuilder(Sleep.SleepSummary prototype)
Parameter
Name Description
prototype Sleep.SleepSummary
Returns
Type Description
Sleep.SleepSummary.Builder

parseDelimitedFrom(InputStream input)

public static Sleep.SleepSummary parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Sleep.SleepSummary parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Sleep.SleepSummary parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Sleep.SleepSummary parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Sleep.SleepSummary parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Sleep.SleepSummary parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Sleep.SleepSummary parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Sleep.SleepSummary parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Sleep.SleepSummary parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Sleep.SleepSummary parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Sleep.SleepSummary parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Sleep.SleepSummary parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sleep.SleepSummary
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Sleep.SleepSummary> parser()
Returns
Type Description
Parser<SleepSummary>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

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

getMinutesAfterWakeUp()

public long getMinutesAfterWakeUp()

Output only. Minutes after wake up calculated by restlessness algorithm.

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

Returns
Type Description
long

The minutesAfterWakeUp.

getMinutesAsleep()

public long getMinutesAsleep()

Output only. Total number of minutes asleep. For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages (excluding AWAKE).

optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The minutesAsleep.

getMinutesAwake()

public long getMinutesAwake()

Output only. Total number of minutes awake. It is a sum of all AWAKE stages.

optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The minutesAwake.

getMinutesInSleepPeriod()

public long getMinutesInSleepPeriod()

Output only. Delta between wake time and bedtime. It is the sum of all stages.

optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The minutesInSleepPeriod.

getMinutesToFallAsleep()

public long getMinutesToFallAsleep()

Output only. Minutes to fall asleep calculated by restlessness algorithm.

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

Returns
Type Description
long

The minutesToFallAsleep.

getParserForType()

public Parser<Sleep.SleepSummary> getParserForType()
Returns
Type Description
Parser<SleepSummary>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getStagesSummary(int index)

public Sleep.SleepSummary.StageSummary getStagesSummary(int index)

Output only. List of summaries (total duration and segment count) per each sleep stage type.

repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Sleep.SleepSummary.StageSummary

getStagesSummaryCount()

public int getStagesSummaryCount()

Output only. List of summaries (total duration and segment count) per each sleep stage type.

repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getStagesSummaryList()

public List<Sleep.SleepSummary.StageSummary> getStagesSummaryList()

Output only. List of summaries (total duration and segment count) per each sleep stage type.

repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<StageSummary>

getStagesSummaryOrBuilder(int index)

public Sleep.SleepSummary.StageSummaryOrBuilder getStagesSummaryOrBuilder(int index)

Output only. List of summaries (total duration and segment count) per each sleep stage type.

repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Sleep.SleepSummary.StageSummaryOrBuilder

getStagesSummaryOrBuilderList()

public List<? extends Sleep.SleepSummary.StageSummaryOrBuilder> getStagesSummaryOrBuilderList()

Output only. List of summaries (total duration and segment count) per each sleep stage type.

repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummaryOrBuilder>

hasMinutesAfterWakeUp()

public boolean hasMinutesAfterWakeUp()

Output only. Minutes after wake up calculated by restlessness algorithm.

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

Returns
Type Description
boolean

Whether the minutesAfterWakeUp field is set.

hasMinutesAsleep()

public boolean hasMinutesAsleep()

Output only. Total number of minutes asleep. For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages (excluding AWAKE).

optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the minutesAsleep field is set.

hasMinutesAwake()

public boolean hasMinutesAwake()

Output only. Total number of minutes awake. It is a sum of all AWAKE stages.

optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the minutesAwake field is set.

hasMinutesInSleepPeriod()

public boolean hasMinutesInSleepPeriod()

Output only. Delta between wake time and bedtime. It is the sum of all stages.

optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the minutesInSleepPeriod field is set.

hasMinutesToFallAsleep()

public boolean hasMinutesToFallAsleep()

Output only. Minutes to fall asleep calculated by restlessness algorithm.

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

Returns
Type Description
boolean

Whether the minutesToFallAsleep field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Sleep.SleepSummary.Builder newBuilderForType()
Returns
Type Description
Sleep.SleepSummary.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Sleep.SleepSummary.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Sleep.SleepSummary.Builder
Overrides

toBuilder()

public Sleep.SleepSummary.Builder toBuilder()
Returns
Type Description
Sleep.SleepSummary.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException