Class: Google::Apis::HealthV4::FoodMeasurementUnit

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 a food measurement unit.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameString

Required. The display name of the food measurement unit (e.g., "gram", "piece") . Corresponds to the JSON property displayName

Returns:

  • (String)


2494
2495
2496
# File 'lib/google/apis/health_v4/classes.rb', line 2494

def display_name
  @display_name
end

#plural_display_nameString

Optional. The plural display name of the food measurement unit (e.g., "grams", "pieces"). Corresponds to the JSON property pluralDisplayName

Returns:

  • (String)


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