Class: Google::Apis::HealthV4::Sleep
- Inherits:
-
Object
- Object
- Google::Apis::HealthV4::Sleep
- 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
A sleep session possibly including stages.
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#interval ⇒ Google::Apis::HealthV4::SessionTimeInterval
Represents a time interval of session data point, which bundles multiple observed metrics together.
-
#metadata ⇒ Google::Apis::HealthV4::SleepMetadata
Additional information about how the sleep was processed.
-
#out_of_bed_segments ⇒ Array<Google::Apis::HealthV4::OutOfBedSegment>
Optional.
-
#stages ⇒ Array<Google::Apis::HealthV4::SleepStage>
Optional.
-
#summary ⇒ Google::Apis::HealthV4::SleepSummary
Sleep summary: metrics and stages summary.
-
#type ⇒ String
Optional.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Sleep
constructor
A new instance of Sleep.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Sleep
Returns a new instance of Sleep.
3662 3663 3664 |
# File 'lib/google/apis/health_v4/classes.rb', line 3662 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_time ⇒ String
Output only. Creation time of this sleep observation.
Corresponds to the JSON property createTime
3623 3624 3625 |
# File 'lib/google/apis/health_v4/classes.rb', line 3623 def create_time @create_time end |
#interval ⇒ Google::Apis::HealthV4::SessionTimeInterval
Represents a time interval of session data point, which bundles multiple
observed metrics together.
Corresponds to the JSON property interval
3629 3630 3631 |
# File 'lib/google/apis/health_v4/classes.rb', line 3629 def interval @interval end |
#metadata ⇒ Google::Apis::HealthV4::SleepMetadata
Additional information about how the sleep was processed.
Corresponds to the JSON property metadata
3634 3635 3636 |
# File 'lib/google/apis/health_v4/classes.rb', line 3634 def @metadata end |
#out_of_bed_segments ⇒ Array<Google::Apis::HealthV4::OutOfBedSegment>
Optional. “Out of bed” segments that can overlap with sleep stages.
Corresponds to the JSON property outOfBedSegments
3639 3640 3641 |
# File 'lib/google/apis/health_v4/classes.rb', line 3639 def out_of_bed_segments @out_of_bed_segments end |
#stages ⇒ Array<Google::Apis::HealthV4::SleepStage>
Optional. List of non-overlapping contiguous sleep stage segments that cover
the sleep period.
Corresponds to the JSON property stages
3645 3646 3647 |
# File 'lib/google/apis/health_v4/classes.rb', line 3645 def stages @stages end |
#summary ⇒ Google::Apis::HealthV4::SleepSummary
Sleep summary: metrics and stages summary.
Corresponds to the JSON property summary
3650 3651 3652 |
# File 'lib/google/apis/health_v4/classes.rb', line 3650 def summary @summary end |
#type ⇒ String
Optional. SleepType: classic or stages.
Corresponds to the JSON property type
3655 3656 3657 |
# File 'lib/google/apis/health_v4/classes.rb', line 3655 def type @type end |
#update_time ⇒ String
Output only. Last update time of this sleep observation.
Corresponds to the JSON property updateTime
3660 3661 3662 |
# File 'lib/google/apis/health_v4/classes.rb', line 3660 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 |
# File 'lib/google/apis/health_v4/classes.rb', line 3667 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @interval = args[:interval] if args.key?(:interval) @metadata = args[:metadata] if args.key?(:metadata) @out_of_bed_segments = args[:out_of_bed_segments] if args.key?(:out_of_bed_segments) @stages = args[:stages] if args.key?(:stages) @summary = args[:summary] if args.key?(:summary) @type = args[:type] if args.key?(:type) @update_time = args[:update_time] if args.key?(:update_time) end |