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.



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

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)


2148
2149
2150
# File 'lib/google/apis/health_v4/classes.rb', line 2148

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)


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

def user_provided_unit_last
  @user_provided_unit_last
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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