Class: Google::Apis::HealthV4::EnergyQuantity

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

Represents the energy quantity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EnergyQuantity

Returns a new instance of EnergyQuantity.



2162
2163
2164
# File 'lib/google/apis/health_v4/classes.rb', line 2162

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

Instance Attribute Details

#kcalFloat

Required. The energy value in kilocalories. Corresponds to the JSON property kcal

Returns:

  • (Float)


2155
2156
2157
# File 'lib/google/apis/health_v4/classes.rb', line 2155

def kcal
  @kcal
end

#user_provided_unitString

Optional. Value representing the user provided unit. Corresponds to the JSON property userProvidedUnit

Returns:

  • (String)


2160
2161
2162
# File 'lib/google/apis/health_v4/classes.rb', line 2160

def user_provided_unit
  @user_provided_unit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2167
2168
2169
2170
# File 'lib/google/apis/health_v4/classes.rb', line 2167

def update!(**args)
  @kcal = args[:kcal] if args.key?(:kcal)
  @user_provided_unit = args[:user_provided_unit] if args.key?(:user_provided_unit)
end