Class Sleep.SleepSummary

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.devicesandservices.health.v4.Sleep.SleepSummary
All Implemented Interfaces:
Sleep.SleepSummaryOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
Sleep

public static final class Sleep.SleepSummary extends com.google.protobuf.GeneratedMessage implements Sleep.SleepSummaryOrBuilder

 Sleep summary: metrics and stages summary.
 
Protobuf type google.devicesandservices.health.v4.Sleep.SleepSummary
See Also:
  • Field Details

    • MINUTES_IN_SLEEP_PERIOD_FIELD_NUMBER

      public static final int MINUTES_IN_SLEEP_PERIOD_FIELD_NUMBER
      See Also:
    • MINUTES_AFTER_WAKE_UP_FIELD_NUMBER

      public static final int MINUTES_AFTER_WAKE_UP_FIELD_NUMBER
      See Also:
    • MINUTES_TO_FALL_ASLEEP_FIELD_NUMBER

      public static final int MINUTES_TO_FALL_ASLEEP_FIELD_NUMBER
      See Also:
    • MINUTES_ASLEEP_FIELD_NUMBER

      public static final int MINUTES_ASLEEP_FIELD_NUMBER
      See Also:
    • MINUTES_AWAKE_FIELD_NUMBER

      public static final int MINUTES_AWAKE_FIELD_NUMBER
      See Also:
    • STAGES_SUMMARY_FIELD_NUMBER

      public static final int STAGES_SUMMARY_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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];
      Specified by:
      hasMinutesInSleepPeriod in interface Sleep.SleepSummaryOrBuilder
      Returns:
      Whether the minutesInSleepPeriod field is set.
    • 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];
      Specified by:
      getMinutesInSleepPeriod in interface Sleep.SleepSummaryOrBuilder
      Returns:
      The minutesInSleepPeriod.
    • 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];
      Specified by:
      hasMinutesAfterWakeUp in interface Sleep.SleepSummaryOrBuilder
      Returns:
      Whether the minutesAfterWakeUp field is set.
    • 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];
      Specified by:
      getMinutesAfterWakeUp in interface Sleep.SleepSummaryOrBuilder
      Returns:
      The minutesAfterWakeUp.
    • 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];
      Specified by:
      hasMinutesToFallAsleep in interface Sleep.SleepSummaryOrBuilder
      Returns:
      Whether the minutesToFallAsleep field is set.
    • 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];
      Specified by:
      getMinutesToFallAsleep in interface Sleep.SleepSummaryOrBuilder
      Returns:
      The minutesToFallAsleep.
    • 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];
      Specified by:
      hasMinutesAsleep in interface Sleep.SleepSummaryOrBuilder
      Returns:
      Whether the minutesAsleep field is set.
    • 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];
      Specified by:
      getMinutesAsleep in interface Sleep.SleepSummaryOrBuilder
      Returns:
      The minutesAsleep.
    • 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];
      Specified by:
      hasMinutesAwake in interface Sleep.SleepSummaryOrBuilder
      Returns:
      Whether the minutesAwake field is set.
    • 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];
      Specified by:
      getMinutesAwake in interface Sleep.SleepSummaryOrBuilder
      Returns:
      The minutesAwake.
    • 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];
      Specified by:
      getStagesSummaryList in interface Sleep.SleepSummaryOrBuilder
    • 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];
      Specified by:
      getStagesSummaryOrBuilderList in interface Sleep.SleepSummaryOrBuilder
    • 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];
      Specified by:
      getStagesSummaryCount in interface Sleep.SleepSummaryOrBuilder
    • getStagesSummary

      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];
      Specified by:
      getStagesSummary in interface Sleep.SleepSummaryOrBuilder
    • getStagesSummaryOrBuilder

      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];
      Specified by:
      getStagesSummaryOrBuilder in interface Sleep.SleepSummaryOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Sleep.SleepSummary parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Sleep.SleepSummary parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Sleep.SleepSummary parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Sleep.SleepSummary parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Sleep.SleepSummary parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Sleep.SleepSummary parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Sleep.SleepSummary parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Sleep.SleepSummary parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Sleep.SleepSummary parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Sleep.SleepSummary parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Sleep.SleepSummary parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Sleep.SleepSummary parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Sleep.SleepSummary.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Sleep.SleepSummary.Builder newBuilder()
    • newBuilder

      public static Sleep.SleepSummary.Builder newBuilder(Sleep.SleepSummary prototype)
    • toBuilder

      public Sleep.SleepSummary.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Sleep.SleepSummary.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Sleep.SleepSummary getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Sleep.SleepSummary> parser()
    • getParserForType

      public com.google.protobuf.Parser<Sleep.SleepSummary> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Sleep.SleepSummary getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder