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.



1810
1811
1812
# File 'lib/google/apis/health_v4/classes.rb', line 1810

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



1793
1794
1795
# File 'lib/google/apis/health_v4/classes.rb', line 1793

def application
  @application
end

#deviceGoogle::Apis::HealthV4::Device

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



1798
1799
1800
# File 'lib/google/apis/health_v4/classes.rb', line 1798

def device
  @device
end

#platformString

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

Returns:

  • (String)


1803
1804
1805
# File 'lib/google/apis/health_v4/classes.rb', line 1803

def platform
  @platform
end

#recording_methodString

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

Returns:

  • (String)


1808
1809
1810
# File 'lib/google/apis/health_v4/classes.rb', line 1808

def recording_method
  @recording_method
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1815
1816
1817
1818
1819
1820
# File 'lib/google/apis/health_v4/classes.rb', line 1815

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