Class: Google::Apis::HealthV4::Weight

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Weight

Returns a new instance of Weight.



4402
4403
4404
# File 'lib/google/apis/health_v4/classes.rb', line 4402

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

Instance Attribute Details

#notesString

Optional. Standard free-form notes captured at manual logging. Corresponds to the JSON property notes

Returns:

  • (String)


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

def notes
  @notes
end

#sample_timeGoogle::Apis::HealthV4::ObservationSampleTime

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



4395
4396
4397
# File 'lib/google/apis/health_v4/classes.rb', line 4395

def sample_time
  @sample_time
end

#weight_gramsFloat

Required. Weight of a user in grams. Corresponds to the JSON property weightGrams

Returns:

  • (Float)


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

def weight_grams
  @weight_grams
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4407
4408
4409
4410
4411
# File 'lib/google/apis/health_v4/classes.rb', line 4407

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