| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis_beta.proximitybeacon.v1beta1; | 3 library googleapis_beta.proximitybeacon.v1beta1; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 } | 32 } |
| 33 | 33 |
| 34 | 34 |
| 35 class BeaconinfoResourceApi { | 35 class BeaconinfoResourceApi { |
| 36 final commons.ApiRequester _requester; | 36 final commons.ApiRequester _requester; |
| 37 | 37 |
| 38 BeaconinfoResourceApi(commons.ApiRequester client) : | 38 BeaconinfoResourceApi(commons.ApiRequester client) : |
| 39 _requester = client; | 39 _requester = client; |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * Given one or more beacon observations, returns any beacon information and | 42 * Given one or more beacon observations, returns any beacon information |
| 43 * attachments accessible to your application. Authorize by using the [API | 43 * and attachments accessible to your application. Authorize by using the |
| 44 * [API |
| 44 * key](https://developers.google.com/beacons/proximity/how-tos/authorizing#AP
IKey) | 45 * key](https://developers.google.com/beacons/proximity/how-tos/authorizing#AP
IKey) |
| 45 * for the application. | 46 * for the application. |
| 46 * | 47 * |
| 47 * [request] - The metadata request object. | 48 * [request] - The metadata request object. |
| 48 * | 49 * |
| 49 * Request parameters: | 50 * Request parameters: |
| 50 * | 51 * |
| 51 * Completes with a [GetInfoForObservedBeaconsResponse]. | 52 * Completes with a [GetInfoForObservedBeaconsResponse]. |
| 52 * | 53 * |
| 53 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 54 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 class BeaconsResourceApi { | 87 class BeaconsResourceApi { |
| 87 final commons.ApiRequester _requester; | 88 final commons.ApiRequester _requester; |
| 88 | 89 |
| 89 BeaconsAttachmentsResourceApi get attachments => new BeaconsAttachmentsResourc
eApi(_requester); | 90 BeaconsAttachmentsResourceApi get attachments => new BeaconsAttachmentsResourc
eApi(_requester); |
| 90 BeaconsDiagnosticsResourceApi get diagnostics => new BeaconsDiagnosticsResourc
eApi(_requester); | 91 BeaconsDiagnosticsResourceApi get diagnostics => new BeaconsDiagnosticsResourc
eApi(_requester); |
| 91 | 92 |
| 92 BeaconsResourceApi(commons.ApiRequester client) : | 93 BeaconsResourceApi(commons.ApiRequester client) : |
| 93 _requester = client; | 94 _requester = client; |
| 94 | 95 |
| 95 /** | 96 /** |
| 96 * Activates a beacon. A beacon that is active will return information and | 97 * Activates a beacon. A beacon that is active will return information |
| 97 * attachment data when queried via `beaconinfo.getforobserved`. Calling this | 98 * and attachment data when queried via `beaconinfo.getforobserved`. |
| 98 * method on an already active beacon will do nothing (but will return a | 99 * Calling this method on an already active beacon will do nothing (but |
| 99 * successful response code). Authenticate using an [OAuth access | 100 * will return a successful response code). |
| 100 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 101 * |
| 101 * signed-in user with **Is owner** or **Can edit** permissions in the Google | 102 * Authenticate using an [OAuth access |
| 102 * Developers Console project. | 103 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 104 * from a signed-in user with **Is owner** or **Can edit** permissions in the |
| 105 * Google Developers Console project. |
| 103 * | 106 * |
| 104 * Request parameters: | 107 * Request parameters: |
| 105 * | 108 * |
| 106 * [beaconName] - Beacon that should be activated. A beacon name has the | 109 * [beaconName] - Beacon that should be activated. A beacon name has the |
| 107 * format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast | 110 * format |
| 108 * by the beacon and N is a code for the beacon's type. Possible values are | 111 * "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by |
| 109 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for | 112 * the beacon and N is a code for the beacon's type. Possible values are |
| 110 * AltBeacon. For Eddystone-EID beacons, you may use either the current EID or | 113 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` |
| 111 * the beacon's "stable" UID. Required. | 114 * for AltBeacon. For Eddystone-EID beacons, you may use either the |
| 112 * Value must have pattern "^beacons/[^/]*$". | 115 * current EID or the beacon's "stable" UID. |
| 116 * Required. |
| 117 * Value must have pattern "^beacons/[^/]+$". |
| 113 * | 118 * |
| 114 * [projectId] - The project id of the beacon to activate. If the project id | 119 * [projectId] - The project id of the beacon to activate. If the project id |
| 115 * is not specified then the project making the request is used. The project | 120 * is not |
| 116 * id must match the project that owns the beacon. Optional. | 121 * specified then the project making the request is used. The project id |
| 122 * must match the project that owns the beacon. |
| 123 * Optional. |
| 117 * | 124 * |
| 118 * Completes with a [Empty]. | 125 * Completes with a [Empty]. |
| 119 * | 126 * |
| 120 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 127 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 121 * error. | 128 * error. |
| 122 * | 129 * |
| 123 * If the used [http.Client] completes with an error when making a REST call, | 130 * If the used [http.Client] completes with an error when making a REST call, |
| 124 * this method will complete with the same error. | 131 * this method will complete with the same error. |
| 125 */ | 132 */ |
| 126 async.Future<Empty> activate(core.String beaconName, {core.String projectId})
{ | 133 async.Future<Empty> activate(core.String beaconName, {core.String projectId})
{ |
| (...skipping 17 matching lines...) Expand all Loading... |
| 144 "POST", | 151 "POST", |
| 145 body: _body, | 152 body: _body, |
| 146 queryParams: _queryParams, | 153 queryParams: _queryParams, |
| 147 uploadOptions: _uploadOptions, | 154 uploadOptions: _uploadOptions, |
| 148 uploadMedia: _uploadMedia, | 155 uploadMedia: _uploadMedia, |
| 149 downloadOptions: _downloadOptions); | 156 downloadOptions: _downloadOptions); |
| 150 return _response.then((data) => new Empty.fromJson(data)); | 157 return _response.then((data) => new Empty.fromJson(data)); |
| 151 } | 158 } |
| 152 | 159 |
| 153 /** | 160 /** |
| 154 * Deactivates a beacon. Once deactivated, the API will not return information | 161 * Deactivates a beacon. Once deactivated, the API will not return |
| 155 * nor attachment data for the beacon when queried via | 162 * information nor attachment data for the beacon when queried via |
| 156 * `beaconinfo.getforobserved`. Calling this method on an already inactive | 163 * `beaconinfo.getforobserved`. Calling this method on an already inactive |
| 157 * beacon will do nothing (but will return a successful response code). | 164 * beacon will do nothing (but will return a successful response code). |
| 165 * |
| 158 * Authenticate using an [OAuth access | 166 * Authenticate using an [OAuth access |
| 159 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 167 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 160 * signed-in user with **Is owner** or **Can edit** permissions in the Google | 168 * from a signed-in user with **Is owner** or **Can edit** permissions in the |
| 161 * Developers Console project. | 169 * Google Developers Console project. |
| 162 * | 170 * |
| 163 * Request parameters: | 171 * Request parameters: |
| 164 * | 172 * |
| 165 * [beaconName] - Beacon that should be deactivated. A beacon name has the | 173 * [beaconName] - Beacon that should be deactivated. A beacon name has the |
| 166 * format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast | 174 * format |
| 167 * by the beacon and N is a code for the beacon's type. Possible values are | 175 * "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by |
| 168 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for | 176 * the beacon and N is a code for the beacon's type. Possible values are |
| 169 * AltBeacon. For Eddystone-EID beacons, you may use either the current EID or | 177 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` |
| 170 * the beacon's "stable" UID. Required. | 178 * for AltBeacon. For Eddystone-EID beacons, you may use either the |
| 171 * Value must have pattern "^beacons/[^/]*$". | 179 * current EID or the beacon's "stable" UID. |
| 180 * Required. |
| 181 * Value must have pattern "^beacons/[^/]+$". |
| 172 * | 182 * |
| 173 * [projectId] - The project id of the beacon to deactivate. If the project id | 183 * [projectId] - The project id of the beacon to deactivate. If the project id |
| 174 * is not specified then the project making the request is used. The project | 184 * is not |
| 175 * id must match the project that owns the beacon. Optional. | 185 * specified then the project making the request is used. The project id must |
| 186 * match the project that owns the beacon. |
| 187 * Optional. |
| 176 * | 188 * |
| 177 * Completes with a [Empty]. | 189 * Completes with a [Empty]. |
| 178 * | 190 * |
| 179 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 191 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 180 * error. | 192 * error. |
| 181 * | 193 * |
| 182 * If the used [http.Client] completes with an error when making a REST call, | 194 * If the used [http.Client] completes with an error when making a REST call, |
| 183 * this method will complete with the same error. | 195 * this method will complete with the same error. |
| 184 */ | 196 */ |
| 185 async.Future<Empty> deactivate(core.String beaconName, {core.String projectId}
) { | 197 async.Future<Empty> deactivate(core.String beaconName, {core.String projectId}
) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 206 uploadOptions: _uploadOptions, | 218 uploadOptions: _uploadOptions, |
| 207 uploadMedia: _uploadMedia, | 219 uploadMedia: _uploadMedia, |
| 208 downloadOptions: _downloadOptions); | 220 downloadOptions: _downloadOptions); |
| 209 return _response.then((data) => new Empty.fromJson(data)); | 221 return _response.then((data) => new Empty.fromJson(data)); |
| 210 } | 222 } |
| 211 | 223 |
| 212 /** | 224 /** |
| 213 * Decommissions the specified beacon in the service. This beacon will no | 225 * Decommissions the specified beacon in the service. This beacon will no |
| 214 * longer be returned from `beaconinfo.getforobserved`. This operation is | 226 * longer be returned from `beaconinfo.getforobserved`. This operation is |
| 215 * permanent -- you will not be able to re-register a beacon with this ID | 227 * permanent -- you will not be able to re-register a beacon with this ID |
| 216 * again. Authenticate using an [OAuth access | 228 * again. |
| 217 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 229 * |
| 218 * signed-in user with **Is owner** or **Can edit** permissions in the Google | 230 * Authenticate using an [OAuth access |
| 219 * Developers Console project. | 231 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 232 * from a signed-in user with **Is owner** or **Can edit** permissions in the |
| 233 * Google Developers Console project. |
| 220 * | 234 * |
| 221 * Request parameters: | 235 * Request parameters: |
| 222 * | 236 * |
| 223 * [beaconName] - Beacon that should be decommissioned. A beacon name has the | 237 * [beaconName] - Beacon that should be decommissioned. A beacon name has the |
| 224 * format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast | 238 * format |
| 225 * by the beacon and N is a code for the beacon's type. Possible values are | 239 * "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by |
| 226 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for | 240 * the beacon and N is a code for the beacon's type. Possible values are |
| 227 * AltBeacon. For Eddystone-EID beacons, you may use either the current EID of | 241 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` |
| 228 * the beacon's "stable" UID. Required. | 242 * for AltBeacon. For Eddystone-EID beacons, you may use either the |
| 229 * Value must have pattern "^beacons/[^/]*$". | 243 * current EID of the beacon's "stable" UID. |
| 244 * Required. |
| 245 * Value must have pattern "^beacons/[^/]+$". |
| 230 * | 246 * |
| 231 * [projectId] - The project id of the beacon to decommission. If the project | 247 * [projectId] - The project id of the beacon to decommission. If the project |
| 232 * id is not specified then the project making the request is used. The | 248 * id is not |
| 233 * project id must match the project that owns the beacon. Optional. | 249 * specified then the project making the request is used. The project id |
| 250 * must match the project that owns the beacon. |
| 251 * Optional. |
| 234 * | 252 * |
| 235 * Completes with a [Empty]. | 253 * Completes with a [Empty]. |
| 236 * | 254 * |
| 237 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 255 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 238 * error. | 256 * error. |
| 239 * | 257 * |
| 240 * If the used [http.Client] completes with an error when making a REST call, | 258 * If the used [http.Client] completes with an error when making a REST call, |
| 241 * this method will complete with the same error. | 259 * this method will complete with the same error. |
| 242 */ | 260 */ |
| 243 async.Future<Empty> decommission(core.String beaconName, {core.String projectI
d}) { | 261 async.Future<Empty> decommission(core.String beaconName, {core.String projectI
d}) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 261 "POST", | 279 "POST", |
| 262 body: _body, | 280 body: _body, |
| 263 queryParams: _queryParams, | 281 queryParams: _queryParams, |
| 264 uploadOptions: _uploadOptions, | 282 uploadOptions: _uploadOptions, |
| 265 uploadMedia: _uploadMedia, | 283 uploadMedia: _uploadMedia, |
| 266 downloadOptions: _downloadOptions); | 284 downloadOptions: _downloadOptions); |
| 267 return _response.then((data) => new Empty.fromJson(data)); | 285 return _response.then((data) => new Empty.fromJson(data)); |
| 268 } | 286 } |
| 269 | 287 |
| 270 /** | 288 /** |
| 271 * Returns detailed information about the specified beacon. Authenticate using | 289 * Deletes the specified beacon including all diagnostics data for the beacon |
| 272 * an [OAuth access | 290 * as well as any attachments on the beacon (including those belonging to |
| 273 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 291 * other projects). This operation cannot be undone. |
| 274 * signed-in user with **viewer**, **Is owner** or **Can edit** permissions in | 292 * |
| 275 * the Google Developers Console project. Requests may supply an Eddystone-EID | 293 * Authenticate using an [OAuth access |
| 276 * beacon name in the form: `beacons/4!beaconId` where the `beaconId` is the | 294 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 277 * base16 ephemeral ID broadcast by the beacon. The returned `Beacon` object | 295 * from a signed-in user with **Is owner** or **Can edit** permissions in the |
| 278 * will contain the beacon's stable Eddystone-UID. Clients not authorized to | 296 * Google Developers Console project. |
| 279 * resolve the beacon's ephemeral Eddystone-EID broadcast will receive an | 297 * |
| 298 * Request parameters: |
| 299 * |
| 300 * [beaconName] - Beacon that should be deleted. A beacon name has the format |
| 301 * "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by |
| 302 * the beacon and N is a code for the beacon's type. Possible values are |
| 303 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` |
| 304 * for AltBeacon. For Eddystone-EID beacons, you may use either the |
| 305 * current EID or the beacon's "stable" UID. |
| 306 * Required. |
| 307 * Value must have pattern "^beacons/[^/]+$". |
| 308 * |
| 309 * [projectId] - The project id of the beacon to delete. If not provided, the |
| 310 * project |
| 311 * that is making the request is used. |
| 312 * Optional. |
| 313 * |
| 314 * Completes with a [Empty]. |
| 315 * |
| 316 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 280 * error. | 317 * error. |
| 281 * | 318 * |
| 319 * If the used [http.Client] completes with an error when making a REST call, |
| 320 * this method will complete with the same error. |
| 321 */ |
| 322 async.Future<Empty> delete(core.String beaconName, {core.String projectId}) { |
| 323 var _url = null; |
| 324 var _queryParams = new core.Map(); |
| 325 var _uploadMedia = null; |
| 326 var _uploadOptions = null; |
| 327 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 328 var _body = null; |
| 329 |
| 330 if (beaconName == null) { |
| 331 throw new core.ArgumentError("Parameter beaconName is required."); |
| 332 } |
| 333 if (projectId != null) { |
| 334 _queryParams["projectId"] = [projectId]; |
| 335 } |
| 336 |
| 337 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$beaconName'); |
| 338 |
| 339 var _response = _requester.request(_url, |
| 340 "DELETE", |
| 341 body: _body, |
| 342 queryParams: _queryParams, |
| 343 uploadOptions: _uploadOptions, |
| 344 uploadMedia: _uploadMedia, |
| 345 downloadOptions: _downloadOptions); |
| 346 return _response.then((data) => new Empty.fromJson(data)); |
| 347 } |
| 348 |
| 349 /** |
| 350 * Returns detailed information about the specified beacon. |
| 351 * |
| 352 * Authenticate using an [OAuth access |
| 353 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 354 * from a signed-in user with **viewer**, **Is owner** or **Can edit** |
| 355 * permissions in the Google Developers Console project. |
| 356 * |
| 357 * Requests may supply an Eddystone-EID beacon name in the form: |
| 358 * `beacons/4!beaconId` where the `beaconId` is the base16 ephemeral ID |
| 359 * broadcast by the beacon. The returned `Beacon` object will contain the |
| 360 * beacon's stable Eddystone-UID. Clients not authorized to resolve the |
| 361 * beacon's ephemeral Eddystone-EID broadcast will receive an error. |
| 362 * |
| 282 * Request parameters: | 363 * Request parameters: |
| 283 * | 364 * |
| 284 * [beaconName] - Resource name of this beacon. A beacon name has the format | 365 * [beaconName] - Resource name of this beacon. A beacon name has the format |
| 285 * "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the | 366 * "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by |
| 286 * beacon and N is a code for the beacon's type. Possible values are `3` for | 367 * the beacon and N is a code for the beacon's type. Possible values are |
| 287 * Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for | 368 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` |
| 288 * AltBeacon. For Eddystone-EID beacons, you may use either the current EID or | 369 * for AltBeacon. For Eddystone-EID beacons, you may use either the |
| 289 * the beacon's "stable" UID. Required. | 370 * current EID or the beacon's "stable" UID. |
| 290 * Value must have pattern "^beacons/[^/]*$". | 371 * Required. |
| 372 * Value must have pattern "^beacons/[^/]+$". |
| 291 * | 373 * |
| 292 * [projectId] - The project id of the beacon to request. If the project id is | 374 * [projectId] - The project id of the beacon to request. If the project id is |
| 293 * not specified then the project making the request is used. The project id | 375 * not specified |
| 294 * must match the project that owns the beacon. Optional. | 376 * then the project making the request is used. The project id must match the |
| 377 * project that owns the beacon. |
| 378 * Optional. |
| 295 * | 379 * |
| 296 * Completes with a [Beacon]. | 380 * Completes with a [Beacon]. |
| 297 * | 381 * |
| 298 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 382 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 299 * error. | 383 * error. |
| 300 * | 384 * |
| 301 * If the used [http.Client] completes with an error when making a REST call, | 385 * If the used [http.Client] completes with an error when making a REST call, |
| 302 * this method will complete with the same error. | 386 * this method will complete with the same error. |
| 303 */ | 387 */ |
| 304 async.Future<Beacon> get(core.String beaconName, {core.String projectId}) { | 388 async.Future<Beacon> get(core.String beaconName, {core.String projectId}) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 323 body: _body, | 407 body: _body, |
| 324 queryParams: _queryParams, | 408 queryParams: _queryParams, |
| 325 uploadOptions: _uploadOptions, | 409 uploadOptions: _uploadOptions, |
| 326 uploadMedia: _uploadMedia, | 410 uploadMedia: _uploadMedia, |
| 327 downloadOptions: _downloadOptions); | 411 downloadOptions: _downloadOptions); |
| 328 return _response.then((data) => new Beacon.fromJson(data)); | 412 return _response.then((data) => new Beacon.fromJson(data)); |
| 329 } | 413 } |
| 330 | 414 |
| 331 /** | 415 /** |
| 332 * Searches the beacon registry for beacons that match the given search | 416 * Searches the beacon registry for beacons that match the given search |
| 333 * criteria. Only those beacons that the client has permission to list will be | 417 * criteria. Only those beacons that the client has permission to list |
| 334 * returned. Authenticate using an [OAuth access | 418 * will be returned. |
| 335 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 419 * |
| 336 * signed-in user with **viewer**, **Is owner** or **Can edit** permissions in | 420 * Authenticate using an [OAuth access |
| 337 * the Google Developers Console project. | 421 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 422 * from a signed-in user with **viewer**, **Is owner** or **Can edit** |
| 423 * permissions in the Google Developers Console project. |
| 338 * | 424 * |
| 339 * Request parameters: | 425 * Request parameters: |
| 340 * | 426 * |
| 341 * [q] - Filter query string that supports the following field filters: * | |
| 342 * `description:""` For example: `description:"Room 3"` Returns beacons whose | |
| 343 * description matches tokens in the string "Room 3" (not necessarily that | |
| 344 * exact string). The string must be double-quoted. * `status:` For example: | |
| 345 * `status:active` Returns beacons whose status matches the given value. | |
| 346 * Values must be one of the Beacon.Status enum values (case insensitive). | |
| 347 * Accepts multiple filters which will be combined with OR logic. * | |
| 348 * `stability:` For example: `stability:mobile` Returns beacons whose expected | |
| 349 * stability matches the given value. Values must be one of the | |
| 350 * Beacon.Stability enum values (case insensitive). Accepts multiple filters | |
| 351 * which will be combined with OR logic. * `place_id:""` For example: | |
| 352 * `place_id:"ChIJVSZzVR8FdkgRXGmmm6SslKw="` Returns beacons explicitly | |
| 353 * registered at the given place, expressed as a Place ID obtained from | |
| 354 * [Google Places API](/places/place-id). Does not match places inside the | |
| 355 * given place. Does not consider the beacon's actual location (which may be | |
| 356 * different from its registered place). Accepts multiple filters that will be | |
| 357 * combined with OR logic. The place ID must be double-quoted. * | |
| 358 * `registration_time[|=]` For example: `registration_time>=1433116800` | |
| 359 * Returns beacons whose registration time matches the given filter. Supports | |
| 360 * the operators: , =. Timestamp must be expressed as an integer number of | |
| 361 * seconds since midnight January 1, 1970 UTC. Accepts at most two filters | |
| 362 * that will be combined with AND logic, to support "between" semantics. If | |
| 363 * more than two are supplied, the latter ones are ignored. * `lat: lng: | |
| 364 * radius:` For example: `lat:51.1232343 lng:-1.093852 radius:1000` Returns | |
| 365 * beacons whose registered location is within the given circle. When any of | |
| 366 * these fields are given, all are required. Latitude and longitude must be | |
| 367 * decimal degrees between -90.0 and 90.0 and between -180.0 and 180.0 | |
| 368 * respectively. Radius must be an integer number of meters between 10 and | |
| 369 * 1,000,000 (1000 km). * `property:"="` For example: | |
| 370 * `property:"battery-type=CR2032"` Returns beacons which have a property of | |
| 371 * the given name and value. Supports multiple filters which will be combined | |
| 372 * with OR logic. The entire name=value string must be double-quoted as one | |
| 373 * string. * `attachment_type:""` For example: | |
| 374 * `attachment_type:"my-namespace/my-type"` Returns beacons having at least | |
| 375 * one attachment of the given namespaced type. Supports "any within this | |
| 376 * namespace" via the partial wildcard syntax: "my-namespace / * ". Supports | |
| 377 * multiple filters which will be combined with OR logic. The string must be | |
| 378 * double-quoted. Multiple filters on the same field are combined with OR | |
| 379 * logic (except registration_time which is combined with AND logic). Multiple | |
| 380 * filters on different fields are combined with AND logic. Filters should be | |
| 381 * separated by spaces. As with any HTTP query string parameter, the whole | |
| 382 * filter expression must be URL-encoded. Example REST request: `GET | |
| 383 * /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000` | |
| 384 * | |
| 385 * [pageToken] - A pagination token obtained from a previous request to list | 427 * [pageToken] - A pagination token obtained from a previous request to list |
| 386 * beacons. | 428 * beacons. |
| 387 * | 429 * |
| 430 * [q] - Filter query string that supports the following field filters: |
| 431 * |
| 432 * * **description:`"<string>"`** |
| 433 * For example: **description:"Room 3"** |
| 434 * Returns beacons whose description matches tokens in the string "Room 3" |
| 435 * (not necessarily that exact string). |
| 436 * The string must be double-quoted. |
| 437 * * **status:`<enum>`** |
| 438 * For example: **status:active** |
| 439 * Returns beacons whose status matches the given value. Values must be |
| 440 * one of the Beacon.Status enum values (case insensitive). Accepts |
| 441 * multiple filters which will be combined with OR logic. |
| 442 * * **stability:`<enum>`** |
| 443 * For example: **stability:mobile** |
| 444 * Returns beacons whose expected stability matches the given value. |
| 445 * Values must be one of the Beacon.Stability enum values (case |
| 446 * insensitive). Accepts multiple filters which will be combined with |
| 447 * OR logic. |
| 448 * * **place\_id:`"<string>"`** |
| 449 * For example: **place\_id:"ChIJVSZzVR8FdkgRXGmmm6SslKw="** |
| 450 * Returns beacons explicitly registered at the given place, expressed as |
| 451 * a Place ID obtained from [Google Places API](/places/place-id). Does not |
| 452 * match places inside the given place. Does not consider the beacon's |
| 453 * actual location (which may be different from its registered place). |
| 454 * Accepts multiple filters that will be combined with OR logic. The place |
| 455 * ID must be double-quoted. |
| 456 * * **registration\_time`[<|>|<=|>=]<integer>`** |
| 457 * For example: **registration\_time>=1433116800** |
| 458 * Returns beacons whose registration time matches the given filter. |
| 459 * Supports the operators: <, >, <=, and >=. Timestamp must be expressed as |
| 460 * an integer number of seconds since midnight January 1, 1970 UTC. Accepts |
| 461 * at most two filters that will be combined with AND logic, to support |
| 462 * "between" semantics. If more than two are supplied, the latter ones are |
| 463 * ignored. |
| 464 * * **lat:`<double> lng:<double> radius:<integer>`** |
| 465 * For example: **lat:51.1232343 lng:-1.093852 radius:1000** |
| 466 * Returns beacons whose registered location is within the given circle. |
| 467 * When any of these fields are given, all are required. Latitude and |
| 468 * longitude must be decimal degrees between -90.0 and 90.0 and between |
| 469 * -180.0 and 180.0 respectively. Radius must be an integer number of |
| 470 * meters between 10 and 1,000,000 (1000 km). |
| 471 * * **property:`"<string>=<string>"`** |
| 472 * For example: **property:"battery-type=CR2032"** |
| 473 * Returns beacons which have a property of the given name and value. |
| 474 * Supports multiple filters which will be combined with OR logic. |
| 475 * The entire name=value string must be double-quoted as one string. |
| 476 * * **attachment\_type:`"<string>"`** |
| 477 * For example: **attachment_type:"my-namespace/my-type"** |
| 478 * Returns beacons having at least one attachment of the given namespaced |
| 479 * type. Supports "any within this namespace" via the partial wildcard |
| 480 * syntax: "my-namespace / * ". Supports multiple filters which will be |
| 481 * combined with OR logic. The string must be double-quoted. |
| 482 * * **indoor\_level:`"<string>"`** |
| 483 * For example: **indoor\_level:"1"** |
| 484 * Returns beacons which are located on the given indoor level. Accepts |
| 485 * multiple filters that will be combined with OR logic. |
| 486 * |
| 487 * Multiple filters on the same field are combined with OR logic (except |
| 488 * registration_time which is combined with AND logic). |
| 489 * Multiple filters on different fields are combined with AND logic. |
| 490 * Filters should be separated by spaces. |
| 491 * |
| 492 * As with any HTTP query string parameter, the whole filter expression must |
| 493 * be URL-encoded. |
| 494 * |
| 495 * Example REST request: |
| 496 * `GET |
| 497 * /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000` |
| 498 * |
| 388 * [pageSize] - The maximum number of records to return for this request, up | 499 * [pageSize] - The maximum number of records to return for this request, up |
| 389 * to a server-defined upper limit. | 500 * to a |
| 501 * server-defined upper limit. |
| 390 * | 502 * |
| 391 * [projectId] - The project id to list beacons under. If not present then the | 503 * [projectId] - The project id to list beacons under. If not present then the |
| 392 * project credential that made the request is used as the project. Optional. | 504 * project |
| 505 * credential that made the request is used as the project. |
| 506 * Optional. |
| 393 * | 507 * |
| 394 * Completes with a [ListBeaconsResponse]. | 508 * Completes with a [ListBeaconsResponse]. |
| 395 * | 509 * |
| 396 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 510 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 397 * error. | 511 * error. |
| 398 * | 512 * |
| 399 * If the used [http.Client] completes with an error when making a REST call, | 513 * If the used [http.Client] completes with an error when making a REST call, |
| 400 * this method will complete with the same error. | 514 * this method will complete with the same error. |
| 401 */ | 515 */ |
| 402 async.Future<ListBeaconsResponse> list({core.String q, core.String pageToken,
core.int pageSize, core.String projectId}) { | 516 async.Future<ListBeaconsResponse> list({core.String pageToken, core.String q,
core.int pageSize, core.String projectId}) { |
| 403 var _url = null; | 517 var _url = null; |
| 404 var _queryParams = new core.Map(); | 518 var _queryParams = new core.Map(); |
| 405 var _uploadMedia = null; | 519 var _uploadMedia = null; |
| 406 var _uploadOptions = null; | 520 var _uploadOptions = null; |
| 407 var _downloadOptions = commons.DownloadOptions.Metadata; | 521 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 408 var _body = null; | 522 var _body = null; |
| 409 | 523 |
| 524 if (pageToken != null) { |
| 525 _queryParams["pageToken"] = [pageToken]; |
| 526 } |
| 410 if (q != null) { | 527 if (q != null) { |
| 411 _queryParams["q"] = [q]; | 528 _queryParams["q"] = [q]; |
| 412 } | 529 } |
| 413 if (pageToken != null) { | |
| 414 _queryParams["pageToken"] = [pageToken]; | |
| 415 } | |
| 416 if (pageSize != null) { | 530 if (pageSize != null) { |
| 417 _queryParams["pageSize"] = ["${pageSize}"]; | 531 _queryParams["pageSize"] = ["${pageSize}"]; |
| 418 } | 532 } |
| 419 if (projectId != null) { | 533 if (projectId != null) { |
| 420 _queryParams["projectId"] = [projectId]; | 534 _queryParams["projectId"] = [projectId]; |
| 421 } | 535 } |
| 422 | 536 |
| 423 _url = 'v1beta1/beacons'; | 537 _url = 'v1beta1/beacons'; |
| 424 | 538 |
| 425 var _response = _requester.request(_url, | 539 var _response = _requester.request(_url, |
| 426 "GET", | 540 "GET", |
| 427 body: _body, | 541 body: _body, |
| 428 queryParams: _queryParams, | 542 queryParams: _queryParams, |
| 429 uploadOptions: _uploadOptions, | 543 uploadOptions: _uploadOptions, |
| 430 uploadMedia: _uploadMedia, | 544 uploadMedia: _uploadMedia, |
| 431 downloadOptions: _downloadOptions); | 545 downloadOptions: _downloadOptions); |
| 432 return _response.then((data) => new ListBeaconsResponse.fromJson(data)); | 546 return _response.then((data) => new ListBeaconsResponse.fromJson(data)); |
| 433 } | 547 } |
| 434 | 548 |
| 435 /** | 549 /** |
| 436 * Registers a previously unregistered beacon given its `advertisedId`. These | 550 * Registers a previously unregistered beacon given its `advertisedId`. |
| 437 * IDs are unique within the system. An ID can be registered only once. | 551 * These IDs are unique within the system. An ID can be registered only once. |
| 552 * |
| 438 * Authenticate using an [OAuth access | 553 * Authenticate using an [OAuth access |
| 439 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 554 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 440 * signed-in user with **Is owner** or **Can edit** permissions in the Google | 555 * from a signed-in user with **Is owner** or **Can edit** permissions in the |
| 441 * Developers Console project. | 556 * Google Developers Console project. |
| 442 * | 557 * |
| 443 * [request] - The metadata request object. | 558 * [request] - The metadata request object. |
| 444 * | 559 * |
| 445 * Request parameters: | 560 * Request parameters: |
| 446 * | 561 * |
| 447 * [projectId] - The project id of the project the beacon will be registered | 562 * [projectId] - The project id of the project the beacon will be registered |
| 448 * to. If the project id is not specified then the project making the request | 563 * to. If |
| 449 * is used. Optional. | 564 * the project id is not specified then the project making the request |
| 565 * is used. |
| 566 * Optional. |
| 450 * | 567 * |
| 451 * Completes with a [Beacon]. | 568 * Completes with a [Beacon]. |
| 452 * | 569 * |
| 453 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 570 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 454 * error. | 571 * error. |
| 455 * | 572 * |
| 456 * If the used [http.Client] completes with an error when making a REST call, | 573 * If the used [http.Client] completes with an error when making a REST call, |
| 457 * this method will complete with the same error. | 574 * this method will complete with the same error. |
| 458 */ | 575 */ |
| 459 async.Future<Beacon> register(Beacon request, {core.String projectId}) { | 576 async.Future<Beacon> register(Beacon request, {core.String projectId}) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 480 uploadOptions: _uploadOptions, | 597 uploadOptions: _uploadOptions, |
| 481 uploadMedia: _uploadMedia, | 598 uploadMedia: _uploadMedia, |
| 482 downloadOptions: _downloadOptions); | 599 downloadOptions: _downloadOptions); |
| 483 return _response.then((data) => new Beacon.fromJson(data)); | 600 return _response.then((data) => new Beacon.fromJson(data)); |
| 484 } | 601 } |
| 485 | 602 |
| 486 /** | 603 /** |
| 487 * Updates the information about the specified beacon. **Any field that you do | 604 * Updates the information about the specified beacon. **Any field that you do |
| 488 * not populate in the submitted beacon will be permanently erased**, so you | 605 * not populate in the submitted beacon will be permanently erased**, so you |
| 489 * should follow the "read, modify, write" pattern to avoid inadvertently | 606 * should follow the "read, modify, write" pattern to avoid inadvertently |
| 490 * destroying data. Changes to the beacon status via this method will be | 607 * destroying data. |
| 491 * silently ignored. To update beacon status, use the separate methods on this | 608 * |
| 492 * API for activation, deactivation, and decommissioning. Authenticate using | 609 * Changes to the beacon status via this method will be silently ignored. |
| 493 * an [OAuth access | 610 * To update beacon status, use the separate methods on this API for |
| 494 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 611 * activation, deactivation, and decommissioning. |
| 495 * signed-in user with **Is owner** or **Can edit** permissions in the Google | 612 * Authenticate using an [OAuth access |
| 496 * Developers Console project. | 613 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 614 * from a signed-in user with **Is owner** or **Can edit** permissions in the |
| 615 * Google Developers Console project. |
| 497 * | 616 * |
| 498 * [request] - The metadata request object. | 617 * [request] - The metadata request object. |
| 499 * | 618 * |
| 500 * Request parameters: | 619 * Request parameters: |
| 501 * | 620 * |
| 502 * [beaconName] - Resource name of this beacon. A beacon name has the format | 621 * [beaconName] - Resource name of this beacon. A beacon name has the format |
| 503 * "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the | 622 * "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by |
| 504 * beacon and N is a code for the beacon's type. Possible values are `3` for | 623 * the beacon and N is a code for the beacon's type. Possible values are |
| 505 * Eddystone, `1` for iBeacon, or `5` for AltBeacon. This field must be left | 624 * `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. |
| 506 * empty when registering. After reading a beacon, clients can use the name | 625 * |
| 507 * for future operations. | 626 * This field must be left empty when registering. After reading a beacon, |
| 508 * Value must have pattern "^beacons/[^/]*$". | 627 * clients can use the name for future operations. |
| 628 * Value must have pattern "^beacons/[^/]+$". |
| 509 * | 629 * |
| 510 * [projectId] - The project id of the beacon to update. If the project id is | 630 * [projectId] - The project id of the beacon to update. If the project id is |
| 511 * not specified then the project making the request is used. The project id | 631 * not |
| 512 * must match the project that owns the beacon. Optional. | 632 * specified then the project making the request is used. The project id |
| 633 * must match the project that owns the beacon. |
| 634 * Optional. |
| 513 * | 635 * |
| 514 * Completes with a [Beacon]. | 636 * Completes with a [Beacon]. |
| 515 * | 637 * |
| 516 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 638 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 517 * error. | 639 * error. |
| 518 * | 640 * |
| 519 * If the used [http.Client] completes with an error when making a REST call, | 641 * If the used [http.Client] completes with an error when making a REST call, |
| 520 * this method will complete with the same error. | 642 * this method will complete with the same error. |
| 521 */ | 643 */ |
| 522 async.Future<Beacon> update(Beacon request, core.String beaconName, {core.Stri
ng projectId}) { | 644 async.Future<Beacon> update(Beacon request, core.String beaconName, {core.Stri
ng projectId}) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 552 } | 674 } |
| 553 | 675 |
| 554 | 676 |
| 555 class BeaconsAttachmentsResourceApi { | 677 class BeaconsAttachmentsResourceApi { |
| 556 final commons.ApiRequester _requester; | 678 final commons.ApiRequester _requester; |
| 557 | 679 |
| 558 BeaconsAttachmentsResourceApi(commons.ApiRequester client) : | 680 BeaconsAttachmentsResourceApi(commons.ApiRequester client) : |
| 559 _requester = client; | 681 _requester = client; |
| 560 | 682 |
| 561 /** | 683 /** |
| 562 * Deletes multiple attachments on a given beacon. This operation is permanent | 684 * Deletes multiple attachments on a given beacon. This operation is |
| 563 * and cannot be undone. You can optionally specify `namespacedType` to choose | 685 * permanent and cannot be undone. |
| 564 * which attachments should be deleted. If you do not specify | 686 * |
| 565 * `namespacedType`, all your attachments on the given beacon will be deleted. | 687 * You can optionally specify `namespacedType` to choose which attachments |
| 566 * You also may explicitly specify `* / * ` to delete all. Authenticate using | 688 * should be deleted. If you do not specify `namespacedType`, all your |
| 567 * an [OAuth access | 689 * attachments on the given beacon will be deleted. You also may explicitly |
| 568 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 690 * specify `* / * ` to delete all. |
| 569 * signed-in user with **Is owner** or **Can edit** permissions in the Google | 691 * |
| 570 * Developers Console project. | 692 * Authenticate using an [OAuth access |
| 693 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 694 * from a signed-in user with **Is owner** or **Can edit** permissions in the |
| 695 * Google Developers Console project. |
| 571 * | 696 * |
| 572 * Request parameters: | 697 * Request parameters: |
| 573 * | 698 * |
| 574 * [beaconName] - The beacon whose attachments should be deleted. A beacon | 699 * [beaconName] - The beacon whose attachments should be deleted. A beacon |
| 575 * name has the format "beacons/N!beaconId" where the beaconId is the base16 | 700 * name has the |
| 576 * ID broadcast by the beacon and N is a code for the beacon's type. Possible | 701 * format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast |
| 577 * values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, | 702 * by the beacon and N is a code for the beacon's type. Possible values are |
| 578 * or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the | 703 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` |
| 579 * current EID or the beacon's "stable" UID. Required. | 704 * for AltBeacon. For Eddystone-EID beacons, you may use either the |
| 580 * Value must have pattern "^beacons/[^/]*$". | 705 * current EID or the beacon's "stable" UID. |
| 706 * Required. |
| 707 * Value must have pattern "^beacons/[^/]+$". |
| 581 * | 708 * |
| 582 * [namespacedType] - Specifies the namespace and type of attachments to | 709 * [namespacedType] - Specifies the namespace and type of attachments to |
| 583 * delete in `namespace/type` format. Accepts `* / * ` to specify "all types | 710 * delete in |
| 584 * in all namespaces". Optional. | 711 * `namespace/type` format. Accepts `* / * ` to specify |
| 712 * "all types in all namespaces". |
| 713 * Optional. |
| 585 * | 714 * |
| 586 * [projectId] - The project id to delete beacon attachments under. This field | 715 * [projectId] - The project id to delete beacon attachments under. This field |
| 587 * can be used when "*" is specified to mean all attachment namespaces. | 716 * can be |
| 588 * Projects may have multiple attachments with multiple namespaces. If "*" is | 717 * used when "*" is specified to mean all attachment namespaces. Projects |
| 589 * specified and the projectId string is empty, then the project making the | 718 * may have multiple attachments with multiple namespaces. If "*" is |
| 590 * request is used. Optional. | 719 * specified and the projectId string is empty, then the project |
| 720 * making the request is used. |
| 721 * Optional. |
| 591 * | 722 * |
| 592 * Completes with a [DeleteAttachmentsResponse]. | 723 * Completes with a [DeleteAttachmentsResponse]. |
| 593 * | 724 * |
| 594 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 725 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 595 * error. | 726 * error. |
| 596 * | 727 * |
| 597 * If the used [http.Client] completes with an error when making a REST call, | 728 * If the used [http.Client] completes with an error when making a REST call, |
| 598 * this method will complete with the same error. | 729 * this method will complete with the same error. |
| 599 */ | 730 */ |
| 600 async.Future<DeleteAttachmentsResponse> batchDelete(core.String beaconName, {c
ore.String namespacedType, core.String projectId}) { | 731 async.Future<DeleteAttachmentsResponse> batchDelete(core.String beaconName, {c
ore.String namespacedType, core.String projectId}) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 623 queryParams: _queryParams, | 754 queryParams: _queryParams, |
| 624 uploadOptions: _uploadOptions, | 755 uploadOptions: _uploadOptions, |
| 625 uploadMedia: _uploadMedia, | 756 uploadMedia: _uploadMedia, |
| 626 downloadOptions: _downloadOptions); | 757 downloadOptions: _downloadOptions); |
| 627 return _response.then((data) => new DeleteAttachmentsResponse.fromJson(data)
); | 758 return _response.then((data) => new DeleteAttachmentsResponse.fromJson(data)
); |
| 628 } | 759 } |
| 629 | 760 |
| 630 /** | 761 /** |
| 631 * Associates the given data with the specified beacon. Attachment data must | 762 * Associates the given data with the specified beacon. Attachment data must |
| 632 * contain two parts: | 763 * contain two parts: |
| 633 * - A namespaced type. | 764 * <ul> |
| 634 * - The actual attachment data itself. The namespaced type consists of two | 765 * <li>A namespaced type.</li> |
| 635 * parts, the namespace and the type. The namespace must be one of the values | 766 * <li>The actual attachment data itself.</li> |
| 636 * returned by the `namespaces` endpoint, while the type can be a string of | 767 * </ul> |
| 637 * any characters except for the forward slash (`/`) up to 100 characters in | 768 * The namespaced type consists of two parts, the namespace and the type. |
| 638 * length. Attachment data can be up to 1024 bytes long. Authenticate using an | 769 * The namespace must be one of the values returned by the `namespaces` |
| 639 * [OAuth access | 770 * endpoint, while the type can be a string of any characters except for the |
| 640 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 771 * forward slash (`/`) up to 100 characters in length. |
| 641 * signed-in user with **Is owner** or **Can edit** permissions in the Google | 772 * |
| 642 * Developers Console project. | 773 * Attachment data can be up to 1024 bytes long. |
| 774 * |
| 775 * Authenticate using an [OAuth access |
| 776 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 777 * from a signed-in user with **Is owner** or **Can edit** permissions in the |
| 778 * Google Developers Console project. |
| 643 * | 779 * |
| 644 * [request] - The metadata request object. | 780 * [request] - The metadata request object. |
| 645 * | 781 * |
| 646 * Request parameters: | 782 * Request parameters: |
| 647 * | 783 * |
| 648 * [beaconName] - Beacon on which the attachment should be created. A beacon | 784 * [beaconName] - Beacon on which the attachment should be created. A beacon |
| 649 * name has the format "beacons/N!beaconId" where the beaconId is the base16 | 785 * name has the |
| 650 * ID broadcast by the beacon and N is a code for the beacon's type. Possible | 786 * format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast |
| 651 * values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, | 787 * by the beacon and N is a code for the beacon's type. Possible values are |
| 652 * or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the | 788 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` |
| 653 * current EID or the beacon's "stable" UID. Required. | 789 * for AltBeacon. For Eddystone-EID beacons, you may use either the |
| 654 * Value must have pattern "^beacons/[^/]*$". | 790 * current EID or the beacon's "stable" UID. |
| 791 * Required. |
| 792 * Value must have pattern "^beacons/[^/]+$". |
| 655 * | 793 * |
| 656 * [projectId] - The project id of the project the attachment will belong to. | 794 * [projectId] - The project id of the project the attachment will belong to. |
| 657 * If the project id is not specified then the project making the request is | 795 * If |
| 658 * used. Optional. | 796 * the project id is not specified then the project making the request |
| 797 * is used. |
| 798 * Optional. |
| 659 * | 799 * |
| 660 * Completes with a [BeaconAttachment]. | 800 * Completes with a [BeaconAttachment]. |
| 661 * | 801 * |
| 662 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 802 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 663 * error. | 803 * error. |
| 664 * | 804 * |
| 665 * If the used [http.Client] completes with an error when making a REST call, | 805 * If the used [http.Client] completes with an error when making a REST call, |
| 666 * this method will complete with the same error. | 806 * this method will complete with the same error. |
| 667 */ | 807 */ |
| 668 async.Future<BeaconAttachment> create(BeaconAttachment request, core.String be
aconName, {core.String projectId}) { | 808 async.Future<BeaconAttachment> create(BeaconAttachment request, core.String be
aconName, {core.String projectId}) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 693 uploadMedia: _uploadMedia, | 833 uploadMedia: _uploadMedia, |
| 694 downloadOptions: _downloadOptions); | 834 downloadOptions: _downloadOptions); |
| 695 return _response.then((data) => new BeaconAttachment.fromJson(data)); | 835 return _response.then((data) => new BeaconAttachment.fromJson(data)); |
| 696 } | 836 } |
| 697 | 837 |
| 698 /** | 838 /** |
| 699 * Deletes the specified attachment for the given beacon. Each attachment has | 839 * Deletes the specified attachment for the given beacon. Each attachment has |
| 700 * a unique attachment name (`attachmentName`) which is returned when you | 840 * a unique attachment name (`attachmentName`) which is returned when you |
| 701 * fetch the attachment data via this API. You specify this with the delete | 841 * fetch the attachment data via this API. You specify this with the delete |
| 702 * request to control which attachment is removed. This operation cannot be | 842 * request to control which attachment is removed. This operation cannot be |
| 703 * undone. Authenticate using an [OAuth access | 843 * undone. |
| 704 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 844 * |
| 705 * signed-in user with **Is owner** or **Can edit** permissions in the Google | 845 * Authenticate using an [OAuth access |
| 706 * Developers Console project. | 846 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 847 * from a signed-in user with **Is owner** or **Can edit** permissions in the |
| 848 * Google Developers Console project. |
| 707 * | 849 * |
| 708 * Request parameters: | 850 * Request parameters: |
| 709 * | 851 * |
| 710 * [attachmentName] - The attachment name (`attachmentName`) of the attachment | 852 * [attachmentName] - The attachment name (`attachmentName`) of |
| 711 * to remove. For example: | 853 * the attachment to remove. For example: |
| 712 * `beacons/3!893737abc9/attachments/c5e937-af0-494-959-ec49d12738`. For | 854 * `beacons/3!893737abc9/attachments/c5e937-af0-494-959-ec49d12738`. For |
| 713 * Eddystone-EID beacons, the beacon ID portion (`3!893737abc9`) may be the | 855 * Eddystone-EID beacons, the beacon ID portion (`3!893737abc9`) may be the |
| 714 * beacon's current EID, or its "stable" Eddystone-UID. Required. | 856 * beacon's current EID, or its "stable" Eddystone-UID. |
| 715 * Value must have pattern "^beacons/[^/] * / attachments/[^/]*$". | 857 * Required. |
| 858 * Value must have pattern "^beacons/[^/]+/attachments/[^/]+$". |
| 716 * | 859 * |
| 717 * [projectId] - The project id of the attachment to delete. If not provided, | 860 * [projectId] - The project id of the attachment to delete. If not provided, |
| 718 * the project that is making the request is used. Optional. | 861 * the project |
| 862 * that is making the request is used. |
| 863 * Optional. |
| 719 * | 864 * |
| 720 * Completes with a [Empty]. | 865 * Completes with a [Empty]. |
| 721 * | 866 * |
| 722 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 867 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 723 * error. | 868 * error. |
| 724 * | 869 * |
| 725 * If the used [http.Client] completes with an error when making a REST call, | 870 * If the used [http.Client] completes with an error when making a REST call, |
| 726 * this method will complete with the same error. | 871 * this method will complete with the same error. |
| 727 */ | 872 */ |
| 728 async.Future<Empty> delete(core.String attachmentName, {core.String projectId}
) { | 873 async.Future<Empty> delete(core.String attachmentName, {core.String projectId}
) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 747 body: _body, | 892 body: _body, |
| 748 queryParams: _queryParams, | 893 queryParams: _queryParams, |
| 749 uploadOptions: _uploadOptions, | 894 uploadOptions: _uploadOptions, |
| 750 uploadMedia: _uploadMedia, | 895 uploadMedia: _uploadMedia, |
| 751 downloadOptions: _downloadOptions); | 896 downloadOptions: _downloadOptions); |
| 752 return _response.then((data) => new Empty.fromJson(data)); | 897 return _response.then((data) => new Empty.fromJson(data)); |
| 753 } | 898 } |
| 754 | 899 |
| 755 /** | 900 /** |
| 756 * Returns the attachments for the specified beacon that match the specified | 901 * Returns the attachments for the specified beacon that match the specified |
| 757 * namespaced-type pattern. To control which namespaced types are returned, | 902 * namespaced-type pattern. |
| 758 * you add the `namespacedType` query parameter to the request. You must | 903 * |
| 759 * either use `* / * `, to return all attachments, or the namespace must be | 904 * To control which namespaced types are returned, you add the |
| 760 * one of the ones returned from the `namespaces` endpoint. Authenticate using | 905 * `namespacedType` query parameter to the request. You must either use |
| 761 * an [OAuth access | 906 * `* / * `, to return all attachments, or the namespace must be one of |
| 762 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 907 * the ones returned from the `namespaces` endpoint. |
| 763 * signed-in user with **viewer**, **Is owner** or **Can edit** permissions in | 908 * |
| 764 * the Google Developers Console project. | 909 * Authenticate using an [OAuth access |
| 910 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 911 * from a signed-in user with **viewer**, **Is owner** or **Can edit** |
| 912 * permissions in the Google Developers Console project. |
| 765 * | 913 * |
| 766 * Request parameters: | 914 * Request parameters: |
| 767 * | 915 * |
| 768 * [beaconName] - Beacon whose attachments should be fetched. A beacon name | 916 * [beaconName] - Beacon whose attachments should be fetched. A beacon name |
| 769 * has the format "beacons/N!beaconId" where the beaconId is the base16 ID | 917 * has the |
| 770 * broadcast by the beacon and N is a code for the beacon's type. Possible | 918 * format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast |
| 771 * values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, | 919 * by the beacon and N is a code for the beacon's type. Possible values are |
| 772 * or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the | 920 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` |
| 773 * current EID or the beacon's "stable" UID. Required. | 921 * for AltBeacon. For Eddystone-EID beacons, you may use either the |
| 774 * Value must have pattern "^beacons/[^/]*$". | 922 * current EID or the beacon's "stable" UID. |
| 923 * Required. |
| 924 * Value must have pattern "^beacons/[^/]+$". |
| 925 * |
| 926 * [projectId] - The project id to list beacon attachments under. This field |
| 927 * can be |
| 928 * used when "*" is specified to mean all attachment namespaces. Projects |
| 929 * may have multiple attachments with multiple namespaces. If "*" is |
| 930 * specified and the projectId string is empty, then the project |
| 931 * making the request is used. |
| 932 * Optional. |
| 775 * | 933 * |
| 776 * [namespacedType] - Specifies the namespace and type of attachment to | 934 * [namespacedType] - Specifies the namespace and type of attachment to |
| 777 * include in response in namespace/type format. Accepts `* / * ` to specify | 935 * include in response in |
| 936 * <var>namespace/type</var> format. Accepts `* / * ` to specify |
| 778 * "all types in all namespaces". | 937 * "all types in all namespaces". |
| 779 * | 938 * |
| 780 * [projectId] - The project id to list beacon attachments under. This field | |
| 781 * can be used when "*" is specified to mean all attachment namespaces. | |
| 782 * Projects may have multiple attachments with multiple namespaces. If "*" is | |
| 783 * specified and the projectId string is empty, then the project making the | |
| 784 * request is used. Optional. | |
| 785 * | |
| 786 * Completes with a [ListBeaconAttachmentsResponse]. | 939 * Completes with a [ListBeaconAttachmentsResponse]. |
| 787 * | 940 * |
| 788 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 941 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 789 * error. | 942 * error. |
| 790 * | 943 * |
| 791 * If the used [http.Client] completes with an error when making a REST call, | 944 * If the used [http.Client] completes with an error when making a REST call, |
| 792 * this method will complete with the same error. | 945 * this method will complete with the same error. |
| 793 */ | 946 */ |
| 794 async.Future<ListBeaconAttachmentsResponse> list(core.String beaconName, {core
.String namespacedType, core.String projectId}) { | 947 async.Future<ListBeaconAttachmentsResponse> list(core.String beaconName, {core
.String projectId, core.String namespacedType}) { |
| 795 var _url = null; | 948 var _url = null; |
| 796 var _queryParams = new core.Map(); | 949 var _queryParams = new core.Map(); |
| 797 var _uploadMedia = null; | 950 var _uploadMedia = null; |
| 798 var _uploadOptions = null; | 951 var _uploadOptions = null; |
| 799 var _downloadOptions = commons.DownloadOptions.Metadata; | 952 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 800 var _body = null; | 953 var _body = null; |
| 801 | 954 |
| 802 if (beaconName == null) { | 955 if (beaconName == null) { |
| 803 throw new core.ArgumentError("Parameter beaconName is required."); | 956 throw new core.ArgumentError("Parameter beaconName is required."); |
| 804 } | 957 } |
| 958 if (projectId != null) { |
| 959 _queryParams["projectId"] = [projectId]; |
| 960 } |
| 805 if (namespacedType != null) { | 961 if (namespacedType != null) { |
| 806 _queryParams["namespacedType"] = [namespacedType]; | 962 _queryParams["namespacedType"] = [namespacedType]; |
| 807 } | 963 } |
| 808 if (projectId != null) { | |
| 809 _queryParams["projectId"] = [projectId]; | |
| 810 } | |
| 811 | 964 |
| 812 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$beaconName') + '
/attachments'; | 965 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$beaconName') + '
/attachments'; |
| 813 | 966 |
| 814 var _response = _requester.request(_url, | 967 var _response = _requester.request(_url, |
| 815 "GET", | 968 "GET", |
| 816 body: _body, | 969 body: _body, |
| 817 queryParams: _queryParams, | 970 queryParams: _queryParams, |
| 818 uploadOptions: _uploadOptions, | 971 uploadOptions: _uploadOptions, |
| 819 uploadMedia: _uploadMedia, | 972 uploadMedia: _uploadMedia, |
| 820 downloadOptions: _downloadOptions); | 973 downloadOptions: _downloadOptions); |
| 821 return _response.then((data) => new ListBeaconAttachmentsResponse.fromJson(d
ata)); | 974 return _response.then((data) => new ListBeaconAttachmentsResponse.fromJson(d
ata)); |
| 822 } | 975 } |
| 823 | 976 |
| 824 } | 977 } |
| 825 | 978 |
| 826 | 979 |
| 827 class BeaconsDiagnosticsResourceApi { | 980 class BeaconsDiagnosticsResourceApi { |
| 828 final commons.ApiRequester _requester; | 981 final commons.ApiRequester _requester; |
| 829 | 982 |
| 830 BeaconsDiagnosticsResourceApi(commons.ApiRequester client) : | 983 BeaconsDiagnosticsResourceApi(commons.ApiRequester client) : |
| 831 _requester = client; | 984 _requester = client; |
| 832 | 985 |
| 833 /** | 986 /** |
| 834 * List the diagnostics for a single beacon. You can also list diagnostics for | 987 * List the diagnostics for a single beacon. You can also list diagnostics for |
| 835 * all the beacons owned by your Google Developers Console project by using | 988 * all the beacons owned by your Google Developers Console project by using |
| 836 * the beacon name `beacons/-`. Authenticate using an [OAuth access | 989 * the beacon name `beacons/-`. |
| 837 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 990 * |
| 838 * signed-in user with **viewer**, **Is owner** or **Can edit** permissions in | 991 * Authenticate using an [OAuth access |
| 839 * the Google Developers Console project. | 992 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 993 * from a signed-in user with **viewer**, **Is owner** or **Can edit** |
| 994 * permissions in the Google Developers Console project. |
| 840 * | 995 * |
| 841 * Request parameters: | 996 * Request parameters: |
| 842 * | 997 * |
| 843 * [beaconName] - Beacon that the diagnostics are for. | 998 * [beaconName] - Beacon that the diagnostics are for. |
| 844 * Value must have pattern "^beacons/[^/]*$". | 999 * Value must have pattern "^beacons/[^/]+$". |
| 845 * | 1000 * |
| 846 * [pageSize] - Specifies the maximum number of results to return. Defaults to | 1001 * [pageSize] - Specifies the maximum number of results to return. Defaults to |
| 847 * 10. Maximum 1000. Optional. | 1002 * 10. Maximum 1000. Optional. |
| 848 * | 1003 * |
| 849 * [pageToken] - Requests results that occur after the `page_token`, obtained | |
| 850 * from the response to a previous request. Optional. | |
| 851 * | |
| 852 * [alertFilter] - Requests only beacons that have the given alert. For | 1004 * [alertFilter] - Requests only beacons that have the given alert. For |
| 853 * example, to find beacons that have low batteries use | 1005 * example, to find |
| 854 * `alert_filter=LOW_BATTERY`. | 1006 * beacons that have low batteries use `alert_filter=LOW_BATTERY`. |
| 855 * Possible string values are: | 1007 * Possible string values are: |
| 856 * - "ALERT_UNSPECIFIED" : A ALERT_UNSPECIFIED. | 1008 * - "ALERT_UNSPECIFIED" : A ALERT_UNSPECIFIED. |
| 857 * - "WRONG_LOCATION" : A WRONG_LOCATION. | 1009 * - "WRONG_LOCATION" : A WRONG_LOCATION. |
| 858 * - "LOW_BATTERY" : A LOW_BATTERY. | 1010 * - "LOW_BATTERY" : A LOW_BATTERY. |
| 859 * | 1011 * |
| 860 * [projectId] - Requests only diagnostic records for the given project id. If | 1012 * [projectId] - Requests only diagnostic records for the given project id. If |
| 861 * not set, then the project making the request will be used for looking up | 1013 * not set, |
| 1014 * then the project making the request will be used for looking up |
| 862 * diagnostic records. Optional. | 1015 * diagnostic records. Optional. |
| 863 * | 1016 * |
| 1017 * [pageToken] - Requests results that occur after the `page_token`, obtained |
| 1018 * from the |
| 1019 * response to a previous request. Optional. |
| 1020 * |
| 864 * Completes with a [ListDiagnosticsResponse]. | 1021 * Completes with a [ListDiagnosticsResponse]. |
| 865 * | 1022 * |
| 866 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1023 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 867 * error. | 1024 * error. |
| 868 * | 1025 * |
| 869 * If the used [http.Client] completes with an error when making a REST call, | 1026 * If the used [http.Client] completes with an error when making a REST call, |
| 870 * this method will complete with the same error. | 1027 * this method will complete with the same error. |
| 871 */ | 1028 */ |
| 872 async.Future<ListDiagnosticsResponse> list(core.String beaconName, {core.int p
ageSize, core.String pageToken, core.String alertFilter, core.String projectId})
{ | 1029 async.Future<ListDiagnosticsResponse> list(core.String beaconName, {core.int p
ageSize, core.String alertFilter, core.String projectId, core.String pageToken})
{ |
| 873 var _url = null; | 1030 var _url = null; |
| 874 var _queryParams = new core.Map(); | 1031 var _queryParams = new core.Map(); |
| 875 var _uploadMedia = null; | 1032 var _uploadMedia = null; |
| 876 var _uploadOptions = null; | 1033 var _uploadOptions = null; |
| 877 var _downloadOptions = commons.DownloadOptions.Metadata; | 1034 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 878 var _body = null; | 1035 var _body = null; |
| 879 | 1036 |
| 880 if (beaconName == null) { | 1037 if (beaconName == null) { |
| 881 throw new core.ArgumentError("Parameter beaconName is required."); | 1038 throw new core.ArgumentError("Parameter beaconName is required."); |
| 882 } | 1039 } |
| 883 if (pageSize != null) { | 1040 if (pageSize != null) { |
| 884 _queryParams["pageSize"] = ["${pageSize}"]; | 1041 _queryParams["pageSize"] = ["${pageSize}"]; |
| 885 } | 1042 } |
| 886 if (pageToken != null) { | |
| 887 _queryParams["pageToken"] = [pageToken]; | |
| 888 } | |
| 889 if (alertFilter != null) { | 1043 if (alertFilter != null) { |
| 890 _queryParams["alertFilter"] = [alertFilter]; | 1044 _queryParams["alertFilter"] = [alertFilter]; |
| 891 } | 1045 } |
| 892 if (projectId != null) { | 1046 if (projectId != null) { |
| 893 _queryParams["projectId"] = [projectId]; | 1047 _queryParams["projectId"] = [projectId]; |
| 894 } | 1048 } |
| 1049 if (pageToken != null) { |
| 1050 _queryParams["pageToken"] = [pageToken]; |
| 1051 } |
| 895 | 1052 |
| 896 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$beaconName') + '
/diagnostics'; | 1053 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$beaconName') + '
/diagnostics'; |
| 897 | 1054 |
| 898 var _response = _requester.request(_url, | 1055 var _response = _requester.request(_url, |
| 899 "GET", | 1056 "GET", |
| 900 body: _body, | 1057 body: _body, |
| 901 queryParams: _queryParams, | 1058 queryParams: _queryParams, |
| 902 uploadOptions: _uploadOptions, | 1059 uploadOptions: _uploadOptions, |
| 903 uploadMedia: _uploadMedia, | 1060 uploadMedia: _uploadMedia, |
| 904 downloadOptions: _downloadOptions); | 1061 downloadOptions: _downloadOptions); |
| 905 return _response.then((data) => new ListDiagnosticsResponse.fromJson(data)); | 1062 return _response.then((data) => new ListDiagnosticsResponse.fromJson(data)); |
| 906 } | 1063 } |
| 907 | 1064 |
| 908 } | 1065 } |
| 909 | 1066 |
| 910 | 1067 |
| 911 class NamespacesResourceApi { | 1068 class NamespacesResourceApi { |
| 912 final commons.ApiRequester _requester; | 1069 final commons.ApiRequester _requester; |
| 913 | 1070 |
| 914 NamespacesResourceApi(commons.ApiRequester client) : | 1071 NamespacesResourceApi(commons.ApiRequester client) : |
| 915 _requester = client; | 1072 _requester = client; |
| 916 | 1073 |
| 917 /** | 1074 /** |
| 918 * Lists all attachment namespaces owned by your Google Developers Console | 1075 * Lists all attachment namespaces owned by your Google Developers Console |
| 919 * project. Attachment data associated with a beacon must include a namespaced | 1076 * project. Attachment data associated with a beacon must include a |
| 920 * type, and the namespace must be owned by your project. Authenticate using | 1077 * namespaced type, and the namespace must be owned by your project. |
| 921 * an [OAuth access | 1078 * |
| 922 * token](https://developers.google.com/identity/protocols/OAuth2) from a | 1079 * Authenticate using an [OAuth access |
| 923 * signed-in user with **viewer**, **Is owner** or **Can edit** permissions in | 1080 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 924 * the Google Developers Console project. | 1081 * from a signed-in user with **viewer**, **Is owner** or **Can edit** |
| 1082 * permissions in the Google Developers Console project. |
| 925 * | 1083 * |
| 926 * Request parameters: | 1084 * Request parameters: |
| 927 * | 1085 * |
| 928 * [projectId] - The project id to list namespaces under. Optional. | 1086 * [projectId] - The project id to list namespaces under. |
| 1087 * Optional. |
| 929 * | 1088 * |
| 930 * Completes with a [ListNamespacesResponse]. | 1089 * Completes with a [ListNamespacesResponse]. |
| 931 * | 1090 * |
| 932 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1091 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 933 * error. | 1092 * error. |
| 934 * | 1093 * |
| 935 * If the used [http.Client] completes with an error when making a REST call, | 1094 * If the used [http.Client] completes with an error when making a REST call, |
| 936 * this method will complete with the same error. | 1095 * this method will complete with the same error. |
| 937 */ | 1096 */ |
| 938 async.Future<ListNamespacesResponse> list({core.String projectId}) { | 1097 async.Future<ListNamespacesResponse> list({core.String projectId}) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 961 | 1120 |
| 962 /** | 1121 /** |
| 963 * Updates the information about the specified namespace. Only the namespace | 1122 * Updates the information about the specified namespace. Only the namespace |
| 964 * visibility can be updated. | 1123 * visibility can be updated. |
| 965 * | 1124 * |
| 966 * [request] - The metadata request object. | 1125 * [request] - The metadata request object. |
| 967 * | 1126 * |
| 968 * Request parameters: | 1127 * Request parameters: |
| 969 * | 1128 * |
| 970 * [namespaceName] - Resource name of this namespace. Namespaces names have | 1129 * [namespaceName] - Resource name of this namespace. Namespaces names have |
| 971 * the format: namespaces/namespace. | 1130 * the format: |
| 972 * Value must have pattern "^namespaces/[^/]*$". | 1131 * <code>namespaces/<var>namespace</var></code>. |
| 1132 * Value must have pattern "^namespaces/[^/]+$". |
| 973 * | 1133 * |
| 974 * [projectId] - The project id of the namespace to update. If the project id | 1134 * [projectId] - The project id of the namespace to update. If the project id |
| 975 * is not specified then the project making the request is used. The project | 1135 * is not |
| 976 * id must match the project that owns the beacon. Optional. | 1136 * specified then the project making the request is used. The project id |
| 1137 * must match the project that owns the beacon. |
| 1138 * Optional. |
| 977 * | 1139 * |
| 978 * Completes with a [Namespace]. | 1140 * Completes with a [Namespace]. |
| 979 * | 1141 * |
| 980 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1142 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 981 * error. | 1143 * error. |
| 982 * | 1144 * |
| 983 * If the used [http.Client] completes with an error when making a REST call, | 1145 * If the used [http.Client] completes with an error when making a REST call, |
| 984 * this method will complete with the same error. | 1146 * this method will complete with the same error. |
| 985 */ | 1147 */ |
| 986 async.Future<Namespace> update(Namespace request, core.String namespaceName, {
core.String projectId}) { | 1148 async.Future<Namespace> update(Namespace request, core.String namespaceName, {
core.String projectId}) { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 | 1228 |
| 1067 | 1229 |
| 1068 | 1230 |
| 1069 /** Defines a unique identifier of a beacon as broadcast by the device. */ | 1231 /** Defines a unique identifier of a beacon as broadcast by the device. */ |
| 1070 class AdvertisedId { | 1232 class AdvertisedId { |
| 1071 /** | 1233 /** |
| 1072 * The actual beacon identifier, as broadcast by the beacon hardware. Must be | 1234 * The actual beacon identifier, as broadcast by the beacon hardware. Must be |
| 1073 * [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP | 1235 * [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP |
| 1074 * requests, and will be so encoded (with padding) in responses. The base64 | 1236 * requests, and will be so encoded (with padding) in responses. The base64 |
| 1075 * encoding should be of the binary byte-stream and not any textual (such as | 1237 * encoding should be of the binary byte-stream and not any textual (such as |
| 1076 * hex) representation thereof. Required. | 1238 * hex) representation thereof. |
| 1239 * Required. |
| 1077 */ | 1240 */ |
| 1078 core.String id; | 1241 core.String id; |
| 1079 core.List<core.int> get idAsBytes { | 1242 core.List<core.int> get idAsBytes { |
| 1080 return convert.BASE64.decode(id); | 1243 return convert.BASE64.decode(id); |
| 1081 } | 1244 } |
| 1082 | 1245 |
| 1083 void set idAsBytes(core.List<core.int> _bytes) { | 1246 void set idAsBytes(core.List<core.int> _bytes) { |
| 1084 id = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-")
; | 1247 id = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-")
; |
| 1085 } | 1248 } |
| 1086 /** | 1249 /** |
| 1087 * Specifies the identifier type. Required. | 1250 * Specifies the identifier type. |
| 1251 * Required. |
| 1088 * Possible string values are: | 1252 * Possible string values are: |
| 1089 * - "TYPE_UNSPECIFIED" : A TYPE_UNSPECIFIED. | 1253 * - "TYPE_UNSPECIFIED" : Do not use this value. |
| 1090 * - "EDDYSTONE" : A EDDYSTONE. | 1254 * - "EDDYSTONE" : Eddystone, an open beacon format that supports Android and |
| 1091 * - "IBEACON" : A IBEACON. | 1255 * iOS devices |
| 1092 * - "ALTBEACON" : A ALTBEACON. | 1256 * https://github.com/google/eddystone/wiki/Beacon-Specification |
| 1093 * - "EDDYSTONE_EID" : A EDDYSTONE_EID. | 1257 * - "IBEACON" : Apple iBeacon compatible beacon |
| 1258 * - "ALTBEACON" : See http://altbeacon.org and/or |
| 1259 * https://github.com/AltBeacon/spec. |
| 1260 * - "EDDYSTONE_EID" : Eddystone Ephemeral ID |
| 1094 */ | 1261 */ |
| 1095 core.String type; | 1262 core.String type; |
| 1096 | 1263 |
| 1097 AdvertisedId(); | 1264 AdvertisedId(); |
| 1098 | 1265 |
| 1099 AdvertisedId.fromJson(core.Map _json) { | 1266 AdvertisedId.fromJson(core.Map _json) { |
| 1100 if (_json.containsKey("id")) { | 1267 if (_json.containsKey("id")) { |
| 1101 id = _json["id"]; | 1268 id = _json["id"]; |
| 1102 } | 1269 } |
| 1103 if (_json.containsKey("type")) { | 1270 if (_json.containsKey("type")) { |
| 1104 type = _json["type"]; | 1271 type = _json["type"]; |
| 1105 } | 1272 } |
| 1106 } | 1273 } |
| 1107 | 1274 |
| 1108 core.Map toJson() { | 1275 core.Map toJson() { |
| 1109 var _json = new core.Map(); | 1276 var _json = new core.Map(); |
| 1110 if (id != null) { | 1277 if (id != null) { |
| 1111 _json["id"] = id; | 1278 _json["id"] = id; |
| 1112 } | 1279 } |
| 1113 if (type != null) { | 1280 if (type != null) { |
| 1114 _json["type"] = type; | 1281 _json["type"] = type; |
| 1115 } | 1282 } |
| 1116 return _json; | 1283 return _json; |
| 1117 } | 1284 } |
| 1118 } | 1285 } |
| 1119 | 1286 |
| 1120 /** | 1287 /** |
| 1121 * A subset of attachment information served via the `beaconinfo.getforobserved` | 1288 * A subset of attachment information served via the |
| 1122 * method, used when your users encounter your beacons. | 1289 * `beaconinfo.getforobserved` method, used when your users encounter your |
| 1290 * beacons. |
| 1123 */ | 1291 */ |
| 1124 class AttachmentInfo { | 1292 class AttachmentInfo { |
| 1125 /** An opaque data container for client-provided data. */ | 1293 /** An opaque data container for client-provided data. */ |
| 1126 core.String data; | 1294 core.String data; |
| 1127 core.List<core.int> get dataAsBytes { | 1295 core.List<core.int> get dataAsBytes { |
| 1128 return convert.BASE64.decode(data); | 1296 return convert.BASE64.decode(data); |
| 1129 } | 1297 } |
| 1130 | 1298 |
| 1131 void set dataAsBytes(core.List<core.int> _bytes) { | 1299 void set dataAsBytes(core.List<core.int> _bytes) { |
| 1132 data = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 1300 data = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); |
| 1133 } | 1301 } |
| 1134 /** | 1302 /** |
| 1135 * Specifies what kind of attachment this is. Tells a client how to interpret | 1303 * Specifies what kind of attachment this is. Tells a client how to |
| 1136 * the `data` field. Format is namespace/type, for example | 1304 * interpret the `data` field. Format is <var>namespace/type</var>, for |
| 1137 * scrupulous-wombat-12345/welcome-message | 1305 * example <code>scrupulous-wombat-12345/welcome-message</code> |
| 1138 */ | 1306 */ |
| 1139 core.String namespacedType; | 1307 core.String namespacedType; |
| 1140 | 1308 |
| 1141 AttachmentInfo(); | 1309 AttachmentInfo(); |
| 1142 | 1310 |
| 1143 AttachmentInfo.fromJson(core.Map _json) { | 1311 AttachmentInfo.fromJson(core.Map _json) { |
| 1144 if (_json.containsKey("data")) { | 1312 if (_json.containsKey("data")) { |
| 1145 data = _json["data"]; | 1313 data = _json["data"]; |
| 1146 } | 1314 } |
| 1147 if (_json.containsKey("namespacedType")) { | 1315 if (_json.containsKey("namespacedType")) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1158 _json["namespacedType"] = namespacedType; | 1326 _json["namespacedType"] = namespacedType; |
| 1159 } | 1327 } |
| 1160 return _json; | 1328 return _json; |
| 1161 } | 1329 } |
| 1162 } | 1330 } |
| 1163 | 1331 |
| 1164 /** Details of a beacon device. */ | 1332 /** Details of a beacon device. */ |
| 1165 class Beacon { | 1333 class Beacon { |
| 1166 /** | 1334 /** |
| 1167 * The identifier of a beacon as advertised by it. This field must be | 1335 * The identifier of a beacon as advertised by it. This field must be |
| 1168 * populated when registering. It may be empty when updating a beacon record | 1336 * populated when registering. It may be empty when updating a beacon |
| 1169 * because it is ignored in updates. When registering a beacon that broadcasts | 1337 * record because it is ignored in updates. |
| 1170 * Eddystone-EID, this field should contain a "stable" Eddystone-UID that | 1338 * |
| 1171 * identifies the beacon and links it to its attachments. The stable | 1339 * When registering a beacon that broadcasts Eddystone-EID, this field |
| 1172 * Eddystone-UID is only used for administering the beacon. | 1340 * should contain a "stable" Eddystone-UID that identifies the beacon and |
| 1341 * links it to its attachments. The stable Eddystone-UID is only used for |
| 1342 * administering the beacon. |
| 1173 */ | 1343 */ |
| 1174 AdvertisedId advertisedId; | 1344 AdvertisedId advertisedId; |
| 1175 /** | 1345 /** |
| 1176 * Resource name of this beacon. A beacon name has the format | 1346 * Resource name of this beacon. A beacon name has the format |
| 1177 * "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the | 1347 * "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by |
| 1178 * beacon and N is a code for the beacon's type. Possible values are `3` for | 1348 * the beacon and N is a code for the beacon's type. Possible values are |
| 1179 * Eddystone, `1` for iBeacon, or `5` for AltBeacon. This field must be left | 1349 * `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. |
| 1180 * empty when registering. After reading a beacon, clients can use the name | 1350 * |
| 1181 * for future operations. | 1351 * This field must be left empty when registering. After reading a beacon, |
| 1352 * clients can use the name for future operations. |
| 1182 */ | 1353 */ |
| 1183 core.String beaconName; | 1354 core.String beaconName; |
| 1184 /** | 1355 /** |
| 1185 * Free text used to identify and describe the beacon. Maximum length 140 | 1356 * Free text used to identify and describe the beacon. Maximum length 140 |
| 1186 * characters. Optional. | 1357 * characters. |
| 1358 * Optional. |
| 1187 */ | 1359 */ |
| 1188 core.String description; | 1360 core.String description; |
| 1189 /** | 1361 /** |
| 1190 * Write-only registration parameters for beacons using Eddystone-EID | 1362 * Write-only registration parameters for beacons using Eddystone-EID |
| 1191 * (remotely resolved ephemeral ID) format. This information will not be | 1363 * (remotely resolved ephemeral ID) format. This information will not be |
| 1192 * populated in API responses. When submitting this data, the `advertised_id` | 1364 * populated in API responses. When submitting this data, the `advertised_id` |
| 1193 * field must contain an ID of type Eddystone-UID. Any other ID type will | 1365 * field must contain an ID of type Eddystone-UID. Any other ID type will |
| 1194 * result in an error. | 1366 * result in an error. |
| 1195 */ | 1367 */ |
| 1196 EphemeralIdRegistration ephemeralIdRegistration; | 1368 EphemeralIdRegistration ephemeralIdRegistration; |
| 1197 /** | 1369 /** |
| 1198 * Expected location stability. This is set when the beacon is registered or | 1370 * Expected location stability. This is set when the beacon is registered or |
| 1199 * updated, not automatically detected in any way. Optional. | 1371 * updated, not automatically detected in any way. |
| 1372 * Optional. |
| 1200 * Possible string values are: | 1373 * Possible string values are: |
| 1201 * - "STABILITY_UNSPECIFIED" : A STABILITY_UNSPECIFIED. | 1374 * - "STABILITY_UNSPECIFIED" : Do not use this value. |
| 1202 * - "STABLE" : A STABLE. | 1375 * - "STABLE" : Not expected to move, for example a store's front door. |
| 1203 * - "PORTABLE" : A PORTABLE. | 1376 * - "PORTABLE" : Usually stable but may move rarely, usually within a single |
| 1204 * - "MOBILE" : A MOBILE. | 1377 * place, |
| 1205 * - "ROVING" : A ROVING. | 1378 * for example a store display. |
| 1379 * - "MOBILE" : Moves frequently, for example a personal item or food truck. |
| 1380 * - "ROVING" : Moves continuously in service, for example a bus or train. |
| 1206 */ | 1381 */ |
| 1207 core.String expectedStability; | 1382 core.String expectedStability; |
| 1208 /** | 1383 /** |
| 1209 * The indoor level information for this beacon, if known. As returned by the | 1384 * The indoor level information for this beacon, if known. As returned by the |
| 1210 * Google Maps API. Optional. | 1385 * Google Maps API. |
| 1386 * Optional. |
| 1211 */ | 1387 */ |
| 1212 IndoorLevel indoorLevel; | 1388 IndoorLevel indoorLevel; |
| 1213 /** | 1389 /** |
| 1214 * The location of the beacon, expressed as a latitude and longitude pair. | 1390 * The location of the beacon, expressed as a latitude and longitude pair. |
| 1215 * This location is given when the beacon is registered or updated. It does | 1391 * This location is given when the beacon is registered or updated. It does |
| 1216 * not necessarily indicate the actual current location of the beacon. | 1392 * not necessarily indicate the actual current location of the beacon. |
| 1217 * Optional. | 1393 * Optional. |
| 1218 */ | 1394 */ |
| 1219 LatLng latLng; | 1395 LatLng latLng; |
| 1220 /** | 1396 /** |
| 1221 * The [Google Places API](/places/place-id) Place ID of the place where the | 1397 * The [Google Places API](/places/place-id) Place ID of the place where |
| 1222 * beacon is deployed. This is given when the beacon is registered or updated, | 1398 * the beacon is deployed. This is given when the beacon is registered or |
| 1223 * not automatically detected in any way. Optional. | 1399 * updated, not automatically detected in any way. |
| 1400 * Optional. |
| 1224 */ | 1401 */ |
| 1225 core.String placeId; | 1402 core.String placeId; |
| 1226 /** | 1403 /** |
| 1227 * Properties of the beacon device, for example battery type or firmware | 1404 * Properties of the beacon device, for example battery type or firmware |
| 1228 * version. Optional. | 1405 * version. |
| 1406 * Optional. |
| 1229 */ | 1407 */ |
| 1230 core.Map<core.String, core.String> properties; | 1408 core.Map<core.String, core.String> properties; |
| 1231 /** | 1409 /** |
| 1232 * Some beacons may require a user to provide an authorization key before | 1410 * Some beacons may require a user to provide an authorization key before |
| 1233 * changing any of its configuration (e.g. broadcast frames, transmit power). | 1411 * changing any of its configuration (e.g. broadcast frames, transmit power). |
| 1234 * This field provides a place to store and control access to that key. This | 1412 * This field provides a place to store and control access to that key. |
| 1235 * field is populated in responses to `GET /v1beta1/beacons/3!beaconId` from | 1413 * This field is populated in responses to `GET /v1beta1/beacons/3!beaconId` |
| 1236 * users with write access to the given beacon. That is to say: If the user is | 1414 * from users with write access to the given beacon. That is to say: If the |
| 1237 * authorized to write the beacon's confidential data in the service, the | 1415 * user is authorized to write the beacon's confidential data in the service, |
| 1238 * service considers them authorized to configure the beacon. Note that this | 1416 * the service considers them authorized to configure the beacon. Note |
| 1239 * key grants nothing on the service, only on the beacon itself. | 1417 * that this key grants nothing on the service, only on the beacon itself. |
| 1240 */ | 1418 */ |
| 1241 core.String provisioningKey; | 1419 core.String provisioningKey; |
| 1242 core.List<core.int> get provisioningKeyAsBytes { | 1420 core.List<core.int> get provisioningKeyAsBytes { |
| 1243 return convert.BASE64.decode(provisioningKey); | 1421 return convert.BASE64.decode(provisioningKey); |
| 1244 } | 1422 } |
| 1245 | 1423 |
| 1246 void set provisioningKeyAsBytes(core.List<core.int> _bytes) { | 1424 void set provisioningKeyAsBytes(core.List<core.int> _bytes) { |
| 1247 provisioningKey = convert.BASE64.encode(_bytes).replaceAll("/", "_").replace
All("+", "-"); | 1425 provisioningKey = convert.BASE64.encode(_bytes).replaceAll("/", "_").replace
All("+", "-"); |
| 1248 } | 1426 } |
| 1249 /** | 1427 /** |
| 1250 * Current status of the beacon. Required. | 1428 * Current status of the beacon. |
| 1429 * Required. |
| 1251 * Possible string values are: | 1430 * Possible string values are: |
| 1252 * - "STATUS_UNSPECIFIED" : A STATUS_UNSPECIFIED. | 1431 * - "STATUS_UNSPECIFIED" : Do not use this value. |
| 1253 * - "ACTIVE" : A ACTIVE. | 1432 * - "ACTIVE" : The "normal" in-use state of a beacon. |
| 1254 * - "DECOMMISSIONED" : A DECOMMISSIONED. | 1433 * - "DECOMMISSIONED" : Beacon should no longer be used for any purpose. This |
| 1255 * - "INACTIVE" : A INACTIVE. | 1434 * is irreversible. |
| 1435 * - "INACTIVE" : The beacon should not be visible to mobile devices. This is |
| 1436 * reversible. |
| 1256 */ | 1437 */ |
| 1257 core.String status; | 1438 core.String status; |
| 1258 | 1439 |
| 1259 Beacon(); | 1440 Beacon(); |
| 1260 | 1441 |
| 1261 Beacon.fromJson(core.Map _json) { | 1442 Beacon.fromJson(core.Map _json) { |
| 1262 if (_json.containsKey("advertisedId")) { | 1443 if (_json.containsKey("advertisedId")) { |
| 1263 advertisedId = new AdvertisedId.fromJson(_json["advertisedId"]); | 1444 advertisedId = new AdvertisedId.fromJson(_json["advertisedId"]); |
| 1264 } | 1445 } |
| 1265 if (_json.containsKey("beaconName")) { | 1446 if (_json.containsKey("beaconName")) { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 _json["status"] = status; | 1511 _json["status"] = status; |
| 1331 } | 1512 } |
| 1332 return _json; | 1513 return _json; |
| 1333 } | 1514 } |
| 1334 } | 1515 } |
| 1335 | 1516 |
| 1336 /** Project-specific data associated with a beacon. */ | 1517 /** Project-specific data associated with a beacon. */ |
| 1337 class BeaconAttachment { | 1518 class BeaconAttachment { |
| 1338 /** | 1519 /** |
| 1339 * Resource name of this attachment. Attachment names have the format: | 1520 * Resource name of this attachment. Attachment names have the format: |
| 1340 * beacons/beacon_id/attachments/attachment_id. Leave this empty on creation. | 1521 * <code>beacons/<var>beacon_id</var>/attachments/<var>attachment_id</var></co
de>. |
| 1522 * Leave this empty on creation. |
| 1341 */ | 1523 */ |
| 1342 core.String attachmentName; | 1524 core.String attachmentName; |
| 1343 /** | 1525 /** |
| 1526 * The UTC time when this attachment was created, in milliseconds since the |
| 1527 * UNIX epoch. |
| 1528 */ |
| 1529 core.String creationTimeMs; |
| 1530 /** |
| 1344 * An opaque data container for client-provided data. Must be | 1531 * An opaque data container for client-provided data. Must be |
| 1345 * [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP | 1532 * [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP |
| 1346 * requests, and will be so encoded (with padding) in responses. Required. | 1533 * requests, and will be so encoded (with padding) in responses. |
| 1534 * Required. |
| 1347 */ | 1535 */ |
| 1348 core.String data; | 1536 core.String data; |
| 1349 core.List<core.int> get dataAsBytes { | 1537 core.List<core.int> get dataAsBytes { |
| 1350 return convert.BASE64.decode(data); | 1538 return convert.BASE64.decode(data); |
| 1351 } | 1539 } |
| 1352 | 1540 |
| 1353 void set dataAsBytes(core.List<core.int> _bytes) { | 1541 void set dataAsBytes(core.List<core.int> _bytes) { |
| 1354 data = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 1542 data = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); |
| 1355 } | 1543 } |
| 1356 /** | 1544 /** |
| 1357 * Specifies what kind of attachment this is. Tells a client how to interpret | 1545 * Specifies what kind of attachment this is. Tells a client how to |
| 1358 * the `data` field. Format is namespace/type. Namespace provides type | 1546 * interpret the `data` field. Format is <var>namespace/type</var>. Namespace |
| 1359 * separation between clients. Type describes the type of `data`, for use by | 1547 * provides type separation between clients. Type describes the type of |
| 1360 * the client when parsing the `data` field. Required. | 1548 * `data`, for use by the client when parsing the `data` field. |
| 1549 * Required. |
| 1361 */ | 1550 */ |
| 1362 core.String namespacedType; | 1551 core.String namespacedType; |
| 1363 | 1552 |
| 1364 BeaconAttachment(); | 1553 BeaconAttachment(); |
| 1365 | 1554 |
| 1366 BeaconAttachment.fromJson(core.Map _json) { | 1555 BeaconAttachment.fromJson(core.Map _json) { |
| 1367 if (_json.containsKey("attachmentName")) { | 1556 if (_json.containsKey("attachmentName")) { |
| 1368 attachmentName = _json["attachmentName"]; | 1557 attachmentName = _json["attachmentName"]; |
| 1369 } | 1558 } |
| 1559 if (_json.containsKey("creationTimeMs")) { |
| 1560 creationTimeMs = _json["creationTimeMs"]; |
| 1561 } |
| 1370 if (_json.containsKey("data")) { | 1562 if (_json.containsKey("data")) { |
| 1371 data = _json["data"]; | 1563 data = _json["data"]; |
| 1372 } | 1564 } |
| 1373 if (_json.containsKey("namespacedType")) { | 1565 if (_json.containsKey("namespacedType")) { |
| 1374 namespacedType = _json["namespacedType"]; | 1566 namespacedType = _json["namespacedType"]; |
| 1375 } | 1567 } |
| 1376 } | 1568 } |
| 1377 | 1569 |
| 1378 core.Map toJson() { | 1570 core.Map toJson() { |
| 1379 var _json = new core.Map(); | 1571 var _json = new core.Map(); |
| 1380 if (attachmentName != null) { | 1572 if (attachmentName != null) { |
| 1381 _json["attachmentName"] = attachmentName; | 1573 _json["attachmentName"] = attachmentName; |
| 1382 } | 1574 } |
| 1575 if (creationTimeMs != null) { |
| 1576 _json["creationTimeMs"] = creationTimeMs; |
| 1577 } |
| 1383 if (data != null) { | 1578 if (data != null) { |
| 1384 _json["data"] = data; | 1579 _json["data"] = data; |
| 1385 } | 1580 } |
| 1386 if (namespacedType != null) { | 1581 if (namespacedType != null) { |
| 1387 _json["namespacedType"] = namespacedType; | 1582 _json["namespacedType"] = namespacedType; |
| 1388 } | 1583 } |
| 1389 return _json; | 1584 return _json; |
| 1390 } | 1585 } |
| 1391 } | 1586 } |
| 1392 | 1587 |
| 1393 /** | 1588 /** |
| 1394 * A subset of beacon information served via the `beaconinfo.getforobserved` | 1589 * A subset of beacon information served via the `beaconinfo.getforobserved` |
| 1395 * method, which you call when users of your app encounter your beacons. | 1590 * method, which you call when users of your app encounter your beacons. |
| 1396 */ | 1591 */ |
| 1397 class BeaconInfo { | 1592 class BeaconInfo { |
| 1398 /** The ID advertised by the beacon. */ | 1593 /** The ID advertised by the beacon. */ |
| 1399 AdvertisedId advertisedId; | 1594 AdvertisedId advertisedId; |
| 1400 /** | 1595 /** |
| 1401 * Attachments matching the type(s) requested. May be empty if no attachment | 1596 * Attachments matching the type(s) requested. |
| 1402 * types were requested, or if none matched. | 1597 * May be empty if no attachment types were requested. |
| 1403 */ | 1598 */ |
| 1404 core.List<AttachmentInfo> attachments; | 1599 core.List<AttachmentInfo> attachments; |
| 1405 /** The name under which the beacon is registered. */ | 1600 /** The name under which the beacon is registered. */ |
| 1406 core.String beaconName; | 1601 core.String beaconName; |
| 1407 | 1602 |
| 1408 BeaconInfo(); | 1603 BeaconInfo(); |
| 1409 | 1604 |
| 1410 BeaconInfo.fromJson(core.Map _json) { | 1605 BeaconInfo.fromJson(core.Map _json) { |
| 1411 if (_json.containsKey("advertisedId")) { | 1606 if (_json.containsKey("advertisedId")) { |
| 1412 advertisedId = new AdvertisedId.fromJson(_json["advertisedId"]); | 1607 advertisedId = new AdvertisedId.fromJson(_json["advertisedId"]); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1429 } | 1624 } |
| 1430 if (beaconName != null) { | 1625 if (beaconName != null) { |
| 1431 _json["beaconName"] = beaconName; | 1626 _json["beaconName"] = beaconName; |
| 1432 } | 1627 } |
| 1433 return _json; | 1628 return _json; |
| 1434 } | 1629 } |
| 1435 } | 1630 } |
| 1436 | 1631 |
| 1437 /** | 1632 /** |
| 1438 * Represents a whole calendar date, e.g. date of birth. The time of day and | 1633 * Represents a whole calendar date, e.g. date of birth. The time of day and |
| 1439 * time zone are either specified elsewhere or are not significant. The date is | 1634 * time zone are either specified elsewhere or are not significant. The date |
| 1440 * relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a | 1635 * is relative to the Proleptic Gregorian Calendar. The day may be 0 to |
| 1441 * year and month where the day is not significant, e.g. credit card expiration | 1636 * represent a year and month where the day is not significant, e.g. credit card |
| 1442 * date. The year may be 0 to represent a month and day independent of year, | 1637 * expiration date. The year may be 0 to represent a month and day independent |
| 1443 * e.g. anniversary date. Related types are google.type.TimeOfDay and | 1638 * of year, e.g. anniversary date. Related types are google.type.TimeOfDay |
| 1444 * `google.protobuf.Timestamp`. | 1639 * and `google.protobuf.Timestamp`. |
| 1445 */ | 1640 */ |
| 1446 class Date { | 1641 class Date { |
| 1447 /** | 1642 /** |
| 1448 * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 | 1643 * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 |
| 1449 * if specifying a year/month where the day is not significant. | 1644 * if specifying a year/month where the day is not significant. |
| 1450 */ | 1645 */ |
| 1451 core.int day; | 1646 core.int day; |
| 1452 /** Month of year. Must be from 1 to 12. */ | 1647 /** Month of year. Must be from 1 to 12. */ |
| 1453 core.int month; | 1648 core.int month; |
| 1454 /** | 1649 /** |
| 1455 * Year of date. Must be from 1 to 9999, or 0 if specifying a date without a | 1650 * Year of date. Must be from 1 to 9999, or 0 if specifying a date without |
| 1456 * year. | 1651 * a year. |
| 1457 */ | 1652 */ |
| 1458 core.int year; | 1653 core.int year; |
| 1459 | 1654 |
| 1460 Date(); | 1655 Date(); |
| 1461 | 1656 |
| 1462 Date.fromJson(core.Map _json) { | 1657 Date.fromJson(core.Map _json) { |
| 1463 if (_json.containsKey("day")) { | 1658 if (_json.containsKey("day")) { |
| 1464 day = _json["day"]; | 1659 day = _json["day"]; |
| 1465 } | 1660 } |
| 1466 if (_json.containsKey("month")) { | 1661 if (_json.containsKey("month")) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 } | 1701 } |
| 1507 return _json; | 1702 return _json; |
| 1508 } | 1703 } |
| 1509 } | 1704 } |
| 1510 | 1705 |
| 1511 /** Diagnostics for a single beacon. */ | 1706 /** Diagnostics for a single beacon. */ |
| 1512 class Diagnostics { | 1707 class Diagnostics { |
| 1513 /** An unordered list of Alerts that the beacon has. */ | 1708 /** An unordered list of Alerts that the beacon has. */ |
| 1514 core.List<core.String> alerts; | 1709 core.List<core.String> alerts; |
| 1515 /** | 1710 /** |
| 1516 * Resource name of the beacon. For Eddystone-EID beacons, this may be the | 1711 * Resource name of the beacon. For Eddystone-EID beacons, this may |
| 1517 * beacon's current EID, or the beacon's "stable" Eddystone-UID. | 1712 * be the beacon's current EID, or the beacon's "stable" Eddystone-UID. |
| 1518 */ | 1713 */ |
| 1519 core.String beaconName; | 1714 core.String beaconName; |
| 1520 /** | 1715 /** |
| 1521 * The date when the battery is expected to be low. If the value is missing | 1716 * The date when the battery is expected to be low. If the value is missing |
| 1522 * then there is no estimate for when the battery will be low. This value is | 1717 * then there is no estimate for when the battery will be low. |
| 1523 * only an estimate, not an exact date. | 1718 * This value is only an estimate, not an exact date. |
| 1524 */ | 1719 */ |
| 1525 Date estimatedLowBatteryDate; | 1720 Date estimatedLowBatteryDate; |
| 1526 | 1721 |
| 1527 Diagnostics(); | 1722 Diagnostics(); |
| 1528 | 1723 |
| 1529 Diagnostics.fromJson(core.Map _json) { | 1724 Diagnostics.fromJson(core.Map _json) { |
| 1530 if (_json.containsKey("alerts")) { | 1725 if (_json.containsKey("alerts")) { |
| 1531 alerts = _json["alerts"]; | 1726 alerts = _json["alerts"]; |
| 1532 } | 1727 } |
| 1533 if (_json.containsKey("beaconName")) { | 1728 if (_json.containsKey("beaconName")) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1548 } | 1743 } |
| 1549 if (estimatedLowBatteryDate != null) { | 1744 if (estimatedLowBatteryDate != null) { |
| 1550 _json["estimatedLowBatteryDate"] = (estimatedLowBatteryDate).toJson(); | 1745 _json["estimatedLowBatteryDate"] = (estimatedLowBatteryDate).toJson(); |
| 1551 } | 1746 } |
| 1552 return _json; | 1747 return _json; |
| 1553 } | 1748 } |
| 1554 } | 1749 } |
| 1555 | 1750 |
| 1556 /** | 1751 /** |
| 1557 * A generic empty message that you can re-use to avoid defining duplicated | 1752 * A generic empty message that you can re-use to avoid defining duplicated |
| 1558 * empty messages in your APIs. A typical example is to use it as the request or | 1753 * empty messages in your APIs. A typical example is to use it as the request |
| 1559 * the response type of an API method. For instance: service Foo { rpc | 1754 * or the response type of an API method. For instance: |
| 1560 * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON | 1755 * |
| 1561 * representation for `Empty` is empty JSON object `{}`. | 1756 * service Foo { |
| 1757 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 1758 * } |
| 1759 * |
| 1760 * The JSON representation for `Empty` is empty JSON object `{}`. |
| 1562 */ | 1761 */ |
| 1563 class Empty { | 1762 class Empty { |
| 1564 | 1763 |
| 1565 Empty(); | 1764 Empty(); |
| 1566 | 1765 |
| 1567 Empty.fromJson(core.Map _json) { | 1766 Empty.fromJson(core.Map _json) { |
| 1568 } | 1767 } |
| 1569 | 1768 |
| 1570 core.Map toJson() { | 1769 core.Map toJson() { |
| 1571 var _json = new core.Map(); | 1770 var _json = new core.Map(); |
| 1572 return _json; | 1771 return _json; |
| 1573 } | 1772 } |
| 1574 } | 1773 } |
| 1575 | 1774 |
| 1576 /** | 1775 /** |
| 1577 * Write-only registration parameters for beacons using Eddystone-EID format. | 1776 * Write-only registration parameters for beacons using Eddystone-EID format. |
| 1578 * Two ways of securely registering an Eddystone-EID beacon with the service are | 1777 * Two ways of securely registering an Eddystone-EID beacon with the service |
| 1579 * supported: 1. Perform an ECDH key exchange via this API, including a previous | 1778 * are supported: |
| 1580 * call to `GET /v1beta1/eidparams`. In this case the fields | 1779 * |
| 1581 * `beacon_ecdh_public_key` and `service_ecdh_public_key` should be populated | 1780 * 1. Perform an ECDH key exchange via this API, including a previous call |
| 1582 * and `beacon_identity_key` should not be populated. This method ensures that | 1781 * to `GET /v1beta1/eidparams`. In this case the fields |
| 1583 * only the two parties in the ECDH key exchange can compute the identity key, | 1782 * `beacon_ecdh_public_key` and `service_ecdh_public_key` should be |
| 1584 * which becomes a secret between them. 2. Derive or obtain the beacon's | 1783 * populated and `beacon_identity_key` should not be populated. This |
| 1585 * identity key via other secure means (perhaps an ECDH key exchange between the | 1784 * method ensures that only the two parties in the ECDH key exchange can |
| 1586 * beacon and a mobile device or any other secure method), and then submit the | 1785 * compute the identity key, which becomes a secret between them. |
| 1587 * resulting identity key to the service. In this case `beacon_identity_key` | 1786 * 2. Derive or obtain the beacon's identity key via other secure means |
| 1588 * field should be populated, and neither of `beacon_ecdh_public_key` nor | 1787 * (perhaps an ECDH key exchange between the beacon and a mobile device |
| 1589 * `service_ecdh_public_key` fields should be. The security of this method | 1788 * or any other secure method), and then submit the resulting identity key |
| 1590 * depends on how securely the parties involved (in particular the bluetooth | 1789 * to the service. In this case `beacon_identity_key` field should be |
| 1591 * client) handle the identity key, and obviously on how securely the identity | 1790 * populated, and neither of `beacon_ecdh_public_key` nor |
| 1592 * key was generated. See [the Eddystone | 1791 * `service_ecdh_public_key` fields should be. The security of this method |
| 1792 * depends on how securely the parties involved (in particular the |
| 1793 * bluetooth client) handle the identity key, and obviously on how |
| 1794 * securely the identity key was generated. |
| 1795 * |
| 1796 * See [the Eddystone |
| 1593 * specification](https://github.com/google/eddystone/tree/master/eddystone-eid) | 1797 * specification](https://github.com/google/eddystone/tree/master/eddystone-eid) |
| 1594 * at GitHub. | 1798 * at GitHub. |
| 1595 */ | 1799 */ |
| 1596 class EphemeralIdRegistration { | 1800 class EphemeralIdRegistration { |
| 1597 /** | 1801 /** |
| 1598 * The beacon's public key used for the Elliptic curve Diffie-Hellman key | 1802 * The beacon's public key used for the Elliptic curve Diffie-Hellman |
| 1599 * exchange. When this field is populated, `service_ecdh_public_key` must also | 1803 * key exchange. When this field is populated, `service_ecdh_public_key` |
| 1600 * be populated, and `beacon_identity_key` must not be. | 1804 * must also be populated, and `beacon_identity_key` must not be. |
| 1601 */ | 1805 */ |
| 1602 core.String beaconEcdhPublicKey; | 1806 core.String beaconEcdhPublicKey; |
| 1603 core.List<core.int> get beaconEcdhPublicKeyAsBytes { | 1807 core.List<core.int> get beaconEcdhPublicKeyAsBytes { |
| 1604 return convert.BASE64.decode(beaconEcdhPublicKey); | 1808 return convert.BASE64.decode(beaconEcdhPublicKey); |
| 1605 } | 1809 } |
| 1606 | 1810 |
| 1607 void set beaconEcdhPublicKeyAsBytes(core.List<core.int> _bytes) { | 1811 void set beaconEcdhPublicKeyAsBytes(core.List<core.int> _bytes) { |
| 1608 beaconEcdhPublicKey = convert.BASE64.encode(_bytes).replaceAll("/", "_").rep
laceAll("+", "-"); | 1812 beaconEcdhPublicKey = convert.BASE64.encode(_bytes).replaceAll("/", "_").rep
laceAll("+", "-"); |
| 1609 } | 1813 } |
| 1610 /** | 1814 /** |
| 1611 * The private key of the beacon. If this field is populated, | 1815 * The private key of the beacon. If this field is populated, |
| 1612 * `beacon_ecdh_public_key` and `service_ecdh_public_key` must not be | 1816 * `beacon_ecdh_public_key` and `service_ecdh_public_key` must not be |
| 1613 * populated. | 1817 * populated. |
| 1614 */ | 1818 */ |
| 1615 core.String beaconIdentityKey; | 1819 core.String beaconIdentityKey; |
| 1616 core.List<core.int> get beaconIdentityKeyAsBytes { | 1820 core.List<core.int> get beaconIdentityKeyAsBytes { |
| 1617 return convert.BASE64.decode(beaconIdentityKey); | 1821 return convert.BASE64.decode(beaconIdentityKey); |
| 1618 } | 1822 } |
| 1619 | 1823 |
| 1620 void set beaconIdentityKeyAsBytes(core.List<core.int> _bytes) { | 1824 void set beaconIdentityKeyAsBytes(core.List<core.int> _bytes) { |
| 1621 beaconIdentityKey = convert.BASE64.encode(_bytes).replaceAll("/", "_").repla
ceAll("+", "-"); | 1825 beaconIdentityKey = convert.BASE64.encode(_bytes).replaceAll("/", "_").repla
ceAll("+", "-"); |
| 1622 } | 1826 } |
| 1623 /** | 1827 /** |
| 1624 * The initial clock value of the beacon. The beacon's clock must have begun | 1828 * The initial clock value of the beacon. The beacon's clock must have |
| 1625 * counting at this value immediately prior to transmitting this value to the | 1829 * begun counting at this value immediately prior to transmitting this |
| 1626 * resolving service. Significant delay in transmitting this value to the | 1830 * value to the resolving service. Significant delay in transmitting this |
| 1627 * service risks registration or resolution failures. If a value is not | 1831 * value to the service risks registration or resolution failures. If a |
| 1628 * provided, the default is zero. | 1832 * value is not provided, the default is zero. |
| 1629 */ | 1833 */ |
| 1630 core.String initialClockValue; | 1834 core.String initialClockValue; |
| 1631 /** | 1835 /** |
| 1632 * An initial ephemeral ID calculated using the clock value submitted as | 1836 * An initial ephemeral ID calculated using the clock value submitted as |
| 1633 * `initial_clock_value`, and the secret key generated by the Diffie-Hellman | 1837 * `initial_clock_value`, and the secret key generated by the |
| 1634 * key exchange using `service_ecdh_public_key` and `service_ecdh_public_key`. | 1838 * Diffie-Hellman key exchange using `service_ecdh_public_key` and |
| 1635 * This initial EID value will be used by the service to confirm that the key | 1839 * `service_ecdh_public_key`. This initial EID value will be used by the |
| 1636 * exchange process was successful. | 1840 * service to confirm that the key exchange process was successful. |
| 1637 */ | 1841 */ |
| 1638 core.String initialEid; | 1842 core.String initialEid; |
| 1639 core.List<core.int> get initialEidAsBytes { | 1843 core.List<core.int> get initialEidAsBytes { |
| 1640 return convert.BASE64.decode(initialEid); | 1844 return convert.BASE64.decode(initialEid); |
| 1641 } | 1845 } |
| 1642 | 1846 |
| 1643 void set initialEidAsBytes(core.List<core.int> _bytes) { | 1847 void set initialEidAsBytes(core.List<core.int> _bytes) { |
| 1644 initialEid = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("
+", "-"); | 1848 initialEid = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("
+", "-"); |
| 1645 } | 1849 } |
| 1646 /** | 1850 /** |
| 1647 * Indicates the nominal period between each rotation of the beacon's | 1851 * Indicates the nominal period between each rotation of the beacon's |
| 1648 * ephemeral ID. "Nominal" because the beacon should randomize the actual | 1852 * ephemeral ID. "Nominal" because the beacon should randomize the |
| 1649 * interval. See [the spec at | 1853 * actual interval. See [the spec at |
| 1650 * github](https://github.com/google/eddystone/tree/master/eddystone-eid) for | 1854 * github](https://github.com/google/eddystone/tree/master/eddystone-eid) |
| 1651 * details. This value corresponds to a power-of-two scaler on the beacon's | 1855 * for details. This value corresponds to a power-of-two scaler on the |
| 1652 * clock: when the scaler value is K, the beacon will begin broadcasting a new | 1856 * beacon's clock: when the scaler value is K, the beacon will begin |
| 1653 * ephemeral ID on average every 2^K seconds. | 1857 * broadcasting a new ephemeral ID on average every 2^K seconds. |
| 1654 */ | 1858 */ |
| 1655 core.int rotationPeriodExponent; | 1859 core.int rotationPeriodExponent; |
| 1656 /** | 1860 /** |
| 1657 * The service's public key used for the Elliptic curve Diffie-Hellman key | 1861 * The service's public key used for the Elliptic curve Diffie-Hellman |
| 1658 * exchange. When this field is populated, `beacon_ecdh_public_key` must also | 1862 * key exchange. When this field is populated, `beacon_ecdh_public_key` |
| 1659 * be populated, and `beacon_identity_key` must not be. | 1863 * must also be populated, and `beacon_identity_key` must not be. |
| 1660 */ | 1864 */ |
| 1661 core.String serviceEcdhPublicKey; | 1865 core.String serviceEcdhPublicKey; |
| 1662 core.List<core.int> get serviceEcdhPublicKeyAsBytes { | 1866 core.List<core.int> get serviceEcdhPublicKeyAsBytes { |
| 1663 return convert.BASE64.decode(serviceEcdhPublicKey); | 1867 return convert.BASE64.decode(serviceEcdhPublicKey); |
| 1664 } | 1868 } |
| 1665 | 1869 |
| 1666 void set serviceEcdhPublicKeyAsBytes(core.List<core.int> _bytes) { | 1870 void set serviceEcdhPublicKeyAsBytes(core.List<core.int> _bytes) { |
| 1667 serviceEcdhPublicKey = convert.BASE64.encode(_bytes).replaceAll("/", "_").re
placeAll("+", "-"); | 1871 serviceEcdhPublicKey = convert.BASE64.encode(_bytes).replaceAll("/", "_").re
placeAll("+", "-"); |
| 1668 } | 1872 } |
| 1669 | 1873 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1708 _json["rotationPeriodExponent"] = rotationPeriodExponent; | 1912 _json["rotationPeriodExponent"] = rotationPeriodExponent; |
| 1709 } | 1913 } |
| 1710 if (serviceEcdhPublicKey != null) { | 1914 if (serviceEcdhPublicKey != null) { |
| 1711 _json["serviceEcdhPublicKey"] = serviceEcdhPublicKey; | 1915 _json["serviceEcdhPublicKey"] = serviceEcdhPublicKey; |
| 1712 } | 1916 } |
| 1713 return _json; | 1917 return _json; |
| 1714 } | 1918 } |
| 1715 } | 1919 } |
| 1716 | 1920 |
| 1717 /** | 1921 /** |
| 1718 * Information a client needs to provision and register beacons that broadcast | 1922 * Information a client needs to provision and register beacons that |
| 1719 * Eddystone-EID format beacon IDs, using Elliptic curve Diffie-Hellman key | 1923 * broadcast Eddystone-EID format beacon IDs, using Elliptic curve |
| 1720 * exchange. See [the Eddystone | 1924 * Diffie-Hellman key exchange. See |
| 1925 * [the Eddystone |
| 1721 * specification](https://github.com/google/eddystone/tree/master/eddystone-eid) | 1926 * specification](https://github.com/google/eddystone/tree/master/eddystone-eid) |
| 1722 * at GitHub. | 1927 * at GitHub. |
| 1723 */ | 1928 */ |
| 1724 class EphemeralIdRegistrationParams { | 1929 class EphemeralIdRegistrationParams { |
| 1725 /** | 1930 /** |
| 1726 * Indicates the maximum rotation period supported by the service. See | 1931 * Indicates the maximum rotation period supported by the service. |
| 1727 * EddystoneEidRegistration.rotation_period_exponent | 1932 * See EddystoneEidRegistration.rotation_period_exponent |
| 1728 */ | 1933 */ |
| 1729 core.int maxRotationPeriodExponent; | 1934 core.int maxRotationPeriodExponent; |
| 1730 /** | 1935 /** |
| 1731 * Indicates the minimum rotation period supported by the service. See | 1936 * Indicates the minimum rotation period supported by the service. |
| 1732 * EddystoneEidRegistration.rotation_period_exponent | 1937 * See EddystoneEidRegistration.rotation_period_exponent |
| 1733 */ | 1938 */ |
| 1734 core.int minRotationPeriodExponent; | 1939 core.int minRotationPeriodExponent; |
| 1735 /** | 1940 /** |
| 1736 * The beacon service's public key for use by a beacon to derive its Identity | 1941 * The beacon service's public key for use by a beacon to derive its |
| 1737 * Key using Elliptic Curve Diffie-Hellman key exchange. | 1942 * Identity Key using Elliptic Curve Diffie-Hellman key exchange. |
| 1738 */ | 1943 */ |
| 1739 core.String serviceEcdhPublicKey; | 1944 core.String serviceEcdhPublicKey; |
| 1740 core.List<core.int> get serviceEcdhPublicKeyAsBytes { | 1945 core.List<core.int> get serviceEcdhPublicKeyAsBytes { |
| 1741 return convert.BASE64.decode(serviceEcdhPublicKey); | 1946 return convert.BASE64.decode(serviceEcdhPublicKey); |
| 1742 } | 1947 } |
| 1743 | 1948 |
| 1744 void set serviceEcdhPublicKeyAsBytes(core.List<core.int> _bytes) { | 1949 void set serviceEcdhPublicKeyAsBytes(core.List<core.int> _bytes) { |
| 1745 serviceEcdhPublicKey = convert.BASE64.encode(_bytes).replaceAll("/", "_").re
placeAll("+", "-"); | 1950 serviceEcdhPublicKey = convert.BASE64.encode(_bytes).replaceAll("/", "_").re
placeAll("+", "-"); |
| 1746 } | 1951 } |
| 1747 | 1952 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1768 _json["minRotationPeriodExponent"] = minRotationPeriodExponent; | 1973 _json["minRotationPeriodExponent"] = minRotationPeriodExponent; |
| 1769 } | 1974 } |
| 1770 if (serviceEcdhPublicKey != null) { | 1975 if (serviceEcdhPublicKey != null) { |
| 1771 _json["serviceEcdhPublicKey"] = serviceEcdhPublicKey; | 1976 _json["serviceEcdhPublicKey"] = serviceEcdhPublicKey; |
| 1772 } | 1977 } |
| 1773 return _json; | 1978 return _json; |
| 1774 } | 1979 } |
| 1775 } | 1980 } |
| 1776 | 1981 |
| 1777 /** | 1982 /** |
| 1778 * Request for beacon and attachment information about beacons that a mobile | 1983 * Request for beacon and attachment information about beacons that |
| 1779 * client has encountered "in the wild". | 1984 * a mobile client has encountered "in the wild". |
| 1780 */ | 1985 */ |
| 1781 class GetInfoForObservedBeaconsRequest { | 1986 class GetInfoForObservedBeaconsRequest { |
| 1782 /** | 1987 /** |
| 1783 * Specifies what kind of attachments to include in the response. When given, | 1988 * Specifies what kind of attachments to include in the response. |
| 1784 * the response will include only attachments of the given types. When empty, | 1989 * When given, the response will include only attachments of the given types. |
| 1785 * no attachments will be returned. Must be in the format namespace/type. | 1990 * When empty, no attachments will be returned. Must be in the format |
| 1786 * Accepts `*` to specify all types in all namespaces. Optional. | 1991 * <var>namespace/type</var>. Accepts `*` to specify all types in |
| 1992 * all namespaces owned by the client. |
| 1993 * Optional. |
| 1787 */ | 1994 */ |
| 1788 core.List<core.String> namespacedTypes; | 1995 core.List<core.String> namespacedTypes; |
| 1789 /** | 1996 /** |
| 1790 * The beacons that the client has encountered. At least one must be given. | 1997 * The beacons that the client has encountered. |
| 1998 * At least one must be given. |
| 1791 */ | 1999 */ |
| 1792 core.List<Observation> observations; | 2000 core.List<Observation> observations; |
| 1793 | 2001 |
| 1794 GetInfoForObservedBeaconsRequest(); | 2002 GetInfoForObservedBeaconsRequest(); |
| 1795 | 2003 |
| 1796 GetInfoForObservedBeaconsRequest.fromJson(core.Map _json) { | 2004 GetInfoForObservedBeaconsRequest.fromJson(core.Map _json) { |
| 1797 if (_json.containsKey("namespacedTypes")) { | 2005 if (_json.containsKey("namespacedTypes")) { |
| 1798 namespacedTypes = _json["namespacedTypes"]; | 2006 namespacedTypes = _json["namespacedTypes"]; |
| 1799 } | 2007 } |
| 1800 if (_json.containsKey("observations")) { | 2008 if (_json.containsKey("observations")) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1813 return _json; | 2021 return _json; |
| 1814 } | 2022 } |
| 1815 } | 2023 } |
| 1816 | 2024 |
| 1817 /** | 2025 /** |
| 1818 * Information about the requested beacons, optionally including attachment | 2026 * Information about the requested beacons, optionally including attachment |
| 1819 * data. | 2027 * data. |
| 1820 */ | 2028 */ |
| 1821 class GetInfoForObservedBeaconsResponse { | 2029 class GetInfoForObservedBeaconsResponse { |
| 1822 /** | 2030 /** |
| 1823 * Public information about beacons. May be empty if the request matched no | 2031 * Public information about beacons. |
| 1824 * beacons. | 2032 * May be empty if the request matched no beacons. |
| 1825 */ | 2033 */ |
| 1826 core.List<BeaconInfo> beacons; | 2034 core.List<BeaconInfo> beacons; |
| 1827 | 2035 |
| 1828 GetInfoForObservedBeaconsResponse(); | 2036 GetInfoForObservedBeaconsResponse(); |
| 1829 | 2037 |
| 1830 GetInfoForObservedBeaconsResponse.fromJson(core.Map _json) { | 2038 GetInfoForObservedBeaconsResponse.fromJson(core.Map _json) { |
| 1831 if (_json.containsKey("beacons")) { | 2039 if (_json.containsKey("beacons")) { |
| 1832 beacons = _json["beacons"].map((value) => new BeaconInfo.fromJson(value)).
toList(); | 2040 beacons = _json["beacons"].map((value) => new BeaconInfo.fromJson(value)).
toList(); |
| 1833 } | 2041 } |
| 1834 } | 2042 } |
| 1835 | 2043 |
| 1836 core.Map toJson() { | 2044 core.Map toJson() { |
| 1837 var _json = new core.Map(); | 2045 var _json = new core.Map(); |
| 1838 if (beacons != null) { | 2046 if (beacons != null) { |
| 1839 _json["beacons"] = beacons.map((value) => (value).toJson()).toList(); | 2047 _json["beacons"] = beacons.map((value) => (value).toJson()).toList(); |
| 1840 } | 2048 } |
| 1841 return _json; | 2049 return _json; |
| 1842 } | 2050 } |
| 1843 } | 2051 } |
| 1844 | 2052 |
| 1845 /** | 2053 /** |
| 1846 * Indoor level, a human-readable string as returned by Google Maps APIs, useful | 2054 * Indoor level, a human-readable string as returned by Google Maps APIs, |
| 1847 * to indicate which floor of a building a beacon is located on. | 2055 * useful to indicate which floor of a building a beacon is located on. |
| 1848 */ | 2056 */ |
| 1849 class IndoorLevel { | 2057 class IndoorLevel { |
| 1850 /** The name of this level. */ | 2058 /** The name of this level. */ |
| 1851 core.String name; | 2059 core.String name; |
| 1852 | 2060 |
| 1853 IndoorLevel(); | 2061 IndoorLevel(); |
| 1854 | 2062 |
| 1855 IndoorLevel.fromJson(core.Map _json) { | 2063 IndoorLevel.fromJson(core.Map _json) { |
| 1856 if (_json.containsKey("name")) { | 2064 if (_json.containsKey("name")) { |
| 1857 name = _json["name"]; | 2065 name = _json["name"]; |
| 1858 } | 2066 } |
| 1859 } | 2067 } |
| 1860 | 2068 |
| 1861 core.Map toJson() { | 2069 core.Map toJson() { |
| 1862 var _json = new core.Map(); | 2070 var _json = new core.Map(); |
| 1863 if (name != null) { | 2071 if (name != null) { |
| 1864 _json["name"] = name; | 2072 _json["name"] = name; |
| 1865 } | 2073 } |
| 1866 return _json; | 2074 return _json; |
| 1867 } | 2075 } |
| 1868 } | 2076 } |
| 1869 | 2077 |
| 1870 /** | 2078 /** |
| 1871 * An object representing a latitude/longitude pair. This is expressed as a pair | 2079 * An object representing a latitude/longitude pair. This is expressed as a pair |
| 1872 * of doubles representing degrees latitude and degrees longitude. Unless | 2080 * of doubles representing degrees latitude and degrees longitude. Unless |
| 1873 * specified otherwise, this must conform to the WGS84 standard. Values must be | 2081 * specified otherwise, this must conform to the |
| 1874 * within normalized ranges. Example of normalization code in Python: def | 2082 * <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 |
| 1875 * NormalizeLongitude(longitude): """Wraps decimal degrees longitude to [-180.0, | 2083 * standard</a>. Values must be within normalized ranges. |
| 1876 * 180.0].""" q, r = divmod(longitude, 360.0) if r > 180.0 or (r == 180.0 and q | 2084 * |
| 1877 * <= -1.0): return r - 360.0 return r def NormalizeLatLng(latitude, longitude): | 2085 * Example of normalization code in Python: |
| 1878 * """Wraps decimal degrees latitude and longitude to [-90.0, 90.0] and [-180.0, | 2086 * |
| 1879 * 180.0], respectively.""" r = latitude % 360.0 if r = 270.0: return r - 360, | 2087 * def NormalizeLongitude(longitude): |
| 1880 * NormalizeLongitude(longitude) else: return 180 - r, | 2088 * """Wraps decimal degrees longitude to [-180.0, 180.0].""" |
| 1881 * NormalizeLongitude(longitude + 180.0) assert 180.0 == | 2089 * q, r = divmod(longitude, 360.0) |
| 1882 * NormalizeLongitude(180.0) assert -180.0 == NormalizeLongitude(-180.0) assert | 2090 * if r > 180.0 or (r == 180.0 and q <= -1.0): |
| 1883 * -179.0 == NormalizeLongitude(181.0) assert (0.0, 0.0) == | 2091 * return r - 360.0 |
| 1884 * NormalizeLatLng(360.0, 0.0) assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) | 2092 * return r |
| 1885 * assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) assert (-85.0, -170.0) == | 2093 * |
| 1886 * NormalizeLatLng(-95.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng(90.0, | 2094 * def NormalizeLatLng(latitude, longitude): |
| 1887 * 10.0) assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) assert (0.0, | 2095 * """Wraps decimal degrees latitude and longitude to |
| 1888 * -170.0) == NormalizeLatLng(-180.0, 10.0) assert (0.0, -170.0) == | 2096 * [-90.0, 90.0] and [-180.0, 180.0], respectively.""" |
| 1889 * NormalizeLatLng(180.0, 10.0) assert (-90.0, 10.0) == NormalizeLatLng(270.0, | 2097 * r = latitude % 360.0 |
| 1890 * 10.0) assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) | 2098 * if r <= 90.0: |
| 2099 * return r, NormalizeLongitude(longitude) |
| 2100 * elif r >= 270.0: |
| 2101 * return r - 360, NormalizeLongitude(longitude) |
| 2102 * else: |
| 2103 * return 180 - r, NormalizeLongitude(longitude + 180.0) |
| 2104 * |
| 2105 * assert 180.0 == NormalizeLongitude(180.0) |
| 2106 * assert -180.0 == NormalizeLongitude(-180.0) |
| 2107 * assert -179.0 == NormalizeLongitude(181.0) |
| 2108 * assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) |
| 2109 * assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) |
| 2110 * assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) |
| 2111 * assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) |
| 2112 * assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) |
| 2113 * assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) |
| 2114 * assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) |
| 2115 * assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) |
| 2116 * assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) |
| 2117 * assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) |
| 2118 * |
| 2119 * The code in logs/storage/validator/logs_validator_traits.cc treats this type |
| 2120 * as if it were annotated as ST_LOCATION. |
| 1891 */ | 2121 */ |
| 1892 class LatLng { | 2122 class LatLng { |
| 1893 /** The latitude in degrees. It must be in the range [-90.0, +90.0]. */ | 2123 /** The latitude in degrees. It must be in the range [-90.0, +90.0]. */ |
| 1894 core.double latitude; | 2124 core.double latitude; |
| 1895 /** The longitude in degrees. It must be in the range [-180.0, +180.0]. */ | 2125 /** The longitude in degrees. It must be in the range [-180.0, +180.0]. */ |
| 1896 core.double longitude; | 2126 core.double longitude; |
| 1897 | 2127 |
| 1898 LatLng(); | 2128 LatLng(); |
| 1899 | 2129 |
| 1900 LatLng.fromJson(core.Map _json) { | 2130 LatLng.fromJson(core.Map _json) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1912 _json["latitude"] = latitude; | 2142 _json["latitude"] = latitude; |
| 1913 } | 2143 } |
| 1914 if (longitude != null) { | 2144 if (longitude != null) { |
| 1915 _json["longitude"] = longitude; | 2145 _json["longitude"] = longitude; |
| 1916 } | 2146 } |
| 1917 return _json; | 2147 return _json; |
| 1918 } | 2148 } |
| 1919 } | 2149 } |
| 1920 | 2150 |
| 1921 /** | 2151 /** |
| 1922 * Response to ListBeaconAttachments that contains the requested attachments. | 2152 * Response to `ListBeaconAttachments` that contains the requested attachments. |
| 1923 */ | 2153 */ |
| 1924 class ListBeaconAttachmentsResponse { | 2154 class ListBeaconAttachmentsResponse { |
| 1925 /** The attachments that corresponded to the request params. */ | 2155 /** The attachments that corresponded to the request params. */ |
| 1926 core.List<BeaconAttachment> attachments; | 2156 core.List<BeaconAttachment> attachments; |
| 1927 | 2157 |
| 1928 ListBeaconAttachmentsResponse(); | 2158 ListBeaconAttachmentsResponse(); |
| 1929 | 2159 |
| 1930 ListBeaconAttachmentsResponse.fromJson(core.Map _json) { | 2160 ListBeaconAttachmentsResponse.fromJson(core.Map _json) { |
| 1931 if (_json.containsKey("attachments")) { | 2161 if (_json.containsKey("attachments")) { |
| 1932 attachments = _json["attachments"].map((value) => new BeaconAttachment.fro
mJson(value)).toList(); | 2162 attachments = _json["attachments"].map((value) => new BeaconAttachment.fro
mJson(value)).toList(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1945 /** Response that contains list beacon results and pagination help. */ | 2175 /** Response that contains list beacon results and pagination help. */ |
| 1946 class ListBeaconsResponse { | 2176 class ListBeaconsResponse { |
| 1947 /** The beacons that matched the search criteria. */ | 2177 /** The beacons that matched the search criteria. */ |
| 1948 core.List<Beacon> beacons; | 2178 core.List<Beacon> beacons; |
| 1949 /** | 2179 /** |
| 1950 * An opaque pagination token that the client may provide in their next | 2180 * An opaque pagination token that the client may provide in their next |
| 1951 * request to retrieve the next page of results. | 2181 * request to retrieve the next page of results. |
| 1952 */ | 2182 */ |
| 1953 core.String nextPageToken; | 2183 core.String nextPageToken; |
| 1954 /** | 2184 /** |
| 1955 * Estimate of the total number of beacons matched by the query. Higher values | 2185 * Estimate of the total number of beacons matched by the query. Higher |
| 1956 * may be less accurate. | 2186 * values may be less accurate. |
| 1957 */ | 2187 */ |
| 1958 core.String totalCount; | 2188 core.String totalCount; |
| 1959 | 2189 |
| 1960 ListBeaconsResponse(); | 2190 ListBeaconsResponse(); |
| 1961 | 2191 |
| 1962 ListBeaconsResponse.fromJson(core.Map _json) { | 2192 ListBeaconsResponse.fromJson(core.Map _json) { |
| 1963 if (_json.containsKey("beacons")) { | 2193 if (_json.containsKey("beacons")) { |
| 1964 beacons = _json["beacons"].map((value) => new Beacon.fromJson(value)).toLi
st(); | 2194 beacons = _json["beacons"].map((value) => new Beacon.fromJson(value)).toLi
st(); |
| 1965 } | 2195 } |
| 1966 if (_json.containsKey("nextPageToken")) { | 2196 if (_json.containsKey("nextPageToken")) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1984 } | 2214 } |
| 1985 return _json; | 2215 return _json; |
| 1986 } | 2216 } |
| 1987 } | 2217 } |
| 1988 | 2218 |
| 1989 /** Response that contains the requested diagnostics. */ | 2219 /** Response that contains the requested diagnostics. */ |
| 1990 class ListDiagnosticsResponse { | 2220 class ListDiagnosticsResponse { |
| 1991 /** The diagnostics matching the given request. */ | 2221 /** The diagnostics matching the given request. */ |
| 1992 core.List<Diagnostics> diagnostics; | 2222 core.List<Diagnostics> diagnostics; |
| 1993 /** | 2223 /** |
| 1994 * Token that can be used for pagination. Returned only if the request matches | 2224 * Token that can be used for pagination. Returned only if the |
| 1995 * more beacons than can be returned in this response. | 2225 * request matches more beacons than can be returned in this response. |
| 1996 */ | 2226 */ |
| 1997 core.String nextPageToken; | 2227 core.String nextPageToken; |
| 1998 | 2228 |
| 1999 ListDiagnosticsResponse(); | 2229 ListDiagnosticsResponse(); |
| 2000 | 2230 |
| 2001 ListDiagnosticsResponse.fromJson(core.Map _json) { | 2231 ListDiagnosticsResponse.fromJson(core.Map _json) { |
| 2002 if (_json.containsKey("diagnostics")) { | 2232 if (_json.containsKey("diagnostics")) { |
| 2003 diagnostics = _json["diagnostics"].map((value) => new Diagnostics.fromJson
(value)).toList(); | 2233 diagnostics = _json["diagnostics"].map((value) => new Diagnostics.fromJson
(value)).toList(); |
| 2004 } | 2234 } |
| 2005 if (_json.containsKey("nextPageToken")) { | 2235 if (_json.containsKey("nextPageToken")) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2038 var _json = new core.Map(); | 2268 var _json = new core.Map(); |
| 2039 if (namespaces != null) { | 2269 if (namespaces != null) { |
| 2040 _json["namespaces"] = namespaces.map((value) => (value).toJson()).toList()
; | 2270 _json["namespaces"] = namespaces.map((value) => (value).toJson()).toList()
; |
| 2041 } | 2271 } |
| 2042 return _json; | 2272 return _json; |
| 2043 } | 2273 } |
| 2044 } | 2274 } |
| 2045 | 2275 |
| 2046 /** | 2276 /** |
| 2047 * An attachment namespace defines read and write access for all the attachments | 2277 * An attachment namespace defines read and write access for all the attachments |
| 2048 * created under it. Each namespace is globally unique, and owned by one project | 2278 * created under it. Each namespace is globally unique, and owned by one |
| 2049 * which is the only project that can create attachments under it. | 2279 * project which is the only project that can create attachments under it. |
| 2050 */ | 2280 */ |
| 2051 class Namespace { | 2281 class Namespace { |
| 2052 /** | 2282 /** |
| 2053 * Resource name of this namespace. Namespaces names have the format: | 2283 * Resource name of this namespace. Namespaces names have the format: |
| 2054 * namespaces/namespace. | 2284 * <code>namespaces/<var>namespace</var></code>. |
| 2055 */ | 2285 */ |
| 2056 core.String namespaceName; | 2286 core.String namespaceName; |
| 2057 /** | 2287 /** |
| 2058 * Specifies what clients may receive attachments under this namespace via | 2288 * Specifies what clients may receive attachments under this namespace |
| 2059 * `beaconinfo.getforobserved`. | 2289 * via `beaconinfo.getforobserved`. |
| 2060 * Possible string values are: | 2290 * Possible string values are: |
| 2061 * - "VISIBILITY_UNSPECIFIED" : A VISIBILITY_UNSPECIFIED. | 2291 * - "VISIBILITY_UNSPECIFIED" : Do not use this value. |
| 2062 * - "UNLISTED" : A UNLISTED. | 2292 * - "UNLISTED" : Served only to the project that owns the namespace. |
| 2063 * - "PUBLIC" : A PUBLIC. | 2293 * - "PUBLIC" : Any project can subscribe to attachments under the namespace. |
| 2064 */ | 2294 */ |
| 2065 core.String servingVisibility; | 2295 core.String servingVisibility; |
| 2066 | 2296 |
| 2067 Namespace(); | 2297 Namespace(); |
| 2068 | 2298 |
| 2069 Namespace.fromJson(core.Map _json) { | 2299 Namespace.fromJson(core.Map _json) { |
| 2070 if (_json.containsKey("namespaceName")) { | 2300 if (_json.containsKey("namespaceName")) { |
| 2071 namespaceName = _json["namespaceName"]; | 2301 namespaceName = _json["namespaceName"]; |
| 2072 } | 2302 } |
| 2073 if (_json.containsKey("servingVisibility")) { | 2303 if (_json.containsKey("servingVisibility")) { |
| 2074 servingVisibility = _json["servingVisibility"]; | 2304 servingVisibility = _json["servingVisibility"]; |
| 2075 } | 2305 } |
| 2076 } | 2306 } |
| 2077 | 2307 |
| 2078 core.Map toJson() { | 2308 core.Map toJson() { |
| 2079 var _json = new core.Map(); | 2309 var _json = new core.Map(); |
| 2080 if (namespaceName != null) { | 2310 if (namespaceName != null) { |
| 2081 _json["namespaceName"] = namespaceName; | 2311 _json["namespaceName"] = namespaceName; |
| 2082 } | 2312 } |
| 2083 if (servingVisibility != null) { | 2313 if (servingVisibility != null) { |
| 2084 _json["servingVisibility"] = servingVisibility; | 2314 _json["servingVisibility"] = servingVisibility; |
| 2085 } | 2315 } |
| 2086 return _json; | 2316 return _json; |
| 2087 } | 2317 } |
| 2088 } | 2318 } |
| 2089 | 2319 |
| 2090 /** Represents one beacon observed once. */ | 2320 /** Represents one beacon observed once. */ |
| 2091 class Observation { | 2321 class Observation { |
| 2092 /** | 2322 /** |
| 2093 * The ID advertised by the beacon the client has encountered. Clients may | 2323 * The ID advertised by the beacon the client has encountered. |
| 2094 * submit an Eddystone-EID `advertised_id`. If the client is not authorized to | 2324 * |
| 2095 * resolve the given Eddystone-EID, no data will be returned for that beacon. | 2325 * If the submitted `advertised_id` type is Eddystone-EID, then the client |
| 2326 * must be authorized to resolve the given beacon. Otherwise no data will be |
| 2327 * returned for that beacon. |
| 2096 * Required. | 2328 * Required. |
| 2097 */ | 2329 */ |
| 2098 AdvertisedId advertisedId; | 2330 AdvertisedId advertisedId; |
| 2099 /** | 2331 /** |
| 2100 * The array of telemetry bytes received from the beacon. The server is | 2332 * The array of telemetry bytes received from the beacon. The server is |
| 2101 * responsible for parsing it. This field may frequently be empty, as with a | 2333 * responsible for parsing it. This field may frequently be empty, as |
| 2102 * beacon that transmits telemetry only occasionally. | 2334 * with a beacon that transmits telemetry only occasionally. |
| 2103 */ | 2335 */ |
| 2104 core.String telemetry; | 2336 core.String telemetry; |
| 2105 core.List<core.int> get telemetryAsBytes { | 2337 core.List<core.int> get telemetryAsBytes { |
| 2106 return convert.BASE64.decode(telemetry); | 2338 return convert.BASE64.decode(telemetry); |
| 2107 } | 2339 } |
| 2108 | 2340 |
| 2109 void set telemetryAsBytes(core.List<core.int> _bytes) { | 2341 void set telemetryAsBytes(core.List<core.int> _bytes) { |
| 2110 telemetry = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); | 2342 telemetry = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); |
| 2111 } | 2343 } |
| 2112 /** Time when the beacon was observed. */ | 2344 /** Time when the beacon was observed. */ |
| (...skipping 20 matching lines...) Expand all Loading... |
| 2133 } | 2365 } |
| 2134 if (telemetry != null) { | 2366 if (telemetry != null) { |
| 2135 _json["telemetry"] = telemetry; | 2367 _json["telemetry"] = telemetry; |
| 2136 } | 2368 } |
| 2137 if (timestampMs != null) { | 2369 if (timestampMs != null) { |
| 2138 _json["timestampMs"] = timestampMs; | 2370 _json["timestampMs"] = timestampMs; |
| 2139 } | 2371 } |
| 2140 return _json; | 2372 return _json; |
| 2141 } | 2373 } |
| 2142 } | 2374 } |
| OLD | NEW |