[−][src]Struct google_fitness1::DataSource
Definition of a unique source of sensor data. Data sources can expose raw data coming from hardware sensors on local or companion devices. They can also expose derived data, created by transforming or merging other data sources. Multiple data sources can exist for the same data type. Every data point inserted into or read from this service has an associated data source.
The data source contains enough information to uniquely identify its data, including the hardware device and the application that collected and/or transformed the data. It also holds useful metadata, such as the hardware and application versions, and the device type.
Each data source produces a unique stream of data, with a unique identifier. Not all changes to data source affect the stream identifier, so that data collected by updated versions of the same application/device can still be considered to belong to the same data stream.
Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- data sources delete users (response)
- data sources update users (request|response)
- data sources create users (request|response)
- data sources get users (response)
Fields
name: Option<String>
An end-user visible name for this data source.
data_quality_standard: Option<Vec<String>>
DO NOT POPULATE THIS FIELD. It is never populated in responses from the platform, and is ignored in queries. It will be removed in a future version entirely.
data_type: Option<DataType>
The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.
data_stream_name: Option<String>
The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.
application: Option<Application>
Information about an application which feeds sensor data into the platform.
device: Option<Device>
Representation of an integrated device (such as a phone or a wearable) that can hold sensors.
data_stream_id: Option<String>
A unique identifier for the data stream produced by this data source. The
identifier includes:
- The physical device's manufacturer, model, and serial number (UID).
- The application's package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client.
- The data source's type.
- The data source's stream name.
The exact format of the data stream ID created by an Android application
is:
type:dataType.name
The exact format of the data stream ID created by a REST client is:
type:dataType.name
When any of the optional fields that make up the data stream ID are absent, they will be omitted from the data stream ID. The minimum viable data stream ID would be: type:dataType.name:developer project number
Finally, the developer project number and device UID are obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form. This means a client will see a different set of data_stream_ids than another client with different credentials.
type_: Option<String>
A constant describing the type of this data source. Indicates whether this data source produces raw or derived data.
Trait Implementations
impl Clone for DataSource
[src]
fn clone(&self) -> DataSource
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for DataSource
[src]
impl Default for DataSource
[src]
fn default() -> DataSource
[src]
impl<'de> Deserialize<'de> for DataSource
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl RequestValue for DataSource
[src]
impl ResponseResult for DataSource
[src]
impl Serialize for DataSource
[src]
Auto Trait Implementations
impl RefUnwindSafe for DataSource
impl Send for DataSource
impl Sync for DataSource
impl Unpin for DataSource
impl UnwindSafe for DataSource
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,