Class: Google::Apis::HealthV4::Weight
- Inherits:
-
Object
- Object
- Google::Apis::HealthV4::Weight
- 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
-
#notes ⇒ String
Optional.
-
#sample_time ⇒ Google::Apis::HealthV4::ObservationSampleTime
Represents a sample time of an observed data point.
-
#weight_grams ⇒ Float
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Weight
constructor
A new instance of Weight.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Weight
Returns a new instance of Weight.
5830 5831 5832 |
# File 'lib/google/apis/health_v4/classes.rb', line 5830 def initialize(**args) update!(**args) end |
Instance Attribute Details
#notes ⇒ String
Optional. Standard free-form notes captured at manual logging.
Corresponds to the JSON property notes
5818 5819 5820 |
# File 'lib/google/apis/health_v4/classes.rb', line 5818 def notes @notes end |
#sample_time ⇒ Google::Apis::HealthV4::ObservationSampleTime
Represents a sample time of an observed data point.
Corresponds to the JSON property sampleTime
5823 5824 5825 |
# File 'lib/google/apis/health_v4/classes.rb', line 5823 def sample_time @sample_time end |
#weight_grams ⇒ Float
Required. Weight of a user in grams.
Corresponds to the JSON property weightGrams
5828 5829 5830 |
# File 'lib/google/apis/health_v4/classes.rb', line 5828 def weight_grams @weight_grams end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5835 5836 5837 5838 5839 |
# File 'lib/google/apis/health_v4/classes.rb', line 5835 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 |