Class: Google::Apis::HealthV4::EnergyQuantity
- Inherits:
-
Object
- Object
- Google::Apis::HealthV4::EnergyQuantity
- 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
Represents the energy quantity.
Instance Attribute Summary collapse
-
#kcal ⇒ Float
Required.
-
#user_provided_unit ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ EnergyQuantity
constructor
A new instance of EnergyQuantity.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ EnergyQuantity
Returns a new instance of EnergyQuantity.
2130 2131 2132 |
# File 'lib/google/apis/health_v4/classes.rb', line 2130 def initialize(**args) update!(**args) end |
Instance Attribute Details
#kcal ⇒ Float
Required. Value representing the energy in kilocalories.
Corresponds to the JSON property kcal
2123 2124 2125 |
# File 'lib/google/apis/health_v4/classes.rb', line 2123 def kcal @kcal end |
#user_provided_unit ⇒ String
Optional. Value representing the user provided unit.
Corresponds to the JSON property userProvidedUnit
2128 2129 2130 |
# File 'lib/google/apis/health_v4/classes.rb', line 2128 def user_provided_unit @user_provided_unit end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2135 2136 2137 2138 |
# File 'lib/google/apis/health_v4/classes.rb', line 2135 def update!(**args) @kcal = args[:kcal] if args.key?(:kcal) @user_provided_unit = args[:user_provided_unit] if args.key?(:user_provided_unit) end |