fitness  v1
Public Member Functions | Static Public Member Functions | List of all members
google_fitness_api::DataPoint Class Reference

#include <data_point.h>

Inheritance diagram for google_fitness_api::DataPoint:

Public Member Functions

 DataPoint (const Json::Value &storage)
 
 DataPoint (Json::Value *storage)
 
virtual ~DataPoint ()
 
const StringPiece GetTypeName () const
 
bool has_computation_time_millis () const
 
void clear_computation_time_millis ()
 
int64 get_computation_time_millis () const
 
void set_computation_time_millis (int64 value)
 
bool has_data_type_name () const
 
void clear_data_type_name ()
 
const StringPiece get_data_type_name () const
 
void set_data_type_name (const StringPiece &value)
 
bool has_end_time_nanos () const
 
void clear_end_time_nanos ()
 
int64 get_end_time_nanos () const
 
void set_end_time_nanos (int64 value)
 
bool has_modified_time_millis () const
 
void clear_modified_time_millis ()
 
int64 get_modified_time_millis () const
 
void set_modified_time_millis (int64 value)
 
bool has_origin_data_source_id () const
 
void clear_origin_data_source_id ()
 
const StringPiece get_origin_data_source_id () const
 
void set_origin_data_source_id (const StringPiece &value)
 
bool has_raw_timestamp_nanos () const
 
void clear_raw_timestamp_nanos ()
 
int64 get_raw_timestamp_nanos () const
 
void set_raw_timestamp_nanos (int64 value)
 
bool has_start_time_nanos () const
 
void clear_start_time_nanos ()
 
int64 get_start_time_nanos () const
 
void set_start_time_nanos (int64 value)
 
bool has_value () const
 
void clear_value ()
 
const client::JsonCppArray< Valueget_value () const
 
client::JsonCppArray< Valuemutable_value ()
 

Static Public Member Functions

static DataPointNew ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DataPoint() [1/2]

google_fitness_api::DataPoint::DataPoint ( const Json::Value &  storage)
explicit

Standard constructor for an immutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ DataPoint() [2/2]

google_fitness_api::DataPoint::DataPoint ( Json::Value *  storage)
explicit

Standard constructor for a mutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ ~DataPoint()

google_fitness_api::DataPoint::~DataPoint ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_computation_time_millis()

void google_fitness_api::DataPoint::clear_computation_time_millis ( )
inline

Clears the 'computationTimeMillis' attribute.

◆ clear_data_type_name()

void google_fitness_api::DataPoint::clear_data_type_name ( )
inline

Clears the 'dataTypeName' attribute.

◆ clear_end_time_nanos()

void google_fitness_api::DataPoint::clear_end_time_nanos ( )
inline

Clears the 'endTimeNanos' attribute.

◆ clear_modified_time_millis()

void google_fitness_api::DataPoint::clear_modified_time_millis ( )
inline

Clears the 'modifiedTimeMillis' attribute.

◆ clear_origin_data_source_id()

void google_fitness_api::DataPoint::clear_origin_data_source_id ( )
inline

Clears the 'originDataSourceId' attribute.

◆ clear_raw_timestamp_nanos()

void google_fitness_api::DataPoint::clear_raw_timestamp_nanos ( )
inline

Clears the 'rawTimestampNanos' attribute.

◆ clear_start_time_nanos()

void google_fitness_api::DataPoint::clear_start_time_nanos ( )
inline

Clears the 'startTimeNanos' attribute.

◆ clear_value()

void google_fitness_api::DataPoint::clear_value ( )
inline

Clears the 'value' attribute.

◆ get_computation_time_millis()

int64 google_fitness_api::DataPoint::get_computation_time_millis ( ) const
inline

Get the value of the 'computationTimeMillis' attribute.

◆ get_data_type_name()

const StringPiece google_fitness_api::DataPoint::get_data_type_name ( ) const
inline

Get the value of the 'dataTypeName' attribute.

◆ get_end_time_nanos()

int64 google_fitness_api::DataPoint::get_end_time_nanos ( ) const
inline

Get the value of the 'endTimeNanos' attribute.

◆ get_modified_time_millis()

int64 google_fitness_api::DataPoint::get_modified_time_millis ( ) const
inline

Get the value of the 'modifiedTimeMillis' attribute.

◆ get_origin_data_source_id()

const StringPiece google_fitness_api::DataPoint::get_origin_data_source_id ( ) const
inline

Get the value of the 'originDataSourceId' attribute.

◆ get_raw_timestamp_nanos()

int64 google_fitness_api::DataPoint::get_raw_timestamp_nanos ( ) const
inline

Get the value of the 'rawTimestampNanos' attribute.

◆ get_start_time_nanos()

