Class: Google::Apis::HealthV4::StageSummary

Inherits:
Object
  • Object
show all
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

Total duration and segment count for a stage.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ StageSummary

Returns a new instance of StageSummary.



3841
3842
3843
# File 'lib/google/apis/health_v4/classes.rb', line 3841

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#countFixnum

Output only. Number of sleep stages segments. Corresponds to the JSON property count

Returns:

  • (Fixnum)


3829
3830
3831
# File 'lib/google/apis/health_v4/classes.rb', line 3829

def count
  @count
end

#minutesFixnum

Output only. Total duration in minutes of a sleep stage. Corresponds to the JSON property minutes

Returns:

  • (Fixnum)


3834
3835
3836
# File 'lib/google/apis/health_v4/classes.rb', line 3834

def minutes
  @minutes
end

#typeString

Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc. Corresponds to the JSON property type

Returns:

  • (String)


3839
3840
3841
# File 'lib/google/apis/health_v4/classes.rb', line 3839

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3846
3847
3848
3849
3850
# File 'lib/google/apis/health_v4/classes.rb', line 3846

def update!(**args)
  @count = args[:count] if args.key?(:count)
  @minutes = args[:minutes] if args.key?(:minutes)
  @type = args[:type] if args.key?(:type)
end