Class: Google::Apis::HealthV4::BodyFat

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

Body fat measurement.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BodyFat

Returns a new instance of BodyFat.



377
378
379
# File 'lib/google/apis/health_v4/classes.rb', line 377

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

Instance Attribute Details

#percentageFloat

Required. Body fat percentage, in range [0, 100]. Corresponds to the JSON property percentage

Returns:

  • (Float)


370
371
372
# File 'lib/google/apis/health_v4/classes.rb', line 370

def percentage
  @percentage
end

#sample_timeGoogle::Apis::HealthV4::ObservationSampleTime

Represents a sample time of an observed data point. Corresponds to the JSON property sampleTime



375
376
377
# File 'lib/google/apis/health_v4/classes.rb', line 375

def sample_time
  @sample_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



382
383
384
385
# File 'lib/google/apis/health_v4/classes.rb', line 382

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