| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 * criteria. Only those beacons that the client has permission to list | 417 * criteria. Only those beacons that the client has permission to list |
| 418 * will be returned. | 418 * will be returned. |
| 419 * | 419 * |
| 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 * [projectId] - The project id to list beacons under. If not present then the |
| 428 * project |
| 429 * credential that made the request is used as the project. |
| 430 * Optional. |
| 431 * |
| 427 * [pageToken] - A pagination token obtained from a previous request to list | 432 * [pageToken] - A pagination token obtained from a previous request to list |
| 428 * beacons. | 433 * beacons. |
| 429 * | 434 * |
| 430 * [pageSize] - The maximum number of records to return for this request, up | 435 * [pageSize] - The maximum number of records to return for this request, up |
| 431 * to a | 436 * to a |
| 432 * server-defined upper limit. | 437 * server-defined upper limit. |
| 433 * | 438 * |
| 434 * [q] - Filter query string that supports the following field filters: | 439 * [q] - Filter query string that supports the following field filters: |
| 435 * | 440 * |
| 436 * * **description:`"<string>"`** | 441 * * **description:`"<string>"`** |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 * Multiple filters on different fields are combined with AND logic. | 498 * Multiple filters on different fields are combined with AND logic. |
| 494 * Filters should be separated by spaces. | 499 * Filters should be separated by spaces. |
| 495 * | 500 * |
| 496 * As with any HTTP query string parameter, the whole filter expression must | 501 * As with any HTTP query string parameter, the whole filter expression must |
| 497 * be URL-encoded. | 502 * be URL-encoded. |
| 498 * | 503 * |
| 499 * Example REST request: | 504 * Example REST request: |
| 500 * `GET | 505 * `GET |
| 501 * /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000` | 506 * /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000` |
| 502 * | 507 * |
| 503 * [projectId] - The project id to list beacons under. If not present then the | |
| 504 * project | |
| 505 * credential that made the request is used as the project. | |
| 506 * Optional. | |
| 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.int pageSi
ze, core.String q, core.String projectId}) { | 516 async.Future<ListBeaconsResponse> list({core.String projectId, core.String pag
eToken, core.int pageSize, core.String q}) { |
| 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 (projectId != null) { |
| 525 _queryParams["projectId"] = [projectId]; |
| 526 } |
| 524 if (pageToken != null) { | 527 if (pageToken != null) { |
| 525 _queryParams["pageToken"] = [pageToken]; | 528 _queryParams["pageToken"] = [pageToken]; |
| 526 } | 529 } |
| 527 if (pageSize != null) { | 530 if (pageSize != null) { |
| 528 _queryParams["pageSize"] = ["${pageSize}"]; | 531 _queryParams["pageSize"] = ["${pageSize}"]; |
| 529 } | 532 } |
| 530 if (q != null) { | 533 if (q != null) { |
| 531 _queryParams["q"] = [q]; | 534 _queryParams["q"] = [q]; |
| 532 } | 535 } |
| 533 if (projectId != null) { | |
| 534 _queryParams["projectId"] = [projectId]; | |
| 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, |
| 543 uploadOptions: _uploadOptions, | 543 uploadOptions: _uploadOptions, |
| 544 uploadMedia: _uploadMedia, | 544 uploadMedia: _uploadMedia, |
| 545 downloadOptions: _downloadOptions); | 545 downloadOptions: _downloadOptions); |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 * [beaconName] - Beacon whose attachments should be fetched. A beacon name | 916 * [beaconName] - Beacon whose attachments should be fetched. A beacon name |
| 917 * has the | 917 * has the |
| 918 * format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast | 918 * format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast |
| 919 * by the beacon and N is a code for the beacon's type. Possible values are | 919 * by the beacon and N is a code for the beacon's type. Possible values are |
| 920 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` | 920 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` |
| 921 * for AltBeacon. For Eddystone-EID beacons, you may use either the | 921 * for AltBeacon. For Eddystone-EID beacons, you may use either the |
| 922 * current EID or the beacon's "stable" UID. | 922 * current EID or the beacon's "stable" UID. |
| 923 * Required. | 923 * Required. |
| 924 * Value must have pattern "^beacons/[^/]+$". | 924 * Value must have pattern "^beacons/[^/]+$". |
| 925 * | 925 * |
| 926 * [namespacedType] - Specifies the namespace and type of attachment to | |
| 927 * include in response in | |
| 928 * <var>namespace/type</var> format. Accepts `* / * ` to specify | |
| 929 * "all types in all namespaces". | |
| 930 * | |
| 931 * [projectId] - The project id to list beacon attachments under. This field | 926 * [projectId] - The project id to list beacon attachments under. This field |
| 932 * can be | 927 * can be |
| 933 * used when "*" is specified to mean all attachment namespaces. Projects | 928 * used when "*" is specified to mean all attachment namespaces. Projects |
| 934 * may have multiple attachments with multiple namespaces. If "*" is | 929 * may have multiple attachments with multiple namespaces. If "*" is |
| 935 * specified and the projectId string is empty, then the project | 930 * specified and the projectId string is empty, then the project |
| 936 * making the request is used. | 931 * making the request is used. |
| 937 * Optional. | 932 * Optional. |
| 938 * | 933 * |
| 934 * [namespacedType] - Specifies the namespace and type of attachment to |
| 935 * include in response in |
| 936 * <var>namespace/type</var> format. Accepts `* / * ` to specify |
| 937 * "all types in all namespaces". |
| 938 * |
| 939 * Completes with a [ListBeaconAttachmentsResponse]. | 939 * Completes with a [ListBeaconAttachmentsResponse]. |
| 940 * | 940 * |
| 941 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 941 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 942 * error. | 942 * error. |
| 943 * | 943 * |
| 944 * 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, |
| 945 * this method will complete with the same error. | 945 * this method will complete with the same error. |
| 946 */ | 946 */ |
| 947 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}) { |
| 948 var _url = null; | 948 var _url = null; |
| 949 var _queryParams = new core.Map(); | 949 var _queryParams = new core.Map(); |
| 950 var _uploadMedia = null; | 950 var _uploadMedia = null; |
| 951 var _uploadOptions = null; | 951 var _uploadOptions = null; |
| 952 var _downloadOptions = commons.DownloadOptions.Metadata; | 952 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 953 var _body = null; | 953 var _body = null; |
| 954 | 954 |
| 955 if (beaconName == null) { | 955 if (beaconName == null) { |
| 956 throw new core.ArgumentError("Parameter beaconName is required."); | 956 throw new core.ArgumentError("Parameter beaconName is required."); |
| 957 } | 957 } |
| 958 if (projectId != null) { |
| 959 _queryParams["projectId"] = [projectId]; |
| 960 } |
| 958 if (namespacedType != null) { | 961 if (namespacedType != null) { |
| 959 _queryParams["namespacedType"] = [namespacedType]; | 962 _queryParams["namespacedType"] = [namespacedType]; |
| 960 } | 963 } |
| 961 if (projectId != null) { | |
| 962 _queryParams["projectId"] = [projectId]; | |
| 963 } | |
| 964 | 964 |
| 965 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$beaconName') + '
/attachments'; | 965 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$beaconName') + '
/attachments'; |
| 966 | 966 |
| 967 var _response = _requester.request(_url, | 967 var _response = _requester.request(_url, |
| 968 "GET", | 968 "GET", |
| 969 body: _body, | 969 body: _body, |
| 970 queryParams: _queryParams, | 970 queryParams: _queryParams, |
| 971 uploadOptions: _uploadOptions, | 971 uploadOptions: _uploadOptions, |
| 972 uploadMedia: _uploadMedia, | 972 uploadMedia: _uploadMedia, |
| 973 downloadOptions: _downloadOptions); | 973 downloadOptions: _downloadOptions); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 991 * Authenticate using an [OAuth access | 991 * Authenticate using an [OAuth access |
| 992 * token](https://developers.google.com/identity/protocols/OAuth2) | 992 * token](https://developers.google.com/identity/protocols/OAuth2) |
| 993 * from a signed-in user with **viewer**, **Is owner** or **Can edit** | 993 * from a signed-in user with **viewer**, **Is owner** or **Can edit** |
| 994 * permissions in the Google Developers Console project. | 994 * permissions in the Google Developers Console project. |
| 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 | |
| 1002 * from the | |
| 1003 * response to a previous request. Optional. | |
| 1004 * | |
| 1005 * [alertFilter] - Requests only beacons that have the given alert. For | 1001 * [alertFilter] - Requests only beacons that have the given alert. For |
| 1006 * example, to find | 1002 * example, to find |
| 1007 * beacons that have low batteries use `alert_filter=LOW_BATTERY`. | 1003 * beacons that have low batteries use `alert_filter=LOW_BATTERY`. |
| 1008 * Possible string values are: | 1004 * Possible string values are: |
| 1009 * - "ALERT_UNSPECIFIED" : A ALERT_UNSPECIFIED. | 1005 * - "ALERT_UNSPECIFIED" : A ALERT_UNSPECIFIED. |
| 1010 * - "WRONG_LOCATION" : A WRONG_LOCATION. | 1006 * - "WRONG_LOCATION" : A WRONG_LOCATION. |
| 1011 * - "LOW_BATTERY" : A LOW_BATTERY. | 1007 * - "LOW_BATTERY" : A LOW_BATTERY. |
| 1012 * | 1008 * |
| 1013 * [pageSize] - Specifies the maximum number of results to return. Defaults to | 1009 * [pageSize] - Specifies the maximum number of results to return. Defaults to |
| 1014 * 10. Maximum 1000. Optional. | 1010 * 10. Maximum 1000. Optional. |
| 1015 * | 1011 * |
| 1016 * [projectId] - Requests only diagnostic records for the given project id. If | 1012 * [projectId] - Requests only diagnostic records for the given project id. If |
| 1017 * not set, | 1013 * not set, |
| 1018 * then the project making the request will be used for looking up | 1014 * then the project making the request will be used for looking up |
| 1019 * diagnostic records. Optional. | 1015 * diagnostic records. Optional. |
| 1020 * | 1016 * |
| 1017 * [pageToken] - Requests results that occur after the `page_token`, obtained |
| 1018 * from the |
| 1019 * response to a previous request. Optional. |
| 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.String alertFilter, core.int pageSize, core.String projectId})
{ | 1029 async.Future<ListDiagnosticsResponse> list(core.String beaconName, {core.Strin
g alertFilter, core.int pageSize, core.String projectId, core.String pageToken})
{ |
| 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) { | |
| 1041 _queryParams["pageToken"] = [pageToken]; | |
| 1042 } | |
| 1043 if (alertFilter != null) { | 1040 if (alertFilter != null) { |
| 1044 _queryParams["alertFilter"] = [alertFilter]; | 1041 _queryParams["alertFilter"] = [alertFilter]; |
| 1045 } | 1042 } |
| 1046 if (pageSize != null) { | 1043 if (pageSize != null) { |
| 1047 _queryParams["pageSize"] = ["${pageSize}"]; | 1044 _queryParams["pageSize"] = ["${pageSize}"]; |
| 1048 } | 1045 } |
| 1049 if (projectId != null) { | 1046 if (projectId != null) { |
| 1050 _queryParams["projectId"] = [projectId]; | 1047 _queryParams["projectId"] = [projectId]; |
| 1051 } | 1048 } |
| 1049 if (pageToken != null) { |
| 1050 _queryParams["pageToken"] = [pageToken]; |
| 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, |
| 1059 uploadOptions: _uploadOptions, | 1059 uploadOptions: _uploadOptions, |
| 1060 uploadMedia: _uploadMedia, | 1060 uploadMedia: _uploadMedia, |
| 1061 downloadOptions: _downloadOptions); | 1061 downloadOptions: _downloadOptions); |
| (...skipping 1300 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 |