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.



3592
3593
3594
# File 'lib/google/apis/health_v4/classes.rb', line 3592

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

Instance Attribute Details

#energyGoogle::Apis::HealthV4::EnergyQuantityRollup

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



3570
3571
3572
# File 'lib/google/apis/health_v4/classes.rb', line 3570

def energy
  @energy
end

#energy_from_fatGoogle::Apis::HealthV4::EnergyQuantityRollup

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



3575
3576
3577
# File 'lib/google/apis/health_v4/classes.rb', line 3575

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



3580
3581
3582
# File 'lib/google/apis/health_v4/classes.rb', line 3580

def nutrients
  @nutrients
end

#total_carbohydrateGoogle::Apis::HealthV4::WeightQuantityRollup

Rollup for the weight. Corresponds to the JSON property totalCarbohydrate



3585
3586
3587
# File 'lib/google/apis/health_v4/classes.rb', line 3585

def total_carbohydrate
  @total_carbohydrate
end

#total_fatGoogle::Apis::HealthV4::WeightQuantityRollup

Rollup for the weight. Corresponds to the JSON property totalFat



3590
3591
3592
# File 'lib/google/apis/health_v4/classes.rb', line 3590

def total_fat
  @total_fat
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3597
3598
3599
3600
3601
3602
3603
# File 'lib/google/apis/health_v4/classes.rb', line 3597

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