Class: Google::Apis::HealthV4::VolumeQuantity

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ VolumeQuantity

Returns a new instance of VolumeQuantity.



4400
4401
4402
# File 'lib/google/apis/health_v4/classes.rb', line 4400

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

Instance Attribute Details

#millilitersFloat

Required. Value representing the volume in milliliters. Corresponds to the JSON property milliliters

Returns:

  • (Float)


4391
4392
4393
# File 'lib/google/apis/health_v4/classes.rb', line 4391

def milliliters
  @milliliters
end

#user_provided_unitString

Optional. Value representing the user provided unit, used only for user-facing input and display purposes. In the API format, all volume quantities are converted to milliliters. Corresponds to the JSON property userProvidedUnit

Returns:

  • (String)


4398
4399
4400
# File 'lib/google/apis/health_v4/classes.rb', line 4398

def user_provided_unit
  @user_provided_unit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4405
4406
4407
4408
# File 'lib/google/apis/health_v4/classes.rb', line 4405

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