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.pubsub.v1; | 3 library googleapis.pubsub.v1; |
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 uploadMedia: _uploadMedia, | 144 uploadMedia: _uploadMedia, |
145 downloadOptions: _downloadOptions); | 145 downloadOptions: _downloadOptions); |
146 return _response.then((data) => new Policy.fromJson(data)); | 146 return _response.then((data) => new Policy.fromJson(data)); |
147 } | 147 } |
148 | 148 |
149 /** | 149 /** |
150 * Returns permissions that a caller has on the specified resource. | 150 * Returns permissions that a caller has on the specified resource. |
151 * If the resource does not exist, this will return an empty set of | 151 * If the resource does not exist, this will return an empty set of |
152 * permissions, not a NOT_FOUND error. | 152 * permissions, not a NOT_FOUND error. |
153 * | 153 * |
| 154 * Note: This operation is designed to be used for building permission-aware |
| 155 * UIs and command-line tools, not for authorization checking. This operation |
| 156 * may "fail open" without warning. |
| 157 * |
154 * [request] - The metadata request object. | 158 * [request] - The metadata request object. |
155 * | 159 * |
156 * Request parameters: | 160 * Request parameters: |
157 * | 161 * |
158 * [resource] - REQUIRED: The resource for which the policy detail is being | 162 * [resource] - REQUIRED: The resource for which the policy detail is being |
159 * requested. | 163 * requested. |
160 * `resource` is usually specified as a path. For example, a Project | 164 * `resource` is usually specified as a path. For example, a Project |
161 * resource is specified as `projects/{project}`. | 165 * resource is specified as `projects/{project}`. |
162 * Value must have pattern "^projects/[^/]+/snapshots/[^/]+$". | 166 * Value must have pattern "^projects/[^/]+/snapshots/[^/]+$". |
163 * | 167 * |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 uploadMedia: _uploadMedia, | 703 uploadMedia: _uploadMedia, |
700 downloadOptions: _downloadOptions); | 704 downloadOptions: _downloadOptions); |
701 return _response.then((data) => new Policy.fromJson(data)); | 705 return _response.then((data) => new Policy.fromJson(data)); |
702 } | 706 } |
703 | 707 |
704 /** | 708 /** |
705 * Returns permissions that a caller has on the specified resource. | 709 * Returns permissions that a caller has on the specified resource. |
706 * If the resource does not exist, this will return an empty set of | 710 * If the resource does not exist, this will return an empty set of |
707 * permissions, not a NOT_FOUND error. | 711 * permissions, not a NOT_FOUND error. |
708 * | 712 * |
| 713 * Note: This operation is designed to be used for building permission-aware |
| 714 * UIs and command-line tools, not for authorization checking. This operation |
| 715 * may "fail open" without warning. |
| 716 * |
709 * [request] - The metadata request object. | 717 * [request] - The metadata request object. |
710 * | 718 * |
711 * Request parameters: | 719 * Request parameters: |
712 * | 720 * |
713 * [resource] - REQUIRED: The resource for which the policy detail is being | 721 * [resource] - REQUIRED: The resource for which the policy detail is being |
714 * requested. | 722 * requested. |
715 * `resource` is usually specified as a path. For example, a Project | 723 * `resource` is usually specified as a path. For example, a Project |
716 * resource is specified as `projects/{project}`. | 724 * resource is specified as `projects/{project}`. |
717 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". | 725 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". |
718 * | 726 * |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 | 953 |
946 /** | 954 /** |
947 * Lists matching topics. | 955 * Lists matching topics. |
948 * | 956 * |
949 * Request parameters: | 957 * Request parameters: |
950 * | 958 * |
951 * [project] - The name of the cloud project that topics belong to. | 959 * [project] - The name of the cloud project that topics belong to. |
952 * Format is `projects/{project}`. | 960 * Format is `projects/{project}`. |
953 * Value must have pattern "^projects/[^/]+$". | 961 * Value must have pattern "^projects/[^/]+$". |
954 * | 962 * |
| 963 * [pageSize] - Maximum number of topics to return. |
| 964 * |
955 * [pageToken] - The value returned by the last `ListTopicsResponse`; | 965 * [pageToken] - The value returned by the last `ListTopicsResponse`; |
956 * indicates that this is | 966 * indicates that this is |
957 * a continuation of a prior `ListTopics` call, and that the system should | 967 * a continuation of a prior `ListTopics` call, and that the system should |
958 * return the next page of data. | 968 * return the next page of data. |
959 * | 969 * |
960 * [pageSize] - Maximum number of topics to return. | |
961 * | |
962 * Completes with a [ListTopicsResponse]. | 970 * Completes with a [ListTopicsResponse]. |
963 * | 971 * |
964 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 972 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
965 * error. | 973 * error. |
966 * | 974 * |
967 * If the used [http.Client] completes with an error when making a REST call, | 975 * If the used [http.Client] completes with an error when making a REST call, |
968 * this method will complete with the same error. | 976 * this method will complete with the same error. |
969 */ | 977 */ |
970 async.Future<ListTopicsResponse> list(core.String project, {core.String pageTo
ken, core.int pageSize}) { | 978 async.Future<ListTopicsResponse> list(core.String project, {core.int pageSize,
core.String pageToken}) { |
971 var _url = null; | 979 var _url = null; |
972 var _queryParams = new core.Map(); | 980 var _queryParams = new core.Map(); |
973 var _uploadMedia = null; | 981 var _uploadMedia = null; |
974 var _uploadOptions = null; | 982 var _uploadOptions = null; |
975 var _downloadOptions = commons.DownloadOptions.Metadata; | 983 var _downloadOptions = commons.DownloadOptions.Metadata; |
976 var _body = null; | 984 var _body = null; |
977 | 985 |
978 if (project == null) { | 986 if (project == null) { |
979 throw new core.ArgumentError("Parameter project is required."); | 987 throw new core.ArgumentError("Parameter project is required."); |
980 } | 988 } |
| 989 if (pageSize != null) { |
| 990 _queryParams["pageSize"] = ["${pageSize}"]; |
| 991 } |
981 if (pageToken != null) { | 992 if (pageToken != null) { |
982 _queryParams["pageToken"] = [pageToken]; | 993 _queryParams["pageToken"] = [pageToken]; |
983 } | 994 } |
984 if (pageSize != null) { | |
985 _queryParams["pageSize"] = ["${pageSize}"]; | |
986 } | |
987 | 995 |
988 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$project') + '/topics'
; | 996 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$project') + '/topics'
; |
989 | 997 |
990 var _response = _requester.request(_url, | 998 var _response = _requester.request(_url, |
991 "GET", | 999 "GET", |
992 body: _body, | 1000 body: _body, |
993 queryParams: _queryParams, | 1001 queryParams: _queryParams, |
994 uploadOptions: _uploadOptions, | 1002 uploadOptions: _uploadOptions, |
995 uploadMedia: _uploadMedia, | 1003 uploadMedia: _uploadMedia, |
996 downloadOptions: _downloadOptions); | 1004 downloadOptions: _downloadOptions); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 uploadMedia: _uploadMedia, | 1100 uploadMedia: _uploadMedia, |
1093 downloadOptions: _downloadOptions); | 1101 downloadOptions: _downloadOptions); |
1094 return _response.then((data) => new Policy.fromJson(data)); | 1102 return _response.then((data) => new Policy.fromJson(data)); |
1095 } | 1103 } |
1096 | 1104 |
1097 /** | 1105 /** |
1098 * Returns permissions that a caller has on the specified resource. | 1106 * Returns permissions that a caller has on the specified resource. |
1099 * If the resource does not exist, this will return an empty set of | 1107 * If the resource does not exist, this will return an empty set of |
1100 * permissions, not a NOT_FOUND error. | 1108 * permissions, not a NOT_FOUND error. |
1101 * | 1109 * |
| 1110 * Note: This operation is designed to be used for building permission-aware |
| 1111 * UIs and command-line tools, not for authorization checking. This operation |
| 1112 * may "fail open" without warning. |
| 1113 * |
1102 * [request] - The metadata request object. | 1114 * [request] - The metadata request object. |
1103 * | 1115 * |
1104 * Request parameters: | 1116 * Request parameters: |
1105 * | 1117 * |
1106 * [resource] - REQUIRED: The resource for which the policy detail is being | 1118 * [resource] - REQUIRED: The resource for which the policy detail is being |
1107 * requested. | 1119 * requested. |
1108 * `resource` is usually specified as a path. For example, a Project | 1120 * `resource` is usually specified as a path. For example, a Project |
1109 * resource is specified as `projects/{project}`. | 1121 * resource is specified as `projects/{project}`. |
1110 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". | 1122 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". |
1111 * | 1123 * |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 | 1167 |
1156 /** | 1168 /** |
1157 * Lists the name of the subscriptions for this topic. | 1169 * Lists the name of the subscriptions for this topic. |
1158 * | 1170 * |
1159 * Request parameters: | 1171 * Request parameters: |
1160 * | 1172 * |
1161 * [topic] - The name of the topic that subscriptions are attached to. | 1173 * [topic] - The name of the topic that subscriptions are attached to. |
1162 * Format is `projects/{project}/topics/{topic}`. | 1174 * Format is `projects/{project}/topics/{topic}`. |
1163 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". | 1175 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". |
1164 * | 1176 * |
1165 * [pageSize] - Maximum number of subscription names to return. | |
1166 * | |
1167 * [pageToken] - The value returned by the last | 1177 * [pageToken] - The value returned by the last |
1168 * `ListTopicSubscriptionsResponse`; indicates | 1178 * `ListTopicSubscriptionsResponse`; indicates |
1169 * that this is a continuation of a prior `ListTopicSubscriptions` call, and | 1179 * that this is a continuation of a prior `ListTopicSubscriptions` call, and |
1170 * that the system should return the next page of data. | 1180 * that the system should return the next page of data. |
1171 * | 1181 * |
| 1182 * [pageSize] - Maximum number of subscription names to return. |
| 1183 * |
1172 * Completes with a [ListTopicSubscriptionsResponse]. | 1184 * Completes with a [ListTopicSubscriptionsResponse]. |
1173 * | 1185 * |
1174 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1186 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1175 * error. | 1187 * error. |
1176 * | 1188 * |
1177 * If the used [http.Client] completes with an error when making a REST call, | 1189 * If the used [http.Client] completes with an error when making a REST call, |
1178 * this method will complete with the same error. | 1190 * this method will complete with the same error. |
1179 */ | 1191 */ |
1180 async.Future<ListTopicSubscriptionsResponse> list(core.String topic, {core.int
pageSize, core.String pageToken}) { | 1192 async.Future<ListTopicSubscriptionsResponse> list(core.String topic, {core.Str
ing pageToken, core.int pageSize}) { |
1181 var _url = null; | 1193 var _url = null; |
1182 var _queryParams = new core.Map(); | 1194 var _queryParams = new core.Map(); |
1183 var _uploadMedia = null; | 1195 var _uploadMedia = null; |
1184 var _uploadOptions = null; | 1196 var _uploadOptions = null; |
1185 var _downloadOptions = commons.DownloadOptions.Metadata; | 1197 var _downloadOptions = commons.DownloadOptions.Metadata; |
1186 var _body = null; | 1198 var _body = null; |
1187 | 1199 |
1188 if (topic == null) { | 1200 if (topic == null) { |
1189 throw new core.ArgumentError("Parameter topic is required."); | 1201 throw new core.ArgumentError("Parameter topic is required."); |
1190 } | 1202 } |
| 1203 if (pageToken != null) { |
| 1204 _queryParams["pageToken"] = [pageToken]; |
| 1205 } |
1191 if (pageSize != null) { | 1206 if (pageSize != null) { |
1192 _queryParams["pageSize"] = ["${pageSize}"]; | 1207 _queryParams["pageSize"] = ["${pageSize}"]; |
1193 } | 1208 } |
1194 if (pageToken != null) { | |
1195 _queryParams["pageToken"] = [pageToken]; | |
1196 } | |
1197 | 1209 |
1198 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$topic') + '/subscript
ions'; | 1210 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$topic') + '/subscript
ions'; |
1199 | 1211 |
1200 var _response = _requester.request(_url, | 1212 var _response = _requester.request(_url, |
1201 "GET", | 1213 "GET", |
1202 body: _body, | 1214 body: _body, |
1203 queryParams: _queryParams, | 1215 queryParams: _queryParams, |
1204 uploadOptions: _uploadOptions, | 1216 uploadOptions: _uploadOptions, |
1205 uploadMedia: _uploadMedia, | 1217 uploadMedia: _uploadMedia, |
1206 downloadOptions: _downloadOptions); | 1218 downloadOptions: _downloadOptions); |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2024 } | 2036 } |
2025 | 2037 |
2026 core.Map toJson() { | 2038 core.Map toJson() { |
2027 var _json = new core.Map(); | 2039 var _json = new core.Map(); |
2028 if (name != null) { | 2040 if (name != null) { |
2029 _json["name"] = name; | 2041 _json["name"] = name; |
2030 } | 2042 } |
2031 return _json; | 2043 return _json; |
2032 } | 2044 } |
2033 } | 2045 } |
OLD | NEW |