Class: Google::Apis::HealthV4::DataSource

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

Data Source definition to track the origin of data. Each health data point, regardless of the complexity or data model (whether a simple step count or a detailed sleep session) must retain information about its source of origin (e. g. the device or app that collected it).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DataSource

Returns a new instance of DataSource.



1778
1779
1780
# File 'lib/google/apis/health_v4/classes.rb', line 1778

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

Instance Attribute Details

#applicationGoogle::Apis::HealthV4::Application

Optional metadata for the application that provided this data. Corresponds to the JSON property application



1761
1762
1763
# File 'lib/google/apis/health_v4/classes.rb', line 1761

def application
  @application
end

#deviceGoogle::Apis::HealthV4::Device

Captures metadata about the device that recorded the measurement. Corresponds to the JSON property device



1766
1767
1768
# File 'lib/google/apis/health_v4/classes.rb', line 1766

def device
  @device
end

#platformString

Output only. Captures the platform that uploaded the data. Corresponds to the JSON property platform

Returns:

  • (String)


1771
1772
1773
# File 'lib/google/apis/health_v4/classes.rb', line 1771

def platform
  @platform
end

#recording_methodString

Optional. Captures how the data was recorded. Corresponds to the JSON property recordingMethod

Returns:

  • (String)


1776
1777
1778
# File 'lib/google/apis/health_v4/classes.rb', line 1776

def recording_method
  @recording_method
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1783
1784
1785
1786
1787
1788
# File 'lib/google/apis/health_v4/classes.rb', line 1783

def update!(**args)
  @application = args[:application] if args.key?(:application)
  @device = args[:device] if args.key?(:device)
  @platform = args[:platform] if args.key?(:platform)
  @recording_method = args[:recording_method] if args.key?(:recording_method)
end