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.



3902
3903
3904
# File 'lib/google/apis/health_v4/classes.rb', line 3902

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)


3890
3891
3892
# File 'lib/google/apis/health_v4/classes.rb', line 3890

def count
  @count
end

#minutesFixnum

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

Returns:

  • (Fixnum)


3895
3896
3897
# File 'lib/google/apis/health_v4/classes.rb', line 3895

def minutes
  @minutes
end

#typeString

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

Returns:

  • (String)


3900
3901
3902
# File 'lib/google/apis/health_v4/classes.rb', line 3900

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3907
3908
3909
3910
3911
# File 'lib/google/apis/health_v4/classes.rb', line 3907

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