Class: Google::Apis::HealthV4::SleepMetadata
- Inherits:
-
Object
- Object
- Google::Apis::HealthV4::SleepMetadata
- 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
Additional information about how the sleep was processed.
Instance Attribute Summary collapse
-
#external_id ⇒ String
Optional.
-
#main_sleep ⇒ Boolean
(also: #main_sleep?)
Output only.
-
#manually_edited ⇒ Boolean
(also: #manually_edited?)
Output only.
-
#nap ⇒ Boolean
(also: #nap?)
Output only.
-
#processed ⇒ Boolean
(also: #processed?)
Output only.
-
#stages_status ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SleepMetadata
constructor
A new instance of SleepMetadata.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SleepMetadata
Returns a new instance of SleepMetadata.
5146 5147 5148 |
# File 'lib/google/apis/health_v4/classes.rb', line 5146 def initialize(**args) update!(**args) end |
Instance Attribute Details
#external_id ⇒ String
Optional. Sleep identifier relevant in the context of the data source.
Corresponds to the JSON property externalId
5108 5109 5110 |
# File 'lib/google/apis/health_v4/classes.rb', line 5108 def external_id @external_id end |
#main_sleep ⇒ Boolean Also known as: main_sleep?
Output only. main_sleep: the longest sleep session with stages within one
day. If no sleep session has stages, then the longest sleep is the main_sleep
. If there are multiple days of sleep in the response, there is one
main_sleep per day.
Corresponds to the JSON property mainSleep
5116 5117 5118 |
# File 'lib/google/apis/health_v4/classes.rb', line 5116 def main_sleep @main_sleep end |
#manually_edited ⇒ Boolean Also known as: manually_edited?
Output only. Some sleeps autodetected by algorithms can be manually edited by
users.
Corresponds to the JSON property manuallyEdited
5123 5124 5125 |
# File 'lib/google/apis/health_v4/classes.rb', line 5123 def manually_edited @manually_edited end |
#nap ⇒ Boolean Also known as: nap?
Output only. Naps are sleeps without stages and relatively short durations.
Corresponds to the JSON property nap
5129 5130 5131 |
# File 'lib/google/apis/health_v4/classes.rb', line 5129 def nap @nap end |
#processed ⇒ Boolean Also known as: processed?
Output only. Sleep and sleep stages algorithms finished processing. A true
value indicates whether all data processing for the session is complete. A
false value means sleep period is detected but sleep stages is still
processing.
Corresponds to the JSON property processed
5138 5139 5140 |
# File 'lib/google/apis/health_v4/classes.rb', line 5138 def processed @processed end |
#stages_status ⇒ String
Output only. Sleep stages algorithm processing status.
Corresponds to the JSON property stagesStatus
5144 5145 5146 |
# File 'lib/google/apis/health_v4/classes.rb', line 5144 def stages_status @stages_status end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5151 5152 5153 5154 5155 5156 5157 5158 |
# File 'lib/google/apis/health_v4/classes.rb', line 5151 def update!(**args) @external_id = args[:external_id] if args.key?(:external_id) @main_sleep = args[:main_sleep] if args.key?(:main_sleep) @manually_edited = args[:manually_edited] if args.key?(:manually_edited) @nap = args[:nap] if args.key?(:nap) @processed = args[:processed] if args.key?(:processed) @stages_status = args[:stages_status] if args.key?(:stages_status) end |