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.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:crypto/crypto.dart' as crypto; | 10 import 'package:crypto/crypto.dart' as crypto; |
11 import 'package:http/http.dart' as http; | 11 import 'package:http/http.dart' as http; |
12 | 12 |
13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
14 ApiRequestError, DetailedApiRequestError; | 14 ApiRequestError, DetailedApiRequestError; |
15 | 15 |
16 const core.String USER_AGENT = 'dart-api-client pubsub/v1beta2'; | 16 const core.String USER_AGENT = 'dart-api-client pubsub/v1'; |
17 | 17 |
18 /** | 18 /** |
19 * Provides reliable, many-to-many, asynchronous messaging between applications. | 19 * Provides reliable, many-to-many, asynchronous messaging between applications. |
20 */ | 20 */ |
21 class PubsubApi { | 21 class PubsubApi { |
22 /** View and manage your data across Google Cloud Platform services */ | 22 /** View and manage your data across Google Cloud Platform services */ |
23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
24 | 24 |
25 /** View and manage Pub/Sub topics and subscriptions */ | 25 /** View and manage Pub/Sub topics and subscriptions */ |
26 static const PubsubScope = "https://www.googleapis.com/auth/pubsub"; | 26 static const PubsubScope = "https://www.googleapis.com/auth/pubsub"; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 var _downloadOptions = commons.DownloadOptions.Metadata; | 82 var _downloadOptions = commons.DownloadOptions.Metadata; |
83 var _body = null; | 83 var _body = null; |
84 | 84 |
85 if (request != null) { | 85 if (request != null) { |
86 _body = convert.JSON.encode((request).toJson()); | 86 _body = convert.JSON.encode((request).toJson()); |
87 } | 87 } |
88 if (subscription == null) { | 88 if (subscription == null) { |
89 throw new core.ArgumentError("Parameter subscription is required."); | 89 throw new core.ArgumentError("Parameter subscription is required."); |
90 } | 90 } |
91 | 91 |
92 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription') +
':acknowledge'; | 92 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$subscription') + ':ac
knowledge'; |
93 | 93 |
94 var _response = _requester.request(_url, | 94 var _response = _requester.request(_url, |
95 "POST", | 95 "POST", |
96 body: _body, | 96 body: _body, |
97 queryParams: _queryParams, | 97 queryParams: _queryParams, |
98 uploadOptions: _uploadOptions, | 98 uploadOptions: _uploadOptions, |
99 uploadMedia: _uploadMedia, | 99 uploadMedia: _uploadMedia, |
100 downloadOptions: _downloadOptions); | 100 downloadOptions: _downloadOptions); |
101 return _response.then((data) => new Empty.fromJson(data)); | 101 return _response.then((data) => new Empty.fromJson(data)); |
102 } | 102 } |
103 | 103 |
104 /** | 104 /** |
105 * Creates a subscription to a given topic for a given subscriber. If the | 105 * Creates a subscription to a given topic for a given subscriber. If the |
106 * subscription already exists, returns ALREADY_EXISTS. If the corresponding | 106 * subscription already exists, returns ALREADY_EXISTS. If the corresponding |
107 * topic doesn't exist, returns NOT_FOUND. If the name is not provided in the | 107 * topic doesn't exist, returns NOT_FOUND. If the name is not provided in the |
108 * request, the server will assign a random name for this subscription on the | 108 * request, the server will assign a random name for this subscription on the |
109 * same project as the topic. | 109 * same project as the topic. |
110 * | 110 * |
111 * [request] - The metadata request object. | 111 * [request] - The metadata request object. |
112 * | 112 * |
113 * Request parameters: | 113 * Request parameters: |
114 * | 114 * |
115 * [name] - The name of the subscription. It must have the format | 115 * [name] - The name of the subscription. It must have the format |
116 * "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub | 116 * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
117 * API v1 and v1beta2. {subscription} must start with a letter, and contain | 117 * start with a letter, and contain only letters (`[A-Za-z]`), numbers |
118 * only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), | 118 * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
119 * periods (.), tildes (~), plus (+) or percent signs (%). It must be between | 119 * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
120 * 3 and 255 characters in length, and it must not start with "goog". | 120 * in length, and it must not start with `"goog"`. |
121 * Value must have pattern "^projects/[^/] * / subscriptions/[^/]*$". | 121 * Value must have pattern "^projects/[^/] * / subscriptions/[^/]*$". |
122 * | 122 * |
123 * Completes with a [Subscription]. | 123 * Completes with a [Subscription]. |
124 * | 124 * |
125 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 125 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
126 * error. | 126 * error. |
127 * | 127 * |
128 * If the used [http.Client] completes with an error when making a REST call, | 128 * If the used [http.Client] completes with an error when making a REST call, |
129 * this method will complete with the same error. | 129 * this method will complete with the same error. |
130 */ | 130 */ |
131 async.Future<Subscription> create(Subscription request, core.String name) { | 131 async.Future<Subscription> create(Subscription request, core.String name) { |
132 var _url = null; | 132 var _url = null; |
133 var _queryParams = new core.Map(); | 133 var _queryParams = new core.Map(); |
134 var _uploadMedia = null; | 134 var _uploadMedia = null; |
135 var _uploadOptions = null; | 135 var _uploadOptions = null; |
136 var _downloadOptions = commons.DownloadOptions.Metadata; | 136 var _downloadOptions = commons.DownloadOptions.Metadata; |
137 var _body = null; | 137 var _body = null; |
138 | 138 |
139 if (request != null) { | 139 if (request != null) { |
140 _body = convert.JSON.encode((request).toJson()); | 140 _body = convert.JSON.encode((request).toJson()); |
141 } | 141 } |
142 if (name == null) { | 142 if (name == null) { |
143 throw new core.ArgumentError("Parameter name is required."); | 143 throw new core.ArgumentError("Parameter name is required."); |
144 } | 144 } |
145 | 145 |
146 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$name'); | 146 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
147 | 147 |
148 var _response = _requester.request(_url, | 148 var _response = _requester.request(_url, |
149 "PUT", | 149 "PUT", |
150 body: _body, | 150 body: _body, |
151 queryParams: _queryParams, | 151 queryParams: _queryParams, |
152 uploadOptions: _uploadOptions, | 152 uploadOptions: _uploadOptions, |
153 uploadMedia: _uploadMedia, | 153 uploadMedia: _uploadMedia, |
154 downloadOptions: _downloadOptions); | 154 downloadOptions: _downloadOptions); |
155 return _response.then((data) => new Subscription.fromJson(data)); | 155 return _response.then((data) => new Subscription.fromJson(data)); |
156 } | 156 } |
(...skipping 23 matching lines...) Expand all Loading... |
180 var _queryParams = new core.Map(); | 180 var _queryParams = new core.Map(); |
181 var _uploadMedia = null; | 181 var _uploadMedia = null; |
182 var _uploadOptions = null; | 182 var _uploadOptions = null; |
183 var _downloadOptions = commons.DownloadOptions.Metadata; | 183 var _downloadOptions = commons.DownloadOptions.Metadata; |
184 var _body = null; | 184 var _body = null; |
185 | 185 |
186 if (subscription == null) { | 186 if (subscription == null) { |
187 throw new core.ArgumentError("Parameter subscription is required."); | 187 throw new core.ArgumentError("Parameter subscription is required."); |
188 } | 188 } |
189 | 189 |
190 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription'); | 190 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$subscription'); |
191 | 191 |
192 var _response = _requester.request(_url, | 192 var _response = _requester.request(_url, |
193 "DELETE", | 193 "DELETE", |
194 body: _body, | 194 body: _body, |
195 queryParams: _queryParams, | 195 queryParams: _queryParams, |
196 uploadOptions: _uploadOptions, | 196 uploadOptions: _uploadOptions, |
197 uploadMedia: _uploadMedia, | 197 uploadMedia: _uploadMedia, |
198 downloadOptions: _downloadOptions); | 198 downloadOptions: _downloadOptions); |
199 return _response.then((data) => new Empty.fromJson(data)); | 199 return _response.then((data) => new Empty.fromJson(data)); |
200 } | 200 } |
(...skipping 19 matching lines...) Expand all Loading... |
220 var _queryParams = new core.Map(); | 220 var _queryParams = new core.Map(); |
221 var _uploadMedia = null; | 221 var _uploadMedia = null; |
222 var _uploadOptions = null; | 222 var _uploadOptions = null; |
223 var _downloadOptions = commons.DownloadOptions.Metadata; | 223 var _downloadOptions = commons.DownloadOptions.Metadata; |
224 var _body = null; | 224 var _body = null; |
225 | 225 |
226 if (subscription == null) { | 226 if (subscription == null) { |
227 throw new core.ArgumentError("Parameter subscription is required."); | 227 throw new core.ArgumentError("Parameter subscription is required."); |
228 } | 228 } |
229 | 229 |
230 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription'); | 230 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$subscription'); |
231 | 231 |
232 var _response = _requester.request(_url, | 232 var _response = _requester.request(_url, |
233 "GET", | 233 "GET", |
234 body: _body, | 234 body: _body, |
235 queryParams: _queryParams, | 235 queryParams: _queryParams, |
236 uploadOptions: _uploadOptions, | 236 uploadOptions: _uploadOptions, |
237 uploadMedia: _uploadMedia, | 237 uploadMedia: _uploadMedia, |
238 downloadOptions: _downloadOptions); | 238 downloadOptions: _downloadOptions); |
239 return _response.then((data) => new Subscription.fromJson(data)); | 239 return _response.then((data) => new Subscription.fromJson(data)); |
240 } | 240 } |
(...skipping 21 matching lines...) Expand all Loading... |
262 var _queryParams = new core.Map(); | 262 var _queryParams = new core.Map(); |
263 var _uploadMedia = null; | 263 var _uploadMedia = null; |
264 var _uploadOptions = null; | 264 var _uploadOptions = null; |
265 var _downloadOptions = commons.DownloadOptions.Metadata; | 265 var _downloadOptions = commons.DownloadOptions.Metadata; |
266 var _body = null; | 266 var _body = null; |
267 | 267 |
268 if (resource == null) { | 268 if (resource == null) { |
269 throw new core.ArgumentError("Parameter resource is required."); | 269 throw new core.ArgumentError("Parameter resource is required."); |
270 } | 270 } |
271 | 271 |
272 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g
etIamPolicy'; | 272 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam
Policy'; |
273 | 273 |
274 var _response = _requester.request(_url, | 274 var _response = _requester.request(_url, |
275 "GET", | 275 "GET", |
276 body: _body, | 276 body: _body, |
277 queryParams: _queryParams, | 277 queryParams: _queryParams, |
278 uploadOptions: _uploadOptions, | 278 uploadOptions: _uploadOptions, |
279 uploadMedia: _uploadMedia, | 279 uploadMedia: _uploadMedia, |
280 downloadOptions: _downloadOptions); | 280 downloadOptions: _downloadOptions); |
281 return _response.then((data) => new Policy.fromJson(data)); | 281 return _response.then((data) => new Policy.fromJson(data)); |
282 } | 282 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 if (project == null) { | 314 if (project == null) { |
315 throw new core.ArgumentError("Parameter project is required."); | 315 throw new core.ArgumentError("Parameter project is required."); |
316 } | 316 } |
317 if (pageSize != null) { | 317 if (pageSize != null) { |
318 _queryParams["pageSize"] = ["${pageSize}"]; | 318 _queryParams["pageSize"] = ["${pageSize}"]; |
319 } | 319 } |
320 if (pageToken != null) { | 320 if (pageToken != null) { |
321 _queryParams["pageToken"] = [pageToken]; | 321 _queryParams["pageToken"] = [pageToken]; |
322 } | 322 } |
323 | 323 |
324 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$project') + '/su
bscriptions'; | 324 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$project') + '/subscri
ptions'; |
325 | 325 |
326 var _response = _requester.request(_url, | 326 var _response = _requester.request(_url, |
327 "GET", | 327 "GET", |
328 body: _body, | 328 body: _body, |
329 queryParams: _queryParams, | 329 queryParams: _queryParams, |
330 uploadOptions: _uploadOptions, | 330 uploadOptions: _uploadOptions, |
331 uploadMedia: _uploadMedia, | 331 uploadMedia: _uploadMedia, |
332 downloadOptions: _downloadOptions); | 332 downloadOptions: _downloadOptions); |
333 return _response.then((data) => new ListSubscriptionsResponse.fromJson(data)
); | 333 return _response.then((data) => new ListSubscriptionsResponse.fromJson(data)
); |
334 } | 334 } |
(...skipping 27 matching lines...) Expand all Loading... |
362 var _downloadOptions = commons.DownloadOptions.Metadata; | 362 var _downloadOptions = commons.DownloadOptions.Metadata; |
363 var _body = null; | 363 var _body = null; |
364 | 364 |
365 if (request != null) { | 365 if (request != null) { |
366 _body = convert.JSON.encode((request).toJson()); | 366 _body = convert.JSON.encode((request).toJson()); |
367 } | 367 } |
368 if (subscription == null) { | 368 if (subscription == null) { |
369 throw new core.ArgumentError("Parameter subscription is required."); | 369 throw new core.ArgumentError("Parameter subscription is required."); |
370 } | 370 } |
371 | 371 |
372 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription') +
':modifyAckDeadline'; | 372 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$subscription') + ':mo
difyAckDeadline'; |
373 | 373 |
374 var _response = _requester.request(_url, | 374 var _response = _requester.request(_url, |
375 "POST", | 375 "POST", |
376 body: _body, | 376 body: _body, |
377 queryParams: _queryParams, | 377 queryParams: _queryParams, |
378 uploadOptions: _uploadOptions, | 378 uploadOptions: _uploadOptions, |
379 uploadMedia: _uploadMedia, | 379 uploadMedia: _uploadMedia, |
380 downloadOptions: _downloadOptions); | 380 downloadOptions: _downloadOptions); |
381 return _response.then((data) => new Empty.fromJson(data)); | 381 return _response.then((data) => new Empty.fromJson(data)); |
382 } | 382 } |
(...skipping 28 matching lines...) Expand all Loading... |
411 var _downloadOptions = commons.DownloadOptions.Metadata; | 411 var _downloadOptions = commons.DownloadOptions.Metadata; |
412 var _body = null; | 412 var _body = null; |
413 | 413 |
414 if (request != null) { | 414 if (request != null) { |
415 _body = convert.JSON.encode((request).toJson()); | 415 _body = convert.JSON.encode((request).toJson()); |
416 } | 416 } |
417 if (subscription == null) { | 417 if (subscription == null) { |
418 throw new core.ArgumentError("Parameter subscription is required."); | 418 throw new core.ArgumentError("Parameter subscription is required."); |
419 } | 419 } |
420 | 420 |
421 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription') +
':modifyPushConfig'; | 421 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$subscription') + ':mo
difyPushConfig'; |
422 | 422 |
423 var _response = _requester.request(_url, | 423 var _response = _requester.request(_url, |
424 "POST", | 424 "POST", |
425 body: _body, | 425 body: _body, |
426 queryParams: _queryParams, | 426 queryParams: _queryParams, |
427 uploadOptions: _uploadOptions, | 427 uploadOptions: _uploadOptions, |
428 uploadMedia: _uploadMedia, | 428 uploadMedia: _uploadMedia, |
429 downloadOptions: _downloadOptions); | 429 downloadOptions: _downloadOptions); |
430 return _response.then((data) => new Empty.fromJson(data)); | 430 return _response.then((data) => new Empty.fromJson(data)); |
431 } | 431 } |
(...skipping 27 matching lines...) Expand all Loading... |
459 var _downloadOptions = commons.DownloadOptions.Metadata; | 459 var _downloadOptions = commons.DownloadOptions.Metadata; |
460 var _body = null; | 460 var _body = null; |
461 | 461 |
462 if (request != null) { | 462 if (request != null) { |
463 _body = convert.JSON.encode((request).toJson()); | 463 _body = convert.JSON.encode((request).toJson()); |
464 } | 464 } |
465 if (subscription == null) { | 465 if (subscription == null) { |
466 throw new core.ArgumentError("Parameter subscription is required."); | 466 throw new core.ArgumentError("Parameter subscription is required."); |
467 } | 467 } |
468 | 468 |
469 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription') +
':pull'; | 469 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$subscription') + ':pu
ll'; |
470 | 470 |
471 var _response = _requester.request(_url, | 471 var _response = _requester.request(_url, |
472 "POST", | 472 "POST", |
473 body: _body, | 473 body: _body, |
474 queryParams: _queryParams, | 474 queryParams: _queryParams, |
475 uploadOptions: _uploadOptions, | 475 uploadOptions: _uploadOptions, |
476 uploadMedia: _uploadMedia, | 476 uploadMedia: _uploadMedia, |
477 downloadOptions: _downloadOptions); | 477 downloadOptions: _downloadOptions); |
478 return _response.then((data) => new PullResponse.fromJson(data)); | 478 return _response.then((data) => new PullResponse.fromJson(data)); |
479 } | 479 } |
(...skipping 27 matching lines...) Expand all Loading... |
507 var _downloadOptions = commons.DownloadOptions.Metadata; | 507 var _downloadOptions = commons.DownloadOptions.Metadata; |
508 var _body = null; | 508 var _body = null; |
509 | 509 |
510 if (request != null) { | 510 if (request != null) { |
511 _body = convert.JSON.encode((request).toJson()); | 511 _body = convert.JSON.encode((request).toJson()); |
512 } | 512 } |
513 if (resource == null) { | 513 if (resource == null) { |
514 throw new core.ArgumentError("Parameter resource is required."); | 514 throw new core.ArgumentError("Parameter resource is required."); |
515 } | 515 } |
516 | 516 |
517 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':s
etIamPolicy'; | 517 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIam
Policy'; |
518 | 518 |
519 var _response = _requester.request(_url, | 519 var _response = _requester.request(_url, |
520 "POST", | 520 "POST", |
521 body: _body, | 521 body: _body, |
522 queryParams: _queryParams, | 522 queryParams: _queryParams, |
523 uploadOptions: _uploadOptions, | 523 uploadOptions: _uploadOptions, |
524 uploadMedia: _uploadMedia, | 524 uploadMedia: _uploadMedia, |
525 downloadOptions: _downloadOptions); | 525 downloadOptions: _downloadOptions); |
526 return _response.then((data) => new Policy.fromJson(data)); | 526 return _response.then((data) => new Policy.fromJson(data)); |
527 } | 527 } |
(...skipping 26 matching lines...) Expand all Loading... |
554 var _downloadOptions = commons.DownloadOptions.Metadata; | 554 var _downloadOptions = commons.DownloadOptions.Metadata; |
555 var _body = null; | 555 var _body = null; |
556 | 556 |
557 if (request != null) { | 557 if (request != null) { |
558 _body = convert.JSON.encode((request).toJson()); | 558 _body = convert.JSON.encode((request).toJson()); |
559 } | 559 } |
560 if (resource == null) { | 560 if (resource == null) { |
561 throw new core.ArgumentError("Parameter resource is required."); | 561 throw new core.ArgumentError("Parameter resource is required."); |
562 } | 562 } |
563 | 563 |
564 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':t
estIamPermissions'; | 564 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIa
mPermissions'; |
565 | 565 |
566 var _response = _requester.request(_url, | 566 var _response = _requester.request(_url, |
567 "POST", | 567 "POST", |
568 body: _body, | 568 body: _body, |
569 queryParams: _queryParams, | 569 queryParams: _queryParams, |
570 uploadOptions: _uploadOptions, | 570 uploadOptions: _uploadOptions, |
571 uploadMedia: _uploadMedia, | 571 uploadMedia: _uploadMedia, |
572 downloadOptions: _downloadOptions); | 572 downloadOptions: _downloadOptions); |
573 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); | 573 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); |
574 } | 574 } |
(...skipping 10 matching lines...) Expand all Loading... |
585 _requester = client; | 585 _requester = client; |
586 | 586 |
587 /** | 587 /** |
588 * Creates the given topic with the given name. | 588 * Creates the given topic with the given name. |
589 * | 589 * |
590 * [request] - The metadata request object. | 590 * [request] - The metadata request object. |
591 * | 591 * |
592 * Request parameters: | 592 * Request parameters: |
593 * | 593 * |
594 * [name] - The name of the topic. It must have the format | 594 * [name] - The name of the topic. It must have the format |
595 * "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1 and | 595 * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
596 * v1beta2. {topic} must start with a letter, and contain only letters | 596 * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
597 * ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), | 597 * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs |
598 * tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 | 598 * (`%`). It must be between 3 and 255 characters in length, and it must not |
599 * characters in length, and it must not start with "goog". | 599 * start with `"goog"`. |
600 * Value must have pattern "^projects/[^/] * / topics/[^/]*$". | 600 * Value must have pattern "^projects/[^/] * / topics/[^/]*$". |
601 * | 601 * |
602 * Completes with a [Topic]. | 602 * Completes with a [Topic]. |
603 * | 603 * |
604 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 604 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
605 * error. | 605 * error. |
606 * | 606 * |
607 * If the used [http.Client] completes with an error when making a REST call, | 607 * If the used [http.Client] completes with an error when making a REST call, |
608 * this method will complete with the same error. | 608 * this method will complete with the same error. |
609 */ | 609 */ |
610 async.Future<Topic> create(Topic request, core.String name) { | 610 async.Future<Topic> create(Topic request, core.String name) { |
611 var _url = null; | 611 var _url = null; |
612 var _queryParams = new core.Map(); | 612 var _queryParams = new core.Map(); |
613 var _uploadMedia = null; | 613 var _uploadMedia = null; |
614 var _uploadOptions = null; | 614 var _uploadOptions = null; |
615 var _downloadOptions = commons.DownloadOptions.Metadata; | 615 var _downloadOptions = commons.DownloadOptions.Metadata; |
616 var _body = null; | 616 var _body = null; |
617 | 617 |
618 if (request != null) { | 618 if (request != null) { |
619 _body = convert.JSON.encode((request).toJson()); | 619 _body = convert.JSON.encode((request).toJson()); |
620 } | 620 } |
621 if (name == null) { | 621 if (name == null) { |
622 throw new core.ArgumentError("Parameter name is required."); | 622 throw new core.ArgumentError("Parameter name is required."); |
623 } | 623 } |
624 | 624 |
625 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$name'); | 625 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
626 | 626 |
627 var _response = _requester.request(_url, | 627 var _response = _requester.request(_url, |
628 "PUT", | 628 "PUT", |
629 body: _body, | 629 body: _body, |
630 queryParams: _queryParams, | 630 queryParams: _queryParams, |
631 uploadOptions: _uploadOptions, | 631 uploadOptions: _uploadOptions, |
632 uploadMedia: _uploadMedia, | 632 uploadMedia: _uploadMedia, |
633 downloadOptions: _downloadOptions); | 633 downloadOptions: _downloadOptions); |
634 return _response.then((data) => new Topic.fromJson(data)); | 634 return _response.then((data) => new Topic.fromJson(data)); |
635 } | 635 } |
(...skipping 23 matching lines...) Expand all Loading... |
659 var _queryParams = new core.Map(); | 659 var _queryParams = new core.Map(); |
660 var _uploadMedia = null; | 660 var _uploadMedia = null; |
661 var _uploadOptions = null; | 661 var _uploadOptions = null; |
662 var _downloadOptions = commons.DownloadOptions.Metadata; | 662 var _downloadOptions = commons.DownloadOptions.Metadata; |
663 var _body = null; | 663 var _body = null; |
664 | 664 |
665 if (topic == null) { | 665 if (topic == null) { |
666 throw new core.ArgumentError("Parameter topic is required."); | 666 throw new core.ArgumentError("Parameter topic is required."); |
667 } | 667 } |
668 | 668 |
669 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic'); | 669 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$topic'); |
670 | 670 |
671 var _response = _requester.request(_url, | 671 var _response = _requester.request(_url, |
672 "DELETE", | 672 "DELETE", |
673 body: _body, | 673 body: _body, |
674 queryParams: _queryParams, | 674 queryParams: _queryParams, |
675 uploadOptions: _uploadOptions, | 675 uploadOptions: _uploadOptions, |
676 uploadMedia: _uploadMedia, | 676 uploadMedia: _uploadMedia, |
677 downloadOptions: _downloadOptions); | 677 downloadOptions: _downloadOptions); |
678 return _response.then((data) => new Empty.fromJson(data)); | 678 return _response.then((data) => new Empty.fromJson(data)); |
679 } | 679 } |
(...skipping 19 matching lines...) Expand all Loading... |
699 var _queryParams = new core.Map(); | 699 var _queryParams = new core.Map(); |
700 var _uploadMedia = null; | 700 var _uploadMedia = null; |
701 var _uploadOptions = null; | 701 var _uploadOptions = null; |
702 var _downloadOptions = commons.DownloadOptions.Metadata; | 702 var _downloadOptions = commons.DownloadOptions.Metadata; |
703 var _body = null; | 703 var _body = null; |
704 | 704 |
705 if (topic == null) { | 705 if (topic == null) { |
706 throw new core.ArgumentError("Parameter topic is required."); | 706 throw new core.ArgumentError("Parameter topic is required."); |
707 } | 707 } |
708 | 708 |
709 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic'); | 709 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$topic'); |
710 | 710 |
711 var _response = _requester.request(_url, | 711 var _response = _requester.request(_url, |
712 "GET", | 712 "GET", |
713 body: _body, | 713 body: _body, |
714 queryParams: _queryParams, | 714 queryParams: _queryParams, |
715 uploadOptions: _uploadOptions, | 715 uploadOptions: _uploadOptions, |
716 uploadMedia: _uploadMedia, | 716 uploadMedia: _uploadMedia, |
717 downloadOptions: _downloadOptions); | 717 downloadOptions: _downloadOptions); |
718 return _response.then((data) => new Topic.fromJson(data)); | 718 return _response.then((data) => new Topic.fromJson(data)); |
719 } | 719 } |
(...skipping 21 matching lines...) Expand all Loading... |
741 var _queryParams = new core.Map(); | 741 var _queryParams = new core.Map(); |
742 var _uploadMedia = null; | 742 var _uploadMedia = null; |
743 var _uploadOptions = null; | 743 var _uploadOptions = null; |
744 var _downloadOptions = commons.DownloadOptions.Metadata; | 744 var _downloadOptions = commons.DownloadOptions.Metadata; |
745 var _body = null; | 745 var _body = null; |
746 | 746 |
747 if (resource == null) { | 747 if (resource == null) { |
748 throw new core.ArgumentError("Parameter resource is required."); | 748 throw new core.ArgumentError("Parameter resource is required."); |
749 } | 749 } |
750 | 750 |
751 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g
etIamPolicy'; | 751 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam
Policy'; |
752 | 752 |
753 var _response = _requester.request(_url, | 753 var _response = _requester.request(_url, |
754 "GET", | 754 "GET", |
755 body: _body, | 755 body: _body, |
756 queryParams: _queryParams, | 756 queryParams: _queryParams, |
757 uploadOptions: _uploadOptions, | 757 uploadOptions: _uploadOptions, |
758 uploadMedia: _uploadMedia, | 758 uploadMedia: _uploadMedia, |
759 downloadOptions: _downloadOptions); | 759 downloadOptions: _downloadOptions); |
760 return _response.then((data) => new Policy.fromJson(data)); | 760 return _response.then((data) => new Policy.fromJson(data)); |
761 } | 761 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 if (project == null) { | 793 if (project == null) { |
794 throw new core.ArgumentError("Parameter project is required."); | 794 throw new core.ArgumentError("Parameter project is required."); |
795 } | 795 } |
796 if (pageSize != null) { | 796 if (pageSize != null) { |
797 _queryParams["pageSize"] = ["${pageSize}"]; | 797 _queryParams["pageSize"] = ["${pageSize}"]; |
798 } | 798 } |
799 if (pageToken != null) { | 799 if (pageToken != null) { |
800 _queryParams["pageToken"] = [pageToken]; | 800 _queryParams["pageToken"] = [pageToken]; |
801 } | 801 } |
802 | 802 |
803 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$project') + '/to
pics'; | 803 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$project') + '/topics'
; |
804 | 804 |
805 var _response = _requester.request(_url, | 805 var _response = _requester.request(_url, |
806 "GET", | 806 "GET", |
807 body: _body, | 807 body: _body, |
808 queryParams: _queryParams, | 808 queryParams: _queryParams, |
809 uploadOptions: _uploadOptions, | 809 uploadOptions: _uploadOptions, |
810 uploadMedia: _uploadMedia, | 810 uploadMedia: _uploadMedia, |
811 downloadOptions: _downloadOptions); | 811 downloadOptions: _downloadOptions); |
812 return _response.then((data) => new ListTopicsResponse.fromJson(data)); | 812 return _response.then((data) => new ListTopicsResponse.fromJson(data)); |
813 } | 813 } |
814 | 814 |
815 /** | 815 /** |
816 * Adds one or more messages to the topic. Returns NOT_FOUND if the topic does | 816 * Adds one or more messages to the topic. Returns NOT_FOUND if the topic does |
817 * not exist. | 817 * not exist. The message payload must not be empty; it must contain either a |
| 818 * non-empty data field, or at least one attribute. |
818 * | 819 * |
819 * [request] - The metadata request object. | 820 * [request] - The metadata request object. |
820 * | 821 * |
821 * Request parameters: | 822 * Request parameters: |
822 * | 823 * |
823 * [topic] - The messages in the request will be published on this topic. | 824 * [topic] - The messages in the request will be published on this topic. |
824 * Value must have pattern "^projects/[^/] * / topics/[^/]*$". | 825 * Value must have pattern "^projects/[^/] * / topics/[^/]*$". |
825 * | 826 * |
826 * Completes with a [PublishResponse]. | 827 * Completes with a [PublishResponse]. |
827 * | 828 * |
(...skipping 11 matching lines...) Expand all Loading... |
839 var _downloadOptions = commons.DownloadOptions.Metadata; | 840 var _downloadOptions = commons.DownloadOptions.Metadata; |
840 var _body = null; | 841 var _body = null; |
841 | 842 |
842 if (request != null) { | 843 if (request != null) { |
843 _body = convert.JSON.encode((request).toJson()); | 844 _body = convert.JSON.encode((request).toJson()); |
844 } | 845 } |
845 if (topic == null) { | 846 if (topic == null) { |
846 throw new core.ArgumentError("Parameter topic is required."); | 847 throw new core.ArgumentError("Parameter topic is required."); |
847 } | 848 } |
848 | 849 |
849 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic') + ':publ
ish'; | 850 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$topic') + ':publish'; |
850 | 851 |
851 var _response = _requester.request(_url, | 852 var _response = _requester.request(_url, |
852 "POST", | 853 "POST", |
853 body: _body, | 854 body: _body, |
854 queryParams: _queryParams, | 855 queryParams: _queryParams, |
855 uploadOptions: _uploadOptions, | 856 uploadOptions: _uploadOptions, |
856 uploadMedia: _uploadMedia, | 857 uploadMedia: _uploadMedia, |
857 downloadOptions: _downloadOptions); | 858 downloadOptions: _downloadOptions); |
858 return _response.then((data) => new PublishResponse.fromJson(data)); | 859 return _response.then((data) => new PublishResponse.fromJson(data)); |
859 } | 860 } |
(...skipping 27 matching lines...) Expand all Loading... |
887 var _downloadOptions = commons.DownloadOptions.Metadata; | 888 var _downloadOptions = commons.DownloadOptions.Metadata; |
888 var _body = null; | 889 var _body = null; |
889 | 890 |
890 if (request != null) { | 891 if (request != null) { |
891 _body = convert.JSON.encode((request).toJson()); | 892 _body = convert.JSON.encode((request).toJson()); |
892 } | 893 } |
893 if (resource == null) { | 894 if (resource == null) { |
894 throw new core.ArgumentError("Parameter resource is required."); | 895 throw new core.ArgumentError("Parameter resource is required."); |
895 } | 896 } |
896 | 897 |
897 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':s
etIamPolicy'; | 898 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIam
Policy'; |
898 | 899 |
899 var _response = _requester.request(_url, | 900 var _response = _requester.request(_url, |
900 "POST", | 901 "POST", |
901 body: _body, | 902 body: _body, |
902 queryParams: _queryParams, | 903 queryParams: _queryParams, |
903 uploadOptions: _uploadOptions, | 904 uploadOptions: _uploadOptions, |
904 uploadMedia: _uploadMedia, | 905 uploadMedia: _uploadMedia, |
905 downloadOptions: _downloadOptions); | 906 downloadOptions: _downloadOptions); |
906 return _response.then((data) => new Policy.fromJson(data)); | 907 return _response.then((data) => new Policy.fromJson(data)); |
907 } | 908 } |
(...skipping 26 matching lines...) Expand all Loading... |
934 var _downloadOptions = commons.DownloadOptions.Metadata; | 935 var _downloadOptions = commons.DownloadOptions.Metadata; |
935 var _body = null; | 936 var _body = null; |
936 | 937 |
937 if (request != null) { | 938 if (request != null) { |
938 _body = convert.JSON.encode((request).toJson()); | 939 _body = convert.JSON.encode((request).toJson()); |
939 } | 940 } |
940 if (resource == null) { | 941 if (resource == null) { |
941 throw new core.ArgumentError("Parameter resource is required."); | 942 throw new core.ArgumentError("Parameter resource is required."); |
942 } | 943 } |
943 | 944 |
944 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':t
estIamPermissions'; | 945 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIa
mPermissions'; |
945 | 946 |
946 var _response = _requester.request(_url, | 947 var _response = _requester.request(_url, |
947 "POST", | 948 "POST", |
948 body: _body, | 949 body: _body, |
949 queryParams: _queryParams, | 950 queryParams: _queryParams, |
950 uploadOptions: _uploadOptions, | 951 uploadOptions: _uploadOptions, |
951 uploadMedia: _uploadMedia, | 952 uploadMedia: _uploadMedia, |
952 downloadOptions: _downloadOptions); | 953 downloadOptions: _downloadOptions); |
953 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); | 954 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); |
954 } | 955 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 if (topic == null) { | 997 if (topic == null) { |
997 throw new core.ArgumentError("Parameter topic is required."); | 998 throw new core.ArgumentError("Parameter topic is required."); |
998 } | 999 } |
999 if (pageSize != null) { | 1000 if (pageSize != null) { |
1000 _queryParams["pageSize"] = ["${pageSize}"]; | 1001 _queryParams["pageSize"] = ["${pageSize}"]; |
1001 } | 1002 } |
1002 if (pageToken != null) { | 1003 if (pageToken != null) { |
1003 _queryParams["pageToken"] = [pageToken]; | 1004 _queryParams["pageToken"] = [pageToken]; |
1004 } | 1005 } |
1005 | 1006 |
1006 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic') + '/subs
criptions'; | 1007 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$topic') + '/subscript
ions'; |
1007 | 1008 |
1008 var _response = _requester.request(_url, | 1009 var _response = _requester.request(_url, |
1009 "GET", | 1010 "GET", |
1010 body: _body, | 1011 body: _body, |
1011 queryParams: _queryParams, | 1012 queryParams: _queryParams, |
1012 uploadOptions: _uploadOptions, | 1013 uploadOptions: _uploadOptions, |
1013 uploadMedia: _uploadMedia, | 1014 uploadMedia: _uploadMedia, |
1014 downloadOptions: _downloadOptions); | 1015 downloadOptions: _downloadOptions); |
1015 return _response.then((data) => new ListTopicSubscriptionsResponse.fromJson(
data)); | 1016 return _response.then((data) => new ListTopicSubscriptionsResponse.fromJson(
data)); |
1016 } | 1017 } |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 /** Request for the ModifyAckDeadline method. */ | 1406 /** Request for the ModifyAckDeadline method. */ |
1406 class ModifyAckDeadlineRequest { | 1407 class ModifyAckDeadlineRequest { |
1407 /** | 1408 /** |
1408 * The new ack deadline with respect to the time this request was sent to the | 1409 * The new ack deadline with respect to the time this request was sent to the |
1409 * Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack | 1410 * Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack |
1410 * deadline will expire 10 seconds after the ModifyAckDeadline call was made. | 1411 * deadline will expire 10 seconds after the ModifyAckDeadline call was made. |
1411 * Specifying zero may immediately make the message available for another pull | 1412 * Specifying zero may immediately make the message available for another pull |
1412 * request. | 1413 * request. |
1413 */ | 1414 */ |
1414 core.int ackDeadlineSeconds; | 1415 core.int ackDeadlineSeconds; |
1415 /** | |
1416 * The acknowledgment ID. Either this or ack_ids must be populated, but not | |
1417 * both. | |
1418 */ | |
1419 core.String ackId; | |
1420 /** List of acknowledgment IDs. */ | 1416 /** List of acknowledgment IDs. */ |
1421 core.List<core.String> ackIds; | 1417 core.List<core.String> ackIds; |
1422 | 1418 |
1423 ModifyAckDeadlineRequest(); | 1419 ModifyAckDeadlineRequest(); |
1424 | 1420 |
1425 ModifyAckDeadlineRequest.fromJson(core.Map _json) { | 1421 ModifyAckDeadlineRequest.fromJson(core.Map _json) { |
1426 if (_json.containsKey("ackDeadlineSeconds")) { | 1422 if (_json.containsKey("ackDeadlineSeconds")) { |
1427 ackDeadlineSeconds = _json["ackDeadlineSeconds"]; | 1423 ackDeadlineSeconds = _json["ackDeadlineSeconds"]; |
1428 } | 1424 } |
1429 if (_json.containsKey("ackId")) { | |
1430 ackId = _json["ackId"]; | |
1431 } | |
1432 if (_json.containsKey("ackIds")) { | 1425 if (_json.containsKey("ackIds")) { |
1433 ackIds = _json["ackIds"]; | 1426 ackIds = _json["ackIds"]; |
1434 } | 1427 } |
1435 } | 1428 } |
1436 | 1429 |
1437 core.Map toJson() { | 1430 core.Map toJson() { |
1438 var _json = new core.Map(); | 1431 var _json = new core.Map(); |
1439 if (ackDeadlineSeconds != null) { | 1432 if (ackDeadlineSeconds != null) { |
1440 _json["ackDeadlineSeconds"] = ackDeadlineSeconds; | 1433 _json["ackDeadlineSeconds"] = ackDeadlineSeconds; |
1441 } | 1434 } |
1442 if (ackId != null) { | |
1443 _json["ackId"] = ackId; | |
1444 } | |
1445 if (ackIds != null) { | 1435 if (ackIds != null) { |
1446 _json["ackIds"] = ackIds; | 1436 _json["ackIds"] = ackIds; |
1447 } | 1437 } |
1448 return _json; | 1438 return _json; |
1449 } | 1439 } |
1450 } | 1440 } |
1451 | 1441 |
1452 /** Request for the ModifyPushConfig method. */ | 1442 /** Request for the ModifyPushConfig method. */ |
1453 class ModifyPushConfigRequest { | 1443 class ModifyPushConfigRequest { |
1454 /** | 1444 /** |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1589 | 1579 |
1590 core.Map toJson() { | 1580 core.Map toJson() { |
1591 var _json = new core.Map(); | 1581 var _json = new core.Map(); |
1592 if (messageIds != null) { | 1582 if (messageIds != null) { |
1593 _json["messageIds"] = messageIds; | 1583 _json["messageIds"] = messageIds; |
1594 } | 1584 } |
1595 return _json; | 1585 return _json; |
1596 } | 1586 } |
1597 } | 1587 } |
1598 | 1588 |
1599 /** A message data and its attributes. */ | 1589 /** |
| 1590 * A message data and its attributes. The message payload must not be empty; it |
| 1591 * must contain either a non-empty data field, or at least one attribute. |
| 1592 */ |
1600 class PubsubMessage { | 1593 class PubsubMessage { |
1601 /** Optional attributes for this message. */ | 1594 /** Optional attributes for this message. */ |
1602 core.Map<core.String, core.String> attributes; | 1595 core.Map<core.String, core.String> attributes; |
1603 /** | 1596 /** |
1604 * The message payload. For JSON requests, the value of this field must be | 1597 * The message payload. For JSON requests, the value of this field must be |
1605 * base64-encoded. | 1598 * base64-encoded. |
1606 */ | 1599 */ |
1607 core.String data; | 1600 core.String data; |
1608 core.List<core.int> get dataAsBytes { | 1601 core.List<core.int> get dataAsBytes { |
1609 return crypto.CryptoUtils.base64StringToBytes(data); | 1602 return crypto.CryptoUtils.base64StringToBytes(data); |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 } | 1906 } |
1914 | 1907 |
1915 /** A subscription resource. */ | 1908 /** A subscription resource. */ |
1916 class Subscription { | 1909 class Subscription { |
1917 /** | 1910 /** |
1918 * This value is the maximum time after a subscriber receives a message before | 1911 * This value is the maximum time after a subscriber receives a message before |
1919 * the subscriber should acknowledge the message. After message delivery but | 1912 * the subscriber should acknowledge the message. After message delivery but |
1920 * before the ack deadline expires and before the message is acknowledged, it | 1913 * before the ack deadline expires and before the message is acknowledged, it |
1921 * is an outstanding message and will not be delivered again during that time | 1914 * is an outstanding message and will not be delivered again during that time |
1922 * (on a best-effort basis). For pull delivery this value is used as the | 1915 * (on a best-effort basis). For pull delivery this value is used as the |
1923 * initial value for the ack deadline. It may be overridden for each message | 1916 * initial value for the ack deadline. To override this value for a given |
1924 * using its corresponding ack_id by calling ModifyAckDeadline. For push | 1917 * message, call ModifyAckDeadline with the corresponding ack_id. For push |
1925 * delivery, this value is also used to set the request timeout for the call | 1918 * delivery, this value is also used to set the request timeout for the call |
1926 * to the push endpoint. If the subscriber never acknowledges the message, the | 1919 * to the push endpoint. If the subscriber never acknowledges the message, the |
1927 * Pub/Sub system will eventually redeliver the message. If this parameter is | 1920 * Pub/Sub system will eventually redeliver the message. If this parameter is |
1928 * not set, the default value of 60 seconds is used. | 1921 * not set, the default value of 10 seconds is used. |
1929 */ | 1922 */ |
1930 core.int ackDeadlineSeconds; | 1923 core.int ackDeadlineSeconds; |
1931 /** | 1924 /** |
1932 * The name of the subscription. It must have the format | 1925 * The name of the subscription. It must have the format |
1933 * "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub | 1926 * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
1934 * API v1 and v1beta2. {subscription} must start with a letter, and contain | 1927 * start with a letter, and contain only letters (`[A-Za-z]`), numbers |
1935 * only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), | 1928 * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
1936 * periods (.), tildes (~), plus (+) or percent signs (%). It must be between | 1929 * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
1937 * 3 and 255 characters in length, and it must not start with "goog". | 1930 * in length, and it must not start with `"goog"`. |
1938 */ | 1931 */ |
1939 core.String name; | 1932 core.String name; |
1940 /** | 1933 /** |
1941 * If push delivery is used with this subscription, this field is used to | 1934 * If push delivery is used with this subscription, this field is used to |
1942 * configure it. An empty pushConfig signifies that the subscriber will pull | 1935 * configure it. An empty pushConfig signifies that the subscriber will pull |
1943 * and ack messages using API methods. | 1936 * and ack messages using API methods. |
1944 */ | 1937 */ |
1945 PushConfig pushConfig; | 1938 PushConfig pushConfig; |
1946 /** | 1939 /** |
1947 * The name of the topic from which this subscription is receiving messages. | 1940 * The name of the topic from which this subscription is receiving messages. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2032 _json["permissions"] = permissions; | 2025 _json["permissions"] = permissions; |
2033 } | 2026 } |
2034 return _json; | 2027 return _json; |
2035 } | 2028 } |
2036 } | 2029 } |
2037 | 2030 |
2038 /** A topic resource. */ | 2031 /** A topic resource. */ |
2039 class Topic { | 2032 class Topic { |
2040 /** | 2033 /** |
2041 * The name of the topic. It must have the format | 2034 * The name of the topic. It must have the format |
2042 * "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1 and | 2035 * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
2043 * v1beta2. {topic} must start with a letter, and contain only letters | 2036 * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
2044 * ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), | 2037 * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs |
2045 * tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 | 2038 * (`%`). It must be between 3 and 255 characters in length, and it must not |
2046 * characters in length, and it must not start with "goog". | 2039 * start with `"goog"`. |
2047 */ | 2040 */ |
2048 core.String name; | 2041 core.String name; |
2049 | 2042 |
2050 Topic(); | 2043 Topic(); |
2051 | 2044 |
2052 Topic.fromJson(core.Map _json) { | 2045 Topic.fromJson(core.Map _json) { |
2053 if (_json.containsKey("name")) { | 2046 if (_json.containsKey("name")) { |
2054 name = _json["name"]; | 2047 name = _json["name"]; |
2055 } | 2048 } |
2056 } | 2049 } |
2057 | 2050 |
2058 core.Map toJson() { | 2051 core.Map toJson() { |
2059 var _json = new core.Map(); | 2052 var _json = new core.Map(); |
2060 if (name != null) { | 2053 if (name != null) { |
2061 _json["name"] = name; | 2054 _json["name"] = name; |
2062 } | 2055 } |
2063 return _json; | 2056 return _json; |
2064 } | 2057 } |
2065 } | 2058 } |
OLD | NEW |