Class: Google::Apis::FitnessV1::DataPoint
- Inherits:
-
Object
- Object
- Google::Apis::FitnessV1::DataPoint
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/fitness_v1/classes.rb,
generated/google/apis/fitness_v1/representations.rb,
generated/google/apis/fitness_v1/representations.rb
Overview
Represents a single data point, generated by a particular data source. A data point holds a value for each field, an end timestamp and an optional start time. The exact semantics of each of these attributes are specified in the documentation for the particular data type. A data point can represent an instantaneous measurement, reading or input observation, as well as averages or aggregates over a time interval. Check the data type documentation to determine which is the case for a particular data type. Data points always contain one value for each field of the data type.
Instance Attribute Summary collapse
-
#computation_time_millis ⇒ Fixnum
DO NOT USE THIS FIELD.
-
#data_type_name ⇒ String
The data type defining the format of the values in this data point.
-
#end_time_nanos ⇒ Fixnum
The end time of the interval represented by this data point, in nanoseconds since epoch.
-
#modified_time_millis ⇒ Fixnum
Indicates the last time this data point was modified.
-
#origin_data_source_id ⇒ String
If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the data point originally.
-
#raw_timestamp_nanos ⇒ Fixnum
The raw timestamp from the original SensorEvent.
-
#start_time_nanos ⇒ Fixnum
The start time of the interval represented by this data point, in nanoseconds since epoch.
-
#value ⇒ Array<Google::Apis::FitnessV1::Value>
Values of each data type field for the data point.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DataPoint
constructor
A new instance of DataPoint.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ DataPoint
Returns a new instance of DataPoint
414 415 416 |
# File 'generated/google/apis/fitness_v1/classes.rb', line 414 def initialize(**args) update!(**args) end |
Instance Attribute Details
#computation_time_millis ⇒ Fixnum
DO NOT USE THIS FIELD. It is ignored, and not stored.
Corresponds to the JSON property computationTimeMillis
367 368 369 |
# File 'generated/google/apis/fitness_v1/classes.rb', line 367 def computation_time_millis @computation_time_millis end |
#data_type_name ⇒ String
The data type defining the format of the values in this data point.
Corresponds to the JSON property dataTypeName
372 373 374 |
# File 'generated/google/apis/fitness_v1/classes.rb', line 372 def data_type_name @data_type_name end |
#end_time_nanos ⇒ Fixnum
The end time of the interval represented by this data point, in nanoseconds
since epoch.
Corresponds to the JSON property endTimeNanos
378 379 380 |
# File 'generated/google/apis/fitness_v1/classes.rb', line 378 def end_time_nanos @end_time_nanos end |
#modified_time_millis ⇒ Fixnum
Indicates the last time this data point was modified. Useful only in contexts
where we are listing the data changes, rather than representing the current
state of the data.
Corresponds to the JSON property modifiedTimeMillis
385 386 387 |
# File 'generated/google/apis/fitness_v1/classes.rb', line 385 def modified_time_millis @modified_time_millis end |
#origin_data_source_id ⇒ String
If the data point is contained in a dataset for a derived data source, this
field will be populated with the data source stream ID that created the data
point originally.
Corresponds to the JSON property originDataSourceId
392 393 394 |
# File 'generated/google/apis/fitness_v1/classes.rb', line 392 def origin_data_source_id @origin_data_source_id end |
#raw_timestamp_nanos ⇒ Fixnum
The raw timestamp from the original SensorEvent.
Corresponds to the JSON property rawTimestampNanos
397 398 399 |
# File 'generated/google/apis/fitness_v1/classes.rb', line 397 def @raw_timestamp_nanos end |
#start_time_nanos ⇒ Fixnum
The start time of the interval represented by this data point, in nanoseconds
since epoch.
Corresponds to the JSON property startTimeNanos
403 404 405 |
# File 'generated/google/apis/fitness_v1/classes.rb', line 403 def start_time_nanos @start_time_nanos end |
#value ⇒ Array<Google::Apis::FitnessV1::Value>
Values of each data type field for the data point. It is expected that each
value corresponding to a data type field will occur in the same order that the
field is listed with in the data type specified in a data source.
Only one of integer and floating point fields will be populated, depending on
the format enum value within data source's type field.
Corresponds to the JSON property value
412 413 414 |
# File 'generated/google/apis/fitness_v1/classes.rb', line 412 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
419 420 421 422 423 424 425 426 427 428 |
# File 'generated/google/apis/fitness_v1/classes.rb', line 419 def update!(**args) @computation_time_millis = args[:computation_time_millis] if args.key?(:computation_time_millis) @data_type_name = args[:data_type_name] if args.key?(:data_type_name) @end_time_nanos = args[:end_time_nanos] if args.key?(:end_time_nanos) @modified_time_millis = args[:modified_time_millis] if args.key?(:modified_time_millis) @origin_data_source_id = args[:origin_data_source_id] if args.key?(:origin_data_source_id) @raw_timestamp_nanos = args[:raw_timestamp_nanos] if args.key?(:raw_timestamp_nanos) @start_time_nanos = args[:start_time_nanos] if args.key?(:start_time_nanos) @value = args[:value] if args.key?(:value) end |