public final class Sleep extends GeneratedMessage implements SleepOrBuilder
A sleep session possibly including stages.
Protobuf type google.devicesandservices.health.v4.Sleep
Inherited Members
com.google.protobuf.GeneratedMessage.<ContainingT,T>newFileScopedGeneratedExtension(java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ContainingT,T>newMessageScopedGeneratedExtension(com.google.protobuf.Message,int,java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessage.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessage.<V>serializeBooleanMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Boolean,V>,com.google.protobuf.MapEntry<java.lang.Boolean,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeIntegerMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Integer,V>,com.google.protobuf.MapEntry<java.lang.Integer,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeLongMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Long,V>,com.google.protobuf.MapEntry<java.lang.Long,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeStringMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.String,V>,com.google.protobuf.MapEntry<java.lang.String,V>,int)
com.google.protobuf.GeneratedMessage.canUseUnsafe()
com.google.protobuf.GeneratedMessage.emptyBooleanList()
com.google.protobuf.GeneratedMessage.emptyDoubleList()
com.google.protobuf.GeneratedMessage.emptyFloatList()
com.google.protobuf.GeneratedMessage.emptyIntList()
com.google.protobuf.GeneratedMessage.emptyLongList()
com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.isStringEmpty(java.lang.Object)
com.google.protobuf.GeneratedMessage.mergeFromAndMakeImmutableInternal(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite)
com.google.protobuf.GeneratedMessage.newInstance(com.google.protobuf.GeneratedMessage.UnusedPrivateParameter)
com.google.protobuf.GeneratedMessage.parseUnknownFieldProto3(com.google.protobuf.CodedInputStream,com.google.protobuf.UnknownFieldSet.Builder,com.google.protobuf.ExtensionRegistryLite,int)
Static Fields
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
INTERVAL_FIELD_NUMBER
public static final int INTERVAL_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
public static final int METADATA_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
OUT_OF_BED_SEGMENTS_FIELD_NUMBER
public static final int OUT_OF_BED_SEGMENTS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
STAGES_FIELD_NUMBER
public static final int STAGES_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
SUMMARY_FIELD_NUMBER
public static final int SUMMARY_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
UPDATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Sleep getDefaultInstance()
| Returns |
| Type |
Description |
Sleep |
|
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Sleep.Builder newBuilder()
newBuilder(Sleep prototype)
public static Sleep.Builder newBuilder(Sleep prototype)
| Parameter |
| Name |
Description |
prototype |
Sleep
|
public static Sleep parseDelimitedFrom(InputStream input)
| Returns |
| Type |
Description |
Sleep |
|
public static Sleep parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Sleep |
|
parseFrom(byte[] data)
public static Sleep parseFrom(byte[] data)
| Parameter |
| Name |
Description |
data |
byte[]
|
| Returns |
| Type |
Description |
Sleep |
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Sleep parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Sleep |
|
parseFrom(ByteString data)
public static Sleep parseFrom(ByteString data)
| Returns |
| Type |
Description |
Sleep |
|
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Sleep parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Sleep |
|
public static Sleep parseFrom(CodedInputStream input)
| Returns |
| Type |
Description |
Sleep |
|
public static Sleep parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Sleep |
|
public static Sleep parseFrom(InputStream input)
| Returns |
| Type |
Description |
Sleep |
|
public static Sleep parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Sleep |
|
parseFrom(ByteBuffer data)
public static Sleep parseFrom(ByteBuffer data)
| Returns |
| Type |
Description |
Sleep |
|
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Sleep parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Sleep |
|
parser()
public static Parser<Sleep> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
getCreateTime()
public Timestamp getCreateTime()
Output only. Creation time of this sleep observation.
.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
Timestamp |
The createTime.
|
getCreateTimeOrBuilder()
public TimestampOrBuilder getCreateTimeOrBuilder()
Output only. Creation time of this sleep observation.
.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
getDefaultInstanceForType()
public Sleep getDefaultInstanceForType()
| Returns |
| Type |
Description |
Sleep |
|
getInterval()
public SessionTimeInterval getInterval()
Required. Observed sleep interval.
.google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED];
getIntervalOrBuilder()
public SessionTimeIntervalOrBuilder getIntervalOrBuilder()
Required. Observed sleep interval.
.google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED];
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];
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];
getOutOfBedSegments(int index)
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];
| Parameter |
| Name |
Description |
index |
int
|
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];
| Returns |
| Type |
Description |
int |
|
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];
getOutOfBedSegmentsOrBuilder(int index)
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];
| Parameter |
| Name |
Description |
index |
int
|
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];
| Returns |
| Type |
Description |
List<? extends com.google.devicesandservices.health.v4.Sleep.OutOfBedSegmentOrBuilder> |
|
getParserForType()
public Parser<Sleep> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
| Returns |
| Type |
Description |
int |
|
Overrides
getStages(int index)
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];
| Parameter |
| Name |
Description |
index |
int
|
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];
| Returns |
| Type |
Description |
int |
|
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];
getStagesOrBuilder(int index)
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];
| Parameter |
| Name |
Description |
index |
int
|
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];
| Returns |
| Type |
Description |
List<? extends com.google.devicesandservices.health.v4.Sleep.SleepStageOrBuilder> |
|
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];
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];
getType()
public Sleep.SleepType getType()
Optional. SleepType: classic or stages.
.google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL];
getTypeValue()
public int getTypeValue()
Optional. SleepType: classic or stages.
.google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
int |
The enum numeric value on the wire for type.
|
getUpdateTime()
public Timestamp getUpdateTime()
Output only. Last update time of this sleep observation.
.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
Timestamp |
The updateTime.
|
getUpdateTimeOrBuilder()
public TimestampOrBuilder getUpdateTimeOrBuilder()
Output only. Last update time of this sleep observation.
.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasCreateTime()
public boolean hasCreateTime()
Output only. Creation time of this sleep observation.
.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
boolean |
Whether the createTime field is set.
|
hasInterval()
public boolean hasInterval()
Required. Observed sleep interval.
.google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
boolean |
Whether the interval field is set.
|
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];
| Returns |
| Type |
Description |
boolean |
Whether the metadata field is set.
|
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];
| Returns |
| Type |
Description |
boolean |
Whether the summary field is set.
|
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];
| Returns |
| Type |
Description |
boolean |
Whether the updateTime field is set.
|
hashCode()
| Returns |
| Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Sleep.Builder newBuilderForType()
newBuilderForType(AbstractMessage.BuilderParent parent)
protected Sleep.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Overrides
toBuilder()
public Sleep.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides