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.



1401
1402
1403
# File 'lib/google/apis/health_v4/classes.rb', line 1401

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



1384
1385
1386
# File 'lib/google/apis/health_v4/classes.rb', line 1384

def application
  @application
end

#deviceGoogle::Apis::HealthV4::Device

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



1389
1390
1391
# File 'lib/google/apis/health_v4/classes.rb', line 1389

def device
  @device
end

#platformString

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

Returns:

  • (String)


1394
1395
1396
# File 'lib/google/apis/health_v4/classes.rb', line 1394

def platform
  @platform
end

#recording_methodString

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

Returns:

  • (String)


1399
1400
1401
# File 'lib/google/apis/health_v4/classes.rb', line 1399

def recording_method
  @recording_method
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1406
1407
1408
1409
1410
1411
# File 'lib/google/apis/health_v4/classes.rb', line 1406

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