Class: Google::Apis::HealthV4::Exercise
- Inherits:
-
Object
- Object
- Google::Apis::HealthV4::Exercise
- 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
-
#active_duration ⇒ String
Optional.
-
#create_time ⇒ String
Output only.
-
#display_name ⇒ String
Required.
-
#exercise_events ⇒ Array<Google::Apis::HealthV4::ExerciseEvent>
Optional.
-
#exercise_metadata ⇒ Google::Apis::HealthV4::ExerciseMetadata
Additional exercise metadata.
-
#exercise_type ⇒ String
Required.
-
#interval ⇒ Google::Apis::HealthV4::SessionTimeInterval
Represents a time interval of session data point, which bundles multiple observed metrics together.
-
#metrics_summary ⇒ Google::Apis::HealthV4::MetricsSummary
Summary metrics for an exercise.
-
#notes ⇒ String
Optional.
-
#split_summaries ⇒ Array<Google::Apis::HealthV4::SplitSummary>
Optional.
-
#splits ⇒ Array<Google::Apis::HealthV4::SplitSummary>
Optional.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Exercise
constructor
A new instance of Exercise.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Exercise
Returns a new instance of Exercise.
2236 2237 2238 |
# File 'lib/google/apis/health_v4/classes.rb', line 2236 def initialize(**args) update!(**args) end |
Instance Attribute Details
#active_duration ⇒ String
Optional. Duration excluding pauses.
Corresponds to the JSON property activeDuration
2173 2174 2175 |
# File 'lib/google/apis/health_v4/classes.rb', line 2173 def active_duration @active_duration end |
#create_time ⇒ String
Output only. Represents the timestamp of the creation of the exercise.
Corresponds to the JSON property createTime
2178 2179 2180 |
# File 'lib/google/apis/health_v4/classes.rb', line 2178 def create_time @create_time end |
#display_name ⇒ String
Required. Exercise display name.
Corresponds to the JSON property displayName
2183 2184 2185 |
# File 'lib/google/apis/health_v4/classes.rb', line 2183 def display_name @display_name end |
#exercise_events ⇒ Array<Google::Apis::HealthV4::ExerciseEvent>
Optional. Exercise events that happen during an exercise, such as pause &
restarts.
Corresponds to the JSON property exerciseEvents
2189 2190 2191 |
# File 'lib/google/apis/health_v4/classes.rb', line 2189 def exercise_events @exercise_events end |
#exercise_metadata ⇒ Google::Apis::HealthV4::ExerciseMetadata
Additional exercise metadata.
Corresponds to the JSON property exerciseMetadata
2194 2195 2196 |
# File 'lib/google/apis/health_v4/classes.rb', line 2194 def @exercise_metadata end |
#exercise_type ⇒ String
Required. The type of activity performed during an exercise.
Corresponds to the JSON property exerciseType
2199 2200 2201 |
# File 'lib/google/apis/health_v4/classes.rb', line 2199 def exercise_type @exercise_type 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
2205 2206 2207 |
# File 'lib/google/apis/health_v4/classes.rb', line 2205 def interval @interval end |
#metrics_summary ⇒ Google::Apis::HealthV4::MetricsSummary
Summary metrics for an exercise.
Corresponds to the JSON property metricsSummary
2210 2211 2212 |
# File 'lib/google/apis/health_v4/classes.rb', line 2210 def metrics_summary @metrics_summary end |
#notes ⇒ String
Optional. Standard free-form notes captured at manual logging.
Corresponds to the JSON property notes
2215 2216 2217 |
# File 'lib/google/apis/health_v4/classes.rb', line 2215 def notes @notes end |
#split_summaries ⇒ Array<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
2222 2223 2224 |
# File 'lib/google/apis/health_v4/classes.rb', line 2222 def split_summaries @split_summaries end |
#splits ⇒ Array<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
2229 2230 2231 |
# File 'lib/google/apis/health_v4/classes.rb', line 2229 def splits @splits end |
#update_time ⇒ String
Output only. This is the timestamp of the last update to the exercise.
Corresponds to the JSON property updateTime
2234 2235 2236 |
# File 'lib/google/apis/health_v4/classes.rb', line 2234 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 |
# File 'lib/google/apis/health_v4/classes.rb', line 2241 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 |