Class: Google::Apis::HealthV4::SleepSummary
- Inherits:
-
Object
- Object
- Google::Apis::HealthV4::SleepSummary
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/health_v4/classes.rb,
lib/google/apis/health_v4/representations.rb,
lib/google/apis/health_v4/representations.rb
Overview
Sleep summary: metrics and stages summary.
Instance Attribute Summary collapse
-
#minutes_after_wake_up ⇒ Fixnum
Output only.
-
#minutes_asleep ⇒ Fixnum
Output only.
-
#minutes_awake ⇒ Fixnum
Output only.
-
#minutes_in_sleep_period ⇒ Fixnum
Output only.
-
#minutes_to_fall_asleep ⇒ Fixnum
Output only.
-
#stages_summary ⇒ Array<Google::Apis::HealthV4::StageSummary>
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SleepSummary
constructor
A new instance of SleepSummary.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SleepSummary
Returns a new instance of SleepSummary.
3811 3812 3813 |
# File 'lib/google/apis/health_v4/classes.rb', line 3811 def initialize(**args) update!(**args) end |
Instance Attribute Details
#minutes_after_wake_up ⇒ Fixnum
Output only. Minutes after wake up calculated by restlessness algorithm.
Corresponds to the JSON property minutesAfterWakeUp
3781 3782 3783 |
# File 'lib/google/apis/health_v4/classes.rb', line 3781 def minutes_after_wake_up @minutes_after_wake_up end |
#minutes_asleep ⇒ Fixnum
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).
Corresponds to the JSON property minutesAsleep
3788 3789 3790 |
# File 'lib/google/apis/health_v4/classes.rb', line 3788 def minutes_asleep @minutes_asleep end |
#minutes_awake ⇒ Fixnum
Output only. Total number of minutes awake. It is a sum of all AWAKE stages.
Corresponds to the JSON property minutesAwake
3793 3794 3795 |
# File 'lib/google/apis/health_v4/classes.rb', line 3793 def minutes_awake @minutes_awake end |
#minutes_in_sleep_period ⇒ Fixnum
Output only. Delta between wake time and bedtime. It is the sum of all stages.
Corresponds to the JSON property minutesInSleepPeriod
3798 3799 3800 |
# File 'lib/google/apis/health_v4/classes.rb', line 3798 def minutes_in_sleep_period @minutes_in_sleep_period end |
#minutes_to_fall_asleep ⇒ Fixnum
Output only. Minutes to fall asleep calculated by restlessness algorithm.
Corresponds to the JSON property minutesToFallAsleep
3803 3804 3805 |
# File 'lib/google/apis/health_v4/classes.rb', line 3803 def minutes_to_fall_asleep @minutes_to_fall_asleep end |
#stages_summary ⇒ Array<Google::Apis::HealthV4::StageSummary>
Output only. List of summaries (total duration and segment count) per each
sleep stage type.
Corresponds to the JSON property stagesSummary
3809 3810 3811 |
# File 'lib/google/apis/health_v4/classes.rb', line 3809 def stages_summary @stages_summary end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3816 3817 3818 3819 3820 3821 3822 3823 |
# File 'lib/google/apis/health_v4/classes.rb', line 3816 def update!(**args) @minutes_after_wake_up = args[:minutes_after_wake_up] if args.key?(:minutes_after_wake_up) @minutes_asleep = args[:minutes_asleep] if args.key?(:minutes_asleep) @minutes_awake = args[:minutes_awake] if args.key?(:minutes_awake) @minutes_in_sleep_period = args[:minutes_in_sleep_period] if args.key?(:minutes_in_sleep_period) @minutes_to_fall_asleep = args[:minutes_to_fall_asleep] if args.key?(:minutes_to_fall_asleep) @stages_summary = args[:stages_summary] if args.key?(:stages_summary) end |