Class Sleep.SleepMetadata.Builder (0.2.0)

public static final class Sleep.SleepMetadata.Builder extends GeneratedMessage.Builder<Sleep.SleepMetadata.Builder> implements Sleep.SleepMetadataOrBuilder

Additional information about how the sleep was processed.

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

Static Methods

getDescriptor()

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

Methods

build()

public Sleep.SleepMetadata build()
Returns
Type Description
Sleep.SleepMetadata

buildPartial()

public Sleep.SleepMetadata buildPartial()
Returns
Type Description
Sleep.SleepMetadata

clear()

public Sleep.SleepMetadata.Builder clear()
Returns
Type Description
Sleep.SleepMetadata.Builder
Overrides

clearExternalId()

public Sleep.SleepMetadata.Builder clearExternalId()

Optional. Sleep identifier relevant in the context of the data source.

string external_id = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.

clearManuallyEdited()

public Sleep.SleepMetadata.Builder clearManuallyEdited()

Output only. Some sleeps autodetected by algorithms can be manually edited by users.

bool manually_edited = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.

clearNap()

public Sleep.SleepMetadata.Builder clearNap()

Output only. Naps are sleeps without stages and relatively short durations.

bool nap = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.

clearProcessed()

public Sleep.SleepMetadata.Builder clearProcessed()

Output only. Sleep and sleep stages algorithms finished processing.

bool processed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.

clearStagesStatus()

public Sleep.SleepMetadata.Builder clearStagesStatus()

Output only. Sleep stages algorithm processing status.

.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.

getDefaultInstanceForType()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getExternalId()

public String getExternalId()

Optional. Sleep identifier relevant in the context of the data source.

string external_id = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The externalId.

getExternalIdBytes()

public ByteString getExternalIdBytes()

Optional. Sleep identifier relevant in the context of the data source.

string external_id = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for externalId.

getManuallyEdited()

public boolean getManuallyEdited()

Output only. Some sleeps autodetected by algorithms can be manually edited by users.

bool manually_edited = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The manuallyEdited.

getNap()

public boolean getNap()

Output only. Naps are sleeps without stages and relatively short durations.

bool nap = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The nap.

getProcessed()

public boolean getProcessed()

Output only. Sleep and sleep stages algorithms finished processing.

bool processed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The processed.

getStagesStatus()

public Sleep.SleepMetadata.StagesState getStagesStatus()

Output only. Sleep stages algorithm processing status.

.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sleep.SleepMetadata.StagesState

The stagesStatus.

getStagesStatusValue()

public int getStagesStatusValue()

Output only. Sleep stages algorithm processing status.

.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for stagesStatus.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Sleep.SleepMetadata other)

public Sleep.SleepMetadata.Builder mergeFrom(Sleep.SleepMetadata other)
Parameter
Name Description
other Sleep.SleepMetadata
Returns
Type Description
Sleep.SleepMetadata.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Sleep.SleepMetadata.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sleep.SleepMetadata.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Sleep.SleepMetadata.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Sleep.SleepMetadata.Builder
Overrides

setExternalId(String value)

public Sleep.SleepMetadata.Builder setExternalId(String value)

Optional. Sleep identifier relevant in the context of the data source.

string external_id = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The externalId to set.

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.

setExternalIdBytes(ByteString value)

public Sleep.SleepMetadata.Builder setExternalIdBytes(ByteString value)

Optional. Sleep identifier relevant in the context of the data source.

string external_id = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for externalId to set.

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.

setManuallyEdited(boolean value)

public Sleep.SleepMetadata.Builder setManuallyEdited(boolean value)

Output only. Some sleeps autodetected by algorithms can be manually edited by users.

bool manually_edited = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The manuallyEdited to set.

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.

setNap(boolean value)

public Sleep.SleepMetadata.Builder setNap(boolean value)

Output only. Naps are sleeps without stages and relatively short durations.

bool nap = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The nap to set.

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.

setProcessed(boolean value)

public Sleep.SleepMetadata.Builder setProcessed(boolean value)

Output only. Sleep and sleep stages algorithms finished processing.

bool processed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The processed to set.

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.

setStagesStatus(Sleep.SleepMetadata.StagesState value)

public Sleep.SleepMetadata.Builder setStagesStatus(Sleep.SleepMetadata.StagesState value)

Output only. Sleep stages algorithm processing status.

.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Sleep.SleepMetadata.StagesState

The stagesStatus to set.

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.

setStagesStatusValue(int value)

public Sleep.SleepMetadata.Builder setStagesStatusValue(int value)

Output only. Sleep stages algorithm processing status.

.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for stagesStatus to set.

Returns
Type Description
Sleep.SleepMetadata.Builder

This builder for chaining.