Class: Google::Apis::HealthV4::NutritionLogRollupValue
- Inherits:
-
Object
- Object
- Google::Apis::HealthV4::NutritionLogRollupValue
- 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
-
#energy ⇒ Google::Apis::HealthV4::EnergyQuantityRollup
Rollup for the energy quantity.
-
#energy_from_fat ⇒ Google::Apis::HealthV4::EnergyQuantityRollup
Rollup for the energy quantity.
-
#nutrients ⇒ Array<Google::Apis::HealthV4::NutrientQuantityRollup>
List of the nutrient roll-ups by the nutrient type.
-
#total_carbohydrate ⇒ Google::Apis::HealthV4::WeightQuantityRollup
Rollup for the weight.
-
#total_fat ⇒ Google::Apis::HealthV4::WeightQuantityRollup
Rollup for the weight.
Instance Method Summary collapse
-
#initialize(**args) ⇒ NutritionLogRollupValue
constructor
A new instance of NutritionLogRollupValue.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ NutritionLogRollupValue
Returns a new instance of NutritionLogRollupValue.
3767 3768 3769 |
# File 'lib/google/apis/health_v4/classes.rb', line 3767 def initialize(**args) update!(**args) end |
Instance Attribute Details
#energy ⇒ Google::Apis::HealthV4::EnergyQuantityRollup
Rollup for the energy quantity.
Corresponds to the JSON property energy
3745 3746 3747 |
# File 'lib/google/apis/health_v4/classes.rb', line 3745 def energy @energy end |
#energy_from_fat ⇒ Google::Apis::HealthV4::EnergyQuantityRollup
Rollup for the energy quantity.
Corresponds to the JSON property energyFromFat
3750 3751 3752 |
# File 'lib/google/apis/health_v4/classes.rb', line 3750 def energy_from_fat @energy_from_fat end |
#nutrients ⇒ Array<Google::Apis::HealthV4::NutrientQuantityRollup>
List of the nutrient roll-ups by the nutrient type.
Corresponds to the JSON property nutrients
3755 3756 3757 |
# File 'lib/google/apis/health_v4/classes.rb', line 3755 def nutrients @nutrients end |
#total_carbohydrate ⇒ Google::Apis::HealthV4::WeightQuantityRollup
Rollup for the weight.
Corresponds to the JSON property totalCarbohydrate
3760 3761 3762 |
# File 'lib/google/apis/health_v4/classes.rb', line 3760 def total_carbohydrate @total_carbohydrate end |
#total_fat ⇒ Google::Apis::HealthV4::WeightQuantityRollup
Rollup for the weight.
Corresponds to the JSON property totalFat
3765 3766 3767 |
# File 'lib/google/apis/health_v4/classes.rb', line 3765 def total_fat @total_fat end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3772 3773 3774 3775 3776 3777 3778 |
# File 'lib/google/apis/health_v4/classes.rb', line 3772 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 |