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

@Generated public final class Sleep extends com.google.protobuf.GeneratedMessage implements SleepOrBuilder
 A sleep session possibly including stages.
 
Protobuf type google.devicesandservices.health.v4.Sleep
See Also:
  • Field Details

  • 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
    • hasInterval

      public boolean hasInterval()
       Required. Observed sleep interval.
       
      .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasInterval in interface SleepOrBuilder
      Returns:
      Whether the interval field is set.
    • getInterval

      public SessionTimeInterval getInterval()
       Required. Observed sleep interval.
       
      .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getInterval in interface SleepOrBuilder
      Returns:
      The interval.
    • getIntervalOrBuilder

      public SessionTimeIntervalOrBuilder getIntervalOrBuilder()
       Required. Observed sleep interval.
       
      .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getIntervalOrBuilder in interface SleepOrBuilder
    • getTypeValue

      public int getTypeValue()
       Optional. SleepType: classic or stages.
       
      .google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTypeValue in interface SleepOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • getType

      public Sleep.SleepType getType()
       Optional. SleepType: classic or stages.
       
      .google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getType in interface SleepOrBuilder
      Returns:
      The type.
    • getStagesList

      public List<Sleep.SleepStage> getStagesList()
       Optional. List of non-overlapping contiguous sleep stage segments that
       cover the sleep period.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStagesList in interface SleepOrBuilder
    • getStagesOrBuilderList

      public List<? extends Sleep.SleepStageOrBuilder> getStagesOrBuilderList()
       Optional. List of non-overlapping contiguous sleep stage segments that
       cover the sleep period.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStagesOrBuilderList in interface SleepOrBuilder
    • getStagesCount

      public int getStagesCount()
       Optional. List of non-overlapping contiguous sleep stage segments that
       cover the sleep period.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStagesCount in interface SleepOrBuilder
    • getStages

      public Sleep.SleepStage getStages(int index)
       Optional. List of non-overlapping contiguous sleep stage segments that
       cover the sleep period.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStages in interface SleepOrBuilder
    • getStagesOrBuilder

      public Sleep.SleepStageOrBuilder getStagesOrBuilder(int index)
       Optional. List of non-overlapping contiguous sleep stage segments that
       cover the sleep period.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStagesOrBuilder in interface SleepOrBuilder
    • getOutOfBedSegmentsList

      public List<Sleep.OutOfBedSegment> getOutOfBedSegmentsList()
       Optional.
       “Out of bed” segments that can overlap with sleep stages.
       
      repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOutOfBedSegmentsList in interface SleepOrBuilder
    • getOutOfBedSegmentsOrBuilderList

      public List<? extends Sleep.OutOfBedSegmentOrBuilder> getOutOfBedSegmentsOrBuilderList()
       Optional.
       “Out of bed” segments that can overlap with sleep stages.
       
      repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOutOfBedSegmentsOrBuilderList in interface SleepOrBuilder
    • getOutOfBedSegmentsCount

      public int getOutOfBedSegmentsCount()
       Optional.
       “Out of bed” segments that can overlap with sleep stages.
       
      repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOutOfBedSegmentsCount in interface SleepOrBuilder
    • getOutOfBedSegments

      public Sleep.OutOfBedSegment getOutOfBedSegments(int index)
       Optional.
       “Out of bed” segments that can overlap with sleep stages.
       
      repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOutOfBedSegments in interface SleepOrBuilder
    • getOutOfBedSegmentsOrBuilder

      public Sleep.OutOfBedSegmentOrBuilder getOutOfBedSegmentsOrBuilder(int index)
       Optional.
       “Out of bed” segments that can overlap with sleep stages.
       
      repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOutOfBedSegmentsOrBuilder in interface SleepOrBuilder
    • hasMetadata

      public boolean hasMetadata()
       Optional. Sleep metadata: processing, main, manually edited, stages status.
       
      .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasMetadata in interface SleepOrBuilder
      Returns:
      Whether the metadata field is set.
    • getMetadata

      public Sleep.SleepMetadata getMetadata()
       Optional. Sleep metadata: processing, main, manually edited, stages status.
       
      .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMetadata in interface SleepOrBuilder
      Returns:
      The metadata.
    • getMetadataOrBuilder

      public Sleep.SleepMetadataOrBuilder getMetadataOrBuilder()
       Optional. Sleep metadata: processing, main, manually edited, stages status.
       
      .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMetadataOrBuilder in interface SleepOrBuilder
    • hasSummary

      public boolean hasSummary()
       Output only. Sleep summary: metrics and stages summary.
       
      .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasSummary in interface SleepOrBuilder
      Returns:
      Whether the summary field is set.
    • getSummary

      public Sleep.SleepSummary getSummary()
       Output only. Sleep summary: metrics and stages summary.
       
      .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSummary in interface SleepOrBuilder
      Returns:
      The summary.
    • getSummaryOrBuilder

      public Sleep.SleepSummaryOrBuilder getSummaryOrBuilder()
       Output only. Sleep summary: metrics and stages summary.
       
      .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSummaryOrBuilder in interface SleepOrBuilder
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Creation time of this sleep observation.
       
      .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface SleepOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Creation time of this sleep observation.
       
      .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface SleepOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Creation time of this sleep observation.
       
      .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface SleepOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. Last update time of this sleep observation.
       
      .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface SleepOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. Last update time of this sleep observation.
       
      .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface SleepOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. Last update time of this sleep observation.
       
      .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface SleepOrBuilder
    • 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 parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

      public static Sleep 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 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

      public static Sleep.Builder newBuilder()
    • newBuilder

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

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

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

      public static Sleep getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<Sleep> 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 getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder