Class: Google::Apis::HealthV4::BloodGlucose

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

Represents a blood glucose level measurement. LINT: LEGACY_NAMES

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BloodGlucose

Returns a new instance of BloodGlucose.



546
547
548
# File 'lib/google/apis/health_v4/classes.rb', line 546

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

Instance Attribute Details

#blood_glucose_milligrams_per_deciliterFloat

Required. Blood glucose level concentration in mg/dL. Corresponds to the JSON property bloodGlucoseMilligramsPerDeciliter

Returns:

  • (Float)


514
515
516
# File 'lib/google/apis/health_v4/classes.rb', line 514

def blood_glucose_milligrams_per_deciliter
  @blood_glucose_milligrams_per_deciliter
end

#meal_typeString

Optional. Meal type of the measurement. Corresponds to the JSON property mealType

Returns:

  • (String)


519
520
521
# File 'lib/google/apis/health_v4/classes.rb', line 519

def meal_type
  @meal_type
end

#measurement_sourceString

Optional. Source of the measurement. Corresponds to the JSON property measurementSource

Returns:

  • (String)


524
525
526
# File 'lib/google/apis/health_v4/classes.rb', line 524

def measurement_source
  @measurement_source
end

#measurement_timingString

Optional. Timing of the measurement. Corresponds to the JSON property measurementTiming

Returns:

  • (String)


529
530
531
# File 'lib/google/apis/health_v4/classes.rb', line 529

def measurement_timing
  @measurement_timing
end

#notesString

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

Returns:

  • (String)


534
535
536
# File 'lib/google/apis/health_v4/classes.rb', line 534

def notes
  @notes
end

#sample_timeGoogle::Apis::HealthV4::ObservationSampleTime

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



539
540
541
# File 'lib/google/apis/health_v4/classes.rb', line 539

def sample_time
  @sample_time
end

#specimenString

Optional. Type of body fluid used to measure the blood glucose. Corresponds to the JSON property specimen

Returns:

  • (String)


544
545
546
# File 'lib/google/apis/health_v4/classes.rb', line 544

def specimen
  @specimen
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



551
552
553
554
555
556
557
558
559
# File 'lib/google/apis/health_v4/classes.rb', line 551

def update!(**args)
  @blood_glucose_milligrams_per_deciliter = args[:blood_glucose_milligrams_per_deciliter] if args.key?(:blood_glucose_milligrams_per_deciliter)
  @meal_type = args[:meal_type] if args.key?(:meal_type)
  @measurement_source = args[:measurement_source] if args.key?(:measurement_source)
  @measurement_timing = args[:measurement_timing] if args.key?(:measurement_timing)
  @notes = args[:notes] if args.key?(:notes)
  @sample_time = args[:sample_time] if args.key?(:sample_time)
  @specimen = args[:specimen] if args.key?(:specimen)
end