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.



3675
3676
3677
# File 'lib/google/apis/health_v4/classes.rb', line 3675

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

Instance Attribute Details

#energyGoogle::Apis::HealthV4::EnergyQuantityRollup

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



3653
3654
3655
# File 'lib/google/apis/health_v4/classes.rb', line 3653

def energy
  @energy
end

#energy_from_fatGoogle::Apis::HealthV4::EnergyQuantityRollup

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



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

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



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

def nutrients
  @nutrients
end

#total_carbohydrateGoogle::Apis::HealthV4::WeightQuantityRollup

Rollup for the weight. Corresponds to the JSON property totalCarbohydrate



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

def total_carbohydrate
  @total_carbohydrate
end

#total_fatGoogle::Apis::HealthV4::WeightQuantityRollup

Rollup for the weight. Corresponds to the JSON property totalFat



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

def total_fat
  @total_fat
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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