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.



4443
4444
4445
# File 'lib/google/apis/health_v4/classes.rb', line 4443

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)


4431
4432
4433
# File 'lib/google/apis/health_v4/classes.rb', line 4431

def notes
  @notes
end

#sample_timeGoogle::Apis::HealthV4::ObservationSampleTime

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



4436
4437
4438
# File 'lib/google/apis/health_v4/classes.rb', line 4436

def sample_time
  @sample_time
end

#weight_gramsFloat

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

Returns:

  • (Float)


4441
4442
4443
# File 'lib/google/apis/health_v4/classes.rb', line 4441

def weight_grams
  @weight_grams
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4448
4449
4450
4451
4452
# File 'lib/google/apis/health_v4/classes.rb', line 4448

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