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.pubsub.v1beta2; | 3 library googleapis_beta.pubsub.v1beta2; |
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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } | 287 } |
288 | 288 |
289 /** | 289 /** |
290 * Lists matching subscriptions. | 290 * Lists matching subscriptions. |
291 * | 291 * |
292 * Request parameters: | 292 * Request parameters: |
293 * | 293 * |
294 * [project] - The name of the cloud project that subscriptions belong to. | 294 * [project] - The name of the cloud project that subscriptions belong to. |
295 * Value must have pattern "^projects/[^/]+$". | 295 * Value must have pattern "^projects/[^/]+$". |
296 * | 296 * |
297 * [pageSize] - Maximum number of subscriptions to return. | |
298 * | |
299 * [pageToken] - The value returned by the last `ListSubscriptionsResponse`; | 297 * [pageToken] - The value returned by the last `ListSubscriptionsResponse`; |
300 * indicates that | 298 * indicates that |
301 * this is a continuation of a prior `ListSubscriptions` call, and that the | 299 * this is a continuation of a prior `ListSubscriptions` call, and that the |
302 * system should return the next page of data. | 300 * system should return the next page of data. |
303 * | 301 * |
| 302 * [pageSize] - Maximum number of subscriptions to return. |
| 303 * |
304 * Completes with a [ListSubscriptionsResponse]. | 304 * Completes with a [ListSubscriptionsResponse]. |
305 * | 305 * |
306 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 306 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
307 * error. | 307 * error. |
308 * | 308 * |
309 * If the used [http.Client] completes with an error when making a REST call, | 309 * If the used [http.Client] completes with an error when making a REST call, |
310 * this method will complete with the same error. | 310 * this method will complete with the same error. |
311 */ | 311 */ |
312 async.Future<ListSubscriptionsResponse> list(core.String project, {core.int pa
geSize, core.String pageToken}) { | 312 async.Future<ListSubscriptionsResponse> list(core.String project, {core.String
pageToken, core.int pageSize}) { |
313 var _url = null; | 313 var _url = null; |
314 var _queryParams = new core.Map(); | 314 var _queryParams = new core.Map(); |
315 var _uploadMedia = null; | 315 var _uploadMedia = null; |
316 var _uploadOptions = null; | 316 var _uploadOptions = null; |
317 var _downloadOptions = commons.DownloadOptions.Metadata; | 317 var _downloadOptions = commons.DownloadOptions.Metadata; |
318 var _body = null; | 318 var _body = null; |
319 | 319 |
320 if (project == null) { | 320 if (project == null) { |
321 throw new core.ArgumentError("Parameter project is required."); | 321 throw new core.ArgumentError("Parameter project is required."); |
322 } | 322 } |
| 323 if (pageToken != null) { |
| 324 _queryParams["pageToken"] = [pageToken]; |
| 325 } |
323 if (pageSize != null) { | 326 if (pageSize != null) { |
324 _queryParams["pageSize"] = ["${pageSize}"]; | 327 _queryParams["pageSize"] = ["${pageSize}"]; |
325 } | 328 } |
326 if (pageToken != null) { | |
327 _queryParams["pageToken"] = [pageToken]; | |
328 } | |
329 | 329 |
330 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$project') + '/su
bscriptions'; | 330 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$project') + '/su
bscriptions'; |
331 | 331 |
332 var _response = _requester.request(_url, | 332 var _response = _requester.request(_url, |
333 "GET", | 333 "GET", |
334 body: _body, | 334 body: _body, |
335 queryParams: _queryParams, | 335 queryParams: _queryParams, |
336 uploadOptions: _uploadOptions, | 336 uploadOptions: _uploadOptions, |
337 uploadMedia: _uploadMedia, | 337 uploadMedia: _uploadMedia, |
338 downloadOptions: _downloadOptions); | 338 downloadOptions: _downloadOptions); |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 } | 777 } |
778 | 778 |
779 /** | 779 /** |
780 * Lists matching topics. | 780 * Lists matching topics. |
781 * | 781 * |
782 * Request parameters: | 782 * Request parameters: |
783 * | 783 * |
784 * [project] - The name of the cloud project that topics belong to. | 784 * [project] - The name of the cloud project that topics belong to. |
785 * Value must have pattern "^projects/[^/]+$". | 785 * Value must have pattern "^projects/[^/]+$". |
786 * | 786 * |
787 * [pageSize] - Maximum number of topics to return. | |
788 * | |
789 * [pageToken] - The value returned by the last `ListTopicsResponse`; | 787 * [pageToken] - The value returned by the last `ListTopicsResponse`; |
790 * indicates that this is | 788 * indicates that this is |
791 * a continuation of a prior `ListTopics` call, and that the system should | 789 * a continuation of a prior `ListTopics` call, and that the system should |
792 * return the next page of data. | 790 * return the next page of data. |
793 * | 791 * |
| 792 * [pageSize] - Maximum number of topics to return. |
| 793 * |
794 * Completes with a [ListTopicsResponse]. | 794 * Completes with a [ListTopicsResponse]. |
795 * | 795 * |
796 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 796 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
797 * error. | 797 * error. |
798 * | 798 * |
799 * If the used [http.Client] completes with an error when making a REST call, | 799 * If the used [http.Client] completes with an error when making a REST call, |
800 * this method will complete with the same error. | 800 * this method will complete with the same error. |
801 */ | 801 */ |
802 async.Future<ListTopicsResponse> list(core.String project, {core.int pageSize,
core.String pageToken}) { | 802 async.Future<ListTopicsResponse> list(core.String project, {core.String pageTo
ken, core.int pageSize}) { |
803 var _url = null; | 803 var _url = null; |
804 var _queryParams = new core.Map(); | 804 var _queryParams = new core.Map(); |
805 var _uploadMedia = null; | 805 var _uploadMedia = null; |
806 var _uploadOptions = null; | 806 var _uploadOptions = null; |
807 var _downloadOptions = commons.DownloadOptions.Metadata; | 807 var _downloadOptions = commons.DownloadOptions.Metadata; |
808 var _body = null; | 808 var _body = null; |
809 | 809 |
810 if (project == null) { | 810 if (project == null) { |
811 throw new core.ArgumentError("Parameter project is required."); | 811 throw new core.ArgumentError("Parameter project is required."); |
812 } | 812 } |
| 813 if (pageToken != null) { |
| 814 _queryParams["pageToken"] = [pageToken]; |
| 815 } |
813 if (pageSize != null) { | 816 if (pageSize != null) { |
814 _queryParams["pageSize"] = ["${pageSize}"]; | 817 _queryParams["pageSize"] = ["${pageSize}"]; |
815 } | 818 } |
816 if (pageToken != null) { | |
817 _queryParams["pageToken"] = [pageToken]; | |
818 } | |
819 | 819 |
820 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$project') + '/to
pics'; | 820 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$project') + '/to
pics'; |
821 | 821 |
822 var _response = _requester.request(_url, | 822 var _response = _requester.request(_url, |
823 "GET", | 823 "GET", |
824 body: _body, | 824 body: _body, |
825 queryParams: _queryParams, | 825 queryParams: _queryParams, |
826 uploadOptions: _uploadOptions, | 826 uploadOptions: _uploadOptions, |
827 uploadMedia: _uploadMedia, | 827 uploadMedia: _uploadMedia, |
828 downloadOptions: _downloadOptions); | 828 downloadOptions: _downloadOptions); |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1865 } | 1865 } |
1866 | 1866 |
1867 core.Map<core.String, core.Object> toJson() { | 1867 core.Map<core.String, core.Object> toJson() { |
1868 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1868 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
1869 if (name != null) { | 1869 if (name != null) { |
1870 _json["name"] = name; | 1870 _json["name"] = name; |
1871 } | 1871 } |
1872 return _json; | 1872 return _json; |
1873 } | 1873 } |
1874 } | 1874 } |
OLD | NEW |