google-apis-fitness_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-fitness_v1.rb +15 -0
- data/lib/google/apis/fitness_v1.rb +99 -0
- data/lib/google/apis/fitness_v1/classes.rb +982 -0
- data/lib/google/apis/fitness_v1/gem_version.rb +28 -0
- data/lib/google/apis/fitness_v1/representations.rb +398 -0
- data/lib/google/apis/fitness_v1/service.rb +630 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b6f6edb80909963abb7517cfa36c53a1d6688881d03411fc43ea825dacfb9560
|
4
|
+
data.tar.gz: 1c633dacca1b53e313886fbc37799221f94e418ba3cd090847291b2aaeeec575
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8571a3c0c56c0bf4d57ddb17489d5bc6d3f707a9abf39ad4100bd44d23cd31f1566f687f1e0e6caae682a3ef578382b34e86bd1e913d22a7bdcaac8682030318
|
7
|
+
data.tar.gz: 69e53bc5e01e3f85ba681b19f4666f0faabbf0761e7909497bf0062663f39cfabbd1413514c6ba4bedcf46df978cc164c219780b3037f65ed7afe2ac67ef0cb2
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-fitness_v1
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/fitness_v1/*.rb
|
9
|
+
lib/google/apis/fitness_v1.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V1 of the Fitness API
|
2
|
+
|
3
|
+
This is a simple client library for version V1 of the Fitness API. It provides:
|
4
|
+
|
5
|
+
* A client object that connects to the HTTP/JSON REST endpoint for the service.
|
6
|
+
* Ruby objects for data structures related to the service.
|
7
|
+
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
|
8
|
+
* Control of retry, pagination, and timeouts.
|
9
|
+
|
10
|
+
Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
|
11
|
+
|
12
|
+
## Getting started
|
13
|
+
|
14
|
+
### Before you begin
|
15
|
+
|
16
|
+
There are a few setup steps you need to complete before you can use this library:
|
17
|
+
|
18
|
+
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
|
19
|
+
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
|
20
|
+
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/fitness.googleapis.com) in the console.
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'google-apis-fitness_v1', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-fitness_v1
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/fitness_v1"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::FitnessV1::FitnessService.new
|
52
|
+
|
53
|
+
# Authenticate calls
|
54
|
+
client.authentication = # ... use the googleauth gem to create credentials
|
55
|
+
```
|
56
|
+
|
57
|
+
See the class reference docs for information on the methods you can call from a client.
|
58
|
+
|
59
|
+
## Documentation
|
60
|
+
|
61
|
+
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
|
+
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
|
+
|
66
|
+
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Fitness service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the Fitness API, see the {Google::Apis::FitnessV1::FitnessService class reference docs}.
|
69
|
+
|
70
|
+
## Which client should I use?
|
71
|
+
|
72
|
+
Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
|
73
|
+
|
74
|
+
This library, `google-apis-fitness_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](https://developers.google.com/fit/rest/v1/get-started) may provide guidance regarding the preferred client library to use.
|
83
|
+
|
84
|
+
## Supported Ruby versions
|
85
|
+
|
86
|
+
This library is supported on Ruby 2.5+.
|
87
|
+
|
88
|
+
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
|
93
|
+
|
94
|
+
## Support
|
95
|
+
|
96
|
+
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "google/apis/fitness_v1"
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/fitness_v1/service.rb'
|
16
|
+
require 'google/apis/fitness_v1/classes.rb'
|
17
|
+
require 'google/apis/fitness_v1/representations.rb'
|
18
|
+
require 'google/apis/fitness_v1/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Fitness API
|
23
|
+
#
|
24
|
+
# The Fitness API for managing users' fitness tracking data.
|
25
|
+
#
|
26
|
+
# @see https://developers.google.com/fit/rest/v1/get-started
|
27
|
+
module FitnessV1
|
28
|
+
# Version of the Fitness API this client connects to.
|
29
|
+
# This is NOT the gem version.
|
30
|
+
VERSION = 'V1'
|
31
|
+
|
32
|
+
# Use Google Fit to see and store your physical activity data
|
33
|
+
AUTH_FITNESS_ACTIVITY_READ = 'https://www.googleapis.com/auth/fitness.activity.read'
|
34
|
+
|
35
|
+
# See and add to your Google Fit physical activity data
|
36
|
+
AUTH_FITNESS_ACTIVITY_WRITE = 'https://www.googleapis.com/auth/fitness.activity.write'
|
37
|
+
|
38
|
+
# See info about your blood glucose in Google Fit. I consent to Google sharing my blood glucose information with this app.
|
39
|
+
AUTH_FITNESS_BLOOD_GLUCOSE_READ = 'https://www.googleapis.com/auth/fitness.blood_glucose.read'
|
40
|
+
|
41
|
+
# See and add info about your blood glucose to Google Fit. I consent to Google sharing my blood glucose information with this app.
|
42
|
+
AUTH_FITNESS_BLOOD_GLUCOSE_WRITE = 'https://www.googleapis.com/auth/fitness.blood_glucose.write'
|
43
|
+
|
44
|
+
# See info about your blood pressure in Google Fit. I consent to Google sharing my blood pressure information with this app.
|
45
|
+
AUTH_FITNESS_BLOOD_PRESSURE_READ = 'https://www.googleapis.com/auth/fitness.blood_pressure.read'
|
46
|
+
|
47
|
+
# See and add info about your blood pressure in Google Fit. I consent to Google sharing my blood pressure information with this app.
|
48
|
+
AUTH_FITNESS_BLOOD_PRESSURE_WRITE = 'https://www.googleapis.com/auth/fitness.blood_pressure.write'
|
49
|
+
|
50
|
+
# See info about your body measurements and heart rate in Google Fit
|
51
|
+
AUTH_FITNESS_BODY_READ = 'https://www.googleapis.com/auth/fitness.body.read'
|
52
|
+
|
53
|
+
# See and add info about your body measurements and heart rate to Google Fit
|
54
|
+
AUTH_FITNESS_BODY_WRITE = 'https://www.googleapis.com/auth/fitness.body.write'
|
55
|
+
|
56
|
+
# See info about your body temperature in Google Fit. I consent to Google sharing my body temperature information with this app.
|
57
|
+
AUTH_FITNESS_BODY_TEMPERATURE_READ = 'https://www.googleapis.com/auth/fitness.body_temperature.read'
|
58
|
+
|
59
|
+
# See and add to info about your body temperature in Google Fit. I consent to Google sharing my body temperature information with this app.
|
60
|
+
AUTH_FITNESS_BODY_TEMPERATURE_WRITE = 'https://www.googleapis.com/auth/fitness.body_temperature.write'
|
61
|
+
|
62
|
+
# See your heart rate data in Google Fit. I consent to Google sharing my heart rate information with this app.
|
63
|
+
AUTH_FITNESS_HEART_RATE_READ = 'https://www.googleapis.com/auth/fitness.heart_rate.read'
|
64
|
+
|
65
|
+
# See and add to your heart rate data in Google Fit. I consent to Google sharing my heart rate information with this app.
|
66
|
+
AUTH_FITNESS_HEART_RATE_WRITE = 'https://www.googleapis.com/auth/fitness.heart_rate.write'
|
67
|
+
|
68
|
+
# See your Google Fit speed and distance data
|
69
|
+
AUTH_FITNESS_LOCATION_READ = 'https://www.googleapis.com/auth/fitness.location.read'
|
70
|
+
|
71
|
+
# See and add to your Google Fit location data
|
72
|
+
AUTH_FITNESS_LOCATION_WRITE = 'https://www.googleapis.com/auth/fitness.location.write'
|
73
|
+
|
74
|
+
# See info about your nutrition in Google Fit
|
75
|
+
AUTH_FITNESS_NUTRITION_READ = 'https://www.googleapis.com/auth/fitness.nutrition.read'
|
76
|
+
|
77
|
+
# See and add to info about your nutrition in Google Fit
|
78
|
+
AUTH_FITNESS_NUTRITION_WRITE = 'https://www.googleapis.com/auth/fitness.nutrition.write'
|
79
|
+
|
80
|
+
# See info about your oxygen saturation in Google Fit. I consent to Google sharing my oxygen saturation information with this app.
|
81
|
+
AUTH_FITNESS_OXYGEN_SATURATION_READ = 'https://www.googleapis.com/auth/fitness.oxygen_saturation.read'
|
82
|
+
|
83
|
+
# See and add info about your oxygen saturation in Google Fit. I consent to Google sharing my oxygen saturation information with this app.
|
84
|
+
AUTH_FITNESS_OXYGEN_SATURATION_WRITE = 'https://www.googleapis.com/auth/fitness.oxygen_saturation.write'
|
85
|
+
|
86
|
+
# See info about your reproductive health in Google Fit. I consent to Google sharing my reproductive health information with this app.
|
87
|
+
AUTH_FITNESS_REPRODUCTIVE_HEALTH_READ = 'https://www.googleapis.com/auth/fitness.reproductive_health.read'
|
88
|
+
|
89
|
+
# See and add info about your reproductive health in Google Fit. I consent to Google sharing my reproductive health information with this app.
|
90
|
+
AUTH_FITNESS_REPRODUCTIVE_HEALTH_WRITE = 'https://www.googleapis.com/auth/fitness.reproductive_health.write'
|
91
|
+
|
92
|
+
# See your sleep data in Google Fit. I consent to Google sharing my sleep information with this app.
|
93
|
+
AUTH_FITNESS_SLEEP_READ = 'https://www.googleapis.com/auth/fitness.sleep.read'
|
94
|
+
|
95
|
+
# See and add to your sleep data in Google Fit. I consent to Google sharing my sleep information with this app.
|
96
|
+
AUTH_FITNESS_SLEEP_WRITE = 'https://www.googleapis.com/auth/fitness.sleep.write'
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,982 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module FitnessV1
|
24
|
+
|
25
|
+
#
|
26
|
+
class AggregateBucket
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Available for Bucket.Type.ACTIVITY_TYPE, Bucket.Type.ACTIVITY_SEGMENT
|
30
|
+
# Corresponds to the JSON property `activity`
|
31
|
+
# @return [Fixnum]
|
32
|
+
attr_accessor :activity
|
33
|
+
|
34
|
+
# There will be one dataset per AggregateBy in the request.
|
35
|
+
# Corresponds to the JSON property `dataset`
|
36
|
+
# @return [Array<Google::Apis::FitnessV1::Dataset>]
|
37
|
+
attr_accessor :dataset
|
38
|
+
|
39
|
+
# The end time for the aggregated data, in milliseconds since epoch, inclusive.
|
40
|
+
# Corresponds to the JSON property `endTimeMillis`
|
41
|
+
# @return [Fixnum]
|
42
|
+
attr_accessor :end_time_millis
|
43
|
+
|
44
|
+
# Sessions contain metadata, such as a user-friendly name and time interval
|
45
|
+
# information.
|
46
|
+
# Corresponds to the JSON property `session`
|
47
|
+
# @return [Google::Apis::FitnessV1::Session]
|
48
|
+
attr_accessor :session
|
49
|
+
|
50
|
+
# The start time for the aggregated data, in milliseconds since epoch, inclusive.
|
51
|
+
# Corresponds to the JSON property `startTimeMillis`
|
52
|
+
# @return [Fixnum]
|
53
|
+
attr_accessor :start_time_millis
|
54
|
+
|
55
|
+
# The type of a bucket signifies how the data aggregation is performed in the
|
56
|
+
# bucket.
|
57
|
+
# Corresponds to the JSON property `type`
|
58
|
+
# @return [String]
|
59
|
+
attr_accessor :type
|
60
|
+
|
61
|
+
def initialize(**args)
|
62
|
+
update!(**args)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Update properties of this object
|
66
|
+
def update!(**args)
|
67
|
+
@activity = args[:activity] if args.key?(:activity)
|
68
|
+
@dataset = args[:dataset] if args.key?(:dataset)
|
69
|
+
@end_time_millis = args[:end_time_millis] if args.key?(:end_time_millis)
|
70
|
+
@session = args[:session] if args.key?(:session)
|
71
|
+
@start_time_millis = args[:start_time_millis] if args.key?(:start_time_millis)
|
72
|
+
@type = args[:type] if args.key?(:type)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# The specification of which data to aggregate.
|
77
|
+
class AggregateBy
|
78
|
+
include Google::Apis::Core::Hashable
|
79
|
+
|
80
|
+
# A data source ID to aggregate. Only data from the specified data source ID
|
81
|
+
# will be included in the aggregation. If specified, this data source must exist;
|
82
|
+
# the OAuth scopes in the supplied credentials must grant read access to this
|
83
|
+
# data type. The dataset in the response will have the same data source ID. Note:
|
84
|
+
# Data can be aggregated by either the dataTypeName or the dataSourceId, not
|
85
|
+
# both.
|
86
|
+
# Corresponds to the JSON property `dataSourceId`
|
87
|
+
# @return [String]
|
88
|
+
attr_accessor :data_source_id
|
89
|
+
|
90
|
+
# The data type to aggregate. All data sources providing this data type will
|
91
|
+
# contribute data to the aggregation. The response will contain a single dataset
|
92
|
+
# for this data type name. The dataset will have a data source ID of derived::
|
93
|
+
# com.google.android.gms:aggregated. If the user has no data for this data type,
|
94
|
+
# an empty data set will be returned. Note: Data can be aggregated by either the
|
95
|
+
# dataTypeName or the dataSourceId, not both.
|
96
|
+
# Corresponds to the JSON property `dataTypeName`
|
97
|
+
# @return [String]
|
98
|
+
attr_accessor :data_type_name
|
99
|
+
|
100
|
+
def initialize(**args)
|
101
|
+
update!(**args)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Update properties of this object
|
105
|
+
def update!(**args)
|
106
|
+
@data_source_id = args[:data_source_id] if args.key?(:data_source_id)
|
107
|
+
@data_type_name = args[:data_type_name] if args.key?(:data_type_name)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# Next id: 10
|
112
|
+
class AggregateRequest
|
113
|
+
include Google::Apis::Core::Hashable
|
114
|
+
|
115
|
+
# The specification of data to be aggregated. At least one aggregateBy spec must
|
116
|
+
# be provided. All data that is specified will be aggregated using the same
|
117
|
+
# bucketing criteria. There will be one dataset in the response for every
|
118
|
+
# aggregateBy spec.
|
119
|
+
# Corresponds to the JSON property `aggregateBy`
|
120
|
+
# @return [Array<Google::Apis::FitnessV1::AggregateBy>]
|
121
|
+
attr_accessor :aggregate_by
|
122
|
+
|
123
|
+
# Specifies that data be aggregated each activity segment recorded for a user.
|
124
|
+
# Similar to bucketByActivitySegment, but bucketing is done for each activity
|
125
|
+
# segment rather than all segments of the same type. Mutually exclusive of other
|
126
|
+
# bucketing specifications.
|
127
|
+
# Corresponds to the JSON property `bucketByActivitySegment`
|
128
|
+
# @return [Google::Apis::FitnessV1::BucketByActivity]
|
129
|
+
attr_accessor :bucket_by_activity_segment
|
130
|
+
|
131
|
+
# Specifies that data be aggregated by the type of activity being performed when
|
132
|
+
# the data was recorded. All data that was recorded during a certain activity
|
133
|
+
# type (.for the given time range) will be aggregated into the same bucket. Data
|
134
|
+
# that was recorded while the user was not active will not be included in the
|
135
|
+
# response. Mutually exclusive of other bucketing specifications.
|
136
|
+
# Corresponds to the JSON property `bucketByActivityType`
|
137
|
+
# @return [Google::Apis::FitnessV1::BucketByActivity]
|
138
|
+
attr_accessor :bucket_by_activity_type
|
139
|
+
|
140
|
+
# Specifies that data be aggregated by user sessions. Data that does not fall
|
141
|
+
# within the time range of a session will not be included in the response.
|
142
|
+
# Mutually exclusive of other bucketing specifications.
|
143
|
+
# Corresponds to the JSON property `bucketBySession`
|
144
|
+
# @return [Google::Apis::FitnessV1::BucketBySession]
|
145
|
+
attr_accessor :bucket_by_session
|
146
|
+
|
147
|
+
# Specifies that data be aggregated by a single time interval. Mutually
|
148
|
+
# exclusive of other bucketing specifications.
|
149
|
+
# Corresponds to the JSON property `bucketByTime`
|
150
|
+
# @return [Google::Apis::FitnessV1::BucketByTime]
|
151
|
+
attr_accessor :bucket_by_time
|
152
|
+
|
153
|
+
# The end of a window of time. Data that intersects with this time window will
|
154
|
+
# be aggregated. The time is in milliseconds since epoch, inclusive.
|
155
|
+
# Corresponds to the JSON property `endTimeMillis`
|
156
|
+
# @return [Fixnum]
|
157
|
+
attr_accessor :end_time_millis
|
158
|
+
|
159
|
+
# DO NOT POPULATE THIS FIELD. It is ignored.
|
160
|
+
# Corresponds to the JSON property `filteredDataQualityStandard`
|
161
|
+
# @return [Array<String>]
|
162
|
+
attr_accessor :filtered_data_quality_standard
|
163
|
+
|
164
|
+
# The start of a window of time. Data that intersects with this time window will
|
165
|
+
# be aggregated. The time is in milliseconds since epoch, inclusive.
|
166
|
+
# Corresponds to the JSON property `startTimeMillis`
|
167
|
+
# @return [Fixnum]
|
168
|
+
attr_accessor :start_time_millis
|
169
|
+
|
170
|
+
def initialize(**args)
|
171
|
+
update!(**args)
|
172
|
+
end
|
173
|
+
|
174
|
+
# Update properties of this object
|
175
|
+
def update!(**args)
|
176
|
+
@aggregate_by = args[:aggregate_by] if args.key?(:aggregate_by)
|
177
|
+
@bucket_by_activity_segment = args[:bucket_by_activity_segment] if args.key?(:bucket_by_activity_segment)
|
178
|
+
@bucket_by_activity_type = args[:bucket_by_activity_type] if args.key?(:bucket_by_activity_type)
|
179
|
+
@bucket_by_session = args[:bucket_by_session] if args.key?(:bucket_by_session)
|
180
|
+
@bucket_by_time = args[:bucket_by_time] if args.key?(:bucket_by_time)
|
181
|
+
@end_time_millis = args[:end_time_millis] if args.key?(:end_time_millis)
|
182
|
+
@filtered_data_quality_standard = args[:filtered_data_quality_standard] if args.key?(:filtered_data_quality_standard)
|
183
|
+
@start_time_millis = args[:start_time_millis] if args.key?(:start_time_millis)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
#
|
188
|
+
class AggregateResponse
|
189
|
+
include Google::Apis::Core::Hashable
|
190
|
+
|
191
|
+
# A list of buckets containing the aggregated data.
|
192
|
+
# Corresponds to the JSON property `bucket`
|
193
|
+
# @return [Array<Google::Apis::FitnessV1::AggregateBucket>]
|
194
|
+
attr_accessor :bucket
|
195
|
+
|
196
|
+
def initialize(**args)
|
197
|
+
update!(**args)
|
198
|
+
end
|
199
|
+
|
200
|
+
# Update properties of this object
|
201
|
+
def update!(**args)
|
202
|
+
@bucket = args[:bucket] if args.key?(:bucket)
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
#
|
207
|
+
class Application
|
208
|
+
include Google::Apis::Core::Hashable
|
209
|
+
|
210
|
+
# An optional URI that can be used to link back to the application.
|
211
|
+
# Corresponds to the JSON property `detailsUrl`
|
212
|
+
# @return [String]
|
213
|
+
attr_accessor :details_url
|
214
|
+
|
215
|
+
# The name of this application. This is required for REST clients, but we do not
|
216
|
+
# enforce uniqueness of this name. It is provided as a matter of convenience for
|
217
|
+
# other developers who would like to identify which REST created an Application
|
218
|
+
# or Data Source.
|
219
|
+
# Corresponds to the JSON property `name`
|
220
|
+
# @return [String]
|
221
|
+
attr_accessor :name
|
222
|
+
|
223
|
+
# Package name for this application. This is used as a unique identifier when
|
224
|
+
# created by Android applications, but cannot be specified by REST clients. REST
|
225
|
+
# clients will have their developer project number reflected into the Data
|
226
|
+
# Source data stream IDs, instead of the packageName.
|
227
|
+
# Corresponds to the JSON property `packageName`
|
228
|
+
# @return [String]
|
229
|
+
attr_accessor :package_name
|
230
|
+
|
231
|
+
# Version of the application. You should update this field whenever the
|
232
|
+
# application changes in a way that affects the computation of the data.
|
233
|
+
# Corresponds to the JSON property `version`
|
234
|
+
# @return [String]
|
235
|
+
attr_accessor :version
|
236
|
+
|
237
|
+
def initialize(**args)
|
238
|
+
update!(**args)
|
239
|
+
end
|
240
|
+
|
241
|
+
# Update properties of this object
|
242
|
+
def update!(**args)
|
243
|
+
@details_url = args[:details_url] if args.key?(:details_url)
|
244
|
+
@name = args[:name] if args.key?(:name)
|
245
|
+
@package_name = args[:package_name] if args.key?(:package_name)
|
246
|
+
@version = args[:version] if args.key?(:version)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
#
|
251
|
+
class BucketByActivity
|
252
|
+
include Google::Apis::Core::Hashable
|
253
|
+
|
254
|
+
# The default activity stream will be used if a specific activityDataSourceId is
|
255
|
+
# not specified.
|
256
|
+
# Corresponds to the JSON property `activityDataSourceId`
|
257
|
+
# @return [String]
|
258
|
+
attr_accessor :activity_data_source_id
|
259
|
+
|
260
|
+
# Specifies that only activity segments of duration longer than
|
261
|
+
# minDurationMillis are considered and used as a container for aggregated data.
|
262
|
+
# Corresponds to the JSON property `minDurationMillis`
|
263
|
+
# @return [Fixnum]
|
264
|
+
attr_accessor :min_duration_millis
|
265
|
+
|
266
|
+
def initialize(**args)
|
267
|
+
update!(**args)
|
268
|
+
end
|
269
|
+
|
270
|
+
# Update properties of this object
|
271
|
+
def update!(**args)
|
272
|
+
@activity_data_source_id = args[:activity_data_source_id] if args.key?(:activity_data_source_id)
|
273
|
+
@min_duration_millis = args[:min_duration_millis] if args.key?(:min_duration_millis)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
#
|
278
|
+
class BucketBySession
|
279
|
+
include Google::Apis::Core::Hashable
|
280
|
+
|
281
|
+
# Specifies that only sessions of duration longer than minDurationMillis are
|
282
|
+
# considered and used as a container for aggregated data.
|
283
|
+
# Corresponds to the JSON property `minDurationMillis`
|
284
|
+
# @return [Fixnum]
|
285
|
+
attr_accessor :min_duration_millis
|
286
|
+
|
287
|
+
def initialize(**args)
|
288
|
+
update!(**args)
|
289
|
+
end
|
290
|
+
|
291
|
+
# Update properties of this object
|
292
|
+
def update!(**args)
|
293
|
+
@min_duration_millis = args[:min_duration_millis] if args.key?(:min_duration_millis)
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
#
|
298
|
+
class BucketByTime
|
299
|
+
include Google::Apis::Core::Hashable
|
300
|
+
|
301
|
+
# Specifies that result buckets aggregate data by exactly durationMillis time
|
302
|
+
# frames. Time frames that contain no data will be included in the response with
|
303
|
+
# an empty dataset.
|
304
|
+
# Corresponds to the JSON property `durationMillis`
|
305
|
+
# @return [Fixnum]
|
306
|
+
attr_accessor :duration_millis
|
307
|
+
|
308
|
+
#
|
309
|
+
# Corresponds to the JSON property `period`
|
310
|
+
# @return [Google::Apis::FitnessV1::BucketByTimePeriod]
|
311
|
+
attr_accessor :period
|
312
|
+
|
313
|
+
def initialize(**args)
|
314
|
+
update!(**args)
|
315
|
+
end
|
316
|
+
|
317
|
+
# Update properties of this object
|
318
|
+
def update!(**args)
|
319
|
+
@duration_millis = args[:duration_millis] if args.key?(:duration_millis)
|
320
|
+
@period = args[:period] if args.key?(:period)
|
321
|
+
end
|
322
|
+
end
|
323
|
+
|
324
|
+
#
|
325
|
+
class BucketByTimePeriod
|
326
|
+
include Google::Apis::Core::Hashable
|
327
|
+
|
328
|
+
# org.joda.timezone.DateTimeZone
|
329
|
+
# Corresponds to the JSON property `timeZoneId`
|
330
|
+
# @return [String]
|
331
|
+
attr_accessor :time_zone_id
|
332
|
+
|
333
|
+
#
|
334
|
+
# Corresponds to the JSON property `type`
|
335
|
+
# @return [String]
|
336
|
+
attr_accessor :type
|
337
|
+
|
338
|
+
#
|
339
|
+
# Corresponds to the JSON property `value`
|
340
|
+
# @return [Fixnum]
|
341
|
+
attr_accessor :value
|
342
|
+
|
343
|
+
def initialize(**args)
|
344
|
+
update!(**args)
|
345
|
+
end
|
346
|
+
|
347
|
+
# Update properties of this object
|
348
|
+
def update!(**args)
|
349
|
+
@time_zone_id = args[:time_zone_id] if args.key?(:time_zone_id)
|
350
|
+
@type = args[:type] if args.key?(:type)
|
351
|
+
@value = args[:value] if args.key?(:value)
|
352
|
+
end
|
353
|
+
end
|
354
|
+
|
355
|
+
# Represents a single data point, generated by a particular data source. A data
|
356
|
+
# point holds a value for each field, an end timestamp and an optional start
|
357
|
+
# time. The exact semantics of each of these attributes are specified in the
|
358
|
+
# documentation for the particular data type. A data point can represent an
|
359
|
+
# instantaneous measurement, reading or input observation, as well as averages
|
360
|
+
# or aggregates over a time interval. Check the data type documentation to
|
361
|
+
# determine which is the case for a particular data type. Data points always
|
362
|
+
# contain one value for each field of the data type.
|
363
|
+
class DataPoint
|
364
|
+
include Google::Apis::Core::Hashable
|
365
|
+
|
366
|
+
# DO NOT USE THIS FIELD. It is ignored, and not stored.
|
367
|
+
# Corresponds to the JSON property `computationTimeMillis`
|
368
|
+
# @return [Fixnum]
|
369
|
+
attr_accessor :computation_time_millis
|
370
|
+
|
371
|
+
# The data type defining the format of the values in this data point.
|
372
|
+
# Corresponds to the JSON property `dataTypeName`
|
373
|
+
# @return [String]
|
374
|
+
attr_accessor :data_type_name
|
375
|
+
|
376
|
+
# The end time of the interval represented by this data point, in nanoseconds
|
377
|
+
# since epoch.
|
378
|
+
# Corresponds to the JSON property `endTimeNanos`
|
379
|
+
# @return [Fixnum]
|
380
|
+
attr_accessor :end_time_nanos
|
381
|
+
|
382
|
+
# Indicates the last time this data point was modified. Useful only in contexts
|
383
|
+
# where we are listing the data changes, rather than representing the current
|
384
|
+
# state of the data.
|
385
|
+
# Corresponds to the JSON property `modifiedTimeMillis`
|
386
|
+
# @return [Fixnum]
|
387
|
+
attr_accessor :modified_time_millis
|
388
|
+
|
389
|
+
# If the data point is contained in a dataset for a derived data source, this
|
390
|
+
# field will be populated with the data source stream ID that created the data
|
391
|
+
# point originally. WARNING: do not rely on this field for anything other than
|
392
|
+
# debugging. The value of this field, if it is set at all, is an implementation
|
393
|
+
# detail and is not guaranteed to remain consistent.
|
394
|
+
# Corresponds to the JSON property `originDataSourceId`
|
395
|
+
# @return [String]
|
396
|
+
attr_accessor :origin_data_source_id
|
397
|
+
|
398
|
+
# The raw timestamp from the original SensorEvent.
|
399
|
+
# Corresponds to the JSON property `rawTimestampNanos`
|
400
|
+
# @return [Fixnum]
|
401
|
+
attr_accessor :raw_timestamp_nanos
|
402
|
+
|
403
|
+
# The start time of the interval represented by this data point, in nanoseconds
|
404
|
+
# since epoch.
|
405
|
+
# Corresponds to the JSON property `startTimeNanos`
|
406
|
+
# @return [Fixnum]
|
407
|
+
attr_accessor :start_time_nanos
|
408
|
+
|
409
|
+
# Values of each data type field for the data point. It is expected that each
|
410
|
+
# value corresponding to a data type field will occur in the same order that the
|
411
|
+
# field is listed with in the data type specified in a data source. Only one of
|
412
|
+
# integer and floating point fields will be populated, depending on the format
|
413
|
+
# enum value within data source's type field.
|
414
|
+
# Corresponds to the JSON property `value`
|
415
|
+
# @return [Array<Google::Apis::FitnessV1::Value>]
|
416
|
+
attr_accessor :value
|
417
|
+
|
418
|
+
def initialize(**args)
|
419
|
+
update!(**args)
|
420
|
+
end
|
421
|
+
|
422
|
+
# Update properties of this object
|
423
|
+
def update!(**args)
|
424
|
+
@computation_time_millis = args[:computation_time_millis] if args.key?(:computation_time_millis)
|
425
|
+
@data_type_name = args[:data_type_name] if args.key?(:data_type_name)
|
426
|
+
@end_time_nanos = args[:end_time_nanos] if args.key?(:end_time_nanos)
|
427
|
+
@modified_time_millis = args[:modified_time_millis] if args.key?(:modified_time_millis)
|
428
|
+
@origin_data_source_id = args[:origin_data_source_id] if args.key?(:origin_data_source_id)
|
429
|
+
@raw_timestamp_nanos = args[:raw_timestamp_nanos] if args.key?(:raw_timestamp_nanos)
|
430
|
+
@start_time_nanos = args[:start_time_nanos] if args.key?(:start_time_nanos)
|
431
|
+
@value = args[:value] if args.key?(:value)
|
432
|
+
end
|
433
|
+
end
|
434
|
+
|
435
|
+
# Definition of a unique source of sensor data. Data sources can expose raw data
|
436
|
+
# coming from hardware sensors on local or companion devices. They can also
|
437
|
+
# expose derived data, created by transforming or merging other data sources.
|
438
|
+
# Multiple data sources can exist for the same data type. Every data point
|
439
|
+
# inserted into or read from this service has an associated data source. The
|
440
|
+
# data source contains enough information to uniquely identify its data,
|
441
|
+
# including the hardware device and the application that collected and/or
|
442
|
+
# transformed the data. It also holds useful metadata, such as the hardware and
|
443
|
+
# application versions, and the device type. Each data source produces a unique
|
444
|
+
# stream of data, with a unique identifier. Not all changes to data source
|
445
|
+
# affect the stream identifier, so that data collected by updated versions of
|
446
|
+
# the same application/device can still be considered to belong to the same data
|
447
|
+
# stream.
|
448
|
+
class DataSource
|
449
|
+
include Google::Apis::Core::Hashable
|
450
|
+
|
451
|
+
# Information about an application which feeds sensor data into the platform.
|
452
|
+
# Corresponds to the JSON property `application`
|
453
|
+
# @return [Google::Apis::FitnessV1::Application]
|
454
|
+
attr_accessor :application
|
455
|
+
|
456
|
+
# DO NOT POPULATE THIS FIELD. It is never populated in responses from the
|
457
|
+
# platform, and is ignored in queries. It will be removed in a future version
|
458
|
+
# entirely.
|
459
|
+
# Corresponds to the JSON property `dataQualityStandard`
|
460
|
+
# @return [Array<String>]
|
461
|
+
attr_accessor :data_quality_standard
|
462
|
+
|
463
|
+
# A unique identifier for the data stream produced by this data source. The
|
464
|
+
# identifier includes: - The physical device's manufacturer, model, and serial
|
465
|
+
# number (UID). - The application's package name or name. Package name is used
|
466
|
+
# when the data source was created by an Android application. The developer
|
467
|
+
# project number is used when the data source was created by a REST client. -
|
468
|
+
# The data source's type. - The data source's stream name. Note that not all
|
469
|
+
# attributes of the data source are used as part of the stream identifier. In
|
470
|
+
# particular, the version of the hardware/the application isn't used. This
|
471
|
+
# allows us to preserve the same stream through version updates. This also means
|
472
|
+
# that two DataSource objects may represent the same data stream even if they're
|
473
|
+
# not equal. The exact format of the data stream ID created by an Android
|
474
|
+
# application is: type:dataType.name:application.packageName:device.manufacturer:
|
475
|
+
# device.model:device.uid:dataStreamName The exact format of the data stream ID
|
476
|
+
# created by a REST client is: type:dataType.name:developer project number:
|
477
|
+
# device.manufacturer:device.model:device.uid:dataStreamName When any of the
|
478
|
+
# optional fields that make up the data stream ID are absent, they will be
|
479
|
+
# omitted from the data stream ID. The minimum viable data stream ID would be:
|
480
|
+
# type:dataType.name:developer project number Finally, the developer project
|
481
|
+
# number and device UID are obfuscated when read by any REST or Android client
|
482
|
+
# that did not create the data source. Only the data source creator will see the
|
483
|
+
# developer project number in clear and normal form. This means a client will
|
484
|
+
# see a different set of data_stream_ids than another client with different
|
485
|
+
# credentials.
|
486
|
+
# Corresponds to the JSON property `dataStreamId`
|
487
|
+
# @return [String]
|
488
|
+
attr_accessor :data_stream_id
|
489
|
+
|
490
|
+
# The stream name uniquely identifies this particular data source among other
|
491
|
+
# data sources of the same type from the same underlying producer. Setting the
|
492
|
+
# stream name is optional, but should be done whenever an application exposes
|
493
|
+
# two streams for the same data type, or when a device has two equivalent
|
494
|
+
# sensors.
|
495
|
+
# Corresponds to the JSON property `dataStreamName`
|
496
|
+
# @return [String]
|
497
|
+
attr_accessor :data_stream_name
|
498
|
+
|
499
|
+
# The data type defines the schema for a stream of data being collected by,
|
500
|
+
# inserted into, or queried from the Fitness API.
|
501
|
+
# Corresponds to the JSON property `dataType`
|
502
|
+
# @return [Google::Apis::FitnessV1::DataType]
|
503
|
+
attr_accessor :data_type
|
504
|
+
|
505
|
+
# Representation of an integrated device (such as a phone or a wearable) that
|
506
|
+
# can hold sensors. Each sensor is exposed as a data source. The main purpose of
|
507
|
+
# the device information contained in this class is to identify the hardware of
|
508
|
+
# a particular data source. This can be useful in different ways, including: -
|
509
|
+
# Distinguishing two similar sensors on different devices (the step counter on
|
510
|
+
# two nexus 5 phones, for instance) - Display the source of data to the user (by
|
511
|
+
# using the device make / model) - Treat data differently depending on sensor
|
512
|
+
# type (accelerometers on a watch may give different patterns than those on a
|
513
|
+
# phone) - Build different analysis models for each device/version.
|
514
|
+
# Corresponds to the JSON property `device`
|
515
|
+
# @return [Google::Apis::FitnessV1::Device]
|
516
|
+
attr_accessor :device
|
517
|
+
|
518
|
+
# An end-user visible name for this data source.
|
519
|
+
# Corresponds to the JSON property `name`
|
520
|
+
# @return [String]
|
521
|
+
attr_accessor :name
|
522
|
+
|
523
|
+
# A constant describing the type of this data source. Indicates whether this
|
524
|
+
# data source produces raw or derived data.
|
525
|
+
# Corresponds to the JSON property `type`
|
526
|
+
# @return [String]
|
527
|
+
attr_accessor :type
|
528
|
+
|
529
|
+
def initialize(**args)
|
530
|
+
update!(**args)
|
531
|
+
end
|
532
|
+
|
533
|
+
# Update properties of this object
|
534
|
+
def update!(**args)
|
535
|
+
@application = args[:application] if args.key?(:application)
|
536
|
+
@data_quality_standard = args[:data_quality_standard] if args.key?(:data_quality_standard)
|
537
|
+
@data_stream_id = args[:data_stream_id] if args.key?(:data_stream_id)
|
538
|
+
@data_stream_name = args[:data_stream_name] if args.key?(:data_stream_name)
|
539
|
+
@data_type = args[:data_type] if args.key?(:data_type)
|
540
|
+
@device = args[:device] if args.key?(:device)
|
541
|
+
@name = args[:name] if args.key?(:name)
|
542
|
+
@type = args[:type] if args.key?(:type)
|
543
|
+
end
|
544
|
+
end
|
545
|
+
|
546
|
+
#
|
547
|
+
class DataType
|
548
|
+
include Google::Apis::Core::Hashable
|
549
|
+
|
550
|
+
# A field represents one dimension of a data type.
|
551
|
+
# Corresponds to the JSON property `field`
|
552
|
+
# @return [Array<Google::Apis::FitnessV1::DataTypeField>]
|
553
|
+
attr_accessor :field
|
554
|
+
|
555
|
+
# Each data type has a unique, namespaced, name. All data types in the com.
|
556
|
+
# google namespace are shared as part of the platform.
|
557
|
+
# Corresponds to the JSON property `name`
|
558
|
+
# @return [String]
|
559
|
+
attr_accessor :name
|
560
|
+
|
561
|
+
def initialize(**args)
|
562
|
+
update!(**args)
|
563
|
+
end
|
564
|
+
|
565
|
+
# Update properties of this object
|
566
|
+
def update!(**args)
|
567
|
+
@field = args[:field] if args.key?(:field)
|
568
|
+
@name = args[:name] if args.key?(:name)
|
569
|
+
end
|
570
|
+
end
|
571
|
+
|
572
|
+
# In case of multi-dimensional data (such as an accelerometer with x, y, and z
|
573
|
+
# axes) each field represents one dimension. Each data type field has a unique
|
574
|
+
# name which identifies it. The field also defines the format of the data (int,
|
575
|
+
# float, etc.). This message is only instantiated in code and not used for wire
|
576
|
+
# comms or stored in any way.
|
577
|
+
class DataTypeField
|
578
|
+
include Google::Apis::Core::Hashable
|
579
|
+
|
580
|
+
# The different supported formats for each field in a data type.
|
581
|
+
# Corresponds to the JSON property `format`
|
582
|
+
# @return [String]
|
583
|
+
attr_accessor :format
|
584
|
+
|
585
|
+
# Defines the name and format of data. Unlike data type names, field names are
|
586
|
+
# not namespaced, and only need to be unique within the data type.
|
587
|
+
# Corresponds to the JSON property `name`
|
588
|
+
# @return [String]
|
589
|
+
attr_accessor :name
|
590
|
+
|
591
|
+
#
|
592
|
+
# Corresponds to the JSON property `optional`
|
593
|
+
# @return [Boolean]
|
594
|
+
attr_accessor :optional
|
595
|
+
alias_method :optional?, :optional
|
596
|
+
|
597
|
+
def initialize(**args)
|
598
|
+
update!(**args)
|
599
|
+
end
|
600
|
+
|
601
|
+
# Update properties of this object
|
602
|
+
def update!(**args)
|
603
|
+
@format = args[:format] if args.key?(:format)
|
604
|
+
@name = args[:name] if args.key?(:name)
|
605
|
+
@optional = args[:optional] if args.key?(:optional)
|
606
|
+
end
|
607
|
+
end
|
608
|
+
|
609
|
+
# A dataset represents a projection container for data points. They do not carry
|
610
|
+
# any info of their own. Datasets represent a set of data points from a
|
611
|
+
# particular data source. A data point can be found in more than one dataset.
|
612
|
+
class Dataset
|
613
|
+
include Google::Apis::Core::Hashable
|
614
|
+
|
615
|
+
# The data stream ID of the data source that created the points in this dataset.
|
616
|
+
# Corresponds to the JSON property `dataSourceId`
|
617
|
+
# @return [String]
|
618
|
+
attr_accessor :data_source_id
|
619
|
+
|
620
|
+
# The largest end time of all data points in this possibly partial
|
621
|
+
# representation of the dataset. Time is in nanoseconds from epoch. This should
|
622
|
+
# also match the second part of the dataset identifier.
|
623
|
+
# Corresponds to the JSON property `maxEndTimeNs`
|
624
|
+
# @return [Fixnum]
|
625
|
+
attr_accessor :max_end_time_ns
|
626
|
+
|
627
|
+
# The smallest start time of all data points in this possibly partial
|
628
|
+
# representation of the dataset. Time is in nanoseconds from epoch. This should
|
629
|
+
# also match the first part of the dataset identifier.
|
630
|
+
# Corresponds to the JSON property `minStartTimeNs`
|
631
|
+
# @return [Fixnum]
|
632
|
+
attr_accessor :min_start_time_ns
|
633
|
+
|
634
|
+
# This token will be set when a dataset is received in response to a GET request
|
635
|
+
# and the dataset is too large to be included in a single response. Provide this
|
636
|
+
# value in a subsequent GET request to return the next page of data points
|
637
|
+
# within this dataset.
|
638
|
+
# Corresponds to the JSON property `nextPageToken`
|
639
|
+
# @return [String]
|
640
|
+
attr_accessor :next_page_token
|
641
|
+
|
642
|
+
# A partial list of data points contained in the dataset, ordered by
|
643
|
+
# endTimeNanos. This list is considered complete when retrieving a small dataset
|
644
|
+
# and partial when patching a dataset or retrieving a dataset that is too large
|
645
|
+
# to include in a single response.
|
646
|
+
# Corresponds to the JSON property `point`
|
647
|
+
# @return [Array<Google::Apis::FitnessV1::DataPoint>]
|
648
|
+
attr_accessor :point
|
649
|
+
|
650
|
+
def initialize(**args)
|
651
|
+
update!(**args)
|
652
|
+
end
|
653
|
+
|
654
|
+
# Update properties of this object
|
655
|
+
def update!(**args)
|
656
|
+
@data_source_id = args[:data_source_id] if args.key?(:data_source_id)
|
657
|
+
@max_end_time_ns = args[:max_end_time_ns] if args.key?(:max_end_time_ns)
|
658
|
+
@min_start_time_ns = args[:min_start_time_ns] if args.key?(:min_start_time_ns)
|
659
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
660
|
+
@point = args[:point] if args.key?(:point)
|
661
|
+
end
|
662
|
+
end
|
663
|
+
|
664
|
+
# Representation of an integrated device (such as a phone or a wearable) that
|
665
|
+
# can hold sensors. Each sensor is exposed as a data source. The main purpose of
|
666
|
+
# the device information contained in this class is to identify the hardware of
|
667
|
+
# a particular data source. This can be useful in different ways, including: -
|
668
|
+
# Distinguishing two similar sensors on different devices (the step counter on
|
669
|
+
# two nexus 5 phones, for instance) - Display the source of data to the user (by
|
670
|
+
# using the device make / model) - Treat data differently depending on sensor
|
671
|
+
# type (accelerometers on a watch may give different patterns than those on a
|
672
|
+
# phone) - Build different analysis models for each device/version.
|
673
|
+
class Device
|
674
|
+
include Google::Apis::Core::Hashable
|
675
|
+
|
676
|
+
# Manufacturer of the product/hardware.
|
677
|
+
# Corresponds to the JSON property `manufacturer`
|
678
|
+
# @return [String]
|
679
|
+
attr_accessor :manufacturer
|
680
|
+
|
681
|
+
# End-user visible model name for the device.
|
682
|
+
# Corresponds to the JSON property `model`
|
683
|
+
# @return [String]
|
684
|
+
attr_accessor :model
|
685
|
+
|
686
|
+
# A constant representing the type of the device.
|
687
|
+
# Corresponds to the JSON property `type`
|
688
|
+
# @return [String]
|
689
|
+
attr_accessor :type
|
690
|
+
|
691
|
+
# The serial number or other unique ID for the hardware. This field is
|
692
|
+
# obfuscated when read by any REST or Android client that did not create the
|
693
|
+
# data source. Only the data source creator will see the uid field in clear and
|
694
|
+
# normal form. The obfuscation preserves equality; that is, given two IDs, if
|
695
|
+
# id1 == id2, obfuscated(id1) == obfuscated(id2).
|
696
|
+
# Corresponds to the JSON property `uid`
|
697
|
+
# @return [String]
|
698
|
+
attr_accessor :uid
|
699
|
+
|
700
|
+
# Version string for the device hardware/software.
|
701
|
+
# Corresponds to the JSON property `version`
|
702
|
+
# @return [String]
|
703
|
+
attr_accessor :version
|
704
|
+
|
705
|
+
def initialize(**args)
|
706
|
+
update!(**args)
|
707
|
+
end
|
708
|
+
|
709
|
+
# Update properties of this object
|
710
|
+
def update!(**args)
|
711
|
+
@manufacturer = args[:manufacturer] if args.key?(:manufacturer)
|
712
|
+
@model = args[:model] if args.key?(:model)
|
713
|
+
@type = args[:type] if args.key?(:type)
|
714
|
+
@uid = args[:uid] if args.key?(:uid)
|
715
|
+
@version = args[:version] if args.key?(:version)
|
716
|
+
end
|
717
|
+
end
|
718
|
+
|
719
|
+
#
|
720
|
+
class ListDataPointChangesResponse
|
721
|
+
include Google::Apis::Core::Hashable
|
722
|
+
|
723
|
+
# The data stream ID of the data source with data point changes.
|
724
|
+
# Corresponds to the JSON property `dataSourceId`
|
725
|
+
# @return [String]
|
726
|
+
attr_accessor :data_source_id
|
727
|
+
|
728
|
+
# Deleted data points for the user. Note, for modifications this should be
|
729
|
+
# parsed before handling insertions.
|
730
|
+
# Corresponds to the JSON property `deletedDataPoint`
|
731
|
+
# @return [Array<Google::Apis::FitnessV1::DataPoint>]
|
732
|
+
attr_accessor :deleted_data_point
|
733
|
+
|
734
|
+
# Inserted data points for the user.
|
735
|
+
# Corresponds to the JSON property `insertedDataPoint`
|
736
|
+
# @return [Array<Google::Apis::FitnessV1::DataPoint>]
|
737
|
+
attr_accessor :inserted_data_point
|
738
|
+
|
739
|
+
# The continuation token, which is used to page through large result sets.
|
740
|
+
# Provide this value in a subsequent request to return the next page of results.
|
741
|
+
# Corresponds to the JSON property `nextPageToken`
|
742
|
+
# @return [String]
|
743
|
+
attr_accessor :next_page_token
|
744
|
+
|
745
|
+
def initialize(**args)
|
746
|
+
update!(**args)
|
747
|
+
end
|
748
|
+
|
749
|
+
# Update properties of this object
|
750
|
+
def update!(**args)
|
751
|
+
@data_source_id = args[:data_source_id] if args.key?(:data_source_id)
|
752
|
+
@deleted_data_point = args[:deleted_data_point] if args.key?(:deleted_data_point)
|
753
|
+
@inserted_data_point = args[:inserted_data_point] if args.key?(:inserted_data_point)
|
754
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
755
|
+
end
|
756
|
+
end
|
757
|
+
|
758
|
+
#
|
759
|
+
class ListDataSourcesResponse
|
760
|
+
include Google::Apis::Core::Hashable
|
761
|
+
|
762
|
+
# A previously created data source.
|
763
|
+
# Corresponds to the JSON property `dataSource`
|
764
|
+
# @return [Array<Google::Apis::FitnessV1::DataSource>]
|
765
|
+
attr_accessor :data_source
|
766
|
+
|
767
|
+
def initialize(**args)
|
768
|
+
update!(**args)
|
769
|
+
end
|
770
|
+
|
771
|
+
# Update properties of this object
|
772
|
+
def update!(**args)
|
773
|
+
@data_source = args[:data_source] if args.key?(:data_source)
|
774
|
+
end
|
775
|
+
end
|
776
|
+
|
777
|
+
#
|
778
|
+
class ListSessionsResponse
|
779
|
+
include Google::Apis::Core::Hashable
|
780
|
+
|
781
|
+
# If includeDeleted is set to true in the request, and startTime and endTime are
|
782
|
+
# omitted, this will include sessions which were deleted since the last sync.
|
783
|
+
# Corresponds to the JSON property `deletedSession`
|
784
|
+
# @return [Array<Google::Apis::FitnessV1::Session>]
|
785
|
+
attr_accessor :deleted_session
|
786
|
+
|
787
|
+
# Flag to indicate server has more data to transfer. DO NOT USE THIS FIELD. It
|
788
|
+
# is never populated in responses from the server.
|
789
|
+
# Corresponds to the JSON property `hasMoreData`
|
790
|
+
# @return [Boolean]
|
791
|
+
attr_accessor :has_more_data
|
792
|
+
alias_method :has_more_data?, :has_more_data
|
793
|
+
|
794
|
+
# The sync token which is used to sync further changes. This will only be
|
795
|
+
# provided if both startTime and endTime are omitted from the request.
|
796
|
+
# Corresponds to the JSON property `nextPageToken`
|
797
|
+
# @return [String]
|
798
|
+
attr_accessor :next_page_token
|
799
|
+
|
800
|
+
# Sessions with an end time that is between startTime and endTime of the request.
|
801
|
+
# Corresponds to the JSON property `session`
|
802
|
+
# @return [Array<Google::Apis::FitnessV1::Session>]
|
803
|
+
attr_accessor :session
|
804
|
+
|
805
|
+
def initialize(**args)
|
806
|
+
update!(**args)
|
807
|
+
end
|
808
|
+
|
809
|
+
# Update properties of this object
|
810
|
+
def update!(**args)
|
811
|
+
@deleted_session = args[:deleted_session] if args.key?(:deleted_session)
|
812
|
+
@has_more_data = args[:has_more_data] if args.key?(:has_more_data)
|
813
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
814
|
+
@session = args[:session] if args.key?(:session)
|
815
|
+
end
|
816
|
+
end
|
817
|
+
|
818
|
+
# Holder object for the value of an entry in a map field of a data point. A map
|
819
|
+
# value supports a subset of the formats that the regular Value supports.
|
820
|
+
class MapValue
|
821
|
+
include Google::Apis::Core::Hashable
|
822
|
+
|
823
|
+
# Floating point value.
|
824
|
+
# Corresponds to the JSON property `fpVal`
|
825
|
+
# @return [Float]
|
826
|
+
attr_accessor :fp_val
|
827
|
+
|
828
|
+
def initialize(**args)
|
829
|
+
update!(**args)
|
830
|
+
end
|
831
|
+
|
832
|
+
# Update properties of this object
|
833
|
+
def update!(**args)
|
834
|
+
@fp_val = args[:fp_val] if args.key?(:fp_val)
|
835
|
+
end
|
836
|
+
end
|
837
|
+
|
838
|
+
# Sessions contain metadata, such as a user-friendly name and time interval
|
839
|
+
# information.
|
840
|
+
class Session
|
841
|
+
include Google::Apis::Core::Hashable
|
842
|
+
|
843
|
+
# Session active time. While start_time_millis and end_time_millis define the
|
844
|
+
# full session time, the active time can be shorter and specified by
|
845
|
+
# active_time_millis. If the inactive time during the session is known, it
|
846
|
+
# should also be inserted via a com.google.activity.segment data point with a
|
847
|
+
# STILL activity value
|
848
|
+
# Corresponds to the JSON property `activeTimeMillis`
|
849
|
+
# @return [Fixnum]
|
850
|
+
attr_accessor :active_time_millis
|
851
|
+
|
852
|
+
# The type of activity this session represents.
|
853
|
+
# Corresponds to the JSON property `activityType`
|
854
|
+
# @return [Fixnum]
|
855
|
+
attr_accessor :activity_type
|
856
|
+
|
857
|
+
# The application that created the session.
|
858
|
+
# Corresponds to the JSON property `application`
|
859
|
+
# @return [Google::Apis::FitnessV1::Application]
|
860
|
+
attr_accessor :application
|
861
|
+
|
862
|
+
# A description for this session.
|
863
|
+
# Corresponds to the JSON property `description`
|
864
|
+
# @return [String]
|
865
|
+
attr_accessor :description
|
866
|
+
|
867
|
+
# An end time, in milliseconds since epoch, inclusive.
|
868
|
+
# Corresponds to the JSON property `endTimeMillis`
|
869
|
+
# @return [Fixnum]
|
870
|
+
attr_accessor :end_time_millis
|
871
|
+
|
872
|
+
# A client-generated identifier that is unique across all sessions owned by this
|
873
|
+
# particular user.
|
874
|
+
# Corresponds to the JSON property `id`
|
875
|
+
# @return [String]
|
876
|
+
attr_accessor :id
|
877
|
+
|
878
|
+
# A timestamp that indicates when the session was last modified.
|
879
|
+
# Corresponds to the JSON property `modifiedTimeMillis`
|
880
|
+
# @return [Fixnum]
|
881
|
+
attr_accessor :modified_time_millis
|
882
|
+
|
883
|
+
# A human readable name of the session.
|
884
|
+
# Corresponds to the JSON property `name`
|
885
|
+
# @return [String]
|
886
|
+
attr_accessor :name
|
887
|
+
|
888
|
+
# A start time, in milliseconds since epoch, inclusive.
|
889
|
+
# Corresponds to the JSON property `startTimeMillis`
|
890
|
+
# @return [Fixnum]
|
891
|
+
attr_accessor :start_time_millis
|
892
|
+
|
893
|
+
def initialize(**args)
|
894
|
+
update!(**args)
|
895
|
+
end
|
896
|
+
|
897
|
+
# Update properties of this object
|
898
|
+
def update!(**args)
|
899
|
+
@active_time_millis = args[:active_time_millis] if args.key?(:active_time_millis)
|
900
|
+
@activity_type = args[:activity_type] if args.key?(:activity_type)
|
901
|
+
@application = args[:application] if args.key?(:application)
|
902
|
+
@description = args[:description] if args.key?(:description)
|
903
|
+
@end_time_millis = args[:end_time_millis] if args.key?(:end_time_millis)
|
904
|
+
@id = args[:id] if args.key?(:id)
|
905
|
+
@modified_time_millis = args[:modified_time_millis] if args.key?(:modified_time_millis)
|
906
|
+
@name = args[:name] if args.key?(:name)
|
907
|
+
@start_time_millis = args[:start_time_millis] if args.key?(:start_time_millis)
|
908
|
+
end
|
909
|
+
end
|
910
|
+
|
911
|
+
# Holder object for the value of a single field in a data point. A field value
|
912
|
+
# has a particular format and is only ever set to one of an integer or a
|
913
|
+
# floating point value.
|
914
|
+
class Value
|
915
|
+
include Google::Apis::Core::Hashable
|
916
|
+
|
917
|
+
# Floating point value. When this is set, other values must not be set.
|
918
|
+
# Corresponds to the JSON property `fpVal`
|
919
|
+
# @return [Float]
|
920
|
+
attr_accessor :fp_val
|
921
|
+
|
922
|
+
# Integer value. When this is set, other values must not be set.
|
923
|
+
# Corresponds to the JSON property `intVal`
|
924
|
+
# @return [Fixnum]
|
925
|
+
attr_accessor :int_val
|
926
|
+
|
927
|
+
# Map value. The valid key space and units for the corresponding value of each
|
928
|
+
# entry should be documented as part of the data type definition. Keys should be
|
929
|
+
# kept small whenever possible. Data streams with large keys and high data
|
930
|
+
# frequency may be down sampled.
|
931
|
+
# Corresponds to the JSON property `mapVal`
|
932
|
+
# @return [Array<Google::Apis::FitnessV1::ValueMapValEntry>]
|
933
|
+
attr_accessor :map_val
|
934
|
+
|
935
|
+
# String value. When this is set, other values must not be set. Strings should
|
936
|
+
# be kept small whenever possible. Data streams with large string values and
|
937
|
+
# high data frequency may be down sampled.
|
938
|
+
# Corresponds to the JSON property `stringVal`
|
939
|
+
# @return [String]
|
940
|
+
attr_accessor :string_val
|
941
|
+
|
942
|
+
def initialize(**args)
|
943
|
+
update!(**args)
|
944
|
+
end
|
945
|
+
|
946
|
+
# Update properties of this object
|
947
|
+
def update!(**args)
|
948
|
+
@fp_val = args[:fp_val] if args.key?(:fp_val)
|
949
|
+
@int_val = args[:int_val] if args.key?(:int_val)
|
950
|
+
@map_val = args[:map_val] if args.key?(:map_val)
|
951
|
+
@string_val = args[:string_val] if args.key?(:string_val)
|
952
|
+
end
|
953
|
+
end
|
954
|
+
|
955
|
+
#
|
956
|
+
class ValueMapValEntry
|
957
|
+
include Google::Apis::Core::Hashable
|
958
|
+
|
959
|
+
#
|
960
|
+
# Corresponds to the JSON property `key`
|
961
|
+
# @return [String]
|
962
|
+
attr_accessor :key
|
963
|
+
|
964
|
+
# Holder object for the value of an entry in a map field of a data point. A map
|
965
|
+
# value supports a subset of the formats that the regular Value supports.
|
966
|
+
# Corresponds to the JSON property `value`
|
967
|
+
# @return [Google::Apis::FitnessV1::MapValue]
|
968
|
+
attr_accessor :value
|
969
|
+
|
970
|
+
def initialize(**args)
|
971
|
+
update!(**args)
|
972
|
+
end
|
973
|
+
|
974
|
+
# Update properties of this object
|
975
|
+
def update!(**args)
|
976
|
+
@key = args[:key] if args.key?(:key)
|
977
|
+
@value = args[:value] if args.key?(:value)
|
978
|
+
end
|
979
|
+
end
|
980
|
+
end
|
981
|
+
end
|
982
|
+
end
|