Class: Google::Apis::HealthV4::FoodMeasurementUnit
- Inherits:
-
Object
- Object
- Google::Apis::HealthV4::FoodMeasurementUnit
- 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 a food measurement unit.
Instance Attribute Summary collapse
-
#display_name ⇒ String
Required.
-
#plural_display_name ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ FoodMeasurementUnit
constructor
A new instance of FoodMeasurementUnit.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ FoodMeasurementUnit
Returns a new instance of FoodMeasurementUnit.
2502 2503 2504 |
# File 'lib/google/apis/health_v4/classes.rb', line 2502 def initialize(**args) update!(**args) end |
Instance Attribute Details
#display_name ⇒ String
Required. The display name of the food measurement unit (e.g., "gram", "piece")
.
Corresponds to the JSON property displayName
2494 2495 2496 |
# File 'lib/google/apis/health_v4/classes.rb', line 2494 def display_name @display_name end |
#plural_display_name ⇒ String
Optional. The plural display name of the food measurement unit (e.g., "grams",
"pieces").
Corresponds to the JSON property pluralDisplayName
2500 2501 2502 |
# File 'lib/google/apis/health_v4/classes.rb', line 2500 def plural_display_name @plural_display_name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2507 2508 2509 2510 |
# File 'lib/google/apis/health_v4/classes.rb', line 2507 def update!(**args) @display_name = args[:display_name] if args.key?(:display_name) @plural_display_name = args[:plural_display_name] if args.key?(:plural_display_name) end |