| 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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 * [beaconName] - The beacon whose attachments should be deleted. A beacon | 699 * [beaconName] - The beacon whose attachments should be deleted. A beacon |
| 700 * name has the | 700 * name has the |
| 701 * format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast | 701 * format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast |
| 702 * by the beacon and N is a code for the beacon's type. Possible values are | 702 * by the beacon and N is a code for the beacon's type. Possible values are |
| 703 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` | 703 * `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` |
| 704 * for AltBeacon. For Eddystone-EID beacons, you may use either the | 704 * for AltBeacon. For Eddystone-EID beacons, you may use either the |
| 705 * current EID or the beacon's "stable" UID. | 705 * current EID or the beacon's "stable" UID. |
| 706 * Required. | 706 * Required. |
| 707 * Value must have pattern "^beacons/[^/]+$". | 707 * Value must have pattern "^beacons/[^/]+$". |
| 708 * | 708 * |
| 709 * [namespacedType] - Specifies the namespace and type of attachments to | |
| 710 * delete in | |
| 711 * `namespace/type` format. Accepts `* / * ` to specify | |
| 712 * "all types in all namespaces". | |
| 713 * Optional. | |
| 714 * | |
| 715 * [projectId] - The project id to delete beacon attachments under. This field | 709 * [projectId] - The project id to delete beacon attachments under. This field |
| 716 * can be | 710 * can be |
| 717 * used when "*" is specified to mean all attachment namespaces. Projects | 711 * used when "*" is specified to mean all attachment namespaces. Projects |
| 718 * may have multiple attachments with multiple namespaces. If "*" is | 712 * may have multiple attachments with multiple namespaces. If "*" is |
| 719 * specified and the projectId string is empty, then the project | 713 * specified and the projectId string is empty, then the project |
| 720 * making the request is used. | 714 * making the request is used. |
| 721 * Optional. | 715 * Optional. |
| 722 * | 716 * |
| 717 * [namespacedType] - Specifies the namespace and type of attachments to |
| 718 * delete in |
| 719 * `namespace/type` format. Accepts `* / * ` to specify |
| 720 * "all types in all namespaces". |
| 721 * Optional. |
| 722 * |
| 723 * Completes with a [DeleteAttachmentsResponse]. | 723 * Completes with a [DeleteAttachmentsResponse]. |
| 724 * | 724 * |
| 725 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 725 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 726 * error. | 726 * error. |
| 727 * | 727 * |
| 728 * 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, |
| 729 * this method will complete with the same error. | 729 * this method will complete with the same error. |
| 730 */ | 730 */ |
| 731 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 projectId, core.String namespacedType}) { |
| 732 var _url = null; | 732 var _url = null; |
| 733 var _queryParams = new core.Map(); | 733 var _queryParams = new core.Map(); |
| 734 var _uploadMedia = null; | 734 var _uploadMedia = null; |
| 735 var _uploadOptions = null; | 735 var _uploadOptions = null; |
| 736 var _downloadOptions = commons.DownloadOptions.Metadata; | 736 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 737 var _body = null; | 737 var _body = null; |
| 738 | 738 |
| 739 if (beaconName == null) { | 739 if (beaconName == null) { |
| 740 throw new core.ArgumentError("Parameter beaconName is required."); | 740 throw new core.ArgumentError("Parameter beaconName is required."); |
| 741 } | 741 } |
| 742 if (projectId != null) { |
| 743 _queryParams["projectId"] = [projectId]; |
| 744 } |
| 742 if (namespacedType != null) { | 745 if (namespacedType != null) { |
| 743 _queryParams["namespacedType"] = [namespacedType]; | 746 _queryParams["namespacedType"] = [namespacedType]; |
| 744 } | 747 } |
| 745 if (projectId != null) { | |
| 746 _queryParams["projectId"] = [projectId]; | |
| 747 } | |
| 748 | 748 |
| 749 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$beaconName') + '
/attachments:batchDelete'; | 749 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$beaconName') + '
/attachments:batchDelete'; |
| 750 | 750 |
| 751 var _response = _requester.request(_url, | 751 var _response = _requester.request(_url, |
| 752 "POST", | 752 "POST", |
| 753 body: _body, | 753 body: _body, |
| 754 queryParams: _queryParams, | 754 queryParams: _queryParams, |
| 755 uploadOptions: _uploadOptions, | 755 uploadOptions: _uploadOptions, |
| 756 uploadMedia: _uploadMedia, | 756 uploadMedia: _uploadMedia, |
| 757 downloadOptions: _downloadOptions); | 757 downloadOptions: _downloadOptions); |
| (...skipping 158 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 * |
| 926 * [projectId] - The project id to list beacon attachments under. This field | 931 * [projectId] - The project id to list beacon attachments under. This field |
| 927 * can be | 932 * can be |
| 928 * used when "*" is specified to mean all attachment namespaces. Projects | 933 * used when "*" is specified to mean all attachment namespaces. Projects |
| 929 * may have multiple attachments with multiple namespaces. If "*" is | 934 * may have multiple attachments with multiple namespaces. If "*" is |
| 930 * specified and the projectId string is empty, then the project | 935 * specified and the projectId string is empty, then the project |
| 931 * making the request is used. | 936 * making the request is used. |
| 932 * Optional. | 937 * Optional. |
| 933 * | 938 * |
| 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 projectId, core.String namespacedType}) { | 947 async.Future<ListBeaconAttachmentsResponse> list(core.String beaconName, {core
.String namespacedType, core.String projectId}) { |
| 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 (namespacedType != null) { |
| 959 _queryParams["namespacedType"] = [namespacedType]; |
| 960 } |
| 958 if (projectId != null) { | 961 if (projectId != null) { |
| 959 _queryParams["projectId"] = [projectId]; | 962 _queryParams["projectId"] = [projectId]; |
| 960 } | 963 } |
| 961 if (namespacedType != null) { | |
| 962 _queryParams["namespacedType"] = [namespacedType]; | |
| 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 1388 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 |