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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 * Authenticate using an [OAuth access | 420 * Authenticate using an [OAuth access |
421 * token](https://developers.google.com/identity/protocols/OAuth2) | 421 * token](https://developers.google.com/identity/protocols/OAuth2) |
422 * from a signed-in user with **viewer**, **Is owner** or **Can edit** | 422 * from a signed-in user with **viewer**, **Is owner** or **Can edit** |
423 * permissions in the Google Developers Console project. | 423 * permissions in the Google Developers Console project. |
424 * | 424 * |
425 * Request parameters: | 425 * Request parameters: |
426 * | 426 * |
427 * [pageToken] - A pagination token obtained from a previous request to list | 427 * [pageToken] - A pagination token obtained from a previous request to list |
428 * beacons. | 428 * beacons. |
429 * | 429 * |
| 430 * [pageSize] - The maximum number of records to return for this request, up |
| 431 * to a |
| 432 * server-defined upper limit. |
| 433 * |
430 * [q] - Filter query string that supports the following field filters: | 434 * [q] - Filter query string that supports the following field filters: |
431 * | 435 * |
432 * * **description:`"<string>"`** | 436 * * **description:`"<string>"`** |
433 * For example: **description:"Room 3"** | 437 * For example: **description:"Room 3"** |
434 * Returns beacons whose description matches tokens in the string "Room 3" | 438 * Returns beacons whose description matches tokens in the string "Room 3" |
435 * (not necessarily that exact string). | 439 * (not necessarily that exact string). |
436 * The string must be double-quoted. | 440 * The string must be double-quoted. |
437 * * **status:`<enum>`** | 441 * * **status:`<enum>`** |
438 * For example: **status:active** | 442 * For example: **status:active** |
439 * Returns beacons whose status matches the given value. Values must be | 443 * Returns beacons whose status matches the given value. Values must be |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 * Multiple filters on different fields are combined with AND logic. | 493 * Multiple filters on different fields are combined with AND logic. |
490 * Filters should be separated by spaces. | 494 * Filters should be separated by spaces. |
491 * | 495 * |
492 * As with any HTTP query string parameter, the whole filter expression must | 496 * As with any HTTP query string parameter, the whole filter expression must |
493 * be URL-encoded. | 497 * be URL-encoded. |
494 * | 498 * |
495 * Example REST request: | 499 * Example REST request: |
496 * `GET | 500 * `GET |
497 * /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000` | 501 * /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000` |
498 * | 502 * |
499 * [pageSize] - The maximum number of records to return for this request, up | |
500 * to a | |
501 * server-defined upper limit. | |
502 * | |
503 * [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 |
504 * project | 504 * project |
505 * credential that made the request is used as the project. | 505 * credential that made the request is used as the project. |
506 * Optional. | 506 * Optional. |
507 * | 507 * |
508 * Completes with a [ListBeaconsResponse]. | 508 * Completes with a [ListBeaconsResponse]. |
509 * | 509 * |
510 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 510 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
511 * error. | 511 * error. |
512 * | 512 * |
513 * 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, |
514 * this method will complete with the same error. | 514 * this method will complete with the same error. |
515 */ | 515 */ |
516 async.Future<ListBeaconsResponse> list({core.String pageToken, core.String q,
core.int pageSize, core.String projectId}) { | 516 async.Future<ListBeaconsResponse> list({core.String pageToken, core.int pageSi
ze, core.String q, core.String projectId}) { |
517 var _url = null; | 517 var _url = null; |
518 var _queryParams = new core.Map(); | 518 var _queryParams = new core.Map(); |
519 var _uploadMedia = null; | 519 var _uploadMedia = null; |
520 var _uploadOptions = null; | 520 var _uploadOptions = null; |
521 var _downloadOptions = commons.DownloadOptions.Metadata; | 521 var _downloadOptions = commons.DownloadOptions.Metadata; |
522 var _body = null; | 522 var _body = null; |
523 | 523 |
524 if (pageToken != null) { | 524 if (pageToken != null) { |
525 _queryParams["pageToken"] = [pageToken]; | 525 _queryParams["pageToken"] = [pageToken]; |
526 } | 526 } |
| 527 if (pageSize != null) { |
| 528 _queryParams["pageSize"] = ["${pageSize}"]; |
| 529 } |
527 if (q != null) { | 530 if (q != null) { |
528 _queryParams["q"] = [q]; | 531 _queryParams["q"] = [q]; |
529 } | 532 } |
530 if (pageSize != null) { | |
531 _queryParams["pageSize"] = ["${pageSize}"]; | |
532 } | |
533 if (projectId != null) { | 533 if (projectId != null) { |
534 _queryParams["projectId"] = [projectId]; | 534 _queryParams["projectId"] = [projectId]; |
535 } | 535 } |
536 | 536 |
537 _url = 'v1beta1/beacons'; | 537 _url = 'v1beta1/beacons'; |
538 | 538 |
539 var _response = _requester.request(_url, | 539 var _response = _requester.request(_url, |
540 "GET", | 540 "GET", |
541 body: _body, | 541 body: _body, |
542 queryParams: _queryParams, | 542 queryParams: _queryParams, |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 * | 995 * |
996 * Request parameters: | 996 * Request parameters: |
997 * | 997 * |
998 * [beaconName] - Beacon that the diagnostics are for. | 998 * [beaconName] - Beacon that the diagnostics are for. |
999 * Value must have pattern "^beacons/[^/]+$". | 999 * Value must have pattern "^beacons/[^/]+$". |
1000 * | 1000 * |
1001 * [pageToken] - Requests results that occur after the `page_token`, obtained | 1001 * [pageToken] - Requests results that occur after the `page_token`, obtained |
1002 * from the | 1002 * from the |
1003 * response to a previous request. Optional. | 1003 * response to a previous request. Optional. |
1004 * | 1004 * |
1005 * [pageSize] - Specifies the maximum number of results to return. Defaults to | |
1006 * 10. Maximum 1000. Optional. | |
1007 * | |
1008 * [alertFilter] - Requests only beacons that have the given alert. For | 1005 * [alertFilter] - Requests only beacons that have the given alert. For |
1009 * example, to find | 1006 * example, to find |
1010 * beacons that have low batteries use `alert_filter=LOW_BATTERY`. | 1007 * beacons that have low batteries use `alert_filter=LOW_BATTERY`. |
1011 * Possible string values are: | 1008 * Possible string values are: |
1012 * - "ALERT_UNSPECIFIED" : A ALERT_UNSPECIFIED. | 1009 * - "ALERT_UNSPECIFIED" : A ALERT_UNSPECIFIED. |
1013 * - "WRONG_LOCATION" : A WRONG_LOCATION. | 1010 * - "WRONG_LOCATION" : A WRONG_LOCATION. |
1014 * - "LOW_BATTERY" : A LOW_BATTERY. | 1011 * - "LOW_BATTERY" : A LOW_BATTERY. |
1015 * | 1012 * |
| 1013 * [pageSize] - Specifies the maximum number of results to return. Defaults to |
| 1014 * 10. Maximum 1000. Optional. |
| 1015 * |
1016 * [projectId] - Requests only diagnostic records for the given project id. If | 1016 * [projectId] - Requests only diagnostic records for the given project id. If |
1017 * not set, | 1017 * not set, |
1018 * then the project making the request will be used for looking up | 1018 * then the project making the request will be used for looking up |
1019 * diagnostic records. Optional. | 1019 * diagnostic records. Optional. |
1020 * | 1020 * |
1021 * Completes with a [ListDiagnosticsResponse]. | 1021 * Completes with a [ListDiagnosticsResponse]. |
1022 * | 1022 * |
1023 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1023 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1024 * error. | 1024 * error. |
1025 * | 1025 * |
1026 * 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, |
1027 * this method will complete with the same error. | 1027 * this method will complete with the same error. |
1028 */ | 1028 */ |
1029 async.Future<ListDiagnosticsResponse> list(core.String beaconName, {core.Strin
g pageToken, core.int pageSize, core.String alertFilter, core.String projectId})
{ | 1029 async.Future<ListDiagnosticsResponse> list(core.String beaconName, {core.Strin
g pageToken, core.String alertFilter, core.int pageSize, core.String projectId})
{ |
1030 var _url = null; | 1030 var _url = null; |
1031 var _queryParams = new core.Map(); | 1031 var _queryParams = new core.Map(); |
1032 var _uploadMedia = null; | 1032 var _uploadMedia = null; |
1033 var _uploadOptions = null; | 1033 var _uploadOptions = null; |
1034 var _downloadOptions = commons.DownloadOptions.Metadata; | 1034 var _downloadOptions = commons.DownloadOptions.Metadata; |
1035 var _body = null; | 1035 var _body = null; |
1036 | 1036 |
1037 if (beaconName == null) { | 1037 if (beaconName == null) { |
1038 throw new core.ArgumentError("Parameter beaconName is required."); | 1038 throw new core.ArgumentError("Parameter beaconName is required."); |
1039 } | 1039 } |
1040 if (pageToken != null) { | 1040 if (pageToken != null) { |
1041 _queryParams["pageToken"] = [pageToken]; | 1041 _queryParams["pageToken"] = [pageToken]; |
1042 } | 1042 } |
| 1043 if (alertFilter != null) { |
| 1044 _queryParams["alertFilter"] = [alertFilter]; |
| 1045 } |
1043 if (pageSize != null) { | 1046 if (pageSize != null) { |
1044 _queryParams["pageSize"] = ["${pageSize}"]; | 1047 _queryParams["pageSize"] = ["${pageSize}"]; |
1045 } | 1048 } |
1046 if (alertFilter != null) { | |
1047 _queryParams["alertFilter"] = [alertFilter]; | |
1048 } | |
1049 if (projectId != null) { | 1049 if (projectId != null) { |
1050 _queryParams["projectId"] = [projectId]; | 1050 _queryParams["projectId"] = [projectId]; |
1051 } | 1051 } |
1052 | 1052 |
1053 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$beaconName') + '
/diagnostics'; | 1053 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$beaconName') + '
/diagnostics'; |
1054 | 1054 |
1055 var _response = _requester.request(_url, | 1055 var _response = _requester.request(_url, |
1056 "GET", | 1056 "GET", |
1057 body: _body, | 1057 body: _body, |
1058 queryParams: _queryParams, | 1058 queryParams: _queryParams, |
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2362 } | 2362 } |
2363 if (telemetry != null) { | 2363 if (telemetry != null) { |
2364 _json["telemetry"] = telemetry; | 2364 _json["telemetry"] = telemetry; |
2365 } | 2365 } |
2366 if (timestampMs != null) { | 2366 if (timestampMs != null) { |
2367 _json["timestampMs"] = timestampMs; | 2367 _json["timestampMs"] = timestampMs; |
2368 } | 2368 } |
2369 return _json; | 2369 return _json; |
2370 } | 2370 } |
2371 } | 2371 } |
OLD | NEW |