int64 google_fitness_api::DataPoint::get_start_time_nanos ( ) const
inline

Get the value of the 'startTimeNanos' attribute.

◆ get_value()

const client::JsonCppArray<Value > google_fitness_api::DataPoint::get_value ( ) const

Get a reference to the value of the 'value' attribute.

◆ GetTypeName()

const StringPiece google_fitness_api::DataPoint::GetTypeName ( ) const
inline

Returns a string denoting the type of this data object.

Returns
google_fitness_api::DataPoint

◆ has_computation_time_millis()

bool google_fitness_api::DataPoint::has_computation_time_millis ( ) const
inline

Determine if the 'computationTimeMillis' attribute was set.

Returns
true if the 'computationTimeMillis' attribute was set.

◆ has_data_type_name()

bool google_fitness_api::DataPoint::has_data_type_name ( ) const
inline

Determine if the 'dataTypeName' attribute was set.

Returns
true if the 'dataTypeName' attribute was set.

◆ has_end_time_nanos()

bool google_fitness_api::DataPoint::has_end_time_nanos ( ) const
inline

Determine if the 'endTimeNanos' attribute was set.

Returns
true if the 'endTimeNanos' attribute was set.

◆ has_modified_time_millis()

bool google_fitness_api::DataPoint::has_modified_time_millis ( ) const
inline

Determine if the 'modifiedTimeMillis' attribute was set.

Returns
true if the 'modifiedTimeMillis' attribute was set.

◆ has_origin_data_source_id()

bool google_fitness_api::DataPoint::has_origin_data_source_id ( ) const
inline

Determine if the 'originDataSourceId' attribute was set.

Returns
true if the 'originDataSourceId' attribute was set.

◆ has_raw_timestamp_nanos()

bool google_fitness_api::DataPoint::has_raw_timestamp_nanos ( ) const
inline

Determine if the 'rawTimestampNanos' attribute was set.

Returns
true if the 'rawTimestampNanos' attribute was set.

◆ has_start_time_nanos()

bool google_fitness_api::DataPoint::has_start_time_nanos ( ) const
inline

Determine if the 'startTimeNanos' attribute was set.

Returns
true if the 'startTimeNanos' attribute was set.

◆ has_value()

bool google_fitness_api::DataPoint::has_value ( ) const
inline

Determine if the 'value' attribute was set.

Returns
true if the 'value' attribute was set.

◆ mutable_value()

client::JsonCppArray<Value > google_fitness_api::DataPoint::mutable_value ( )

Gets a reference to a mutable value of the 'value' property.

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.

Returns
The result can be modified to change the attribute value.

◆ New()

DataPoint * google_fitness_api::DataPoint::New ( )
static

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_computation_time_millis()

void google_fitness_api::DataPoint::set_computation_time_millis ( int64  value)
inline

Change the 'computationTimeMillis' attribute.

DO NOT USE THIS FIELD. It is ignored, and not stored.

Parameters
[in]valueThe new value.

◆ set_data_type_name()

void google_fitness_api::DataPoint::set_data_type_name ( const StringPiece &  value)
inline

Change the 'dataTypeName' attribute.

The data type defining the format of the values in this data point.

Parameters
[in]valueThe new value.

◆ set_end_time_nanos()

void google_fitness_api::DataPoint::set_end_time_nanos ( int64  value)
inline

Change the 'endTimeNanos' attribute.

The end time of the interval represented by this data point, in nanoseconds since epoch.

Parameters
[in]valueThe new value.

◆ set_modified_time_millis()

void google_fitness_api::DataPoint::set_modified_time_millis ( int64  value)
inline

Change the 'modifiedTimeMillis' attribute.

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.

Parameters
[in]valueThe new value.

◆ set_origin_data_source_id()

void google_fitness_api::DataPoint::set_origin_data_source_id ( const StringPiece &  value)
inline

Change the 'originDataSourceId' attribute.

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.

WARNING: do not rely on this field for anything other than debugging. The value of this field, if it is set at all, is an implementation detail and is not guaranteed to remain consistent.

Parameters
[in]valueThe new value.

◆ set_raw_timestamp_nanos()

void google_fitness_api::DataPoint::set_raw_timestamp_nanos ( int64  value)
inline

Change the 'rawTimestampNanos' attribute.

The raw timestamp from the original SensorEvent.

Parameters
[in]valueThe new value.

◆ set_start_time_nanos()

void google_fitness_api::DataPoint::set_start_time_nanos ( int64  value)
inline

Change the 'startTimeNanos' attribute.

The start time of the interval represented by this data point, in nanoseconds since epoch.

Parameters
[in]valueThe new value.

The documentation for this class was generated from the following files: