Class: Google::Apis::HealthV4::WeightQuantity

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 weight quantity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WeightQuantity

Returns a new instance of WeightQuantity.



5957
5958
5959
# File 'lib/google/apis/health_v4/classes.rb', line 5957

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

Instance Attribute Details

#gramsFloat

Required. The weight value in grams. Corresponds to the JSON property grams

Returns:

  • (Float)


5950
5951
5952
# File 'lib/google/apis/health_v4/classes.rb', line 5950

def grams
  @grams
end

#user_provided_unitString

Optional. Value representing the user provided unit. Corresponds to the JSON property userProvidedUnit

Returns:

  • (String)


5955
5956
5957
# File 'lib/google/apis/health_v4/classes.rb', line 5955

def user_provided_unit
  @user_provided_unit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5962
5963
5964
5965
# File 'lib/google/apis/health_v4/classes.rb', line 5962

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