| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 core.List<core.String> ackIds; | 1052 core.List<core.String> ackIds; |
| 1053 | 1053 |
| 1054 AcknowledgeRequest(); | 1054 AcknowledgeRequest(); |
| 1055 | 1055 |
| 1056 AcknowledgeRequest.fromJson(core.Map _json) { | 1056 AcknowledgeRequest.fromJson(core.Map _json) { |
| 1057 if (_json.containsKey("ackIds")) { | 1057 if (_json.containsKey("ackIds")) { |
| 1058 ackIds = _json["ackIds"]; | 1058 ackIds = _json["ackIds"]; |
| 1059 } | 1059 } |
| 1060 } | 1060 } |
| 1061 | 1061 |
| 1062 core.Map toJson() { | 1062 core.Map<core.String, core.Object> toJson() { |
| 1063 var _json = new core.Map(); | 1063 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1064 if (ackIds != null) { | 1064 if (ackIds != null) { |
| 1065 _json["ackIds"] = ackIds; | 1065 _json["ackIds"] = ackIds; |
| 1066 } | 1066 } |
| 1067 return _json; | 1067 return _json; |
| 1068 } | 1068 } |
| 1069 } | 1069 } |
| 1070 | 1070 |
| 1071 /** Associates `members` with a `role`. */ | 1071 /** Associates `members` with a `role`. */ |
| 1072 class Binding { | 1072 class Binding { |
| 1073 /** | 1073 /** |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 | 1105 |
| 1106 Binding.fromJson(core.Map _json) { | 1106 Binding.fromJson(core.Map _json) { |
| 1107 if (_json.containsKey("members")) { | 1107 if (_json.containsKey("members")) { |
| 1108 members = _json["members"]; | 1108 members = _json["members"]; |
| 1109 } | 1109 } |
| 1110 if (_json.containsKey("role")) { | 1110 if (_json.containsKey("role")) { |
| 1111 role = _json["role"]; | 1111 role = _json["role"]; |
| 1112 } | 1112 } |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 core.Map toJson() { | 1115 core.Map<core.String, core.Object> toJson() { |
| 1116 var _json = new core.Map(); | 1116 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1117 if (members != null) { | 1117 if (members != null) { |
| 1118 _json["members"] = members; | 1118 _json["members"] = members; |
| 1119 } | 1119 } |
| 1120 if (role != null) { | 1120 if (role != null) { |
| 1121 _json["role"] = role; | 1121 _json["role"] = role; |
| 1122 } | 1122 } |
| 1123 return _json; | 1123 return _json; |
| 1124 } | 1124 } |
| 1125 } | 1125 } |
| 1126 | 1126 |
| 1127 /** | 1127 /** |
| 1128 * A generic empty message that you can re-use to avoid defining duplicated | 1128 * A generic empty message that you can re-use to avoid defining duplicated |
| 1129 * empty messages in your APIs. A typical example is to use it as the request | 1129 * empty messages in your APIs. A typical example is to use it as the request |
| 1130 * or the response type of an API method. For instance: | 1130 * or the response type of an API method. For instance: |
| 1131 * | 1131 * |
| 1132 * service Foo { | 1132 * service Foo { |
| 1133 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 1133 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 1134 * } | 1134 * } |
| 1135 * | 1135 * |
| 1136 * The JSON representation for `Empty` is empty JSON object `{}`. | 1136 * The JSON representation for `Empty` is empty JSON object `{}`. |
| 1137 */ | 1137 */ |
| 1138 class Empty { | 1138 class Empty { |
| 1139 | 1139 |
| 1140 Empty(); | 1140 Empty(); |
| 1141 | 1141 |
| 1142 Empty.fromJson(core.Map _json) { | 1142 Empty.fromJson(core.Map _json) { |
| 1143 } | 1143 } |
| 1144 | 1144 |
| 1145 core.Map toJson() { | 1145 core.Map<core.String, core.Object> toJson() { |
| 1146 var _json = new core.Map(); | 1146 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1147 return _json; | 1147 return _json; |
| 1148 } | 1148 } |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 /** Response for the `ListSubscriptions` method. */ | 1151 /** Response for the `ListSubscriptions` method. */ |
| 1152 class ListSubscriptionsResponse { | 1152 class ListSubscriptionsResponse { |
| 1153 /** | 1153 /** |
| 1154 * If not empty, indicates that there may be more subscriptions that match | 1154 * If not empty, indicates that there may be more subscriptions that match |
| 1155 * the request; this value should be passed in a new | 1155 * the request; this value should be passed in a new |
| 1156 * `ListSubscriptionsRequest` to get more subscriptions. | 1156 * `ListSubscriptionsRequest` to get more subscriptions. |
| 1157 */ | 1157 */ |
| 1158 core.String nextPageToken; | 1158 core.String nextPageToken; |
| 1159 /** The subscriptions that match the request. */ | 1159 /** The subscriptions that match the request. */ |
| 1160 core.List<Subscription> subscriptions; | 1160 core.List<Subscription> subscriptions; |
| 1161 | 1161 |
| 1162 ListSubscriptionsResponse(); | 1162 ListSubscriptionsResponse(); |
| 1163 | 1163 |
| 1164 ListSubscriptionsResponse.fromJson(core.Map _json) { | 1164 ListSubscriptionsResponse.fromJson(core.Map _json) { |
| 1165 if (_json.containsKey("nextPageToken")) { | 1165 if (_json.containsKey("nextPageToken")) { |
| 1166 nextPageToken = _json["nextPageToken"]; | 1166 nextPageToken = _json["nextPageToken"]; |
| 1167 } | 1167 } |
| 1168 if (_json.containsKey("subscriptions")) { | 1168 if (_json.containsKey("subscriptions")) { |
| 1169 subscriptions = _json["subscriptions"].map((value) => new Subscription.fro
mJson(value)).toList(); | 1169 subscriptions = _json["subscriptions"].map((value) => new Subscription.fro
mJson(value)).toList(); |
| 1170 } | 1170 } |
| 1171 } | 1171 } |
| 1172 | 1172 |
| 1173 core.Map toJson() { | 1173 core.Map<core.String, core.Object> toJson() { |
| 1174 var _json = new core.Map(); | 1174 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1175 if (nextPageToken != null) { | 1175 if (nextPageToken != null) { |
| 1176 _json["nextPageToken"] = nextPageToken; | 1176 _json["nextPageToken"] = nextPageToken; |
| 1177 } | 1177 } |
| 1178 if (subscriptions != null) { | 1178 if (subscriptions != null) { |
| 1179 _json["subscriptions"] = subscriptions.map((value) => (value).toJson()).to
List(); | 1179 _json["subscriptions"] = subscriptions.map((value) => (value).toJson()).to
List(); |
| 1180 } | 1180 } |
| 1181 return _json; | 1181 return _json; |
| 1182 } | 1182 } |
| 1183 } | 1183 } |
| 1184 | 1184 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1197 | 1197 |
| 1198 ListTopicSubscriptionsResponse.fromJson(core.Map _json) { | 1198 ListTopicSubscriptionsResponse.fromJson(core.Map _json) { |
| 1199 if (_json.containsKey("nextPageToken")) { | 1199 if (_json.containsKey("nextPageToken")) { |
| 1200 nextPageToken = _json["nextPageToken"]; | 1200 nextPageToken = _json["nextPageToken"]; |
| 1201 } | 1201 } |
| 1202 if (_json.containsKey("subscriptions")) { | 1202 if (_json.containsKey("subscriptions")) { |
| 1203 subscriptions = _json["subscriptions"]; | 1203 subscriptions = _json["subscriptions"]; |
| 1204 } | 1204 } |
| 1205 } | 1205 } |
| 1206 | 1206 |
| 1207 core.Map toJson() { | 1207 core.Map<core.String, core.Object> toJson() { |
| 1208 var _json = new core.Map(); | 1208 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1209 if (nextPageToken != null) { | 1209 if (nextPageToken != null) { |
| 1210 _json["nextPageToken"] = nextPageToken; | 1210 _json["nextPageToken"] = nextPageToken; |
| 1211 } | 1211 } |
| 1212 if (subscriptions != null) { | 1212 if (subscriptions != null) { |
| 1213 _json["subscriptions"] = subscriptions; | 1213 _json["subscriptions"] = subscriptions; |
| 1214 } | 1214 } |
| 1215 return _json; | 1215 return _json; |
| 1216 } | 1216 } |
| 1217 } | 1217 } |
| 1218 | 1218 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1230 | 1230 |
| 1231 ListTopicsResponse.fromJson(core.Map _json) { | 1231 ListTopicsResponse.fromJson(core.Map _json) { |
| 1232 if (_json.containsKey("nextPageToken")) { | 1232 if (_json.containsKey("nextPageToken")) { |
| 1233 nextPageToken = _json["nextPageToken"]; | 1233 nextPageToken = _json["nextPageToken"]; |
| 1234 } | 1234 } |
| 1235 if (_json.containsKey("topics")) { | 1235 if (_json.containsKey("topics")) { |
| 1236 topics = _json["topics"].map((value) => new Topic.fromJson(value)).toList(
); | 1236 topics = _json["topics"].map((value) => new Topic.fromJson(value)).toList(
); |
| 1237 } | 1237 } |
| 1238 } | 1238 } |
| 1239 | 1239 |
| 1240 core.Map toJson() { | 1240 core.Map<core.String, core.Object> toJson() { |
| 1241 var _json = new core.Map(); | 1241 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1242 if (nextPageToken != null) { | 1242 if (nextPageToken != null) { |
| 1243 _json["nextPageToken"] = nextPageToken; | 1243 _json["nextPageToken"] = nextPageToken; |
| 1244 } | 1244 } |
| 1245 if (topics != null) { | 1245 if (topics != null) { |
| 1246 _json["topics"] = topics.map((value) => (value).toJson()).toList(); | 1246 _json["topics"] = topics.map((value) => (value).toJson()).toList(); |
| 1247 } | 1247 } |
| 1248 return _json; | 1248 return _json; |
| 1249 } | 1249 } |
| 1250 } | 1250 } |
| 1251 | 1251 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1274 ackDeadlineSeconds = _json["ackDeadlineSeconds"]; | 1274 ackDeadlineSeconds = _json["ackDeadlineSeconds"]; |
| 1275 } | 1275 } |
| 1276 if (_json.containsKey("ackId")) { | 1276 if (_json.containsKey("ackId")) { |
| 1277 ackId = _json["ackId"]; | 1277 ackId = _json["ackId"]; |
| 1278 } | 1278 } |
| 1279 if (_json.containsKey("ackIds")) { | 1279 if (_json.containsKey("ackIds")) { |
| 1280 ackIds = _json["ackIds"]; | 1280 ackIds = _json["ackIds"]; |
| 1281 } | 1281 } |
| 1282 } | 1282 } |
| 1283 | 1283 |
| 1284 core.Map toJson() { | 1284 core.Map<core.String, core.Object> toJson() { |
| 1285 var _json = new core.Map(); | 1285 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1286 if (ackDeadlineSeconds != null) { | 1286 if (ackDeadlineSeconds != null) { |
| 1287 _json["ackDeadlineSeconds"] = ackDeadlineSeconds; | 1287 _json["ackDeadlineSeconds"] = ackDeadlineSeconds; |
| 1288 } | 1288 } |
| 1289 if (ackId != null) { | 1289 if (ackId != null) { |
| 1290 _json["ackId"] = ackId; | 1290 _json["ackId"] = ackId; |
| 1291 } | 1291 } |
| 1292 if (ackIds != null) { | 1292 if (ackIds != null) { |
| 1293 _json["ackIds"] = ackIds; | 1293 _json["ackIds"] = ackIds; |
| 1294 } | 1294 } |
| 1295 return _json; | 1295 return _json; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1309 PushConfig pushConfig; | 1309 PushConfig pushConfig; |
| 1310 | 1310 |
| 1311 ModifyPushConfigRequest(); | 1311 ModifyPushConfigRequest(); |
| 1312 | 1312 |
| 1313 ModifyPushConfigRequest.fromJson(core.Map _json) { | 1313 ModifyPushConfigRequest.fromJson(core.Map _json) { |
| 1314 if (_json.containsKey("pushConfig")) { | 1314 if (_json.containsKey("pushConfig")) { |
| 1315 pushConfig = new PushConfig.fromJson(_json["pushConfig"]); | 1315 pushConfig = new PushConfig.fromJson(_json["pushConfig"]); |
| 1316 } | 1316 } |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 core.Map toJson() { | 1319 core.Map<core.String, core.Object> toJson() { |
| 1320 var _json = new core.Map(); | 1320 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1321 if (pushConfig != null) { | 1321 if (pushConfig != null) { |
| 1322 _json["pushConfig"] = (pushConfig).toJson(); | 1322 _json["pushConfig"] = (pushConfig).toJson(); |
| 1323 } | 1323 } |
| 1324 return _json; | 1324 return _json; |
| 1325 } | 1325 } |
| 1326 } | 1326 } |
| 1327 | 1327 |
| 1328 /** | 1328 /** |
| 1329 * Defines an Identity and Access Management (IAM) policy. It is used to | 1329 * Defines an Identity and Access Management (IAM) policy. It is used to |
| 1330 * specify access control policies for Cloud Platform resources. | 1330 * specify access control policies for Cloud Platform resources. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1395 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t
oList(); | 1395 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t
oList(); |
| 1396 } | 1396 } |
| 1397 if (_json.containsKey("etag")) { | 1397 if (_json.containsKey("etag")) { |
| 1398 etag = _json["etag"]; | 1398 etag = _json["etag"]; |
| 1399 } | 1399 } |
| 1400 if (_json.containsKey("version")) { | 1400 if (_json.containsKey("version")) { |
| 1401 version = _json["version"]; | 1401 version = _json["version"]; |
| 1402 } | 1402 } |
| 1403 } | 1403 } |
| 1404 | 1404 |
| 1405 core.Map toJson() { | 1405 core.Map<core.String, core.Object> toJson() { |
| 1406 var _json = new core.Map(); | 1406 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1407 if (bindings != null) { | 1407 if (bindings != null) { |
| 1408 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); | 1408 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); |
| 1409 } | 1409 } |
| 1410 if (etag != null) { | 1410 if (etag != null) { |
| 1411 _json["etag"] = etag; | 1411 _json["etag"] = etag; |
| 1412 } | 1412 } |
| 1413 if (version != null) { | 1413 if (version != null) { |
| 1414 _json["version"] = version; | 1414 _json["version"] = version; |
| 1415 } | 1415 } |
| 1416 return _json; | 1416 return _json; |
| 1417 } | 1417 } |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 /** Request for the Publish method. */ | 1420 /** Request for the Publish method. */ |
| 1421 class PublishRequest { | 1421 class PublishRequest { |
| 1422 /** The messages to publish. */ | 1422 /** The messages to publish. */ |
| 1423 core.List<PubsubMessage> messages; | 1423 core.List<PubsubMessage> messages; |
| 1424 | 1424 |
| 1425 PublishRequest(); | 1425 PublishRequest(); |
| 1426 | 1426 |
| 1427 PublishRequest.fromJson(core.Map _json) { | 1427 PublishRequest.fromJson(core.Map _json) { |
| 1428 if (_json.containsKey("messages")) { | 1428 if (_json.containsKey("messages")) { |
| 1429 messages = _json["messages"].map((value) => new PubsubMessage.fromJson(val
ue)).toList(); | 1429 messages = _json["messages"].map((value) => new PubsubMessage.fromJson(val
ue)).toList(); |
| 1430 } | 1430 } |
| 1431 } | 1431 } |
| 1432 | 1432 |
| 1433 core.Map toJson() { | 1433 core.Map<core.String, core.Object> toJson() { |
| 1434 var _json = new core.Map(); | 1434 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1435 if (messages != null) { | 1435 if (messages != null) { |
| 1436 _json["messages"] = messages.map((value) => (value).toJson()).toList(); | 1436 _json["messages"] = messages.map((value) => (value).toJson()).toList(); |
| 1437 } | 1437 } |
| 1438 return _json; | 1438 return _json; |
| 1439 } | 1439 } |
| 1440 } | 1440 } |
| 1441 | 1441 |
| 1442 /** Response for the `Publish` method. */ | 1442 /** Response for the `Publish` method. */ |
| 1443 class PublishResponse { | 1443 class PublishResponse { |
| 1444 /** | 1444 /** |
| 1445 * The server-assigned ID of each published message, in the same order as | 1445 * The server-assigned ID of each published message, in the same order as |
| 1446 * the messages in the request. IDs are guaranteed to be unique within | 1446 * the messages in the request. IDs are guaranteed to be unique within |
| 1447 * the topic. | 1447 * the topic. |
| 1448 */ | 1448 */ |
| 1449 core.List<core.String> messageIds; | 1449 core.List<core.String> messageIds; |
| 1450 | 1450 |
| 1451 PublishResponse(); | 1451 PublishResponse(); |
| 1452 | 1452 |
| 1453 PublishResponse.fromJson(core.Map _json) { | 1453 PublishResponse.fromJson(core.Map _json) { |
| 1454 if (_json.containsKey("messageIds")) { | 1454 if (_json.containsKey("messageIds")) { |
| 1455 messageIds = _json["messageIds"]; | 1455 messageIds = _json["messageIds"]; |
| 1456 } | 1456 } |
| 1457 } | 1457 } |
| 1458 | 1458 |
| 1459 core.Map toJson() { | 1459 core.Map<core.String, core.Object> toJson() { |
| 1460 var _json = new core.Map(); | 1460 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1461 if (messageIds != null) { | 1461 if (messageIds != null) { |
| 1462 _json["messageIds"] = messageIds; | 1462 _json["messageIds"] = messageIds; |
| 1463 } | 1463 } |
| 1464 return _json; | 1464 return _json; |
| 1465 } | 1465 } |
| 1466 } | 1466 } |
| 1467 | 1467 |
| 1468 /** | 1468 /** |
| 1469 * A message data and its attributes. The message payload must not be empty; | 1469 * A message data and its attributes. The message payload must not be empty; |
| 1470 * it must contain either a non-empty data field, or at least one attribute. | 1470 * it must contain either a non-empty data field, or at least one attribute. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1508 data = _json["data"]; | 1508 data = _json["data"]; |
| 1509 } | 1509 } |
| 1510 if (_json.containsKey("messageId")) { | 1510 if (_json.containsKey("messageId")) { |
| 1511 messageId = _json["messageId"]; | 1511 messageId = _json["messageId"]; |
| 1512 } | 1512 } |
| 1513 if (_json.containsKey("publishTime")) { | 1513 if (_json.containsKey("publishTime")) { |
| 1514 publishTime = _json["publishTime"]; | 1514 publishTime = _json["publishTime"]; |
| 1515 } | 1515 } |
| 1516 } | 1516 } |
| 1517 | 1517 |
| 1518 core.Map toJson() { | 1518 core.Map<core.String, core.Object> toJson() { |
| 1519 var _json = new core.Map(); | 1519 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1520 if (attributes != null) { | 1520 if (attributes != null) { |
| 1521 _json["attributes"] = attributes; | 1521 _json["attributes"] = attributes; |
| 1522 } | 1522 } |
| 1523 if (data != null) { | 1523 if (data != null) { |
| 1524 _json["data"] = data; | 1524 _json["data"] = data; |
| 1525 } | 1525 } |
| 1526 if (messageId != null) { | 1526 if (messageId != null) { |
| 1527 _json["messageId"] = messageId; | 1527 _json["messageId"] = messageId; |
| 1528 } | 1528 } |
| 1529 if (publishTime != null) { | 1529 if (publishTime != null) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1553 | 1553 |
| 1554 PullRequest.fromJson(core.Map _json) { | 1554 PullRequest.fromJson(core.Map _json) { |
| 1555 if (_json.containsKey("maxMessages")) { | 1555 if (_json.containsKey("maxMessages")) { |
| 1556 maxMessages = _json["maxMessages"]; | 1556 maxMessages = _json["maxMessages"]; |
| 1557 } | 1557 } |
| 1558 if (_json.containsKey("returnImmediately")) { | 1558 if (_json.containsKey("returnImmediately")) { |
| 1559 returnImmediately = _json["returnImmediately"]; | 1559 returnImmediately = _json["returnImmediately"]; |
| 1560 } | 1560 } |
| 1561 } | 1561 } |
| 1562 | 1562 |
| 1563 core.Map toJson() { | 1563 core.Map<core.String, core.Object> toJson() { |
| 1564 var _json = new core.Map(); | 1564 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1565 if (maxMessages != null) { | 1565 if (maxMessages != null) { |
| 1566 _json["maxMessages"] = maxMessages; | 1566 _json["maxMessages"] = maxMessages; |
| 1567 } | 1567 } |
| 1568 if (returnImmediately != null) { | 1568 if (returnImmediately != null) { |
| 1569 _json["returnImmediately"] = returnImmediately; | 1569 _json["returnImmediately"] = returnImmediately; |
| 1570 } | 1570 } |
| 1571 return _json; | 1571 return _json; |
| 1572 } | 1572 } |
| 1573 } | 1573 } |
| 1574 | 1574 |
| 1575 /** Response for the `Pull` method. */ | 1575 /** Response for the `Pull` method. */ |
| 1576 class PullResponse { | 1576 class PullResponse { |
| 1577 /** | 1577 /** |
| 1578 * Received Pub/Sub messages. The Pub/Sub system will return zero messages if | 1578 * Received Pub/Sub messages. The Pub/Sub system will return zero messages if |
| 1579 * there are no more available in the backlog. The Pub/Sub system may return | 1579 * there are no more available in the backlog. The Pub/Sub system may return |
| 1580 * fewer than the `maxMessages` requested even if there are more messages | 1580 * fewer than the `maxMessages` requested even if there are more messages |
| 1581 * available in the backlog. | 1581 * available in the backlog. |
| 1582 */ | 1582 */ |
| 1583 core.List<ReceivedMessage> receivedMessages; | 1583 core.List<ReceivedMessage> receivedMessages; |
| 1584 | 1584 |
| 1585 PullResponse(); | 1585 PullResponse(); |
| 1586 | 1586 |
| 1587 PullResponse.fromJson(core.Map _json) { | 1587 PullResponse.fromJson(core.Map _json) { |
| 1588 if (_json.containsKey("receivedMessages")) { | 1588 if (_json.containsKey("receivedMessages")) { |
| 1589 receivedMessages = _json["receivedMessages"].map((value) => new ReceivedMe
ssage.fromJson(value)).toList(); | 1589 receivedMessages = _json["receivedMessages"].map((value) => new ReceivedMe
ssage.fromJson(value)).toList(); |
| 1590 } | 1590 } |
| 1591 } | 1591 } |
| 1592 | 1592 |
| 1593 core.Map toJson() { | 1593 core.Map<core.String, core.Object> toJson() { |
| 1594 var _json = new core.Map(); | 1594 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1595 if (receivedMessages != null) { | 1595 if (receivedMessages != null) { |
| 1596 _json["receivedMessages"] = receivedMessages.map((value) => (value).toJson
()).toList(); | 1596 _json["receivedMessages"] = receivedMessages.map((value) => (value).toJson
()).toList(); |
| 1597 } | 1597 } |
| 1598 return _json; | 1598 return _json; |
| 1599 } | 1599 } |
| 1600 } | 1600 } |
| 1601 | 1601 |
| 1602 /** Configuration for a push delivery endpoint. */ | 1602 /** Configuration for a push delivery endpoint. */ |
| 1603 class PushConfig { | 1603 class PushConfig { |
| 1604 /** | 1604 /** |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 | 1636 |
| 1637 PushConfig.fromJson(core.Map _json) { | 1637 PushConfig.fromJson(core.Map _json) { |
| 1638 if (_json.containsKey("attributes")) { | 1638 if (_json.containsKey("attributes")) { |
| 1639 attributes = _json["attributes"]; | 1639 attributes = _json["attributes"]; |
| 1640 } | 1640 } |
| 1641 if (_json.containsKey("pushEndpoint")) { | 1641 if (_json.containsKey("pushEndpoint")) { |
| 1642 pushEndpoint = _json["pushEndpoint"]; | 1642 pushEndpoint = _json["pushEndpoint"]; |
| 1643 } | 1643 } |
| 1644 } | 1644 } |
| 1645 | 1645 |
| 1646 core.Map toJson() { | 1646 core.Map<core.String, core.Object> toJson() { |
| 1647 var _json = new core.Map(); | 1647 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1648 if (attributes != null) { | 1648 if (attributes != null) { |
| 1649 _json["attributes"] = attributes; | 1649 _json["attributes"] = attributes; |
| 1650 } | 1650 } |
| 1651 if (pushEndpoint != null) { | 1651 if (pushEndpoint != null) { |
| 1652 _json["pushEndpoint"] = pushEndpoint; | 1652 _json["pushEndpoint"] = pushEndpoint; |
| 1653 } | 1653 } |
| 1654 return _json; | 1654 return _json; |
| 1655 } | 1655 } |
| 1656 } | 1656 } |
| 1657 | 1657 |
| 1658 /** A message and its corresponding acknowledgment ID. */ | 1658 /** A message and its corresponding acknowledgment ID. */ |
| 1659 class ReceivedMessage { | 1659 class ReceivedMessage { |
| 1660 /** This ID can be used to acknowledge the received message. */ | 1660 /** This ID can be used to acknowledge the received message. */ |
| 1661 core.String ackId; | 1661 core.String ackId; |
| 1662 /** The message. */ | 1662 /** The message. */ |
| 1663 PubsubMessage message; | 1663 PubsubMessage message; |
| 1664 | 1664 |
| 1665 ReceivedMessage(); | 1665 ReceivedMessage(); |
| 1666 | 1666 |
| 1667 ReceivedMessage.fromJson(core.Map _json) { | 1667 ReceivedMessage.fromJson(core.Map _json) { |
| 1668 if (_json.containsKey("ackId")) { | 1668 if (_json.containsKey("ackId")) { |
| 1669 ackId = _json["ackId"]; | 1669 ackId = _json["ackId"]; |
| 1670 } | 1670 } |
| 1671 if (_json.containsKey("message")) { | 1671 if (_json.containsKey("message")) { |
| 1672 message = new PubsubMessage.fromJson(_json["message"]); | 1672 message = new PubsubMessage.fromJson(_json["message"]); |
| 1673 } | 1673 } |
| 1674 } | 1674 } |
| 1675 | 1675 |
| 1676 core.Map toJson() { | 1676 core.Map<core.String, core.Object> toJson() { |
| 1677 var _json = new core.Map(); | 1677 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1678 if (ackId != null) { | 1678 if (ackId != null) { |
| 1679 _json["ackId"] = ackId; | 1679 _json["ackId"] = ackId; |
| 1680 } | 1680 } |
| 1681 if (message != null) { | 1681 if (message != null) { |
| 1682 _json["message"] = (message).toJson(); | 1682 _json["message"] = (message).toJson(); |
| 1683 } | 1683 } |
| 1684 return _json; | 1684 return _json; |
| 1685 } | 1685 } |
| 1686 } | 1686 } |
| 1687 | 1687 |
| 1688 /** Request message for `SetIamPolicy` method. */ | 1688 /** Request message for `SetIamPolicy` method. */ |
| 1689 class SetIamPolicyRequest { | 1689 class SetIamPolicyRequest { |
| 1690 /** | 1690 /** |
| 1691 * REQUIRED: The complete policy to be applied to the `resource`. The size of | 1691 * REQUIRED: The complete policy to be applied to the `resource`. The size of |
| 1692 * the policy is limited to a few 10s of KB. An empty policy is a | 1692 * the policy is limited to a few 10s of KB. An empty policy is a |
| 1693 * valid policy but certain Cloud Platform services (such as Projects) | 1693 * valid policy but certain Cloud Platform services (such as Projects) |
| 1694 * might reject them. | 1694 * might reject them. |
| 1695 */ | 1695 */ |
| 1696 Policy policy; | 1696 Policy policy; |
| 1697 | 1697 |
| 1698 SetIamPolicyRequest(); | 1698 SetIamPolicyRequest(); |
| 1699 | 1699 |
| 1700 SetIamPolicyRequest.fromJson(core.Map _json) { | 1700 SetIamPolicyRequest.fromJson(core.Map _json) { |
| 1701 if (_json.containsKey("policy")) { | 1701 if (_json.containsKey("policy")) { |
| 1702 policy = new Policy.fromJson(_json["policy"]); | 1702 policy = new Policy.fromJson(_json["policy"]); |
| 1703 } | 1703 } |
| 1704 } | 1704 } |
| 1705 | 1705 |
| 1706 core.Map toJson() { | 1706 core.Map<core.String, core.Object> toJson() { |
| 1707 var _json = new core.Map(); | 1707 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1708 if (policy != null) { | 1708 if (policy != null) { |
| 1709 _json["policy"] = (policy).toJson(); | 1709 _json["policy"] = (policy).toJson(); |
| 1710 } | 1710 } |
| 1711 return _json; | 1711 return _json; |
| 1712 } | 1712 } |
| 1713 } | 1713 } |
| 1714 | 1714 |
| 1715 /** A subscription resource. */ | 1715 /** A subscription resource. */ |
| 1716 class Subscription { | 1716 class Subscription { |
| 1717 /** | 1717 /** |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1767 name = _json["name"]; | 1767 name = _json["name"]; |
| 1768 } | 1768 } |
| 1769 if (_json.containsKey("pushConfig")) { | 1769 if (_json.containsKey("pushConfig")) { |
| 1770 pushConfig = new PushConfig.fromJson(_json["pushConfig"]); | 1770 pushConfig = new PushConfig.fromJson(_json["pushConfig"]); |
| 1771 } | 1771 } |
| 1772 if (_json.containsKey("topic")) { | 1772 if (_json.containsKey("topic")) { |
| 1773 topic = _json["topic"]; | 1773 topic = _json["topic"]; |
| 1774 } | 1774 } |
| 1775 } | 1775 } |
| 1776 | 1776 |
| 1777 core.Map toJson() { | 1777 core.Map<core.String, core.Object> toJson() { |
| 1778 var _json = new core.Map(); | 1778 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1779 if (ackDeadlineSeconds != null) { | 1779 if (ackDeadlineSeconds != null) { |
| 1780 _json["ackDeadlineSeconds"] = ackDeadlineSeconds; | 1780 _json["ackDeadlineSeconds"] = ackDeadlineSeconds; |
| 1781 } | 1781 } |
| 1782 if (name != null) { | 1782 if (name != null) { |
| 1783 _json["name"] = name; | 1783 _json["name"] = name; |
| 1784 } | 1784 } |
| 1785 if (pushConfig != null) { | 1785 if (pushConfig != null) { |
| 1786 _json["pushConfig"] = (pushConfig).toJson(); | 1786 _json["pushConfig"] = (pushConfig).toJson(); |
| 1787 } | 1787 } |
| 1788 if (topic != null) { | 1788 if (topic != null) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1803 core.List<core.String> permissions; | 1803 core.List<core.String> permissions; |
| 1804 | 1804 |
| 1805 TestIamPermissionsRequest(); | 1805 TestIamPermissionsRequest(); |
| 1806 | 1806 |
| 1807 TestIamPermissionsRequest.fromJson(core.Map _json) { | 1807 TestIamPermissionsRequest.fromJson(core.Map _json) { |
| 1808 if (_json.containsKey("permissions")) { | 1808 if (_json.containsKey("permissions")) { |
| 1809 permissions = _json["permissions"]; | 1809 permissions = _json["permissions"]; |
| 1810 } | 1810 } |
| 1811 } | 1811 } |
| 1812 | 1812 |
| 1813 core.Map toJson() { | 1813 core.Map<core.String, core.Object> toJson() { |
| 1814 var _json = new core.Map(); | 1814 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1815 if (permissions != null) { | 1815 if (permissions != null) { |
| 1816 _json["permissions"] = permissions; | 1816 _json["permissions"] = permissions; |
| 1817 } | 1817 } |
| 1818 return _json; | 1818 return _json; |
| 1819 } | 1819 } |
| 1820 } | 1820 } |
| 1821 | 1821 |
| 1822 /** Response message for `TestIamPermissions` method. */ | 1822 /** Response message for `TestIamPermissions` method. */ |
| 1823 class TestIamPermissionsResponse { | 1823 class TestIamPermissionsResponse { |
| 1824 /** | 1824 /** |
| 1825 * A subset of `TestPermissionsRequest.permissions` that the caller is | 1825 * A subset of `TestPermissionsRequest.permissions` that the caller is |
| 1826 * allowed. | 1826 * allowed. |
| 1827 */ | 1827 */ |
| 1828 core.List<core.String> permissions; | 1828 core.List<core.String> permissions; |
| 1829 | 1829 |
| 1830 TestIamPermissionsResponse(); | 1830 TestIamPermissionsResponse(); |
| 1831 | 1831 |
| 1832 TestIamPermissionsResponse.fromJson(core.Map _json) { | 1832 TestIamPermissionsResponse.fromJson(core.Map _json) { |
| 1833 if (_json.containsKey("permissions")) { | 1833 if (_json.containsKey("permissions")) { |
| 1834 permissions = _json["permissions"]; | 1834 permissions = _json["permissions"]; |
| 1835 } | 1835 } |
| 1836 } | 1836 } |
| 1837 | 1837 |
| 1838 core.Map toJson() { | 1838 core.Map<core.String, core.Object> toJson() { |
| 1839 var _json = new core.Map(); | 1839 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1840 if (permissions != null) { | 1840 if (permissions != null) { |
| 1841 _json["permissions"] = permissions; | 1841 _json["permissions"] = permissions; |
| 1842 } | 1842 } |
| 1843 return _json; | 1843 return _json; |
| 1844 } | 1844 } |
| 1845 } | 1845 } |
| 1846 | 1846 |
| 1847 /** A topic resource. */ | 1847 /** A topic resource. */ |
| 1848 class Topic { | 1848 class Topic { |
| 1849 /** | 1849 /** |
| 1850 * The name of the topic. It must have the format | 1850 * The name of the topic. It must have the format |
| 1851 * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, | 1851 * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
| 1852 * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), | 1852 * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
| 1853 * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent | 1853 * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent |
| 1854 * signs (`%`). It must be between 3 and 255 characters in length, and it | 1854 * signs (`%`). It must be between 3 and 255 characters in length, and it |
| 1855 * must not start with `"goog"`. | 1855 * must not start with `"goog"`. |
| 1856 */ | 1856 */ |
| 1857 core.String name; | 1857 core.String name; |
| 1858 | 1858 |
| 1859 Topic(); | 1859 Topic(); |
| 1860 | 1860 |
| 1861 Topic.fromJson(core.Map _json) { | 1861 Topic.fromJson(core.Map _json) { |
| 1862 if (_json.containsKey("name")) { | 1862 if (_json.containsKey("name")) { |
| 1863 name = _json["name"]; | 1863 name = _json["name"]; |
| 1864 } | 1864 } |
| 1865 } | 1865 } |
| 1866 | 1866 |
| 1867 core.Map toJson() { | 1867 core.Map<core.String, core.Object> toJson() { |
| 1868 var _json = new core.Map(); | 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 |