| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 1 library googleapis.fitness.v1; | 3 library googleapis.fitness.v1; |
| 2 | 4 |
| 3 import "dart:core" as core; | 5 import 'dart:core' as core; |
| 4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
| 5 import "dart:async" as async; | 7 import 'dart:async' as async; |
| 6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
| 7 | 9 |
| 8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
| 9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; | |
| 11 import '../common/common.dart' as common; | |
| 12 | 13 |
| 13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError; |
| 16 |
| 17 const core.String USER_AGENT = 'dart-api-client fitness/v1'; |
| 15 | 18 |
| 16 /** Google Fit API */ | 19 /** Google Fit API */ |
| 17 class FitnessApi { | 20 class FitnessApi { |
| 18 /** View your activity information in Google Fit */ | 21 /** View your activity information in Google Fit */ |
| 19 static const FitnessActivityReadScope = "https://www.googleapis.com/auth/fitne
ss.activity.read"; | 22 static const FitnessActivityReadScope = "https://www.googleapis.com/auth/fitne
ss.activity.read"; |
| 20 | 23 |
| 21 /** View and store your activity information in Google Fit */ | 24 /** View and store your activity information in Google Fit */ |
| 22 static const FitnessActivityWriteScope = "https://www.googleapis.com/auth/fitn
ess.activity.write"; | 25 static const FitnessActivityWriteScope = "https://www.googleapis.com/auth/fitn
ess.activity.write"; |
| 23 | 26 |
| 24 /** View body sensor information in Google Fit */ | 27 /** View body sensor information in Google Fit */ |
| 25 static const FitnessBodyReadScope = "https://www.googleapis.com/auth/fitness.b
ody.read"; | 28 static const FitnessBodyReadScope = "https://www.googleapis.com/auth/fitness.b
ody.read"; |
| 26 | 29 |
| 27 /** View and store body sensor data in Google Fit */ | 30 /** View and store body sensor data in Google Fit */ |
| 28 static const FitnessBodyWriteScope = "https://www.googleapis.com/auth/fitness.
body.write"; | 31 static const FitnessBodyWriteScope = "https://www.googleapis.com/auth/fitness.
body.write"; |
| 29 | 32 |
| 30 /** View your stored location data in Google Fit */ | 33 /** View your stored location data in Google Fit */ |
| 31 static const FitnessLocationReadScope = "https://www.googleapis.com/auth/fitne
ss.location.read"; | 34 static const FitnessLocationReadScope = "https://www.googleapis.com/auth/fitne
ss.location.read"; |
| 32 | 35 |
| 33 /** View and store your location data in Google Fit */ | 36 /** View and store your location data in Google Fit */ |
| 34 static const FitnessLocationWriteScope = "https://www.googleapis.com/auth/fitn
ess.location.write"; | 37 static const FitnessLocationWriteScope = "https://www.googleapis.com/auth/fitn
ess.location.write"; |
| 35 | 38 |
| 36 | 39 |
| 37 final common_internal.ApiRequester _requester; | 40 final commons.ApiRequester _requester; |
| 38 | 41 |
| 39 UsersResourceApi get users => new UsersResourceApi(_requester); | 42 UsersResourceApi get users => new UsersResourceApi(_requester); |
| 40 | 43 |
| 41 FitnessApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c
om/", core.String servicePath: "fitness/v1/users/"}) : | 44 FitnessApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c
om/", core.String servicePath: "fitness/v1/users/"}) : |
| 42 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 45 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 43 } | 46 } |
| 44 | 47 |
| 45 | 48 |
| 46 /** Not documented yet. */ | |
| 47 class UsersResourceApi { | 49 class UsersResourceApi { |
| 48 final common_internal.ApiRequester _requester; | 50 final commons.ApiRequester _requester; |
| 49 | 51 |
| 50 UsersDataSourcesResourceApi get dataSources => new UsersDataSourcesResourceApi
(_requester); | 52 UsersDataSourcesResourceApi get dataSources => new UsersDataSourcesResourceApi
(_requester); |
| 51 UsersSessionsResourceApi get sessions => new UsersSessionsResourceApi(_request
er); | 53 UsersSessionsResourceApi get sessions => new UsersSessionsResourceApi(_request
er); |
| 52 | 54 |
| 53 UsersResourceApi(common_internal.ApiRequester client) : | 55 UsersResourceApi(commons.ApiRequester client) : |
| 54 _requester = client; | 56 _requester = client; |
| 55 } | 57 } |
| 56 | 58 |
| 57 | 59 |
| 58 /** Not documented yet. */ | |
| 59 class UsersDataSourcesResourceApi { | 60 class UsersDataSourcesResourceApi { |
| 60 final common_internal.ApiRequester _requester; | 61 final commons.ApiRequester _requester; |
| 61 | 62 |
| 62 UsersDataSourcesDatasetsResourceApi get datasets => new UsersDataSourcesDatase
tsResourceApi(_requester); | 63 UsersDataSourcesDatasetsResourceApi get datasets => new UsersDataSourcesDatase
tsResourceApi(_requester); |
| 63 | 64 |
| 64 UsersDataSourcesResourceApi(common_internal.ApiRequester client) : | 65 UsersDataSourcesResourceApi(commons.ApiRequester client) : |
| 65 _requester = client; | 66 _requester = client; |
| 66 | 67 |
| 67 /** | 68 /** |
| 68 * Creates a new data source that is unique across all data sources belonging | 69 * Creates a new data source that is unique across all data sources belonging |
| 69 * to this user. The data stream ID field can be omitted and will be generated | 70 * to this user. The data stream ID field can be omitted and will be generated |
| 70 * by the server with the correct format. The data stream ID is an ordered | 71 * by the server with the correct format. The data stream ID is an ordered |
| 71 * combination of some fields from the data source. In addition to the data | 72 * combination of some fields from the data source. In addition to the data |
| 72 * source fields reflected into the data source ID, the developer project | 73 * source fields reflected into the data source ID, the developer project |
| 73 * number that is authenticated when creating the data source is included. | 74 * number that is authenticated when creating the data source is included. |
| 74 * This developer project number is obfuscated when read by any other | 75 * This developer project number is obfuscated when read by any other |
| 75 * developer reading public data types. | 76 * developer reading public data types. |
| 76 * | 77 * |
| 77 * [request] - The metadata request object. | 78 * [request] - The metadata request object. |
| 78 * | 79 * |
| 79 * Request parameters: | 80 * Request parameters: |
| 80 * | 81 * |
| 81 * [userId] - Create the data source for the person identified. Use me to | 82 * [userId] - Create the data source for the person identified. Use me to |
| 82 * indicate the authenticated user. Only me is supported at this time. | 83 * indicate the authenticated user. Only me is supported at this time. |
| 83 * | 84 * |
| 84 * Completes with a [DataSource]. | 85 * Completes with a [DataSource]. |
| 85 * | 86 * |
| 86 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 87 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 87 * error. | 88 * error. |
| 88 * | 89 * |
| 89 * If the used [http.Client] completes with an error when making a REST call, | 90 * If the used [http.Client] completes with an error when making a REST call, |
| 90 * this method will complete with the same error. | 91 * this method will complete with the same error. |
| 91 */ | 92 */ |
| 92 async.Future<DataSource> create(DataSource request, core.String userId) { | 93 async.Future<DataSource> create(DataSource request, core.String userId) { |
| 93 var _url = null; | 94 var _url = null; |
| 94 var _queryParams = new core.Map(); | 95 var _queryParams = new core.Map(); |
| 95 var _uploadMedia = null; | 96 var _uploadMedia = null; |
| 96 var _uploadOptions = null; | 97 var _uploadOptions = null; |
| 97 var _downloadOptions = common.DownloadOptions.Metadata; | 98 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 98 var _body = null; | 99 var _body = null; |
| 99 | 100 |
| 100 if (request != null) { | 101 if (request != null) { |
| 101 _body = convert.JSON.encode((request).toJson()); | 102 _body = convert.JSON.encode((request).toJson()); |
| 102 } | 103 } |
| 103 if (userId == null) { | 104 if (userId == null) { |
| 104 throw new core.ArgumentError("Parameter userId is required."); | 105 throw new core.ArgumentError("Parameter userId is required."); |
| 105 } | 106 } |
| 106 | 107 |
| 107 | 108 |
| 108 _url = common_internal.Escaper.ecapeVariable('$userId') + '/dataSources'; | 109 _url = commons.Escaper.ecapeVariable('$userId') + '/dataSources'; |
| 109 | 110 |
| 110 var _response = _requester.request(_url, | 111 var _response = _requester.request(_url, |
| 111 "POST", | 112 "POST", |
| 112 body: _body, | 113 body: _body, |
| 113 queryParams: _queryParams, | 114 queryParams: _queryParams, |
| 114 uploadOptions: _uploadOptions, | 115 uploadOptions: _uploadOptions, |
| 115 uploadMedia: _uploadMedia, | 116 uploadMedia: _uploadMedia, |
| 116 downloadOptions: _downloadOptions); | 117 downloadOptions: _downloadOptions); |
| 117 return _response.then((data) => new DataSource.fromJson(data)); | 118 return _response.then((data) => new DataSource.fromJson(data)); |
| 118 } | 119 } |
| 119 | 120 |
| 120 /** | 121 /** |
| 121 * Returns a data source identified by a data stream ID. | 122 * Returns a data source identified by a data stream ID. |
| 122 * | 123 * |
| 123 * Request parameters: | 124 * Request parameters: |
| 124 * | 125 * |
| 125 * [userId] - Retrieve a data source for the person identified. Use me to | 126 * [userId] - Retrieve a data source for the person identified. Use me to |
| 126 * indicate the authenticated user. Only me is supported at this time. | 127 * indicate the authenticated user. Only me is supported at this time. |
| 127 * | 128 * |
| 128 * [dataSourceId] - The data stream ID of the data source to retrieve. | 129 * [dataSourceId] - The data stream ID of the data source to retrieve. |
| 129 * | 130 * |
| 130 * Completes with a [DataSource]. | 131 * Completes with a [DataSource]. |
| 131 * | 132 * |
| 132 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 133 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 133 * error. | 134 * error. |
| 134 * | 135 * |
| 135 * If the used [http.Client] completes with an error when making a REST call, | 136 * If the used [http.Client] completes with an error when making a REST call, |
| 136 * this method will complete with the same error. | 137 * this method will complete with the same error. |
| 137 */ | 138 */ |
| 138 async.Future<DataSource> get(core.String userId, core.String dataSourceId) { | 139 async.Future<DataSource> get(core.String userId, core.String dataSourceId) { |
| 139 var _url = null; | 140 var _url = null; |
| 140 var _queryParams = new core.Map(); | 141 var _queryParams = new core.Map(); |
| 141 var _uploadMedia = null; | 142 var _uploadMedia = null; |
| 142 var _uploadOptions = null; | 143 var _uploadOptions = null; |
| 143 var _downloadOptions = common.DownloadOptions.Metadata; | 144 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 144 var _body = null; | 145 var _body = null; |
| 145 | 146 |
| 146 if (userId == null) { | 147 if (userId == null) { |
| 147 throw new core.ArgumentError("Parameter userId is required."); | 148 throw new core.ArgumentError("Parameter userId is required."); |
| 148 } | 149 } |
| 149 if (dataSourceId == null) { | 150 if (dataSourceId == null) { |
| 150 throw new core.ArgumentError("Parameter dataSourceId is required."); | 151 throw new core.ArgumentError("Parameter dataSourceId is required."); |
| 151 } | 152 } |
| 152 | 153 |
| 153 | 154 |
| 154 _url = common_internal.Escaper.ecapeVariable('$userId') + '/dataSources/' +
common_internal.Escaper.ecapeVariable('$dataSourceId'); | 155 _url = commons.Escaper.ecapeVariable('$userId') + '/dataSources/' + commons.
Escaper.ecapeVariable('$dataSourceId'); |
| 155 | 156 |
| 156 var _response = _requester.request(_url, | 157 var _response = _requester.request(_url, |
| 157 "GET", | 158 "GET", |
| 158 body: _body, | 159 body: _body, |
| 159 queryParams: _queryParams, | 160 queryParams: _queryParams, |
| 160 uploadOptions: _uploadOptions, | 161 uploadOptions: _uploadOptions, |
| 161 uploadMedia: _uploadMedia, | 162 uploadMedia: _uploadMedia, |
| 162 downloadOptions: _downloadOptions); | 163 downloadOptions: _downloadOptions); |
| 163 return _response.then((data) => new DataSource.fromJson(data)); | 164 return _response.then((data) => new DataSource.fromJson(data)); |
| 164 } | 165 } |
| 165 | 166 |
| 166 /** | 167 /** |
| 167 * Lists all data sources that are visible to the developer, using the OAuth | 168 * Lists all data sources that are visible to the developer, using the OAuth |
| 168 * scopes provided. The list is not exhaustive: the user may have private data | 169 * scopes provided. The list is not exhaustive: the user may have private data |
| 169 * sources that are only visible to other developers or calls using other | 170 * sources that are only visible to other developers or calls using other |
| 170 * scopes. | 171 * scopes. |
| 171 * | 172 * |
| 172 * Request parameters: | 173 * Request parameters: |
| 173 * | 174 * |
| 174 * [userId] - List data sources for the person identified. Use me to indicate | 175 * [userId] - List data sources for the person identified. Use me to indicate |
| 175 * the authenticated user. Only me is supported at this time. | 176 * the authenticated user. Only me is supported at this time. |
| 176 * | 177 * |
| 177 * [dataTypeName] - The names of data types to include in the list. If not | 178 * [dataTypeName] - The names of data types to include in the list. If not |
| 178 * specified, all data sources will be returned. | 179 * specified, all data sources will be returned. |
| 179 * | 180 * |
| 180 * Completes with a [ListDataSourcesResponse]. | 181 * Completes with a [ListDataSourcesResponse]. |
| 181 * | 182 * |
| 182 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 183 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 183 * error. | 184 * error. |
| 184 * | 185 * |
| 185 * If the used [http.Client] completes with an error when making a REST call, | 186 * If the used [http.Client] completes with an error when making a REST call, |
| 186 * this method will complete with the same error. | 187 * this method will complete with the same error. |
| 187 */ | 188 */ |
| 188 async.Future<ListDataSourcesResponse> list(core.String userId, {core.List<core
.String> dataTypeName}) { | 189 async.Future<ListDataSourcesResponse> list(core.String userId, {core.List<core
.String> dataTypeName}) { |
| 189 var _url = null; | 190 var _url = null; |
| 190 var _queryParams = new core.Map(); | 191 var _queryParams = new core.Map(); |
| 191 var _uploadMedia = null; | 192 var _uploadMedia = null; |
| 192 var _uploadOptions = null; | 193 var _uploadOptions = null; |
| 193 var _downloadOptions = common.DownloadOptions.Metadata; | 194 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 194 var _body = null; | 195 var _body = null; |
| 195 | 196 |
| 196 if (userId == null) { | 197 if (userId == null) { |
| 197 throw new core.ArgumentError("Parameter userId is required."); | 198 throw new core.ArgumentError("Parameter userId is required."); |
| 198 } | 199 } |
| 199 if (dataTypeName != null) { | 200 if (dataTypeName != null) { |
| 200 _queryParams["dataTypeName"] = dataTypeName; | 201 _queryParams["dataTypeName"] = dataTypeName; |
| 201 } | 202 } |
| 202 | 203 |
| 203 | 204 |
| 204 _url = common_internal.Escaper.ecapeVariable('$userId') + '/dataSources'; | 205 _url = commons.Escaper.ecapeVariable('$userId') + '/dataSources'; |
| 205 | 206 |
| 206 var _response = _requester.request(_url, | 207 var _response = _requester.request(_url, |
| 207 "GET", | 208 "GET", |
| 208 body: _body, | 209 body: _body, |
| 209 queryParams: _queryParams, | 210 queryParams: _queryParams, |
| 210 uploadOptions: _uploadOptions, | 211 uploadOptions: _uploadOptions, |
| 211 uploadMedia: _uploadMedia, | 212 uploadMedia: _uploadMedia, |
| 212 downloadOptions: _downloadOptions); | 213 downloadOptions: _downloadOptions); |
| 213 return _response.then((data) => new ListDataSourcesResponse.fromJson(data)); | 214 return _response.then((data) => new ListDataSourcesResponse.fromJson(data)); |
| 214 } | 215 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 226 * | 227 * |
| 227 * Request parameters: | 228 * Request parameters: |
| 228 * | 229 * |
| 229 * [userId] - Update the data source for the person identified. Use me to | 230 * [userId] - Update the data source for the person identified. Use me to |
| 230 * indicate the authenticated user. Only me is supported at this time. | 231 * indicate the authenticated user. Only me is supported at this time. |
| 231 * | 232 * |
| 232 * [dataSourceId] - The data stream ID of the data source to update. | 233 * [dataSourceId] - The data stream ID of the data source to update. |
| 233 * | 234 * |
| 234 * Completes with a [DataSource]. | 235 * Completes with a [DataSource]. |
| 235 * | 236 * |
| 236 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 237 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 237 * error. | 238 * error. |
| 238 * | 239 * |
| 239 * If the used [http.Client] completes with an error when making a REST call, | 240 * If the used [http.Client] completes with an error when making a REST call, |
| 240 * this method will complete with the same error. | 241 * this method will complete with the same error. |
| 241 */ | 242 */ |
| 242 async.Future<DataSource> patch(DataSource request, core.String userId, core.St
ring dataSourceId) { | 243 async.Future<DataSource> patch(DataSource request, core.String userId, core.St
ring dataSourceId) { |
| 243 var _url = null; | 244 var _url = null; |
| 244 var _queryParams = new core.Map(); | 245 var _queryParams = new core.Map(); |
| 245 var _uploadMedia = null; | 246 var _uploadMedia = null; |
| 246 var _uploadOptions = null; | 247 var _uploadOptions = null; |
| 247 var _downloadOptions = common.DownloadOptions.Metadata; | 248 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 248 var _body = null; | 249 var _body = null; |
| 249 | 250 |
| 250 if (request != null) { | 251 if (request != null) { |
| 251 _body = convert.JSON.encode((request).toJson()); | 252 _body = convert.JSON.encode((request).toJson()); |
| 252 } | 253 } |
| 253 if (userId == null) { | 254 if (userId == null) { |
| 254 throw new core.ArgumentError("Parameter userId is required."); | 255 throw new core.ArgumentError("Parameter userId is required."); |
| 255 } | 256 } |
| 256 if (dataSourceId == null) { | 257 if (dataSourceId == null) { |
| 257 throw new core.ArgumentError("Parameter dataSourceId is required."); | 258 throw new core.ArgumentError("Parameter dataSourceId is required."); |
| 258 } | 259 } |
| 259 | 260 |
| 260 | 261 |
| 261 _url = common_internal.Escaper.ecapeVariable('$userId') + '/dataSources/' +
common_internal.Escaper.ecapeVariable('$dataSourceId'); | 262 _url = commons.Escaper.ecapeVariable('$userId') + '/dataSources/' + commons.
Escaper.ecapeVariable('$dataSourceId'); |
| 262 | 263 |
| 263 var _response = _requester.request(_url, | 264 var _response = _requester.request(_url, |
| 264 "PATCH", | 265 "PATCH", |
| 265 body: _body, | 266 body: _body, |
| 266 queryParams: _queryParams, | 267 queryParams: _queryParams, |
| 267 uploadOptions: _uploadOptions, | 268 uploadOptions: _uploadOptions, |
| 268 uploadMedia: _uploadMedia, | 269 uploadMedia: _uploadMedia, |
| 269 downloadOptions: _downloadOptions); | 270 downloadOptions: _downloadOptions); |
| 270 return _response.then((data) => new DataSource.fromJson(data)); | 271 return _response.then((data) => new DataSource.fromJson(data)); |
| 271 } | 272 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 282 * | 283 * |
| 283 * Request parameters: | 284 * Request parameters: |
| 284 * | 285 * |
| 285 * [userId] - Update the data source for the person identified. Use me to | 286 * [userId] - Update the data source for the person identified. Use me to |
| 286 * indicate the authenticated user. Only me is supported at this time. | 287 * indicate the authenticated user. Only me is supported at this time. |
| 287 * | 288 * |
| 288 * [dataSourceId] - The data stream ID of the data source to update. | 289 * [dataSourceId] - The data stream ID of the data source to update. |
| 289 * | 290 * |
| 290 * Completes with a [DataSource]. | 291 * Completes with a [DataSource]. |
| 291 * | 292 * |
| 292 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 293 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 293 * error. | 294 * error. |
| 294 * | 295 * |
| 295 * If the used [http.Client] completes with an error when making a REST call, | 296 * If the used [http.Client] completes with an error when making a REST call, |
| 296 * this method will complete with the same error. | 297 * this method will complete with the same error. |
| 297 */ | 298 */ |
| 298 async.Future<DataSource> update(DataSource request, core.String userId, core.S
tring dataSourceId) { | 299 async.Future<DataSource> update(DataSource request, core.String userId, core.S
tring dataSourceId) { |
| 299 var _url = null; | 300 var _url = null; |
| 300 var _queryParams = new core.Map(); | 301 var _queryParams = new core.Map(); |
| 301 var _uploadMedia = null; | 302 var _uploadMedia = null; |
| 302 var _uploadOptions = null; | 303 var _uploadOptions = null; |
| 303 var _downloadOptions = common.DownloadOptions.Metadata; | 304 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 304 var _body = null; | 305 var _body = null; |
| 305 | 306 |
| 306 if (request != null) { | 307 if (request != null) { |
| 307 _body = convert.JSON.encode((request).toJson()); | 308 _body = convert.JSON.encode((request).toJson()); |
| 308 } | 309 } |
| 309 if (userId == null) { | 310 if (userId == null) { |
| 310 throw new core.ArgumentError("Parameter userId is required."); | 311 throw new core.ArgumentError("Parameter userId is required."); |
| 311 } | 312 } |
| 312 if (dataSourceId == null) { | 313 if (dataSourceId == null) { |
| 313 throw new core.ArgumentError("Parameter dataSourceId is required."); | 314 throw new core.ArgumentError("Parameter dataSourceId is required."); |
| 314 } | 315 } |
| 315 | 316 |
| 316 | 317 |
| 317 _url = common_internal.Escaper.ecapeVariable('$userId') + '/dataSources/' +
common_internal.Escaper.ecapeVariable('$dataSourceId'); | 318 _url = commons.Escaper.ecapeVariable('$userId') + '/dataSources/' + commons.
Escaper.ecapeVariable('$dataSourceId'); |
| 318 | 319 |
| 319 var _response = _requester.request(_url, | 320 var _response = _requester.request(_url, |
| 320 "PUT", | 321 "PUT", |
| 321 body: _body, | 322 body: _body, |
| 322 queryParams: _queryParams, | 323 queryParams: _queryParams, |
| 323 uploadOptions: _uploadOptions, | 324 uploadOptions: _uploadOptions, |
| 324 uploadMedia: _uploadMedia, | 325 uploadMedia: _uploadMedia, |
| 325 downloadOptions: _downloadOptions); | 326 downloadOptions: _downloadOptions); |
| 326 return _response.then((data) => new DataSource.fromJson(data)); | 327 return _response.then((data) => new DataSource.fromJson(data)); |
| 327 } | 328 } |
| 328 | 329 |
| 329 } | 330 } |
| 330 | 331 |
| 331 | 332 |
| 332 /** Not documented yet. */ | |
| 333 class UsersDataSourcesDatasetsResourceApi { | 333 class UsersDataSourcesDatasetsResourceApi { |
| 334 final common_internal.ApiRequester _requester; | 334 final commons.ApiRequester _requester; |
| 335 | 335 |
| 336 UsersDataSourcesDatasetsResourceApi(common_internal.ApiRequester client) : | 336 UsersDataSourcesDatasetsResourceApi(commons.ApiRequester client) : |
| 337 _requester = client; | 337 _requester = client; |
| 338 | 338 |
| 339 /** | 339 /** |
| 340 * Performs an inclusive delete of all data points whose start and end times | 340 * Performs an inclusive delete of all data points whose start and end times |
| 341 * have any overlap with the time range specified by the dataset ID. For most | 341 * have any overlap with the time range specified by the dataset ID. For most |
| 342 * data types, the entire data point will be deleted. For data types where the | 342 * data types, the entire data point will be deleted. For data types where the |
| 343 * time span represents a consistent value (such as | 343 * time span represents a consistent value (such as |
| 344 * com.google.activity.segment), and a data point straddles either end point | 344 * com.google.activity.segment), and a data point straddles either end point |
| 345 * of the dataset, only the overlapping portion of the data point will be | 345 * of the dataset, only the overlapping portion of the data point will be |
| 346 * deleted. | 346 * deleted. |
| 347 * | 347 * |
| 348 * Request parameters: | 348 * Request parameters: |
| 349 * | 349 * |
| 350 * [userId] - Delete a dataset for the person identified. Use me to indicate | 350 * [userId] - Delete a dataset for the person identified. Use me to indicate |
| 351 * the authenticated user. Only me is supported at this time. | 351 * the authenticated user. Only me is supported at this time. |
| 352 * | 352 * |
| 353 * [dataSourceId] - The data stream ID of the data source that created the | 353 * [dataSourceId] - The data stream ID of the data source that created the |
| 354 * dataset. | 354 * dataset. |
| 355 * | 355 * |
| 356 * [datasetId] - Dataset identifier that is a composite of the minimum data | 356 * [datasetId] - Dataset identifier that is a composite of the minimum data |
| 357 * point start time and maximum data point end time represented as nanoseconds | 357 * point start time and maximum data point end time represented as nanoseconds |
| 358 * from the epoch. The ID is formatted like: "startTime-endTime" where | 358 * from the epoch. The ID is formatted like: "startTime-endTime" where |
| 359 * startTime and endTime are 64 bit integers. | 359 * startTime and endTime are 64 bit integers. |
| 360 * | 360 * |
| 361 * [currentTimeMillis] - The client's current time in milliseconds since | 361 * [currentTimeMillis] - The client's current time in milliseconds since |
| 362 * epoch. | 362 * epoch. |
| 363 * | 363 * |
| 364 * [modifiedTimeMillis] - When the operation was performed on the client. | 364 * [modifiedTimeMillis] - When the operation was performed on the client. |
| 365 * | 365 * |
| 366 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 366 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 367 * error. | 367 * error. |
| 368 * | 368 * |
| 369 * If the used [http.Client] completes with an error when making a REST call, | 369 * If the used [http.Client] completes with an error when making a REST call, |
| 370 * this method will complete with the same error. | 370 * this method will complete with the same error. |
| 371 */ | 371 */ |
| 372 async.Future delete(core.String userId, core.String dataSourceId, core.String
datasetId, {core.String currentTimeMillis, core.String modifiedTimeMillis}) { | 372 async.Future delete(core.String userId, core.String dataSourceId, core.String
datasetId, {core.String currentTimeMillis, core.String modifiedTimeMillis}) { |
| 373 var _url = null; | 373 var _url = null; |
| 374 var _queryParams = new core.Map(); | 374 var _queryParams = new core.Map(); |
| 375 var _uploadMedia = null; | 375 var _uploadMedia = null; |
| 376 var _uploadOptions = null; | 376 var _uploadOptions = null; |
| 377 var _downloadOptions = common.DownloadOptions.Metadata; | 377 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 378 var _body = null; | 378 var _body = null; |
| 379 | 379 |
| 380 if (userId == null) { | 380 if (userId == null) { |
| 381 throw new core.ArgumentError("Parameter userId is required."); | 381 throw new core.ArgumentError("Parameter userId is required."); |
| 382 } | 382 } |
| 383 if (dataSourceId == null) { | 383 if (dataSourceId == null) { |
| 384 throw new core.ArgumentError("Parameter dataSourceId is required."); | 384 throw new core.ArgumentError("Parameter dataSourceId is required."); |
| 385 } | 385 } |
| 386 if (datasetId == null) { | 386 if (datasetId == null) { |
| 387 throw new core.ArgumentError("Parameter datasetId is required."); | 387 throw new core.ArgumentError("Parameter datasetId is required."); |
| 388 } | 388 } |
| 389 if (currentTimeMillis != null) { | 389 if (currentTimeMillis != null) { |
| 390 _queryParams["currentTimeMillis"] = [currentTimeMillis]; | 390 _queryParams["currentTimeMillis"] = [currentTimeMillis]; |
| 391 } | 391 } |
| 392 if (modifiedTimeMillis != null) { | 392 if (modifiedTimeMillis != null) { |
| 393 _queryParams["modifiedTimeMillis"] = [modifiedTimeMillis]; | 393 _queryParams["modifiedTimeMillis"] = [modifiedTimeMillis]; |
| 394 } | 394 } |
| 395 | 395 |
| 396 _downloadOptions = null; | 396 _downloadOptions = null; |
| 397 | 397 |
| 398 _url = common_internal.Escaper.ecapeVariable('$userId') + '/dataSources/' +
common_internal.Escaper.ecapeVariable('$dataSourceId') + '/datasets/' + common_i
nternal.Escaper.ecapeVariable('$datasetId'); | 398 _url = commons.Escaper.ecapeVariable('$userId') + '/dataSources/' + commons.
Escaper.ecapeVariable('$dataSourceId') + '/datasets/' + commons.Escaper.ecapeVar
iable('$datasetId'); |
| 399 | 399 |
| 400 var _response = _requester.request(_url, | 400 var _response = _requester.request(_url, |
| 401 "DELETE", | 401 "DELETE", |
| 402 body: _body, | 402 body: _body, |
| 403 queryParams: _queryParams, | 403 queryParams: _queryParams, |
| 404 uploadOptions: _uploadOptions, | 404 uploadOptions: _uploadOptions, |
| 405 uploadMedia: _uploadMedia, | 405 uploadMedia: _uploadMedia, |
| 406 downloadOptions: _downloadOptions); | 406 downloadOptions: _downloadOptions); |
| 407 return _response.then((data) => null); | 407 return _response.then((data) => null); |
| 408 } | 408 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 432 * nextPageToken will be set in the dataset response. | 432 * nextPageToken will be set in the dataset response. |
| 433 * | 433 * |
| 434 * [pageToken] - The continuation token, which is used to page through large | 434 * [pageToken] - The continuation token, which is used to page through large |
| 435 * datasets. To get the next page of a dataset, set this parameter to the | 435 * datasets. To get the next page of a dataset, set this parameter to the |
| 436 * value of nextPageToken from the previous response. Each subsequent call | 436 * value of nextPageToken from the previous response. Each subsequent call |
| 437 * will yield a partial dataset with data point end timestamps that are | 437 * will yield a partial dataset with data point end timestamps that are |
| 438 * strictly smaller than those in the previous partial response. | 438 * strictly smaller than those in the previous partial response. |
| 439 * | 439 * |
| 440 * Completes with a [Dataset]. | 440 * Completes with a [Dataset]. |
| 441 * | 441 * |
| 442 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 442 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 443 * error. | 443 * error. |
| 444 * | 444 * |
| 445 * If the used [http.Client] completes with an error when making a REST call, | 445 * If the used [http.Client] completes with an error when making a REST call, |
| 446 * this method will complete with the same error. | 446 * this method will complete with the same error. |
| 447 */ | 447 */ |
| 448 async.Future<Dataset> get(core.String userId, core.String dataSourceId, core.S
tring datasetId, {core.int limit, core.String pageToken}) { | 448 async.Future<Dataset> get(core.String userId, core.String dataSourceId, core.S
tring datasetId, {core.int limit, core.String pageToken}) { |
| 449 var _url = null; | 449 var _url = null; |
| 450 var _queryParams = new core.Map(); | 450 var _queryParams = new core.Map(); |
| 451 var _uploadMedia = null; | 451 var _uploadMedia = null; |
| 452 var _uploadOptions = null; | 452 var _uploadOptions = null; |
| 453 var _downloadOptions = common.DownloadOptions.Metadata; | 453 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 454 var _body = null; | 454 var _body = null; |
| 455 | 455 |
| 456 if (userId == null) { | 456 if (userId == null) { |
| 457 throw new core.ArgumentError("Parameter userId is required."); | 457 throw new core.ArgumentError("Parameter userId is required."); |
| 458 } | 458 } |
| 459 if (dataSourceId == null) { | 459 if (dataSourceId == null) { |
| 460 throw new core.ArgumentError("Parameter dataSourceId is required."); | 460 throw new core.ArgumentError("Parameter dataSourceId is required."); |
| 461 } | 461 } |
| 462 if (datasetId == null) { | 462 if (datasetId == null) { |
| 463 throw new core.ArgumentError("Parameter datasetId is required."); | 463 throw new core.ArgumentError("Parameter datasetId is required."); |
| 464 } | 464 } |
| 465 if (limit != null) { | 465 if (limit != null) { |
| 466 _queryParams["limit"] = ["${limit}"]; | 466 _queryParams["limit"] = ["${limit}"]; |
| 467 } | 467 } |
| 468 if (pageToken != null) { | 468 if (pageToken != null) { |
| 469 _queryParams["pageToken"] = [pageToken]; | 469 _queryParams["pageToken"] = [pageToken]; |
| 470 } | 470 } |
| 471 | 471 |
| 472 | 472 |
| 473 _url = common_internal.Escaper.ecapeVariable('$userId') + '/dataSources/' +
common_internal.Escaper.ecapeVariable('$dataSourceId') + '/datasets/' + common_i
nternal.Escaper.ecapeVariable('$datasetId'); | 473 _url = commons.Escaper.ecapeVariable('$userId') + '/dataSources/' + commons.
Escaper.ecapeVariable('$dataSourceId') + '/datasets/' + commons.Escaper.ecapeVar
iable('$datasetId'); |
| 474 | 474 |
| 475 var _response = _requester.request(_url, | 475 var _response = _requester.request(_url, |
| 476 "GET", | 476 "GET", |
| 477 body: _body, | 477 body: _body, |
| 478 queryParams: _queryParams, | 478 queryParams: _queryParams, |
| 479 uploadOptions: _uploadOptions, | 479 uploadOptions: _uploadOptions, |
| 480 uploadMedia: _uploadMedia, | 480 uploadMedia: _uploadMedia, |
| 481 downloadOptions: _downloadOptions); | 481 downloadOptions: _downloadOptions); |
| 482 return _response.then((data) => new Dataset.fromJson(data)); | 482 return _response.then((data) => new Dataset.fromJson(data)); |
| 483 } | 483 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 502 * point start time and maximum data point end time represented as nanoseconds | 502 * point start time and maximum data point end time represented as nanoseconds |
| 503 * from the epoch. The ID is formatted like: "startTime-endTime" where | 503 * from the epoch. The ID is formatted like: "startTime-endTime" where |
| 504 * startTime and endTime are 64 bit integers. | 504 * startTime and endTime are 64 bit integers. |
| 505 * | 505 * |
| 506 * [currentTimeMillis] - The client's current time in milliseconds since | 506 * [currentTimeMillis] - The client's current time in milliseconds since |
| 507 * epoch. Note that the minStartTimeNs and maxEndTimeNs properties in the | 507 * epoch. Note that the minStartTimeNs and maxEndTimeNs properties in the |
| 508 * request body are in nanoseconds instead of milliseconds. | 508 * request body are in nanoseconds instead of milliseconds. |
| 509 * | 509 * |
| 510 * Completes with a [Dataset]. | 510 * Completes with a [Dataset]. |
| 511 * | 511 * |
| 512 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 512 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 513 * error. | 513 * error. |
| 514 * | 514 * |
| 515 * If the used [http.Client] completes with an error when making a REST call, | 515 * If the used [http.Client] completes with an error when making a REST call, |
| 516 * this method will complete with the same error. | 516 * this method will complete with the same error. |
| 517 */ | 517 */ |
| 518 async.Future<Dataset> patch(Dataset request, core.String userId, core.String d
ataSourceId, core.String datasetId, {core.String currentTimeMillis}) { | 518 async.Future<Dataset> patch(Dataset request, core.String userId, core.String d
ataSourceId, core.String datasetId, {core.String currentTimeMillis}) { |
| 519 var _url = null; | 519 var _url = null; |
| 520 var _queryParams = new core.Map(); | 520 var _queryParams = new core.Map(); |
| 521 var _uploadMedia = null; | 521 var _uploadMedia = null; |
| 522 var _uploadOptions = null; | 522 var _uploadOptions = null; |
| 523 var _downloadOptions = common.DownloadOptions.Metadata; | 523 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 524 var _body = null; | 524 var _body = null; |
| 525 | 525 |
| 526 if (request != null) { | 526 if (request != null) { |
| 527 _body = convert.JSON.encode((request).toJson()); | 527 _body = convert.JSON.encode((request).toJson()); |
| 528 } | 528 } |
| 529 if (userId == null) { | 529 if (userId == null) { |
| 530 throw new core.ArgumentError("Parameter userId is required."); | 530 throw new core.ArgumentError("Parameter userId is required."); |
| 531 } | 531 } |
| 532 if (dataSourceId == null) { | 532 if (dataSourceId == null) { |
| 533 throw new core.ArgumentError("Parameter dataSourceId is required."); | 533 throw new core.ArgumentError("Parameter dataSourceId is required."); |
| 534 } | 534 } |
| 535 if (datasetId == null) { | 535 if (datasetId == null) { |
| 536 throw new core.ArgumentError("Parameter datasetId is required."); | 536 throw new core.ArgumentError("Parameter datasetId is required."); |
| 537 } | 537 } |
| 538 if (currentTimeMillis != null) { | 538 if (currentTimeMillis != null) { |
| 539 _queryParams["currentTimeMillis"] = [currentTimeMillis]; | 539 _queryParams["currentTimeMillis"] = [currentTimeMillis]; |
| 540 } | 540 } |
| 541 | 541 |
| 542 | 542 |
| 543 _url = common_internal.Escaper.ecapeVariable('$userId') + '/dataSources/' +
common_internal.Escaper.ecapeVariable('$dataSourceId') + '/datasets/' + common_i
nternal.Escaper.ecapeVariable('$datasetId'); | 543 _url = commons.Escaper.ecapeVariable('$userId') + '/dataSources/' + commons.
Escaper.ecapeVariable('$dataSourceId') + '/datasets/' + commons.Escaper.ecapeVar
iable('$datasetId'); |
| 544 | 544 |
| 545 var _response = _requester.request(_url, | 545 var _response = _requester.request(_url, |
| 546 "PATCH", | 546 "PATCH", |
| 547 body: _body, | 547 body: _body, |
| 548 queryParams: _queryParams, | 548 queryParams: _queryParams, |
| 549 uploadOptions: _uploadOptions, | 549 uploadOptions: _uploadOptions, |
| 550 uploadMedia: _uploadMedia, | 550 uploadMedia: _uploadMedia, |
| 551 downloadOptions: _downloadOptions); | 551 downloadOptions: _downloadOptions); |
| 552 return _response.then((data) => new Dataset.fromJson(data)); | 552 return _response.then((data) => new Dataset.fromJson(data)); |
| 553 } | 553 } |
| 554 | 554 |
| 555 } | 555 } |
| 556 | 556 |
| 557 | 557 |
| 558 /** Not documented yet. */ | |
| 559 class UsersSessionsResourceApi { | 558 class UsersSessionsResourceApi { |
| 560 final common_internal.ApiRequester _requester; | 559 final commons.ApiRequester _requester; |
| 561 | 560 |
| 562 UsersSessionsResourceApi(common_internal.ApiRequester client) : | 561 UsersSessionsResourceApi(commons.ApiRequester client) : |
| 563 _requester = client; | 562 _requester = client; |
| 564 | 563 |
| 565 /** | 564 /** |
| 566 * Deletes a session specified by the given session ID. | 565 * Deletes a session specified by the given session ID. |
| 567 * | 566 * |
| 568 * Request parameters: | 567 * Request parameters: |
| 569 * | 568 * |
| 570 * [userId] - Delete a session for the person identified. Use me to indicate | 569 * [userId] - Delete a session for the person identified. Use me to indicate |
| 571 * the authenticated user. Only me is supported at this time. | 570 * the authenticated user. Only me is supported at this time. |
| 572 * | 571 * |
| 573 * [sessionId] - The ID of the session to be deleted. | 572 * [sessionId] - The ID of the session to be deleted. |
| 574 * | 573 * |
| 575 * [currentTimeMillis] - The client's current time in milliseconds since | 574 * [currentTimeMillis] - The client's current time in milliseconds since |
| 576 * epoch. | 575 * epoch. |
| 577 * | 576 * |
| 578 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 577 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 579 * error. | 578 * error. |
| 580 * | 579 * |
| 581 * If the used [http.Client] completes with an error when making a REST call, | 580 * If the used [http.Client] completes with an error when making a REST call, |
| 582 * this method will complete with the same error. | 581 * this method will complete with the same error. |
| 583 */ | 582 */ |
| 584 async.Future delete(core.String userId, core.String sessionId, {core.String cu
rrentTimeMillis}) { | 583 async.Future delete(core.String userId, core.String sessionId, {core.String cu
rrentTimeMillis}) { |
| 585 var _url = null; | 584 var _url = null; |
| 586 var _queryParams = new core.Map(); | 585 var _queryParams = new core.Map(); |
| 587 var _uploadMedia = null; | 586 var _uploadMedia = null; |
| 588 var _uploadOptions = null; | 587 var _uploadOptions = null; |
| 589 var _downloadOptions = common.DownloadOptions.Metadata; | 588 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 590 var _body = null; | 589 var _body = null; |
| 591 | 590 |
| 592 if (userId == null) { | 591 if (userId == null) { |
| 593 throw new core.ArgumentError("Parameter userId is required."); | 592 throw new core.ArgumentError("Parameter userId is required."); |
| 594 } | 593 } |
| 595 if (sessionId == null) { | 594 if (sessionId == null) { |
| 596 throw new core.ArgumentError("Parameter sessionId is required."); | 595 throw new core.ArgumentError("Parameter sessionId is required."); |
| 597 } | 596 } |
| 598 if (currentTimeMillis != null) { | 597 if (currentTimeMillis != null) { |
| 599 _queryParams["currentTimeMillis"] = [currentTimeMillis]; | 598 _queryParams["currentTimeMillis"] = [currentTimeMillis]; |
| 600 } | 599 } |
| 601 | 600 |
| 602 _downloadOptions = null; | 601 _downloadOptions = null; |
| 603 | 602 |
| 604 _url = common_internal.Escaper.ecapeVariable('$userId') + '/sessions/' + com
mon_internal.Escaper.ecapeVariable('$sessionId'); | 603 _url = commons.Escaper.ecapeVariable('$userId') + '/sessions/' + commons.Esc
aper.ecapeVariable('$sessionId'); |
| 605 | 604 |
| 606 var _response = _requester.request(_url, | 605 var _response = _requester.request(_url, |
| 607 "DELETE", | 606 "DELETE", |
| 608 body: _body, | 607 body: _body, |
| 609 queryParams: _queryParams, | 608 queryParams: _queryParams, |
| 610 uploadOptions: _uploadOptions, | 609 uploadOptions: _uploadOptions, |
| 611 uploadMedia: _uploadMedia, | 610 uploadMedia: _uploadMedia, |
| 612 downloadOptions: _downloadOptions); | 611 downloadOptions: _downloadOptions); |
| 613 return _response.then((data) => null); | 612 return _response.then((data) => null); |
| 614 } | 613 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 630 * | 629 * |
| 631 * [pageToken] - The continuation token, which is used to page through large | 630 * [pageToken] - The continuation token, which is used to page through large |
| 632 * result sets. To get the next page of results, set this parameter to the | 631 * result sets. To get the next page of results, set this parameter to the |
| 633 * value of nextPageToken from the previous response. | 632 * value of nextPageToken from the previous response. |
| 634 * | 633 * |
| 635 * [startTime] - An RFC3339 timestamp. Only sessions ending between the start | 634 * [startTime] - An RFC3339 timestamp. Only sessions ending between the start |
| 636 * and end times will be included in the response. | 635 * and end times will be included in the response. |
| 637 * | 636 * |
| 638 * Completes with a [ListSessionsResponse]. | 637 * Completes with a [ListSessionsResponse]. |
| 639 * | 638 * |
| 640 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 639 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 641 * error. | 640 * error. |
| 642 * | 641 * |
| 643 * If the used [http.Client] completes with an error when making a REST call, | 642 * If the used [http.Client] completes with an error when making a REST call, |
| 644 * this method will complete with the same error. | 643 * this method will complete with the same error. |
| 645 */ | 644 */ |
| 646 async.Future<ListSessionsResponse> list(core.String userId, {core.String endTi
me, core.bool includeDeleted, core.String pageToken, core.String startTime}) { | 645 async.Future<ListSessionsResponse> list(core.String userId, {core.String endTi
me, core.bool includeDeleted, core.String pageToken, core.String startTime}) { |
| 647 var _url = null; | 646 var _url = null; |
| 648 var _queryParams = new core.Map(); | 647 var _queryParams = new core.Map(); |
| 649 var _uploadMedia = null; | 648 var _uploadMedia = null; |
| 650 var _uploadOptions = null; | 649 var _uploadOptions = null; |
| 651 var _downloadOptions = common.DownloadOptions.Metadata; | 650 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 652 var _body = null; | 651 var _body = null; |
| 653 | 652 |
| 654 if (userId == null) { | 653 if (userId == null) { |
| 655 throw new core.ArgumentError("Parameter userId is required."); | 654 throw new core.ArgumentError("Parameter userId is required."); |
| 656 } | 655 } |
| 657 if (endTime != null) { | 656 if (endTime != null) { |
| 658 _queryParams["endTime"] = [endTime]; | 657 _queryParams["endTime"] = [endTime]; |
| 659 } | 658 } |
| 660 if (includeDeleted != null) { | 659 if (includeDeleted != null) { |
| 661 _queryParams["includeDeleted"] = ["${includeDeleted}"]; | 660 _queryParams["includeDeleted"] = ["${includeDeleted}"]; |
| 662 } | 661 } |
| 663 if (pageToken != null) { | 662 if (pageToken != null) { |
| 664 _queryParams["pageToken"] = [pageToken]; | 663 _queryParams["pageToken"] = [pageToken]; |
| 665 } | 664 } |
| 666 if (startTime != null) { | 665 if (startTime != null) { |
| 667 _queryParams["startTime"] = [startTime]; | 666 _queryParams["startTime"] = [startTime]; |
| 668 } | 667 } |
| 669 | 668 |
| 670 | 669 |
| 671 _url = common_internal.Escaper.ecapeVariable('$userId') + '/sessions'; | 670 _url = commons.Escaper.ecapeVariable('$userId') + '/sessions'; |
| 672 | 671 |
| 673 var _response = _requester.request(_url, | 672 var _response = _requester.request(_url, |
| 674 "GET", | 673 "GET", |
| 675 body: _body, | 674 body: _body, |
| 676 queryParams: _queryParams, | 675 queryParams: _queryParams, |
| 677 uploadOptions: _uploadOptions, | 676 uploadOptions: _uploadOptions, |
| 678 uploadMedia: _uploadMedia, | 677 uploadMedia: _uploadMedia, |
| 679 downloadOptions: _downloadOptions); | 678 downloadOptions: _downloadOptions); |
| 680 return _response.then((data) => new ListSessionsResponse.fromJson(data)); | 679 return _response.then((data) => new ListSessionsResponse.fromJson(data)); |
| 681 } | 680 } |
| 682 | 681 |
| 683 /** | 682 /** |
| 684 * Updates or insert a given session. | 683 * Updates or insert a given session. |
| 685 * | 684 * |
| 686 * [request] - The metadata request object. | 685 * [request] - The metadata request object. |
| 687 * | 686 * |
| 688 * Request parameters: | 687 * Request parameters: |
| 689 * | 688 * |
| 690 * [userId] - Create sessions for the person identified. Use me to indicate | 689 * [userId] - Create sessions for the person identified. Use me to indicate |
| 691 * the authenticated user. Only me is supported at this time. | 690 * the authenticated user. Only me is supported at this time. |
| 692 * | 691 * |
| 693 * [sessionId] - The ID of the session to be created. | 692 * [sessionId] - The ID of the session to be created. |
| 694 * | 693 * |
| 695 * [currentTimeMillis] - The client's current time in milliseconds since | 694 * [currentTimeMillis] - The client's current time in milliseconds since |
| 696 * epoch. | 695 * epoch. |
| 697 * | 696 * |
| 698 * Completes with a [Session]. | 697 * Completes with a [Session]. |
| 699 * | 698 * |
| 700 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 699 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 701 * error. | 700 * error. |
| 702 * | 701 * |
| 703 * If the used [http.Client] completes with an error when making a REST call, | 702 * If the used [http.Client] completes with an error when making a REST call, |
| 704 * this method will complete with the same error. | 703 * this method will complete with the same error. |
| 705 */ | 704 */ |
| 706 async.Future<Session> update(Session request, core.String userId, core.String
sessionId, {core.String currentTimeMillis}) { | 705 async.Future<Session> update(Session request, core.String userId, core.String
sessionId, {core.String currentTimeMillis}) { |
| 707 var _url = null; | 706 var _url = null; |
| 708 var _queryParams = new core.Map(); | 707 var _queryParams = new core.Map(); |
| 709 var _uploadMedia = null; | 708 var _uploadMedia = null; |
| 710 var _uploadOptions = null; | 709 var _uploadOptions = null; |
| 711 var _downloadOptions = common.DownloadOptions.Metadata; | 710 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 712 var _body = null; | 711 var _body = null; |
| 713 | 712 |
| 714 if (request != null) { | 713 if (request != null) { |
| 715 _body = convert.JSON.encode((request).toJson()); | 714 _body = convert.JSON.encode((request).toJson()); |
| 716 } | 715 } |
| 717 if (userId == null) { | 716 if (userId == null) { |
| 718 throw new core.ArgumentError("Parameter userId is required."); | 717 throw new core.ArgumentError("Parameter userId is required."); |
| 719 } | 718 } |
| 720 if (sessionId == null) { | 719 if (sessionId == null) { |
| 721 throw new core.ArgumentError("Parameter sessionId is required."); | 720 throw new core.ArgumentError("Parameter sessionId is required."); |
| 722 } | 721 } |
| 723 if (currentTimeMillis != null) { | 722 if (currentTimeMillis != null) { |
| 724 _queryParams["currentTimeMillis"] = [currentTimeMillis]; | 723 _queryParams["currentTimeMillis"] = [currentTimeMillis]; |
| 725 } | 724 } |
| 726 | 725 |
| 727 | 726 |
| 728 _url = common_internal.Escaper.ecapeVariable('$userId') + '/sessions/' + com
mon_internal.Escaper.ecapeVariable('$sessionId'); | 727 _url = commons.Escaper.ecapeVariable('$userId') + '/sessions/' + commons.Esc
aper.ecapeVariable('$sessionId'); |
| 729 | 728 |
| 730 var _response = _requester.request(_url, | 729 var _response = _requester.request(_url, |
| 731 "PUT", | 730 "PUT", |
| 732 body: _body, | 731 body: _body, |
| 733 queryParams: _queryParams, | 732 queryParams: _queryParams, |
| 734 uploadOptions: _uploadOptions, | 733 uploadOptions: _uploadOptions, |
| 735 uploadMedia: _uploadMedia, | 734 uploadMedia: _uploadMedia, |
| 736 downloadOptions: _downloadOptions); | 735 downloadOptions: _downloadOptions); |
| 737 return _response.then((data) => new Session.fromJson(data)); | 736 return _response.then((data) => new Session.fromJson(data)); |
| 738 } | 737 } |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 * - "integer" | 1130 * - "integer" |
| 1132 */ | 1131 */ |
| 1133 core.String format; | 1132 core.String format; |
| 1134 | 1133 |
| 1135 /** | 1134 /** |
| 1136 * Defines the name and format of data. Unlike data type names, field names | 1135 * Defines the name and format of data. Unlike data type names, field names |
| 1137 * are not namespaced, and only need to be unique within the data type. | 1136 * are not namespaced, and only need to be unique within the data type. |
| 1138 */ | 1137 */ |
| 1139 core.String name; | 1138 core.String name; |
| 1140 | 1139 |
| 1141 /** Not documented yet. */ | |
| 1142 core.bool optional; | 1140 core.bool optional; |
| 1143 | 1141 |
| 1144 | 1142 |
| 1145 DataTypeField(); | 1143 DataTypeField(); |
| 1146 | 1144 |
| 1147 DataTypeField.fromJson(core.Map _json) { | 1145 DataTypeField.fromJson(core.Map _json) { |
| 1148 if (_json.containsKey("format")) { | 1146 if (_json.containsKey("format")) { |
| 1149 format = _json["format"]; | 1147 format = _json["format"]; |
| 1150 } | 1148 } |
| 1151 if (_json.containsKey("name")) { | 1149 if (_json.containsKey("name")) { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 _json["uid"] = uid; | 1335 _json["uid"] = uid; |
| 1338 } | 1336 } |
| 1339 if (version != null) { | 1337 if (version != null) { |
| 1340 _json["version"] = version; | 1338 _json["version"] = version; |
| 1341 } | 1339 } |
| 1342 return _json; | 1340 return _json; |
| 1343 } | 1341 } |
| 1344 } | 1342 } |
| 1345 | 1343 |
| 1346 | 1344 |
| 1347 /** Not documented yet. */ | |
| 1348 class ListDataSourcesResponse { | 1345 class ListDataSourcesResponse { |
| 1349 /** A previously created data source. */ | 1346 /** A previously created data source. */ |
| 1350 core.List<DataSource> dataSource; | 1347 core.List<DataSource> dataSource; |
| 1351 | 1348 |
| 1352 | 1349 |
| 1353 ListDataSourcesResponse(); | 1350 ListDataSourcesResponse(); |
| 1354 | 1351 |
| 1355 ListDataSourcesResponse.fromJson(core.Map _json) { | 1352 ListDataSourcesResponse.fromJson(core.Map _json) { |
| 1356 if (_json.containsKey("dataSource")) { | 1353 if (_json.containsKey("dataSource")) { |
| 1357 dataSource = _json["dataSource"].map((value) => new DataSource.fromJson(va
lue)).toList(); | 1354 dataSource = _json["dataSource"].map((value) => new DataSource.fromJson(va
lue)).toList(); |
| 1358 } | 1355 } |
| 1359 } | 1356 } |
| 1360 | 1357 |
| 1361 core.Map toJson() { | 1358 core.Map toJson() { |
| 1362 var _json = new core.Map(); | 1359 var _json = new core.Map(); |
| 1363 if (dataSource != null) { | 1360 if (dataSource != null) { |
| 1364 _json["dataSource"] = dataSource.map((value) => (value).toJson()).toList()
; | 1361 _json["dataSource"] = dataSource.map((value) => (value).toJson()).toList()
; |
| 1365 } | 1362 } |
| 1366 return _json; | 1363 return _json; |
| 1367 } | 1364 } |
| 1368 } | 1365 } |
| 1369 | 1366 |
| 1370 | 1367 |
| 1371 /** Not documented yet. */ | |
| 1372 class ListSessionsResponse { | 1368 class ListSessionsResponse { |
| 1373 /** | 1369 /** |
| 1374 * If includeDeleted is set to true in the request, this list will contain | 1370 * If includeDeleted is set to true in the request, this list will contain |
| 1375 * sessions deleted with original end times that are within the startTime and | 1371 * sessions deleted with original end times that are within the startTime and |
| 1376 * endTime frame. | 1372 * endTime frame. |
| 1377 */ | 1373 */ |
| 1378 core.List<Session> deletedSession; | 1374 core.List<Session> deletedSession; |
| 1379 | 1375 |
| 1380 /** | 1376 /** |
| 1381 * The continuation token, which is used to page through large result sets. | 1377 * The continuation token, which is used to page through large result sets. |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1543 var _json = new core.Map(); | 1539 var _json = new core.Map(); |
| 1544 if (fpVal != null) { | 1540 if (fpVal != null) { |
| 1545 _json["fpVal"] = fpVal; | 1541 _json["fpVal"] = fpVal; |
| 1546 } | 1542 } |
| 1547 if (intVal != null) { | 1543 if (intVal != null) { |
| 1548 _json["intVal"] = intVal; | 1544 _json["intVal"] = intVal; |
| 1549 } | 1545 } |
| 1550 return _json; | 1546 return _json; |
| 1551 } | 1547 } |
| 1552 } | 1548 } |
| 1553 | |
| 1554 | |
| OLD | NEW |