Class: Google::Apis::HealthV4::ObservationSampleTime

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 sample time of an observed data point.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ObservationSampleTime

Returns a new instance of ObservationSampleTime.



2514
2515
2516
# File 'lib/google/apis/health_v4/classes.rb', line 2514

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

Instance Attribute Details

#civil_timeGoogle::Apis::HealthV4::CivilDateTime

Civil time representation similar to google.type.DateTime, but ensures that neither the timezone nor the UTC offset can be set to avoid confusion between civil and physical time queries. Corresponds to the JSON property civilTime



2501
2502
2503
# File 'lib/google/apis/health_v4/classes.rb', line 2501

def civil_time
  @civil_time
end

#physical_timeString

Required. The time of the observation. Corresponds to the JSON property physicalTime

Returns:

  • (String)


2506
2507
2508
# File 'lib/google/apis/health_v4/classes.rb', line 2506

def physical_time
  @physical_time
end

#utc_offsetString

Required. The offset of the user's local time during the observation relative to the Coordinated Universal Time (UTC). Corresponds to the JSON property utcOffset

Returns:

  • (String)


2512
2513
2514
# File 'lib/google/apis/health_v4/classes.rb', line 2512

def utc_offset
  @utc_offset
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2519
2520
2521
2522
2523
# File 'lib/google/apis/health_v4/classes.rb', line 2519

def update!(**args)
  @civil_time = args[:civil_time] if args.key?(:civil_time)
  @physical_time = args[:physical_time] if args.key?(:physical_time)
  @utc_offset = args[:utc_offset] if args.key?(:utc_offset)
end