Class: Google::Apis::HealthV4::EnergyQuantityRollup

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

Rollup for the energy quantity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EnergyQuantityRollup

Returns a new instance of EnergyQuantityRollup.



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

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

Instance Attribute Details

#kcal_sumFloat

Required. The sum of the energy in kilocalories. Corresponds to the JSON property kcalSum

Returns:

  • (Float)


2153
2154
2155
# File 'lib/google/apis/health_v4/classes.rb', line 2153

def kcal_sum
  @kcal_sum
end

#user_provided_unit_lastString

Optional. The user provided unit on the last element. Corresponds to the JSON property userProvidedUnitLast

Returns:

  • (String)


2158
2159
2160
# File 'lib/google/apis/health_v4/classes.rb', line 2158

def user_provided_unit_last
  @user_provided_unit_last
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2165
2166
2167
2168
# File 'lib/google/apis/health_v4/classes.rb', line 2165

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