| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 244 |
| 245 /** | 245 /** |
| 246 * Gets the access control policy for a resource. | 246 * Gets the access control policy for a resource. |
| 247 * Returns an empty policy if the resource exists and does not have a policy | 247 * Returns an empty policy if the resource exists and does not have a policy |
| 248 * set. | 248 * set. |
| 249 * | 249 * |
| 250 * Request parameters: | 250 * Request parameters: |
| 251 * | 251 * |
| 252 * [resource] - REQUIRED: The resource for which the policy is being | 252 * [resource] - REQUIRED: The resource for which the policy is being |
| 253 * requested. | 253 * requested. |
| 254 * `resource` is usually specified as a path. For example, a Project | 254 * See the operation documentation for the appropriate value for this field. |
| 255 * resource is specified as `projects/{project}`. | |
| 256 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". | 255 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". |
| 257 * | 256 * |
| 258 * Completes with a [Policy]. | 257 * Completes with a [Policy]. |
| 259 * | 258 * |
| 260 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 259 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 261 * error. | 260 * error. |
| 262 * | 261 * |
| 263 * If the used [http.Client] completes with an error when making a REST call, | 262 * If the used [http.Client] completes with an error when making a REST call, |
| 264 * this method will complete with the same error. | 263 * this method will complete with the same error. |
| 265 */ | 264 */ |
| (...skipping 22 matching lines...) Expand all Loading... |
| 288 } | 287 } |
| 289 | 288 |
| 290 /** | 289 /** |
| 291 * Lists matching subscriptions. | 290 * Lists matching subscriptions. |
| 292 * | 291 * |
| 293 * Request parameters: | 292 * Request parameters: |
| 294 * | 293 * |
| 295 * [project] - The name of the cloud project that subscriptions belong to. | 294 * [project] - The name of the cloud project that subscriptions belong to. |
| 296 * Value must have pattern "^projects/[^/]+$". | 295 * Value must have pattern "^projects/[^/]+$". |
| 297 * | 296 * |
| 297 * [pageSize] - Maximum number of subscriptions to return. |
| 298 * |
| 298 * [pageToken] - The value returned by the last `ListSubscriptionsResponse`; | 299 * [pageToken] - The value returned by the last `ListSubscriptionsResponse`; |
| 299 * indicates that | 300 * indicates that |
| 300 * this is a continuation of a prior `ListSubscriptions` call, and that the | 301 * this is a continuation of a prior `ListSubscriptions` call, and that the |
| 301 * system should return the next page of data. | 302 * system should return the next page of data. |
| 302 * | 303 * |
| 303 * [pageSize] - Maximum number of subscriptions to return. | |
| 304 * | |
| 305 * Completes with a [ListSubscriptionsResponse]. | 304 * Completes with a [ListSubscriptionsResponse]. |
| 306 * | 305 * |
| 307 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 306 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 308 * error. | 307 * error. |
| 309 * | 308 * |
| 310 * 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, |
| 311 * this method will complete with the same error. | 310 * this method will complete with the same error. |
| 312 */ | 311 */ |
| 313 async.Future<ListSubscriptionsResponse> list(core.String project, {core.String
pageToken, core.int pageSize}) { | 312 async.Future<ListSubscriptionsResponse> list(core.String project, {core.int pa
geSize, core.String pageToken}) { |
| 314 var _url = null; | 313 var _url = null; |
| 315 var _queryParams = new core.Map(); | 314 var _queryParams = new core.Map(); |
| 316 var _uploadMedia = null; | 315 var _uploadMedia = null; |
| 317 var _uploadOptions = null; | 316 var _uploadOptions = null; |
| 318 var _downloadOptions = commons.DownloadOptions.Metadata; | 317 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 319 var _body = null; | 318 var _body = null; |
| 320 | 319 |
| 321 if (project == null) { | 320 if (project == null) { |
| 322 throw new core.ArgumentError("Parameter project is required."); | 321 throw new core.ArgumentError("Parameter project is required."); |
| 323 } | 322 } |
| 323 if (pageSize != null) { |
| 324 _queryParams["pageSize"] = ["${pageSize}"]; |
| 325 } |
| 324 if (pageToken != null) { | 326 if (pageToken != null) { |
| 325 _queryParams["pageToken"] = [pageToken]; | 327 _queryParams["pageToken"] = [pageToken]; |
| 326 } | 328 } |
| 327 if (pageSize != null) { | |
| 328 _queryParams["pageSize"] = ["${pageSize}"]; | |
| 329 } | |
| 330 | 329 |
| 331 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$project') + '/su
bscriptions'; | 330 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$project') + '/su
bscriptions'; |
| 332 | 331 |
| 333 var _response = _requester.request(_url, | 332 var _response = _requester.request(_url, |
| 334 "GET", | 333 "GET", |
| 335 body: _body, | 334 body: _body, |
| 336 queryParams: _queryParams, | 335 queryParams: _queryParams, |
| 337 uploadOptions: _uploadOptions, | 336 uploadOptions: _uploadOptions, |
| 338 uploadMedia: _uploadMedia, | 337 uploadMedia: _uploadMedia, |
| 339 downloadOptions: _downloadOptions); | 338 downloadOptions: _downloadOptions); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 /** | 489 /** |
| 491 * Sets the access control policy on the specified resource. Replaces any | 490 * Sets the access control policy on the specified resource. Replaces any |
| 492 * existing policy. | 491 * existing policy. |
| 493 * | 492 * |
| 494 * [request] - The metadata request object. | 493 * [request] - The metadata request object. |
| 495 * | 494 * |
| 496 * Request parameters: | 495 * Request parameters: |
| 497 * | 496 * |
| 498 * [resource] - REQUIRED: The resource for which the policy is being | 497 * [resource] - REQUIRED: The resource for which the policy is being |
| 499 * specified. | 498 * specified. |
| 500 * `resource` is usually specified as a path. For example, a Project | 499 * See the operation documentation for the appropriate value for this field. |
| 501 * resource is specified as `projects/{project}`. | |
| 502 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". | 500 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". |
| 503 * | 501 * |
| 504 * Completes with a [Policy]. | 502 * Completes with a [Policy]. |
| 505 * | 503 * |
| 506 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 504 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 507 * error. | 505 * error. |
| 508 * | 506 * |
| 509 * If the used [http.Client] completes with an error when making a REST call, | 507 * If the used [http.Client] completes with an error when making a REST call, |
| 510 * this method will complete with the same error. | 508 * this method will complete with the same error. |
| 511 */ | 509 */ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 * Note: This operation is designed to be used for building permission-aware | 542 * Note: This operation is designed to be used for building permission-aware |
| 545 * UIs and command-line tools, not for authorization checking. This operation | 543 * UIs and command-line tools, not for authorization checking. This operation |
| 546 * may "fail open" without warning. | 544 * may "fail open" without warning. |
| 547 * | 545 * |
| 548 * [request] - The metadata request object. | 546 * [request] - The metadata request object. |
| 549 * | 547 * |
| 550 * Request parameters: | 548 * Request parameters: |
| 551 * | 549 * |
| 552 * [resource] - REQUIRED: The resource for which the policy detail is being | 550 * [resource] - REQUIRED: The resource for which the policy detail is being |
| 553 * requested. | 551 * requested. |
| 554 * `resource` is usually specified as a path. For example, a Project | 552 * See the operation documentation for the appropriate value for this field. |
| 555 * resource is specified as `projects/{project}`. | |
| 556 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". | 553 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". |
| 557 * | 554 * |
| 558 * Completes with a [TestIamPermissionsResponse]. | 555 * Completes with a [TestIamPermissionsResponse]. |
| 559 * | 556 * |
| 560 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 557 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 561 * error. | 558 * error. |
| 562 * | 559 * |
| 563 * If the used [http.Client] completes with an error when making a REST call, | 560 * If the used [http.Client] completes with an error when making a REST call, |
| 564 * this method will complete with the same error. | 561 * this method will complete with the same error. |
| 565 */ | 562 */ |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 | 734 |
| 738 /** | 735 /** |
| 739 * Gets the access control policy for a resource. | 736 * Gets the access control policy for a resource. |
| 740 * Returns an empty policy if the resource exists and does not have a policy | 737 * Returns an empty policy if the resource exists and does not have a policy |
| 741 * set. | 738 * set. |
| 742 * | 739 * |
| 743 * Request parameters: | 740 * Request parameters: |
| 744 * | 741 * |
| 745 * [resource] - REQUIRED: The resource for which the policy is being | 742 * [resource] - REQUIRED: The resource for which the policy is being |
| 746 * requested. | 743 * requested. |
| 747 * `resource` is usually specified as a path. For example, a Project | 744 * See the operation documentation for the appropriate value for this field. |
| 748 * resource is specified as `projects/{project}`. | |
| 749 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". | 745 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". |
| 750 * | 746 * |
| 751 * Completes with a [Policy]. | 747 * Completes with a [Policy]. |
| 752 * | 748 * |
| 753 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 749 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 754 * error. | 750 * error. |
| 755 * | 751 * |
| 756 * If the used [http.Client] completes with an error when making a REST call, | 752 * If the used [http.Client] completes with an error when making a REST call, |
| 757 * this method will complete with the same error. | 753 * this method will complete with the same error. |
| 758 */ | 754 */ |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 /** | 879 /** |
| 884 * Sets the access control policy on the specified resource. Replaces any | 880 * Sets the access control policy on the specified resource. Replaces any |
| 885 * existing policy. | 881 * existing policy. |
| 886 * | 882 * |
| 887 * [request] - The metadata request object. | 883 * [request] - The metadata request object. |
| 888 * | 884 * |
| 889 * Request parameters: | 885 * Request parameters: |
| 890 * | 886 * |
| 891 * [resource] - REQUIRED: The resource for which the policy is being | 887 * [resource] - REQUIRED: The resource for which the policy is being |
| 892 * specified. | 888 * specified. |
| 893 * `resource` is usually specified as a path. For example, a Project | 889 * See the operation documentation for the appropriate value for this field. |
| 894 * resource is specified as `projects/{project}`. | |
| 895 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". | 890 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". |
| 896 * | 891 * |
| 897 * Completes with a [Policy]. | 892 * Completes with a [Policy]. |
| 898 * | 893 * |
| 899 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 894 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 900 * error. | 895 * error. |
| 901 * | 896 * |
| 902 * If the used [http.Client] completes with an error when making a REST call, | 897 * If the used [http.Client] completes with an error when making a REST call, |
| 903 * this method will complete with the same error. | 898 * this method will complete with the same error. |
| 904 */ | 899 */ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 * Note: This operation is designed to be used for building permission-aware | 932 * Note: This operation is designed to be used for building permission-aware |
| 938 * UIs and command-line tools, not for authorization checking. This operation | 933 * UIs and command-line tools, not for authorization checking. This operation |
| 939 * may "fail open" without warning. | 934 * may "fail open" without warning. |
| 940 * | 935 * |
| 941 * [request] - The metadata request object. | 936 * [request] - The metadata request object. |
| 942 * | 937 * |
| 943 * Request parameters: | 938 * Request parameters: |
| 944 * | 939 * |
| 945 * [resource] - REQUIRED: The resource for which the policy detail is being | 940 * [resource] - REQUIRED: The resource for which the policy detail is being |
| 946 * requested. | 941 * requested. |
| 947 * `resource` is usually specified as a path. For example, a Project | 942 * See the operation documentation for the appropriate value for this field. |
| 948 * resource is specified as `projects/{project}`. | |
| 949 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". | 943 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". |
| 950 * | 944 * |
| 951 * Completes with a [TestIamPermissionsResponse]. | 945 * Completes with a [TestIamPermissionsResponse]. |
| 952 * | 946 * |
| 953 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 947 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 954 * error. | 948 * error. |
| 955 * | 949 * |
| 956 * If the used [http.Client] completes with an error when making a REST call, | 950 * If the used [http.Client] completes with an error when making a REST call, |
| 957 * this method will complete with the same error. | 951 * this method will complete with the same error. |
| 958 */ | 952 */ |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 _requester = client; | 987 _requester = client; |
| 994 | 988 |
| 995 /** | 989 /** |
| 996 * Lists the name of the subscriptions for this topic. | 990 * Lists the name of the subscriptions for this topic. |
| 997 * | 991 * |
| 998 * Request parameters: | 992 * Request parameters: |
| 999 * | 993 * |
| 1000 * [topic] - The name of the topic that subscriptions are attached to. | 994 * [topic] - The name of the topic that subscriptions are attached to. |
| 1001 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". | 995 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". |
| 1002 * | 996 * |
| 997 * [pageSize] - Maximum number of subscription names to return. |
| 998 * |
| 1003 * [pageToken] - The value returned by the last | 999 * [pageToken] - The value returned by the last |
| 1004 * `ListTopicSubscriptionsResponse`; indicates | 1000 * `ListTopicSubscriptionsResponse`; indicates |
| 1005 * that this is a continuation of a prior `ListTopicSubscriptions` call, and | 1001 * that this is a continuation of a prior `ListTopicSubscriptions` call, and |
| 1006 * that the system should return the next page of data. | 1002 * that the system should return the next page of data. |
| 1007 * | 1003 * |
| 1008 * [pageSize] - Maximum number of subscription names to return. | |
| 1009 * | |
| 1010 * Completes with a [ListTopicSubscriptionsResponse]. | 1004 * Completes with a [ListTopicSubscriptionsResponse]. |
| 1011 * | 1005 * |
| 1012 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1006 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1013 * error. | 1007 * error. |
| 1014 * | 1008 * |
| 1015 * If the used [http.Client] completes with an error when making a REST call, | 1009 * If the used [http.Client] completes with an error when making a REST call, |
| 1016 * this method will complete with the same error. | 1010 * this method will complete with the same error. |
| 1017 */ | 1011 */ |
| 1018 async.Future<ListTopicSubscriptionsResponse> list(core.String topic, {core.Str
ing pageToken, core.int pageSize}) { | 1012 async.Future<ListTopicSubscriptionsResponse> list(core.String topic, {core.int
pageSize, core.String pageToken}) { |
| 1019 var _url = null; | 1013 var _url = null; |
| 1020 var _queryParams = new core.Map(); | 1014 var _queryParams = new core.Map(); |
| 1021 var _uploadMedia = null; | 1015 var _uploadMedia = null; |
| 1022 var _uploadOptions = null; | 1016 var _uploadOptions = null; |
| 1023 var _downloadOptions = commons.DownloadOptions.Metadata; | 1017 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1024 var _body = null; | 1018 var _body = null; |
| 1025 | 1019 |
| 1026 if (topic == null) { | 1020 if (topic == null) { |
| 1027 throw new core.ArgumentError("Parameter topic is required."); | 1021 throw new core.ArgumentError("Parameter topic is required."); |
| 1028 } | 1022 } |
| 1023 if (pageSize != null) { |
| 1024 _queryParams["pageSize"] = ["${pageSize}"]; |
| 1025 } |
| 1029 if (pageToken != null) { | 1026 if (pageToken != null) { |
| 1030 _queryParams["pageToken"] = [pageToken]; | 1027 _queryParams["pageToken"] = [pageToken]; |
| 1031 } | 1028 } |
| 1032 if (pageSize != null) { | |
| 1033 _queryParams["pageSize"] = ["${pageSize}"]; | |
| 1034 } | |
| 1035 | 1029 |
| 1036 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic') + '/subs
criptions'; | 1030 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic') + '/subs
criptions'; |
| 1037 | 1031 |
| 1038 var _response = _requester.request(_url, | 1032 var _response = _requester.request(_url, |
| 1039 "GET", | 1033 "GET", |
| 1040 body: _body, | 1034 body: _body, |
| 1041 queryParams: _queryParams, | 1035 queryParams: _queryParams, |
| 1042 uploadOptions: _uploadOptions, | 1036 uploadOptions: _uploadOptions, |
| 1043 uploadMedia: _uploadMedia, | 1037 uploadMedia: _uploadMedia, |
| 1044 downloadOptions: _downloadOptions); | 1038 downloadOptions: _downloadOptions); |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1871 } | 1865 } |
| 1872 | 1866 |
| 1873 core.Map toJson() { | 1867 core.Map toJson() { |
| 1874 var _json = new core.Map(); | 1868 var _json = new core.Map(); |
| 1875 if (name != null) { | 1869 if (name != null) { |
| 1876 _json["name"] = name; | 1870 _json["name"] = name; |
| 1877 } | 1871 } |
| 1878 return _json; | 1872 return _json; |
| 1879 } | 1873 } |
| 1880 } | 1874 } |
| OLD | NEW |