Class Sleep
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA sleep session possibly including stages.static final classA time interval to represent an out-of-bed segment.static interfacestatic final classAdditional information about how the sleep was processed.static interfacestatic final classSleep stage segment.static interfacestatic enumSleep stage type: AWAKE, DEEP, REM, LIGHT etc.static final classSleep summary: metrics and stages summary.static interfacestatic enumSleep type: classic or stages.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.google.protobuf.TimestampOutput only.com.google.protobuf.TimestampOrBuilderOutput only.static Sleepstatic final com.google.protobuf.Descriptors.DescriptorRequired.Required.Optional.Optional.getOutOfBedSegments(int index) Optional.intOptional.Optional.getOutOfBedSegmentsOrBuilder(int index) Optional.List<? extends Sleep.OutOfBedSegmentOrBuilder>Optional.com.google.protobuf.Parser<Sleep>intgetStages(int index) Optional.intOptional.Optional.getStagesOrBuilder(int index) Optional.List<? extends Sleep.SleepStageOrBuilder>Optional.Output only.Output only.getType()Optional.intOptional.com.google.protobuf.TimestampOutput only.com.google.protobuf.TimestampOrBuilderOutput only.booleanOutput only.inthashCode()booleanRequired.booleanOptional.booleanOutput only.booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic Sleep.Builderstatic Sleep.BuildernewBuilder(Sleep prototype) protected Sleep.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static SleepparseDelimitedFrom(InputStream input) static SleepparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SleepparseFrom(byte[] data) static SleepparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SleepparseFrom(com.google.protobuf.ByteString data) static SleepparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SleepparseFrom(com.google.protobuf.CodedInputStream input) static SleepparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SleepparseFrom(InputStream input) static SleepparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SleepparseFrom(ByteBuffer data) static SleepparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Sleep>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
INTERVAL_FIELD_NUMBER
public static final int INTERVAL_FIELD_NUMBER- See Also:
-
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER- See Also:
-
STAGES_FIELD_NUMBER
public static final int STAGES_FIELD_NUMBER- See Also:
-
OUT_OF_BED_SEGMENTS_FIELD_NUMBER
public static final int OUT_OF_BED_SEGMENTS_FIELD_NUMBER- See Also:
-
METADATA_FIELD_NUMBER
public static final int METADATA_FIELD_NUMBER- See Also:
-
SUMMARY_FIELD_NUMBER
public static final int SUMMARY_FIELD_NUMBER- See Also:
-
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER- See Also:
-
UPDATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_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:
internalGetFieldAccessorTablein classcom.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:
hasIntervalin interfaceSleepOrBuilder- Returns:
- Whether the interval field is set.
-
getInterval
Required. Observed sleep interval.
.google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getIntervalin interfaceSleepOrBuilder- Returns:
- The interval.
-
getIntervalOrBuilder
Required. Observed sleep interval.
.google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getIntervalOrBuilderin interfaceSleepOrBuilder
-
getTypeValue
public int getTypeValue()Optional. SleepType: classic or stages.
.google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTypeValuein interfaceSleepOrBuilder- Returns:
- The enum numeric value on the wire for type.
-
getType
Optional. SleepType: classic or stages.
.google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTypein interfaceSleepOrBuilder- Returns:
- The type.
-
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:
getStagesListin interfaceSleepOrBuilder
-
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:
getStagesOrBuilderListin interfaceSleepOrBuilder
-
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:
getStagesCountin interfaceSleepOrBuilder
-
getStages
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:
getStagesin interfaceSleepOrBuilder
-
getStagesOrBuilder
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:
getStagesOrBuilderin interfaceSleepOrBuilder
-
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:
getOutOfBedSegmentsListin interfaceSleepOrBuilder
-
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:
getOutOfBedSegmentsOrBuilderListin interfaceSleepOrBuilder
-
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:
getOutOfBedSegmentsCountin interfaceSleepOrBuilder
-
getOutOfBedSegments
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:
getOutOfBedSegmentsin interfaceSleepOrBuilder
-
getOutOfBedSegmentsOrBuilder
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:
getOutOfBedSegmentsOrBuilderin interfaceSleepOrBuilder
-
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:
hasMetadatain interfaceSleepOrBuilder- Returns:
- Whether the metadata field is set.
-
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:
getMetadatain interfaceSleepOrBuilder- Returns:
- The metadata.
-
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:
getMetadataOrBuilderin interfaceSleepOrBuilder
-
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:
hasSummaryin interfaceSleepOrBuilder- Returns:
- Whether the summary field is set.
-
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:
getSummaryin interfaceSleepOrBuilder- Returns:
- The summary.
-
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:
getSummaryOrBuilderin interfaceSleepOrBuilder
-
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:
hasCreateTimein interfaceSleepOrBuilder- 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:
getCreateTimein interfaceSleepOrBuilder- 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:
getCreateTimeOrBuilderin interfaceSleepOrBuilder
-
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:
hasUpdateTimein interfaceSleepOrBuilder- 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:
getUpdateTimein interfaceSleepOrBuilder- 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:
getUpdateTimeOrBuilderin interfaceSleepOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.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
- Throws:
IOException
-
parseFrom
public static Sleep parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Sleep parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Sleep parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
- Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-