Class: Google::Apis::HealthV4::NutrientQuantity

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 quantity of a nutrient.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NutrientQuantity

Returns a new instance of NutrientQuantity.



3442
3443
3444
# File 'lib/google/apis/health_v4/classes.rb', line 3442

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

Instance Attribute Details

#nutrientString

Required. Value representing the nutrient. Corresponds to the JSON property nutrient

Returns:

  • (String)


3435
3436
3437
# File 'lib/google/apis/health_v4/classes.rb', line 3435

def nutrient
  @nutrient
end

#quantityGoogle::Apis::HealthV4::WeightQuantity

Represents the weight quantity. Corresponds to the JSON property quantity



3440
3441
3442
# File 'lib/google/apis/health_v4/classes.rb', line 3440

def quantity
  @quantity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3447
3448
3449
3450
# File 'lib/google/apis/health_v4/classes.rb', line 3447

def update!(**args)
  @nutrient = args[:nutrient] if args.key?(:nutrient)
  @quantity = args[:quantity] if args.key?(:quantity)
end