Class: Google::Apis::HealthV4::WeightQuantity
- Inherits:
-
Object
- Object
- Google::Apis::HealthV4::WeightQuantity
- 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 weight quantity.
Instance Attribute Summary collapse
-
#grams ⇒ Float
Required.
-
#user_provided_unit ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ WeightQuantity
constructor
A new instance of WeightQuantity.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ WeightQuantity
Returns a new instance of WeightQuantity.
5856 5857 5858 |
# File 'lib/google/apis/health_v4/classes.rb', line 5856 def initialize(**args) update!(**args) end |
Instance Attribute Details
#grams ⇒ Float
Required. Value representing the weight in grams.
Corresponds to the JSON property grams
5849 5850 5851 |
# File 'lib/google/apis/health_v4/classes.rb', line 5849 def grams @grams end |
#user_provided_unit ⇒ String
Optional. Value representing the user provided unit.
Corresponds to the JSON property userProvidedUnit
5854 5855 5856 |
# File 'lib/google/apis/health_v4/classes.rb', line 5854 def user_provided_unit @user_provided_unit end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5861 5862 5863 5864 |
# File 'lib/google/apis/health_v4/classes.rb', line 5861 def update!(**args) @grams = args[:grams] if args.key?(:grams) @user_provided_unit = args[:user_provided_unit] if args.key?(:user_provided_unit) end |