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.
4991 4992 4993 |
# File 'lib/google/apis/health_v4/classes.rb', line 4991 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
4952 4953 4954 |
# File 'lib/google/apis/health_v4/classes.rb', line 4952 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
4958 4959 4960 |
# File 'lib/google/apis/health_v4/classes.rb', line 4958 def interval @interval end |
#metadata ⇒ Google::Apis::HealthV4::SleepMetadata
Additional information about how the sleep was processed.
Corresponds to the JSON property metadata
4963 4964 4965 |
# File 'lib/google/apis/health_v4/classes.rb', line 4963 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
4968 4969 4970 |
# File 'lib/google/apis/health_v4/classes.rb', line 4968 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
4974 4975 4976 |
# File 'lib/google/apis/health_v4/classes.rb', line 4974 def stages @stages end |
#summary ⇒ Google::Apis::HealthV4::SleepSummary
Sleep summary: metrics and stages summary.
Corresponds to the JSON property summary
4979 4980 4981 |
# File 'lib/google/apis/health_v4/classes.rb', line 4979 def summary @summary end |
#type ⇒ String
Optional. SleepType: classic or stages.
Corresponds to the JSON property type
4984 4985 4986 |
# File 'lib/google/apis/health_v4/classes.rb', line 4984 def type @type end |
#update_time ⇒ String
Output only. Last update time of this sleep observation.
Corresponds to the JSON property updateTime
4989 4990 4991 |
# File 'lib/google/apis/health_v4/classes.rb', line 4989 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 |
# File 'lib/google/apis/health_v4/classes.rb', line 4996 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 |