Class: Google::Apis::HealthV4::NutritionLogRollupValue

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 result of the rollup of the nutrition log data type.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NutritionLogRollupValue

Returns a new instance of NutritionLogRollupValue.



3680
3681
3682
# File 'lib/google/apis/health_v4/classes.rb', line 3680

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

Instance Attribute Details

#energyGoogle::Apis::HealthV4::EnergyQuantityRollup

Rollup for the energy quantity. Corresponds to the JSON property energy



3658
3659
3660
# File 'lib/google/apis/health_v4/classes.rb', line 3658

def energy
  @energy
end

#energy_from_fatGoogle::Apis::HealthV4::EnergyQuantityRollup

Rollup for the energy quantity. Corresponds to the JSON property energyFromFat



3663
3664
3665
# File 'lib/google/apis/health_v4/classes.rb', line 3663

def energy_from_fat
  @energy_from_fat
end

#nutrientsArray<Google::Apis::HealthV4::NutrientQuantityRollup>

List of the nutrient roll-ups by the nutrient type. Corresponds to the JSON property nutrients



3668
3669
3670
# File 'lib/google/apis/health_v4/classes.rb', line 3668

def nutrients
  @nutrients
end

#total_carbohydrateGoogle::Apis::HealthV4::WeightQuantityRollup

Rollup for the weight. Corresponds to the JSON property totalCarbohydrate



3673
3674
3675
# File 'lib/google/apis/health_v4/classes.rb', line 3673

def total_carbohydrate
  @total_carbohydrate
end

#total_fatGoogle::Apis::HealthV4::WeightQuantityRollup

Rollup for the weight. Corresponds to the JSON property totalFat



3678
3679
3680
# File 'lib/google/apis/health_v4/classes.rb', line 3678

def total_fat
  @total_fat
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3685
3686
3687
3688
3689
3690
3691
# File 'lib/google/apis/health_v4/classes.rb', line 3685

def update!(**args)
  @energy = args[:energy] if args.key?(:energy)
  @energy_from_fat = args[:energy_from_fat] if args.key?(:energy_from_fat)
  @nutrients = args[:nutrients] if args.key?(:nutrients)
  @total_carbohydrate = args[:total_carbohydrate] if args.key?(:total_carbohydrate)
  @total_fat = args[:total_fat] if args.key?(:total_fat)
end