Class Sleep.SleepSummary.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Sleep.SleepSummary.Builder>
com.google.devicesandservices.health.v4.Sleep.SleepSummary.Builder
All Implemented Interfaces:
Sleep.SleepSummaryOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Sleep.SleepSummary

public static final class Sleep.SleepSummary.Builder extends com.google.protobuf.GeneratedMessage.Builder<Sleep.SleepSummary.Builder> implements Sleep.SleepSummaryOrBuilder

 Sleep summary: metrics and stages summary.
 
Protobuf type google.devicesandservices.health.v4.Sleep.SleepSummary
  • 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.Builder<Sleep.SleepSummary.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Sleep.SleepSummary.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Sleep.SleepSummary.Builder>
    • getDefaultInstanceForType

      public Sleep.SleepSummary getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Sleep.SleepSummary build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Sleep.SleepSummary buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Sleep.SleepSummary.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Sleep.SleepSummary.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Sleep.SleepSummary.Builder>
    • mergeFrom

      public Sleep.SleepSummary.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Sleep.SleepSummary.Builder>
      Throws:
      IOException
    • hasMinutesInSleepPeriod

      public boolean hasMinutesInSleepPeriod()
       Output only. Delta between wake time and bedtime. It is the sum of all
       stages.
       
      optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasMinutesInSleepPeriod in interface Sleep.SleepSummaryOrBuilder
      Returns:
      Whether the minutesInSleepPeriod field is set.
    • getMinutesInSleepPeriod

      public long getMinutesInSleepPeriod()
       Output only. Delta between wake time and bedtime. It is the sum of all
       stages.
       
      optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getMinutesInSleepPeriod in interface Sleep.SleepSummaryOrBuilder
      Returns:
      The minutesInSleepPeriod.
    • setMinutesInSleepPeriod

      public Sleep.SleepSummary.Builder setMinutesInSleepPeriod(long value)
       Output only. Delta between wake time and bedtime. It is the sum of all
       stages.
       
      optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The minutesInSleepPeriod to set.
      Returns:
      This builder for chaining.
    • clearMinutesInSleepPeriod

      public Sleep.SleepSummary.Builder clearMinutesInSleepPeriod()
       Output only. Delta between wake time and bedtime. It is the sum of all
       stages.
       
      optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasMinutesAfterWakeUp

      public boolean hasMinutesAfterWakeUp()
       Output only. Minutes after wake up calculated by restlessness algorithm.
       
      optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasMinutesAfterWakeUp in interface Sleep.SleepSummaryOrBuilder
      Returns:
      Whether the minutesAfterWakeUp field is set.
    • getMinutesAfterWakeUp

      public long getMinutesAfterWakeUp()
       Output only. Minutes after wake up calculated by restlessness algorithm.
       
      optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getMinutesAfterWakeUp in interface Sleep.SleepSummaryOrBuilder
      Returns:
      The minutesAfterWakeUp.
    • setMinutesAfterWakeUp

      public Sleep.SleepSummary.Builder setMinutesAfterWakeUp(long value)
       Output only. Minutes after wake up calculated by restlessness algorithm.
       
      optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The minutesAfterWakeUp to set.
      Returns:
      This builder for chaining.
    • clearMinutesAfterWakeUp

      public Sleep.SleepSummary.Builder clearMinutesAfterWakeUp()
       Output only. Minutes after wake up calculated by restlessness algorithm.
       
      optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasMinutesToFallAsleep

      public boolean hasMinutesToFallAsleep()
       Output only. Minutes to fall asleep calculated by restlessness algorithm.
       
      optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasMinutesToFallAsleep in interface Sleep.SleepSummaryOrBuilder
      Returns:
      Whether the minutesToFallAsleep field is set.
    • getMinutesToFallAsleep

      public long getMinutesToFallAsleep()
       Output only. Minutes to fall asleep calculated by restlessness algorithm.
       
      optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getMinutesToFallAsleep in interface Sleep.SleepSummaryOrBuilder
      Returns:
      The minutesToFallAsleep.
    • setMinutesToFallAsleep

      public Sleep.SleepSummary.Builder setMinutesToFallAsleep(long value)
       Output only. Minutes to fall asleep calculated by restlessness algorithm.
       
      optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The minutesToFallAsleep to set.
      Returns:
      This builder for chaining.
    • clearMinutesToFallAsleep

      public Sleep.SleepSummary.Builder clearMinutesToFallAsleep()
       Output only. Minutes to fall asleep calculated by restlessness algorithm.
       
      optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasMinutesAsleep

      public boolean hasMinutesAsleep()
       Output only. Total number of minutes asleep.
       For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
       RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
       (excluding AWAKE).
       
      optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasMinutesAsleep in interface Sleep.SleepSummaryOrBuilder
      Returns:
      Whether the minutesAsleep field is set.
    • getMinutesAsleep

      public long getMinutesAsleep()
       Output only. Total number of minutes asleep.
       For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
       RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
       (excluding AWAKE).
       
      optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getMinutesAsleep in interface Sleep.SleepSummaryOrBuilder
      Returns:
      The minutesAsleep.
    • setMinutesAsleep

      public Sleep.SleepSummary.Builder setMinutesAsleep(long value)
       Output only. Total number of minutes asleep.
       For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
       RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
       (excluding AWAKE).
       
      optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The minutesAsleep to set.
      Returns:
      This builder for chaining.
    • clearMinutesAsleep

      public Sleep.SleepSummary.Builder clearMinutesAsleep()
       Output only. Total number of minutes asleep.
       For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
       RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
       (excluding AWAKE).
       
      optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasMinutesAwake

      public boolean hasMinutesAwake()
       Output only. Total number of minutes awake. It is a sum of all AWAKE
       stages.
       
      optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasMinutesAwake in interface Sleep.SleepSummaryOrBuilder
      Returns:
      Whether the minutesAwake field is set.
    • getMinutesAwake

      public long getMinutesAwake()
       Output only. Total number of minutes awake. It is a sum of all AWAKE
       stages.
       
      optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getMinutesAwake in interface Sleep.SleepSummaryOrBuilder
      Returns:
      The minutesAwake.
    • setMinutesAwake

      public Sleep.SleepSummary.Builder setMinutesAwake(long value)
       Output only. Total number of minutes awake. It is a sum of all AWAKE
       stages.
       
      optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The minutesAwake to set.
      Returns:
      This builder for chaining.
    • clearMinutesAwake

      public Sleep.SleepSummary.Builder clearMinutesAwake()
       Output only. Total number of minutes awake. It is a sum of all AWAKE
       stages.
       
      optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getStagesSummaryList

      public List<Sleep.SleepSummary.StageSummary> getStagesSummaryList()
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStagesSummaryList in interface Sleep.SleepSummaryOrBuilder
    • getStagesSummaryCount

      public int getStagesSummaryCount()
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStagesSummaryCount in interface Sleep.SleepSummaryOrBuilder
    • getStagesSummary

      public Sleep.SleepSummary.StageSummary getStagesSummary(int index)
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStagesSummary in interface Sleep.SleepSummaryOrBuilder
    • setStagesSummary

      public Sleep.SleepSummary.Builder setStagesSummary(int index, Sleep.SleepSummary.StageSummary value)
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setStagesSummary

      public Sleep.SleepSummary.Builder setStagesSummary(int index, Sleep.SleepSummary.StageSummary.Builder builderForValue)
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addStagesSummary

       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addStagesSummary

      public Sleep.SleepSummary.Builder addStagesSummary(int index, Sleep.SleepSummary.StageSummary value)
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addStagesSummary

      public Sleep.SleepSummary.Builder addStagesSummary(Sleep.SleepSummary.StageSummary.Builder builderForValue)
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addStagesSummary

      public Sleep.SleepSummary.Builder addStagesSummary(int index, Sleep.SleepSummary.StageSummary.Builder builderForValue)
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllStagesSummary

      public Sleep.SleepSummary.Builder addAllStagesSummary(Iterable<? extends Sleep.SleepSummary.StageSummary> values)
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearStagesSummary

      public Sleep.SleepSummary.Builder clearStagesSummary()
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removeStagesSummary

      public Sleep.SleepSummary.Builder removeStagesSummary(int index)
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getStagesSummaryBuilder

      public Sleep.SleepSummary.StageSummary.Builder getStagesSummaryBuilder(int index)
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getStagesSummaryOrBuilder

      public Sleep.SleepSummary.StageSummaryOrBuilder getStagesSummaryOrBuilder(int index)
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStagesSummaryOrBuilder in interface Sleep.SleepSummaryOrBuilder
    • getStagesSummaryOrBuilderList

      public List<? extends Sleep.SleepSummary.StageSummaryOrBuilder> getStagesSummaryOrBuilderList()
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStagesSummaryOrBuilderList in interface Sleep.SleepSummaryOrBuilder
    • addStagesSummaryBuilder

      public Sleep.SleepSummary.StageSummary.Builder addStagesSummaryBuilder()
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addStagesSummaryBuilder

      public Sleep.SleepSummary.StageSummary.Builder addStagesSummaryBuilder(int index)
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getStagesSummaryBuilderList

      public List<Sleep.SleepSummary.StageSummary.Builder> getStagesSummaryBuilderList()
       Output only. List of summaries (total duration and segment count) per
       each sleep stage type.
       
      repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];