Class: Google::Apis::HealthV4::Exercise

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

An exercise that stores information about a physical activity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Exercise

Returns a new instance of Exercise.



1726
1727
1728
# File 'lib/google/apis/health_v4/classes.rb', line 1726

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

Instance Attribute Details

#active_durationString

Optional. Duration excluding pauses. Corresponds to the JSON property activeDuration

Returns:

  • (String)


1663
1664
1665
# File 'lib/google/apis/health_v4/classes.rb', line 1663

def active_duration
  @active_duration
end

#create_timeString

Output only. Represents the timestamp of the creation of the exercise. Corresponds to the JSON property createTime

Returns:

  • (String)


1668
1669
1670
# File 'lib/google/apis/health_v4/classes.rb', line 1668

def create_time
  @create_time
end

#display_nameString

Required. Exercise display name. Corresponds to the JSON property displayName

Returns:

  • (String)


1673
1674
1675
# File 'lib/google/apis/health_v4/classes.rb', line 1673

def display_name
  @display_name
end

#exercise_eventsArray<Google::Apis::HealthV4::ExerciseEvent>

Optional. Exercise events that happen during an exercise, such as pause & restarts. Corresponds to the JSON property exerciseEvents



1679
1680
1681
# File 'lib/google/apis/health_v4/classes.rb', line 1679

def exercise_events
  @exercise_events
end

#exercise_metadataGoogle::Apis::HealthV4::ExerciseMetadata

Additional exercise metadata. Corresponds to the JSON property exerciseMetadata



1684
1685
1686
# File 'lib/google/apis/health_v4/classes.rb', line 1684

def 
  @exercise_metadata
end

#exercise_typeString

Required. The type of activity performed during an exercise. Corresponds to the JSON property exerciseType

Returns:

  • (String)


1689
1690
1691
# File 'lib/google/apis/health_v4/classes.rb', line 1689

def exercise_type
  @exercise_type
end

#intervalGoogle::Apis::HealthV4::SessionTimeInterval

Represents a time interval of session data point, which bundles multiple observed metrics together. Corresponds to the JSON property interval



1695
1696
1697
# File 'lib/google/apis/health_v4/classes.rb', line 1695

def interval
  @interval
end

#metrics_summaryGoogle::Apis::HealthV4::MetricsSummary

Summary metrics for an exercise. Corresponds to the JSON property metricsSummary



1700
1701
1702
# File 'lib/google/apis/health_v4/classes.rb', line 1700

def metrics_summary
  @metrics_summary
end

#notesString

Optional. Standard free-form notes captured at manual logging. Corresponds to the JSON property notes

Returns:

  • (String)


1705
1706
1707
# File 'lib/google/apis/health_v4/classes.rb', line 1705

def notes
  @notes
end

#split_summariesArray<Google::Apis::HealthV4::SplitSummary>

Optional. Laps or splits recorded within an exercise. Laps could be split based on distance or other criteria (duration, etc.) Laps should not be overlapping with each other. Corresponds to the JSON property splitSummaries



1712
1713
1714
# File 'lib/google/apis/health_v4/classes.rb', line 1712

def split_summaries
  @split_summaries
end

#splitsArray<Google::Apis::HealthV4::SplitSummary>

Optional. The default split is 1 km or 1 mile. - if the movement distance is less than the default, then there are no splits - if the movement distance is greater than or equal to the default, then we have splits Corresponds to the JSON property splits



1719
1720
1721
# File 'lib/google/apis/health_v4/classes.rb', line 1719

def splits
  @splits
end

#update_timeString

Output only. This is the timestamp of the last update to the exercise. Corresponds to the JSON property updateTime

Returns:

  • (String)


1724
1725
1726
# File 'lib/google/apis/health_v4/classes.rb', line 1724

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
# File 'lib/google/apis/health_v4/classes.rb', line 1731

def update!(**args)
  @active_duration = args[:active_duration] if args.key?(:active_duration)
  @create_time = args[:create_time] if args.key?(:create_time)
  @display_name = args[:display_name] if args.key?(:display_name)
  @exercise_events = args[:exercise_events] if args.key?(:exercise_events)
  @exercise_metadata = args[:exercise_metadata] if args.key?(:exercise_metadata)
  @exercise_type = args[:exercise_type] if args.key?(:exercise_type)
  @interval = args[:interval] if args.key?(:interval)
  @metrics_summary = args[:metrics_summary] if args.key?(:metrics_summary)
  @notes = args[:notes] if args.key?(:notes)
  @split_summaries = args[:split_summaries] if args.key?(:split_summaries)
  @splits = args[:splits] if args.key?(:splits)
  @update_time = args[:update_time] if args.key?(:update_time)
end