Class Sleep.SleepStage (0.2.0)

public static final class Sleep.SleepStage extends GeneratedMessage implements Sleep.SleepStageOrBuilder

Sleep stage segment.

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

Static Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

END_TIME_FIELD_NUMBER

public static final int END_TIME_FIELD_NUMBER
Field Value
Type Description
int

END_UTC_OFFSET_FIELD_NUMBER

public static final int END_UTC_OFFSET_FIELD_NUMBER
Field Value
Type Description
int

START_TIME_FIELD_NUMBER

public static final int START_TIME_FIELD_NUMBER
Field Value
Type Description
int

START_UTC_OFFSET_FIELD_NUMBER

public static final int START_UTC_OFFSET_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.SleepStage getDefaultInstance()
Returns
Type Description
Sleep.SleepStage

getDescriptor()

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

newBuilder()

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

newBuilder(Sleep.SleepStage prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getCreateTime()

public Timestamp getCreateTime()

Output only. Creation time of this sleep stages segment.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Creation time of this sleep stages segment.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

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

getEndTime()

public Timestamp getEndTime()

Required. Sleep stage end time.

.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Timestamp

The endTime.

getEndTimeOrBuilder()

public TimestampOrBuilder getEndTimeOrBuilder()

Required. Sleep stage end time.

.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TimestampOrBuilder

getEndUtcOffset()

public Duration getEndUtcOffset()

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Duration

The endUtcOffset.

getEndUtcOffsetOrBuilder()

public DurationOrBuilder getEndUtcOffsetOrBuilder()

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DurationOrBuilder

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getStartTime()

public Timestamp getStartTime()

Required. Sleep stage start time.

.google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Timestamp

The startTime.

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Required. Sleep stage start time.

.google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TimestampOrBuilder

getStartUtcOffset()

public Duration getStartUtcOffset()

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Duration

The startUtcOffset.

getStartUtcOffsetOrBuilder()

public DurationOrBuilder getStartUtcOffsetOrBuilder()

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DurationOrBuilder

getType()

public Sleep.SleepStageType getType()

Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

.google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Sleep.SleepStageType

The type.

getTypeValue()

public int getTypeValue()

Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

.google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED];

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 stages segment.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Last update time of this sleep stages segment.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Creation time of this sleep stages segment.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasEndTime()

public boolean hasEndTime()

Required. Sleep stage end time.

.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the endTime field is set.

hasEndUtcOffset()

public boolean hasEndUtcOffset()

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the endUtcOffset field is set.

hasStartTime()

public boolean hasStartTime()

Required. Sleep stage start time.

.google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the startTime field is set.

hasStartUtcOffset()

public boolean hasStartUtcOffset()

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

.google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the startUtcOffset field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Last update time of this sleep stages segment.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime 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.SleepStage.Builder newBuilderForType()
Returns
Type Description
Sleep.SleepStage.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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