Class: Google::Apis::HealthV4::MetricsSummary

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

Summary metrics for an exercise.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MetricsSummary

Returns a new instance of MetricsSummary.



3442
3443
3444
# File 'lib/google/apis/health_v4/classes.rb', line 3442

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

Instance Attribute Details

#active_zone_minutesFixnum

Optional. Total active zone minutes for the exercise. Corresponds to the JSON property activeZoneMinutes

Returns:

  • (Fixnum)


3382
3383
3384
# File 'lib/google/apis/health_v4/classes.rb', line 3382

def active_zone_minutes
  @active_zone_minutes
end

#average_heart_rate_beats_per_minuteFixnum

Optional. Average heart rate during the exercise. Corresponds to the JSON property averageHeartRateBeatsPerMinute

Returns:

  • (Fixnum)


3387
3388
3389
# File 'lib/google/apis/health_v4/classes.rb', line 3387

def average_heart_rate_beats_per_minute
  @average_heart_rate_beats_per_minute
end

#average_pace_seconds_per_meterFloat

Optional. Average pace in seconds per meter. Corresponds to the JSON property averagePaceSecondsPerMeter

Returns:

  • (Float)


3392
3393
3394
# File 'lib/google/apis/health_v4/classes.rb', line 3392

def average_pace_seconds_per_meter
  @average_pace_seconds_per_meter
end

#average_speed_millimeters_per_secondFloat

Optional. Average speed in millimeters per second. Corresponds to the JSON property averageSpeedMillimetersPerSecond

Returns:

  • (Float)


3397
3398
3399
# File 'lib/google/apis/health_v4/classes.rb', line 3397

def average_speed_millimeters_per_second
  @average_speed_millimeters_per_second
end

#calories_kcalFloat

Optional. Total calories burned by the user during the exercise. Corresponds to the JSON property caloriesKcal

Returns:

  • (Float)


3402
3403
3404
# File 'lib/google/apis/health_v4/classes.rb', line 3402

def calories_kcal
  @calories_kcal
end

#distance_millimetersFloat

Optional. Total distance covered by the user during the exercise. Corresponds to the JSON property distanceMillimeters

Returns:

  • (Float)


3407
3408
3409
# File 'lib/google/apis/health_v4/classes.rb', line 3407

def distance_millimeters
  @distance_millimeters
end

#elevation_gain_millimetersFloat

Optional. Total elevation gain during the exercise. Corresponds to the JSON property elevationGainMillimeters

Returns:

  • (Float)


3412
3413
3414
# File 'lib/google/apis/health_v4/classes.rb', line 3412

def elevation_gain_millimeters
  @elevation_gain_millimeters
end

#heart_rate_zone_durationsGoogle::Apis::HealthV4::TimeInHeartRateZones

Time spent in each heart rate zone. Corresponds to the JSON property heartRateZoneDurations



3417
3418
3419
# File 'lib/google/apis/health_v4/classes.rb', line 3417

def heart_rate_zone_durations
  @heart_rate_zone_durations
end

#mobility_metricsGoogle::Apis::HealthV4::MobilityMetrics

Mobility workouts specific metrics Corresponds to the JSON property mobilityMetrics



3422
3423
3424
# File 'lib/google/apis/health_v4/classes.rb', line 3422

def mobility_metrics
  @mobility_metrics
end

#run_vo2_maxFloat

Optional. Run VO2 max value for the exercise. Only present in the running exercises at the top level as in the summary of the whole exercise. Corresponds to the JSON property runVo2Max

Returns:

  • (Float)


3428
3429
3430
# File 'lib/google/apis/health_v4/classes.rb', line 3428

def run_vo2_max
  @run_vo2_max
end

#stepsFixnum

Optional. Total steps taken during the exercise. Corresponds to the JSON property steps

Returns:

  • (Fixnum)


3433
3434
3435
# File 'lib/google/apis/health_v4/classes.rb', line 3433

def steps
  @steps
end

#total_swim_lengthsFloat

Optional. Number of full pool lengths completed during the exercise. Only present in the swimming exercises at the top level as in the summary of the whole exercise. Corresponds to the JSON property totalSwimLengths

Returns:

  • (Float)


3440
3441
3442
# File 'lib/google/apis/health_v4/classes.rb', line 3440

def total_swim_lengths
  @total_swim_lengths
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
# File 'lib/google/apis/health_v4/classes.rb', line 3447

def update!(**args)
  @active_zone_minutes = args[:active_zone_minutes] if args.key?(:active_zone_minutes)
  @average_heart_rate_beats_per_minute = args[:average_heart_rate_beats_per_minute] if args.key?(:average_heart_rate_beats_per_minute)
  @average_pace_seconds_per_meter = args[:average_pace_seconds_per_meter] if args.key?(:average_pace_seconds_per_meter)
  @average_speed_millimeters_per_second = args[:average_speed_millimeters_per_second] if args.key?(:average_speed_millimeters_per_second)
  @calories_kcal = args[:calories_kcal] if args.key?(:calories_kcal)
  @distance_millimeters = args[:distance_millimeters] if args.key?(:distance_millimeters)
  @elevation_gain_millimeters = args[:elevation_gain_millimeters] if args.key?(:elevation_gain_millimeters)
  @heart_rate_zone_durations = args[:heart_rate_zone_durations] if args.key?(:heart_rate_zone_durations)
  @mobility_metrics = args[:mobility_metrics] if args.key?(:mobility_metrics)
  @run_vo2_max = args[:run_vo2_max] if args.key?(:run_vo2_max)
  @steps = args[:steps] if args.key?(:steps)
  @total_swim_lengths = args[:total_swim_lengths] if args.key?(:total_swim_lengths)
end