Class: Google::Apis::HealthV4::HydrationLog

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

Holds information about a user logged hydration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HydrationLog

Returns a new instance of HydrationLog.



2139
2140
2141
# File 'lib/google/apis/health_v4/classes.rb', line 2139

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

Instance Attribute Details

#amount_consumedGoogle::Apis::HealthV4::VolumeQuantity

Represents the volume quantity. Corresponds to the JSON property amountConsumed



2131
2132
2133
# File 'lib/google/apis/health_v4/classes.rb', line 2131

def amount_consumed
  @amount_consumed
end

#intervalGoogle::Apis::HealthV4::SessionTimeInterval

Represents a time interval of session data point, which bundles multiple observed metrics together. Corresponds to the JSON property interval



2137
2138
2139
# File 'lib/google/apis/health_v4/classes.rb', line 2137

def interval
  @interval
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2144
2145
2146
2147
# File 'lib/google/apis/health_v4/classes.rb', line 2144

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