OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
1 library googleapis_beta.pubsub.v1beta2; | 3 library googleapis_beta.pubsub.v1beta2; |
2 | 4 |
3 import "dart:core" as core; | 5 import 'dart:core' as core; |
4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
5 import "dart:async" as async; | 7 import 'dart:async' as async; |
6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
7 | 9 |
8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | |
11 import '../common/common.dart' as common; | |
12 | 13 |
13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError; |
| 16 |
| 17 const core.String USER_AGENT = 'dart-api-client pubsub/v1beta2'; |
15 | 18 |
16 /** | 19 /** |
17 * Provides reliable, many-to-many, asynchronous messaging between applications. | 20 * Provides reliable, many-to-many, asynchronous messaging between applications. |
18 */ | 21 */ |
19 class PubsubApi { | 22 class PubsubApi { |
20 /** View and manage your data across Google Cloud Platform services */ | 23 /** View and manage your data across Google Cloud Platform services */ |
21 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 24 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
22 | 25 |
23 /** View and manage Pub/Sub topics and subscriptions */ | 26 /** View and manage Pub/Sub topics and subscriptions */ |
24 static const PubsubScope = "https://www.googleapis.com/auth/pubsub"; | 27 static const PubsubScope = "https://www.googleapis.com/auth/pubsub"; |
25 | 28 |
26 | 29 |
27 final common_internal.ApiRequester _requester; | 30 final commons.ApiRequester _requester; |
28 | 31 |
29 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 32 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
30 | 33 |
31 PubsubApi(http.Client client, {core.String rootUrl: "https://pubsub.googleapis
.com/", core.String servicePath: "v1beta2/"}) : | 34 PubsubApi(http.Client client, {core.String rootUrl: "https://pubsub.googleapis
.com/", core.String servicePath: "v1beta2/"}) : |
32 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 35 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
33 } | 36 } |
34 | 37 |
35 | 38 |
36 /** Not documented yet. */ | |
37 class ProjectsResourceApi { | 39 class ProjectsResourceApi { |
38 final common_internal.ApiRequester _requester; | 40 final commons.ApiRequester _requester; |
39 | 41 |
40 ProjectsSubscriptionsResourceApi get subscriptions => new ProjectsSubscription
sResourceApi(_requester); | 42 ProjectsSubscriptionsResourceApi get subscriptions => new ProjectsSubscription
sResourceApi(_requester); |
41 ProjectsTopicsResourceApi get topics => new ProjectsTopicsResourceApi(_request
er); | 43 ProjectsTopicsResourceApi get topics => new ProjectsTopicsResourceApi(_request
er); |
42 | 44 |
43 ProjectsResourceApi(common_internal.ApiRequester client) : | 45 ProjectsResourceApi(commons.ApiRequester client) : |
44 _requester = client; | 46 _requester = client; |
45 } | 47 } |
46 | 48 |
47 | 49 |
48 /** Not documented yet. */ | |
49 class ProjectsSubscriptionsResourceApi { | 50 class ProjectsSubscriptionsResourceApi { |
50 final common_internal.ApiRequester _requester; | 51 final commons.ApiRequester _requester; |
51 | 52 |
52 ProjectsSubscriptionsResourceApi(common_internal.ApiRequester client) : | 53 ProjectsSubscriptionsResourceApi(commons.ApiRequester client) : |
53 _requester = client; | 54 _requester = client; |
54 | 55 |
55 /** | 56 /** |
56 * Acknowledges the messages associated with the ack tokens in the | 57 * Acknowledges the messages associated with the ack tokens in the |
57 * AcknowledgeRequest. The Pub/Sub system can remove the relevant messages | 58 * AcknowledgeRequest. The Pub/Sub system can remove the relevant messages |
58 * from the subscription. Acknowledging a message whose ack deadline has | 59 * from the subscription. Acknowledging a message whose ack deadline has |
59 * expired may succeed, but such a message may be redelivered later. | 60 * expired may succeed, but such a message may be redelivered later. |
60 * Acknowledging a message more than once will not result in an error. | 61 * Acknowledging a message more than once will not result in an error. |
61 * | 62 * |
62 * [request] - The metadata request object. | 63 * [request] - The metadata request object. |
63 * | 64 * |
64 * Request parameters: | 65 * Request parameters: |
65 * | 66 * |
66 * [subscription] - null | 67 * [subscription] - null |
67 * | 68 * |
68 * Completes with a [Empty]. | 69 * Completes with a [Empty]. |
69 * | 70 * |
70 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 71 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
71 * error. | 72 * error. |
72 * | 73 * |
73 * If the used [http.Client] completes with an error when making a REST call, | 74 * If the used [http.Client] completes with an error when making a REST call, |
74 * this method will complete with the same error. | 75 * this method will complete with the same error. |
75 */ | 76 */ |
76 async.Future<Empty> acknowledge(AcknowledgeRequest request, core.String subscr
iption) { | 77 async.Future<Empty> acknowledge(AcknowledgeRequest request, core.String subscr
iption) { |
77 var _url = null; | 78 var _url = null; |
78 var _queryParams = new core.Map(); | 79 var _queryParams = new core.Map(); |
79 var _uploadMedia = null; | 80 var _uploadMedia = null; |
80 var _uploadOptions = null; | 81 var _uploadOptions = null; |
81 var _downloadOptions = common.DownloadOptions.Metadata; | 82 var _downloadOptions = commons.DownloadOptions.Metadata; |
82 var _body = null; | 83 var _body = null; |
83 | 84 |
84 if (request != null) { | 85 if (request != null) { |
85 _body = convert.JSON.encode((request).toJson()); | 86 _body = convert.JSON.encode((request).toJson()); |
86 } | 87 } |
87 if (subscription == null) { | 88 if (subscription == null) { |
88 throw new core.ArgumentError("Parameter subscription is required."); | 89 throw new core.ArgumentError("Parameter subscription is required."); |
89 } | 90 } |
90 | 91 |
91 | 92 |
92 _url = common_internal.Escaper.ecapeVariableReserved('$subscription') + ':ac
knowledge'; | 93 _url = commons.Escaper.ecapeVariableReserved('$subscription') + ':acknowledg
e'; |
93 | 94 |
94 var _response = _requester.request(_url, | 95 var _response = _requester.request(_url, |
95 "POST", | 96 "POST", |
96 body: _body, | 97 body: _body, |
97 queryParams: _queryParams, | 98 queryParams: _queryParams, |
98 uploadOptions: _uploadOptions, | 99 uploadOptions: _uploadOptions, |
99 uploadMedia: _uploadMedia, | 100 uploadMedia: _uploadMedia, |
100 downloadOptions: _downloadOptions); | 101 downloadOptions: _downloadOptions); |
101 return _response.then((data) => new Empty.fromJson(data)); | 102 return _response.then((data) => new Empty.fromJson(data)); |
102 } | 103 } |
103 | 104 |
104 /** | 105 /** |
105 * Creates a subscription to a given topic for a given subscriber. If the | 106 * Creates a subscription to a given topic for a given subscriber. If the |
106 * subscription already exists, returns ALREADY_EXISTS. If the corresponding | 107 * 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 | 108 * 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 | 109 * request, the server will assign a random name for this subscription on the |
109 * same project as the topic. | 110 * same project as the topic. |
110 * | 111 * |
111 * [request] - The metadata request object. | 112 * [request] - The metadata request object. |
112 * | 113 * |
113 * Request parameters: | 114 * Request parameters: |
114 * | 115 * |
115 * [name] - null | 116 * [name] - null |
116 * | 117 * |
117 * Completes with a [Subscription]. | 118 * Completes with a [Subscription]. |
118 * | 119 * |
119 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 120 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
120 * error. | 121 * error. |
121 * | 122 * |
122 * If the used [http.Client] completes with an error when making a REST call, | 123 * If the used [http.Client] completes with an error when making a REST call, |
123 * this method will complete with the same error. | 124 * this method will complete with the same error. |
124 */ | 125 */ |
125 async.Future<Subscription> create(Subscription request, core.String name) { | 126 async.Future<Subscription> create(Subscription request, core.String name) { |
126 var _url = null; | 127 var _url = null; |
127 var _queryParams = new core.Map(); | 128 var _queryParams = new core.Map(); |
128 var _uploadMedia = null; | 129 var _uploadMedia = null; |
129 var _uploadOptions = null; | 130 var _uploadOptions = null; |
130 var _downloadOptions = common.DownloadOptions.Metadata; | 131 var _downloadOptions = commons.DownloadOptions.Metadata; |
131 var _body = null; | 132 var _body = null; |
132 | 133 |
133 if (request != null) { | 134 if (request != null) { |
134 _body = convert.JSON.encode((request).toJson()); | 135 _body = convert.JSON.encode((request).toJson()); |
135 } | 136 } |
136 if (name == null) { | 137 if (name == null) { |
137 throw new core.ArgumentError("Parameter name is required."); | 138 throw new core.ArgumentError("Parameter name is required."); |
138 } | 139 } |
139 | 140 |
140 | 141 |
141 _url = common_internal.Escaper.ecapeVariableReserved('$name'); | 142 _url = commons.Escaper.ecapeVariableReserved('$name'); |
142 | 143 |
143 var _response = _requester.request(_url, | 144 var _response = _requester.request(_url, |
144 "PUT", | 145 "PUT", |
145 body: _body, | 146 body: _body, |
146 queryParams: _queryParams, | 147 queryParams: _queryParams, |
147 uploadOptions: _uploadOptions, | 148 uploadOptions: _uploadOptions, |
148 uploadMedia: _uploadMedia, | 149 uploadMedia: _uploadMedia, |
149 downloadOptions: _downloadOptions); | 150 downloadOptions: _downloadOptions); |
150 return _response.then((data) => new Subscription.fromJson(data)); | 151 return _response.then((data) => new Subscription.fromJson(data)); |
151 } | 152 } |
152 | 153 |
153 /** | 154 /** |
154 * Deletes an existing subscription. All pending messages in the subscription | 155 * Deletes an existing subscription. All pending messages in the subscription |
155 * are immediately dropped. Calls to Pull after deletion will return | 156 * are immediately dropped. Calls to Pull after deletion will return |
156 * NOT_FOUND. After a subscription is deleted, a new one may be created with | 157 * NOT_FOUND. After a subscription is deleted, a new one may be created with |
157 * the same name, but the new one has no association with the old | 158 * the same name, but the new one has no association with the old |
158 * subscription, or its topic unless the same topic is specified. | 159 * subscription, or its topic unless the same topic is specified. |
159 * | 160 * |
160 * Request parameters: | 161 * Request parameters: |
161 * | 162 * |
162 * [subscription] - null | 163 * [subscription] - null |
163 * | 164 * |
164 * Completes with a [Empty]. | 165 * Completes with a [Empty]. |
165 * | 166 * |
166 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 167 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
167 * error. | 168 * error. |
168 * | 169 * |
169 * If the used [http.Client] completes with an error when making a REST call, | 170 * If the used [http.Client] completes with an error when making a REST call, |
170 * this method will complete with the same error. | 171 * this method will complete with the same error. |
171 */ | 172 */ |
172 async.Future<Empty> delete(core.String subscription) { | 173 async.Future<Empty> delete(core.String subscription) { |
173 var _url = null; | 174 var _url = null; |
174 var _queryParams = new core.Map(); | 175 var _queryParams = new core.Map(); |
175 var _uploadMedia = null; | 176 var _uploadMedia = null; |
176 var _uploadOptions = null; | 177 var _uploadOptions = null; |
177 var _downloadOptions = common.DownloadOptions.Metadata; | 178 var _downloadOptions = commons.DownloadOptions.Metadata; |
178 var _body = null; | 179 var _body = null; |
179 | 180 |
180 if (subscription == null) { | 181 if (subscription == null) { |
181 throw new core.ArgumentError("Parameter subscription is required."); | 182 throw new core.ArgumentError("Parameter subscription is required."); |
182 } | 183 } |
183 | 184 |
184 | 185 |
185 _url = common_internal.Escaper.ecapeVariableReserved('$subscription'); | 186 _url = commons.Escaper.ecapeVariableReserved('$subscription'); |
186 | 187 |
187 var _response = _requester.request(_url, | 188 var _response = _requester.request(_url, |
188 "DELETE", | 189 "DELETE", |
189 body: _body, | 190 body: _body, |
190 queryParams: _queryParams, | 191 queryParams: _queryParams, |
191 uploadOptions: _uploadOptions, | 192 uploadOptions: _uploadOptions, |
192 uploadMedia: _uploadMedia, | 193 uploadMedia: _uploadMedia, |
193 downloadOptions: _downloadOptions); | 194 downloadOptions: _downloadOptions); |
194 return _response.then((data) => new Empty.fromJson(data)); | 195 return _response.then((data) => new Empty.fromJson(data)); |
195 } | 196 } |
196 | 197 |
197 /** | 198 /** |
198 * Gets the configuration details of a subscription. | 199 * Gets the configuration details of a subscription. |
199 * | 200 * |
200 * Request parameters: | 201 * Request parameters: |
201 * | 202 * |
202 * [subscription] - null | 203 * [subscription] - null |
203 * | 204 * |
204 * Completes with a [Subscription]. | 205 * Completes with a [Subscription]. |
205 * | 206 * |
206 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 207 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
207 * error. | 208 * error. |
208 * | 209 * |
209 * If the used [http.Client] completes with an error when making a REST call, | 210 * If the used [http.Client] completes with an error when making a REST call, |
210 * this method will complete with the same error. | 211 * this method will complete with the same error. |
211 */ | 212 */ |
212 async.Future<Subscription> get(core.String subscription) { | 213 async.Future<Subscription> get(core.String subscription) { |
213 var _url = null; | 214 var _url = null; |
214 var _queryParams = new core.Map(); | 215 var _queryParams = new core.Map(); |
215 var _uploadMedia = null; | 216 var _uploadMedia = null; |
216 var _uploadOptions = null; | 217 var _uploadOptions = null; |
217 var _downloadOptions = common.DownloadOptions.Metadata; | 218 var _downloadOptions = commons.DownloadOptions.Metadata; |
218 var _body = null; | 219 var _body = null; |
219 | 220 |
220 if (subscription == null) { | 221 if (subscription == null) { |
221 throw new core.ArgumentError("Parameter subscription is required."); | 222 throw new core.ArgumentError("Parameter subscription is required."); |
222 } | 223 } |
223 | 224 |
224 | 225 |
225 _url = common_internal.Escaper.ecapeVariableReserved('$subscription'); | 226 _url = commons.Escaper.ecapeVariableReserved('$subscription'); |
226 | 227 |
227 var _response = _requester.request(_url, | 228 var _response = _requester.request(_url, |
228 "GET", | 229 "GET", |
229 body: _body, | 230 body: _body, |
230 queryParams: _queryParams, | 231 queryParams: _queryParams, |
231 uploadOptions: _uploadOptions, | 232 uploadOptions: _uploadOptions, |
232 uploadMedia: _uploadMedia, | 233 uploadMedia: _uploadMedia, |
233 downloadOptions: _downloadOptions); | 234 downloadOptions: _downloadOptions); |
234 return _response.then((data) => new Subscription.fromJson(data)); | 235 return _response.then((data) => new Subscription.fromJson(data)); |
235 } | 236 } |
236 | 237 |
237 /** | 238 /** |
238 * Lists matching subscriptions. | 239 * Lists matching subscriptions. |
239 * | 240 * |
240 * Request parameters: | 241 * Request parameters: |
241 * | 242 * |
242 * [project] - null | 243 * [project] - null |
243 * | 244 * |
244 * [pageSize] - null | 245 * [pageSize] - null |
245 * | 246 * |
246 * [pageToken] - null | 247 * [pageToken] - null |
247 * | 248 * |
248 * Completes with a [ListSubscriptionsResponse]. | 249 * Completes with a [ListSubscriptionsResponse]. |
249 * | 250 * |
250 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 251 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
251 * error. | 252 * error. |
252 * | 253 * |
253 * If the used [http.Client] completes with an error when making a REST call, | 254 * If the used [http.Client] completes with an error when making a REST call, |
254 * this method will complete with the same error. | 255 * this method will complete with the same error. |
255 */ | 256 */ |
256 async.Future<ListSubscriptionsResponse> list(core.String project, {core.int pa
geSize, core.String pageToken}) { | 257 async.Future<ListSubscriptionsResponse> list(core.String project, {core.int pa
geSize, core.String pageToken}) { |
257 var _url = null; | 258 var _url = null; |
258 var _queryParams = new core.Map(); | 259 var _queryParams = new core.Map(); |
259 var _uploadMedia = null; | 260 var _uploadMedia = null; |
260 var _uploadOptions = null; | 261 var _uploadOptions = null; |
261 var _downloadOptions = common.DownloadOptions.Metadata; | 262 var _downloadOptions = commons.DownloadOptions.Metadata; |
262 var _body = null; | 263 var _body = null; |
263 | 264 |
264 if (project == null) { | 265 if (project == null) { |
265 throw new core.ArgumentError("Parameter project is required."); | 266 throw new core.ArgumentError("Parameter project is required."); |
266 } | 267 } |
267 if (pageSize != null) { | 268 if (pageSize != null) { |
268 _queryParams["pageSize"] = ["${pageSize}"]; | 269 _queryParams["pageSize"] = ["${pageSize}"]; |
269 } | 270 } |
270 if (pageToken != null) { | 271 if (pageToken != null) { |
271 _queryParams["pageToken"] = [pageToken]; | 272 _queryParams["pageToken"] = [pageToken]; |
272 } | 273 } |
273 | 274 |
274 | 275 |
275 _url = common_internal.Escaper.ecapeVariableReserved('$project') + '/subscri
ptions'; | 276 _url = commons.Escaper.ecapeVariableReserved('$project') + '/subscriptions'; |
276 | 277 |
277 var _response = _requester.request(_url, | 278 var _response = _requester.request(_url, |
278 "GET", | 279 "GET", |
279 body: _body, | 280 body: _body, |
280 queryParams: _queryParams, | 281 queryParams: _queryParams, |
281 uploadOptions: _uploadOptions, | 282 uploadOptions: _uploadOptions, |
282 uploadMedia: _uploadMedia, | 283 uploadMedia: _uploadMedia, |
283 downloadOptions: _downloadOptions); | 284 downloadOptions: _downloadOptions); |
284 return _response.then((data) => new ListSubscriptionsResponse.fromJson(data)
); | 285 return _response.then((data) => new ListSubscriptionsResponse.fromJson(data)
); |
285 } | 286 } |
286 | 287 |
287 /** | 288 /** |
288 * Modifies the ack deadline for a specific message. This method is useful to | 289 * Modifies the ack deadline for a specific message. This method is useful to |
289 * indicate that more time is needed to process a message by the subscriber, | 290 * indicate that more time is needed to process a message by the subscriber, |
290 * or to make the message available for redelivery if the processing was | 291 * or to make the message available for redelivery if the processing was |
291 * interrupted. | 292 * interrupted. |
292 * | 293 * |
293 * [request] - The metadata request object. | 294 * [request] - The metadata request object. |
294 * | 295 * |
295 * Request parameters: | 296 * Request parameters: |
296 * | 297 * |
297 * [subscription] - null | 298 * [subscription] - null |
298 * | 299 * |
299 * Completes with a [Empty]. | 300 * Completes with a [Empty]. |
300 * | 301 * |
301 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 302 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
302 * error. | 303 * error. |
303 * | 304 * |
304 * If the used [http.Client] completes with an error when making a REST call, | 305 * If the used [http.Client] completes with an error when making a REST call, |
305 * this method will complete with the same error. | 306 * this method will complete with the same error. |
306 */ | 307 */ |
307 async.Future<Empty> modifyAckDeadline(ModifyAckDeadlineRequest request, core.S
tring subscription) { | 308 async.Future<Empty> modifyAckDeadline(ModifyAckDeadlineRequest request, core.S
tring subscription) { |
308 var _url = null; | 309 var _url = null; |
309 var _queryParams = new core.Map(); | 310 var _queryParams = new core.Map(); |
310 var _uploadMedia = null; | 311 var _uploadMedia = null; |
311 var _uploadOptions = null; | 312 var _uploadOptions = null; |
312 var _downloadOptions = common.DownloadOptions.Metadata; | 313 var _downloadOptions = commons.DownloadOptions.Metadata; |
313 var _body = null; | 314 var _body = null; |
314 | 315 |
315 if (request != null) { | 316 if (request != null) { |
316 _body = convert.JSON.encode((request).toJson()); | 317 _body = convert.JSON.encode((request).toJson()); |
317 } | 318 } |
318 if (subscription == null) { | 319 if (subscription == null) { |
319 throw new core.ArgumentError("Parameter subscription is required."); | 320 throw new core.ArgumentError("Parameter subscription is required."); |
320 } | 321 } |
321 | 322 |
322 | 323 |
323 _url = common_internal.Escaper.ecapeVariableReserved('$subscription') + ':mo
difyAckDeadline'; | 324 _url = commons.Escaper.ecapeVariableReserved('$subscription') + ':modifyAckD
eadline'; |
324 | 325 |
325 var _response = _requester.request(_url, | 326 var _response = _requester.request(_url, |
326 "POST", | 327 "POST", |
327 body: _body, | 328 body: _body, |
328 queryParams: _queryParams, | 329 queryParams: _queryParams, |
329 uploadOptions: _uploadOptions, | 330 uploadOptions: _uploadOptions, |
330 uploadMedia: _uploadMedia, | 331 uploadMedia: _uploadMedia, |
331 downloadOptions: _downloadOptions); | 332 downloadOptions: _downloadOptions); |
332 return _response.then((data) => new Empty.fromJson(data)); | 333 return _response.then((data) => new Empty.fromJson(data)); |
333 } | 334 } |
334 | 335 |
335 /** | 336 /** |
336 * Modifies the PushConfig for a specified subscription. This may be used to | 337 * Modifies the PushConfig for a specified subscription. This may be used to |
337 * change a push subscription to a pull one (signified by an empty PushConfig) | 338 * change a push subscription to a pull one (signified by an empty PushConfig) |
338 * or vice versa, or change the endpoint URL and other attributes of a push | 339 * or vice versa, or change the endpoint URL and other attributes of a push |
339 * subscription. Messages will accumulate for delivery continuously through | 340 * subscription. Messages will accumulate for delivery continuously through |
340 * the call regardless of changes to the PushConfig. | 341 * the call regardless of changes to the PushConfig. |
341 * | 342 * |
342 * [request] - The metadata request object. | 343 * [request] - The metadata request object. |
343 * | 344 * |
344 * Request parameters: | 345 * Request parameters: |
345 * | 346 * |
346 * [subscription] - null | 347 * [subscription] - null |
347 * | 348 * |
348 * Completes with a [Empty]. | 349 * Completes with a [Empty]. |
349 * | 350 * |
350 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 351 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
351 * error. | 352 * error. |
352 * | 353 * |
353 * If the used [http.Client] completes with an error when making a REST call, | 354 * If the used [http.Client] completes with an error when making a REST call, |
354 * this method will complete with the same error. | 355 * this method will complete with the same error. |
355 */ | 356 */ |
356 async.Future<Empty> modifyPushConfig(ModifyPushConfigRequest request, core.Str
ing subscription) { | 357 async.Future<Empty> modifyPushConfig(ModifyPushConfigRequest request, core.Str
ing subscription) { |
357 var _url = null; | 358 var _url = null; |
358 var _queryParams = new core.Map(); | 359 var _queryParams = new core.Map(); |
359 var _uploadMedia = null; | 360 var _uploadMedia = null; |
360 var _uploadOptions = null; | 361 var _uploadOptions = null; |
361 var _downloadOptions = common.DownloadOptions.Metadata; | 362 var _downloadOptions = commons.DownloadOptions.Metadata; |
362 var _body = null; | 363 var _body = null; |
363 | 364 |
364 if (request != null) { | 365 if (request != null) { |
365 _body = convert.JSON.encode((request).toJson()); | 366 _body = convert.JSON.encode((request).toJson()); |
366 } | 367 } |
367 if (subscription == null) { | 368 if (subscription == null) { |
368 throw new core.ArgumentError("Parameter subscription is required."); | 369 throw new core.ArgumentError("Parameter subscription is required."); |
369 } | 370 } |
370 | 371 |
371 | 372 |
372 _url = common_internal.Escaper.ecapeVariableReserved('$subscription') + ':mo
difyPushConfig'; | 373 _url = commons.Escaper.ecapeVariableReserved('$subscription') + ':modifyPush
Config'; |
373 | 374 |
374 var _response = _requester.request(_url, | 375 var _response = _requester.request(_url, |
375 "POST", | 376 "POST", |
376 body: _body, | 377 body: _body, |
377 queryParams: _queryParams, | 378 queryParams: _queryParams, |
378 uploadOptions: _uploadOptions, | 379 uploadOptions: _uploadOptions, |
379 uploadMedia: _uploadMedia, | 380 uploadMedia: _uploadMedia, |
380 downloadOptions: _downloadOptions); | 381 downloadOptions: _downloadOptions); |
381 return _response.then((data) => new Empty.fromJson(data)); | 382 return _response.then((data) => new Empty.fromJson(data)); |
382 } | 383 } |
383 | 384 |
384 /** | 385 /** |
385 * Pulls messages from the server. Returns an empty list if there are no | 386 * Pulls messages from the server. Returns an empty list if there are no |
386 * messages available in the backlog. The server may return UNAVAILABLE if | 387 * messages available in the backlog. The server may return UNAVAILABLE if |
387 * there are too many concurrent pull requests pending for the given | 388 * there are too many concurrent pull requests pending for the given |
388 * subscription. | 389 * subscription. |
389 * | 390 * |
390 * [request] - The metadata request object. | 391 * [request] - The metadata request object. |
391 * | 392 * |
392 * Request parameters: | 393 * Request parameters: |
393 * | 394 * |
394 * [subscription] - null | 395 * [subscription] - null |
395 * | 396 * |
396 * Completes with a [PullResponse]. | 397 * Completes with a [PullResponse]. |
397 * | 398 * |
398 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 399 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
399 * error. | 400 * error. |
400 * | 401 * |
401 * If the used [http.Client] completes with an error when making a REST call, | 402 * If the used [http.Client] completes with an error when making a REST call, |
402 * this method will complete with the same error. | 403 * this method will complete with the same error. |
403 */ | 404 */ |
404 async.Future<PullResponse> pull(PullRequest request, core.String subscription)
{ | 405 async.Future<PullResponse> pull(PullRequest request, core.String subscription)
{ |
405 var _url = null; | 406 var _url = null; |
406 var _queryParams = new core.Map(); | 407 var _queryParams = new core.Map(); |
407 var _uploadMedia = null; | 408 var _uploadMedia = null; |
408 var _uploadOptions = null; | 409 var _uploadOptions = null; |
409 var _downloadOptions = common.DownloadOptions.Metadata; | 410 var _downloadOptions = commons.DownloadOptions.Metadata; |
410 var _body = null; | 411 var _body = null; |
411 | 412 |
412 if (request != null) { | 413 if (request != null) { |
413 _body = convert.JSON.encode((request).toJson()); | 414 _body = convert.JSON.encode((request).toJson()); |
414 } | 415 } |
415 if (subscription == null) { | 416 if (subscription == null) { |
416 throw new core.ArgumentError("Parameter subscription is required."); | 417 throw new core.ArgumentError("Parameter subscription is required."); |
417 } | 418 } |
418 | 419 |
419 | 420 |
420 _url = common_internal.Escaper.ecapeVariableReserved('$subscription') + ':pu
ll'; | 421 _url = commons.Escaper.ecapeVariableReserved('$subscription') + ':pull'; |
421 | 422 |
422 var _response = _requester.request(_url, | 423 var _response = _requester.request(_url, |
423 "POST", | 424 "POST", |
424 body: _body, | 425 body: _body, |
425 queryParams: _queryParams, | 426 queryParams: _queryParams, |
426 uploadOptions: _uploadOptions, | 427 uploadOptions: _uploadOptions, |
427 uploadMedia: _uploadMedia, | 428 uploadMedia: _uploadMedia, |
428 downloadOptions: _downloadOptions); | 429 downloadOptions: _downloadOptions); |
429 return _response.then((data) => new PullResponse.fromJson(data)); | 430 return _response.then((data) => new PullResponse.fromJson(data)); |
430 } | 431 } |
431 | 432 |
432 } | 433 } |
433 | 434 |
434 | 435 |
435 /** Not documented yet. */ | |
436 class ProjectsTopicsResourceApi { | 436 class ProjectsTopicsResourceApi { |
437 final common_internal.ApiRequester _requester; | 437 final commons.ApiRequester _requester; |
438 | 438 |
439 ProjectsTopicsSubscriptionsResourceApi get subscriptions => new ProjectsTopics
SubscriptionsResourceApi(_requester); | 439 ProjectsTopicsSubscriptionsResourceApi get subscriptions => new ProjectsTopics
SubscriptionsResourceApi(_requester); |
440 | 440 |
441 ProjectsTopicsResourceApi(common_internal.ApiRequester client) : | 441 ProjectsTopicsResourceApi(commons.ApiRequester client) : |
442 _requester = client; | 442 _requester = client; |
443 | 443 |
444 /** | 444 /** |
445 * Creates the given topic with the given name. | 445 * Creates the given topic with the given name. |
446 * | 446 * |
447 * [request] - The metadata request object. | 447 * [request] - The metadata request object. |
448 * | 448 * |
449 * Request parameters: | 449 * Request parameters: |
450 * | 450 * |
451 * [name] - null | 451 * [name] - null |
452 * | 452 * |
453 * Completes with a [Topic]. | 453 * Completes with a [Topic]. |
454 * | 454 * |
455 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 455 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
456 * error. | 456 * error. |
457 * | 457 * |
458 * If the used [http.Client] completes with an error when making a REST call, | 458 * If the used [http.Client] completes with an error when making a REST call, |
459 * this method will complete with the same error. | 459 * this method will complete with the same error. |
460 */ | 460 */ |
461 async.Future<Topic> create(Topic request, core.String name) { | 461 async.Future<Topic> create(Topic request, core.String name) { |
462 var _url = null; | 462 var _url = null; |
463 var _queryParams = new core.Map(); | 463 var _queryParams = new core.Map(); |
464 var _uploadMedia = null; | 464 var _uploadMedia = null; |
465 var _uploadOptions = null; | 465 var _uploadOptions = null; |
466 var _downloadOptions = common.DownloadOptions.Metadata; | 466 var _downloadOptions = commons.DownloadOptions.Metadata; |
467 var _body = null; | 467 var _body = null; |
468 | 468 |
469 if (request != null) { | 469 if (request != null) { |
470 _body = convert.JSON.encode((request).toJson()); | 470 _body = convert.JSON.encode((request).toJson()); |
471 } | 471 } |
472 if (name == null) { | 472 if (name == null) { |
473 throw new core.ArgumentError("Parameter name is required."); | 473 throw new core.ArgumentError("Parameter name is required."); |
474 } | 474 } |
475 | 475 |
476 | 476 |
477 _url = common_internal.Escaper.ecapeVariableReserved('$name'); | 477 _url = commons.Escaper.ecapeVariableReserved('$name'); |
478 | 478 |
479 var _response = _requester.request(_url, | 479 var _response = _requester.request(_url, |
480 "PUT", | 480 "PUT", |
481 body: _body, | 481 body: _body, |
482 queryParams: _queryParams, | 482 queryParams: _queryParams, |
483 uploadOptions: _uploadOptions, | 483 uploadOptions: _uploadOptions, |
484 uploadMedia: _uploadMedia, | 484 uploadMedia: _uploadMedia, |
485 downloadOptions: _downloadOptions); | 485 downloadOptions: _downloadOptions); |
486 return _response.then((data) => new Topic.fromJson(data)); | 486 return _response.then((data) => new Topic.fromJson(data)); |
487 } | 487 } |
488 | 488 |
489 /** | 489 /** |
490 * Deletes the topic with the given name. All subscriptions to this topic are | 490 * Deletes the topic with the given name. Returns NOT_FOUND if the topic does |
491 * detached from the topic. Returns NOT_FOUND if the topic does not exist. | 491 * not exist. After a topic is deleted, a new topic may be created with the |
492 * After a topic is deleted, a new topic may be created with the same name; | 492 * same name; this is an entirely new topic with none of the old configuration |
493 * this is an entirely new topic with none of the old configuration or | 493 * or subscriptions. Existing subscriptions to this topic are not deleted. |
494 * subscriptions. | |
495 * | 494 * |
496 * Request parameters: | 495 * Request parameters: |
497 * | 496 * |
498 * [topic] - null | 497 * [topic] - null |
499 * | 498 * |
500 * Completes with a [Empty]. | 499 * Completes with a [Empty]. |
501 * | 500 * |
502 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 501 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
503 * error. | 502 * error. |
504 * | 503 * |
505 * If the used [http.Client] completes with an error when making a REST call, | 504 * If the used [http.Client] completes with an error when making a REST call, |
506 * this method will complete with the same error. | 505 * this method will complete with the same error. |
507 */ | 506 */ |
508 async.Future<Empty> delete(core.String topic) { | 507 async.Future<Empty> delete(core.String topic) { |
509 var _url = null; | 508 var _url = null; |
510 var _queryParams = new core.Map(); | 509 var _queryParams = new core.Map(); |
511 var _uploadMedia = null; | 510 var _uploadMedia = null; |
512 var _uploadOptions = null; | 511 var _uploadOptions = null; |
513 var _downloadOptions = common.DownloadOptions.Metadata; | 512 var _downloadOptions = commons.DownloadOptions.Metadata; |
514 var _body = null; | 513 var _body = null; |
515 | 514 |
516 if (topic == null) { | 515 if (topic == null) { |
517 throw new core.ArgumentError("Parameter topic is required."); | 516 throw new core.ArgumentError("Parameter topic is required."); |
518 } | 517 } |
519 | 518 |
520 | 519 |
521 _url = common_internal.Escaper.ecapeVariableReserved('$topic'); | 520 _url = commons.Escaper.ecapeVariableReserved('$topic'); |
522 | 521 |
523 var _response = _requester.request(_url, | 522 var _response = _requester.request(_url, |
524 "DELETE", | 523 "DELETE", |
525 body: _body, | 524 body: _body, |
526 queryParams: _queryParams, | 525 queryParams: _queryParams, |
527 uploadOptions: _uploadOptions, | 526 uploadOptions: _uploadOptions, |
528 uploadMedia: _uploadMedia, | 527 uploadMedia: _uploadMedia, |
529 downloadOptions: _downloadOptions); | 528 downloadOptions: _downloadOptions); |
530 return _response.then((data) => new Empty.fromJson(data)); | 529 return _response.then((data) => new Empty.fromJson(data)); |
531 } | 530 } |
532 | 531 |
533 /** | 532 /** |
534 * Gets the configuration of a topic. | 533 * Gets the configuration of a topic. |
535 * | 534 * |
536 * Request parameters: | 535 * Request parameters: |
537 * | 536 * |
538 * [topic] - null | 537 * [topic] - null |
539 * | 538 * |
540 * Completes with a [Topic]. | 539 * Completes with a [Topic]. |
541 * | 540 * |
542 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 541 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
543 * error. | 542 * error. |
544 * | 543 * |
545 * If the used [http.Client] completes with an error when making a REST call, | 544 * If the used [http.Client] completes with an error when making a REST call, |
546 * this method will complete with the same error. | 545 * this method will complete with the same error. |
547 */ | 546 */ |
548 async.Future<Topic> get(core.String topic) { | 547 async.Future<Topic> get(core.String topic) { |
549 var _url = null; | 548 var _url = null; |
550 var _queryParams = new core.Map(); | 549 var _queryParams = new core.Map(); |
551 var _uploadMedia = null; | 550 var _uploadMedia = null; |
552 var _uploadOptions = null; | 551 var _uploadOptions = null; |
553 var _downloadOptions = common.DownloadOptions.Metadata; | 552 var _downloadOptions = commons.DownloadOptions.Metadata; |
554 var _body = null; | 553 var _body = null; |
555 | 554 |
556 if (topic == null) { | 555 if (topic == null) { |
557 throw new core.ArgumentError("Parameter topic is required."); | 556 throw new core.ArgumentError("Parameter topic is required."); |
558 } | 557 } |
559 | 558 |
560 | 559 |
561 _url = common_internal.Escaper.ecapeVariableReserved('$topic'); | 560 _url = commons.Escaper.ecapeVariableReserved('$topic'); |
562 | 561 |
563 var _response = _requester.request(_url, | 562 var _response = _requester.request(_url, |
564 "GET", | 563 "GET", |
565 body: _body, | 564 body: _body, |
566 queryParams: _queryParams, | 565 queryParams: _queryParams, |
567 uploadOptions: _uploadOptions, | 566 uploadOptions: _uploadOptions, |
568 uploadMedia: _uploadMedia, | 567 uploadMedia: _uploadMedia, |
569 downloadOptions: _downloadOptions); | 568 downloadOptions: _downloadOptions); |
570 return _response.then((data) => new Topic.fromJson(data)); | 569 return _response.then((data) => new Topic.fromJson(data)); |
571 } | 570 } |
572 | 571 |
573 /** | 572 /** |
574 * Lists matching topics. | 573 * Lists matching topics. |
575 * | 574 * |
576 * Request parameters: | 575 * Request parameters: |
577 * | 576 * |
578 * [project] - null | 577 * [project] - null |
579 * | 578 * |
580 * [pageSize] - null | 579 * [pageSize] - null |
581 * | 580 * |
582 * [pageToken] - null | 581 * [pageToken] - null |
583 * | 582 * |
584 * Completes with a [ListTopicsResponse]. | 583 * Completes with a [ListTopicsResponse]. |
585 * | 584 * |
586 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 585 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
587 * error. | 586 * error. |
588 * | 587 * |
589 * If the used [http.Client] completes with an error when making a REST call, | 588 * If the used [http.Client] completes with an error when making a REST call, |
590 * this method will complete with the same error. | 589 * this method will complete with the same error. |
591 */ | 590 */ |
592 async.Future<ListTopicsResponse> list(core.String project, {core.int pageSize,
core.String pageToken}) { | 591 async.Future<ListTopicsResponse> list(core.String project, {core.int pageSize,
core.String pageToken}) { |
593 var _url = null; | 592 var _url = null; |
594 var _queryParams = new core.Map(); | 593 var _queryParams = new core.Map(); |
595 var _uploadMedia = null; | 594 var _uploadMedia = null; |
596 var _uploadOptions = null; | 595 var _uploadOptions = null; |
597 var _downloadOptions = common.DownloadOptions.Metadata; | 596 var _downloadOptions = commons.DownloadOptions.Metadata; |
598 var _body = null; | 597 var _body = null; |
599 | 598 |
600 if (project == null) { | 599 if (project == null) { |
601 throw new core.ArgumentError("Parameter project is required."); | 600 throw new core.ArgumentError("Parameter project is required."); |
602 } | 601 } |
603 if (pageSize != null) { | 602 if (pageSize != null) { |
604 _queryParams["pageSize"] = ["${pageSize}"]; | 603 _queryParams["pageSize"] = ["${pageSize}"]; |
605 } | 604 } |
606 if (pageToken != null) { | 605 if (pageToken != null) { |
607 _queryParams["pageToken"] = [pageToken]; | 606 _queryParams["pageToken"] = [pageToken]; |
608 } | 607 } |
609 | 608 |
610 | 609 |
611 _url = common_internal.Escaper.ecapeVariableReserved('$project') + '/topics'
; | 610 _url = commons.Escaper.ecapeVariableReserved('$project') + '/topics'; |
612 | 611 |
613 var _response = _requester.request(_url, | 612 var _response = _requester.request(_url, |
614 "GET", | 613 "GET", |
615 body: _body, | 614 body: _body, |
616 queryParams: _queryParams, | 615 queryParams: _queryParams, |
617 uploadOptions: _uploadOptions, | 616 uploadOptions: _uploadOptions, |
618 uploadMedia: _uploadMedia, | 617 uploadMedia: _uploadMedia, |
619 downloadOptions: _downloadOptions); | 618 downloadOptions: _downloadOptions); |
620 return _response.then((data) => new ListTopicsResponse.fromJson(data)); | 619 return _response.then((data) => new ListTopicsResponse.fromJson(data)); |
621 } | 620 } |
622 | 621 |
623 /** | 622 /** |
624 * Adds one or more messages to the topic. Returns NOT_FOUND if the topic does | 623 * Adds one or more messages to the topic. Returns NOT_FOUND if the topic does |
625 * not exist. | 624 * not exist. |
626 * | 625 * |
627 * [request] - The metadata request object. | 626 * [request] - The metadata request object. |
628 * | 627 * |
629 * Request parameters: | 628 * Request parameters: |
630 * | 629 * |
631 * [topic] - null | 630 * [topic] - null |
632 * | 631 * |
633 * Completes with a [PublishResponse]. | 632 * Completes with a [PublishResponse]. |
634 * | 633 * |
635 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 634 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
636 * error. | 635 * error. |
637 * | 636 * |
638 * If the used [http.Client] completes with an error when making a REST call, | 637 * If the used [http.Client] completes with an error when making a REST call, |
639 * this method will complete with the same error. | 638 * this method will complete with the same error. |
640 */ | 639 */ |
641 async.Future<PublishResponse> publish(PublishRequest request, core.String topi
c) { | 640 async.Future<PublishResponse> publish(PublishRequest request, core.String topi
c) { |
642 var _url = null; | 641 var _url = null; |
643 var _queryParams = new core.Map(); | 642 var _queryParams = new core.Map(); |
644 var _uploadMedia = null; | 643 var _uploadMedia = null; |
645 var _uploadOptions = null; | 644 var _uploadOptions = null; |
646 var _downloadOptions = common.DownloadOptions.Metadata; | 645 var _downloadOptions = commons.DownloadOptions.Metadata; |
647 var _body = null; | 646 var _body = null; |
648 | 647 |
649 if (request != null) { | 648 if (request != null) { |
650 _body = convert.JSON.encode((request).toJson()); | 649 _body = convert.JSON.encode((request).toJson()); |
651 } | 650 } |
652 if (topic == null) { | 651 if (topic == null) { |
653 throw new core.ArgumentError("Parameter topic is required."); | 652 throw new core.ArgumentError("Parameter topic is required."); |
654 } | 653 } |
655 | 654 |
656 | 655 |
657 _url = common_internal.Escaper.ecapeVariableReserved('$topic') + ':publish'; | 656 _url = commons.Escaper.ecapeVariableReserved('$topic') + ':publish'; |
658 | 657 |
659 var _response = _requester.request(_url, | 658 var _response = _requester.request(_url, |
660 "POST", | 659 "POST", |
661 body: _body, | 660 body: _body, |
662 queryParams: _queryParams, | 661 queryParams: _queryParams, |
663 uploadOptions: _uploadOptions, | 662 uploadOptions: _uploadOptions, |
664 uploadMedia: _uploadMedia, | 663 uploadMedia: _uploadMedia, |
665 downloadOptions: _downloadOptions); | 664 downloadOptions: _downloadOptions); |
666 return _response.then((data) => new PublishResponse.fromJson(data)); | 665 return _response.then((data) => new PublishResponse.fromJson(data)); |
667 } | 666 } |
668 | 667 |
669 } | 668 } |
670 | 669 |
671 | 670 |
672 /** Not documented yet. */ | |
673 class ProjectsTopicsSubscriptionsResourceApi { | 671 class ProjectsTopicsSubscriptionsResourceApi { |
674 final common_internal.ApiRequester _requester; | 672 final commons.ApiRequester _requester; |
675 | 673 |
676 ProjectsTopicsSubscriptionsResourceApi(common_internal.ApiRequester client) : | 674 ProjectsTopicsSubscriptionsResourceApi(commons.ApiRequester client) : |
677 _requester = client; | 675 _requester = client; |
678 | 676 |
679 /** | 677 /** |
680 * Lists the name of the subscriptions for this topic. | 678 * Lists the name of the subscriptions for this topic. |
681 * | 679 * |
682 * Request parameters: | 680 * Request parameters: |
683 * | 681 * |
684 * [topic] - null | 682 * [topic] - null |
685 * | 683 * |
686 * [pageSize] - null | 684 * [pageSize] - null |
687 * | 685 * |
688 * [pageToken] - null | 686 * [pageToken] - null |
689 * | 687 * |
690 * Completes with a [ListTopicSubscriptionsResponse]. | 688 * Completes with a [ListTopicSubscriptionsResponse]. |
691 * | 689 * |
692 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 690 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
693 * error. | 691 * error. |
694 * | 692 * |
695 * If the used [http.Client] completes with an error when making a REST call, | 693 * If the used [http.Client] completes with an error when making a REST call, |
696 * this method will complete with the same error. | 694 * this method will complete with the same error. |
697 */ | 695 */ |
698 async.Future<ListTopicSubscriptionsResponse> list(core.String topic, {core.int
pageSize, core.String pageToken}) { | 696 async.Future<ListTopicSubscriptionsResponse> list(core.String topic, {core.int
pageSize, core.String pageToken}) { |
699 var _url = null; | 697 var _url = null; |
700 var _queryParams = new core.Map(); | 698 var _queryParams = new core.Map(); |
701 var _uploadMedia = null; | 699 var _uploadMedia = null; |
702 var _uploadOptions = null; | 700 var _uploadOptions = null; |
703 var _downloadOptions = common.DownloadOptions.Metadata; | 701 var _downloadOptions = commons.DownloadOptions.Metadata; |
704 var _body = null; | 702 var _body = null; |
705 | 703 |
706 if (topic == null) { | 704 if (topic == null) { |
707 throw new core.ArgumentError("Parameter topic is required."); | 705 throw new core.ArgumentError("Parameter topic is required."); |
708 } | 706 } |
709 if (pageSize != null) { | 707 if (pageSize != null) { |
710 _queryParams["pageSize"] = ["${pageSize}"]; | 708 _queryParams["pageSize"] = ["${pageSize}"]; |
711 } | 709 } |
712 if (pageToken != null) { | 710 if (pageToken != null) { |
713 _queryParams["pageToken"] = [pageToken]; | 711 _queryParams["pageToken"] = [pageToken]; |
714 } | 712 } |
715 | 713 |
716 | 714 |
717 _url = common_internal.Escaper.ecapeVariableReserved('$topic') + '/subscript
ions'; | 715 _url = commons.Escaper.ecapeVariableReserved('$topic') + '/subscriptions'; |
718 | 716 |
719 var _response = _requester.request(_url, | 717 var _response = _requester.request(_url, |
720 "GET", | 718 "GET", |
721 body: _body, | 719 body: _body, |
722 queryParams: _queryParams, | 720 queryParams: _queryParams, |
723 uploadOptions: _uploadOptions, | 721 uploadOptions: _uploadOptions, |
724 uploadMedia: _uploadMedia, | 722 uploadMedia: _uploadMedia, |
725 downloadOptions: _downloadOptions); | 723 downloadOptions: _downloadOptions); |
726 return _response.then((data) => new ListTopicSubscriptionsResponse.fromJson(
data)); | 724 return _response.then((data) => new ListTopicSubscriptionsResponse.fromJson(
data)); |
727 } | 725 } |
728 | 726 |
729 } | 727 } |
730 | 728 |
731 | 729 |
732 | 730 |
733 /** Not documented yet. */ | |
734 class AcknowledgeRequest { | 731 class AcknowledgeRequest { |
735 /** Not documented yet. */ | |
736 core.List<core.String> ackIds; | 732 core.List<core.String> ackIds; |
737 | 733 |
738 | 734 |
739 AcknowledgeRequest(); | 735 AcknowledgeRequest(); |
740 | 736 |
741 AcknowledgeRequest.fromJson(core.Map _json) { | 737 AcknowledgeRequest.fromJson(core.Map _json) { |
742 if (_json.containsKey("ackIds")) { | 738 if (_json.containsKey("ackIds")) { |
743 ackIds = _json["ackIds"]; | 739 ackIds = _json["ackIds"]; |
744 } | 740 } |
745 } | 741 } |
746 | 742 |
747 core.Map toJson() { | 743 core.Map toJson() { |
748 var _json = new core.Map(); | 744 var _json = new core.Map(); |
749 if (ackIds != null) { | 745 if (ackIds != null) { |
750 _json["ackIds"] = ackIds; | 746 _json["ackIds"] = ackIds; |
751 } | 747 } |
752 return _json; | 748 return _json; |
753 } | 749 } |
754 } | 750 } |
755 | 751 |
756 | 752 |
757 /** Not documented yet. */ | |
758 class Empty { | 753 class Empty { |
759 | 754 |
760 Empty(); | 755 Empty(); |
761 | 756 |
762 Empty.fromJson(core.Map _json) { | 757 Empty.fromJson(core.Map _json) { |
763 } | 758 } |
764 | 759 |
765 core.Map toJson() { | 760 core.Map toJson() { |
766 var _json = new core.Map(); | 761 var _json = new core.Map(); |
767 return _json; | 762 return _json; |
768 } | 763 } |
769 } | 764 } |
770 | 765 |
771 | 766 |
772 /** Not documented yet. */ | |
773 class ListSubscriptionsResponse { | 767 class ListSubscriptionsResponse { |
774 /** Not documented yet. */ | |
775 core.String nextPageToken; | 768 core.String nextPageToken; |
776 | 769 |
777 /** Not documented yet. */ | |
778 core.List<Subscription> subscriptions; | 770 core.List<Subscription> subscriptions; |
779 | 771 |
780 | 772 |
781 ListSubscriptionsResponse(); | 773 ListSubscriptionsResponse(); |
782 | 774 |
783 ListSubscriptionsResponse.fromJson(core.Map _json) { | 775 ListSubscriptionsResponse.fromJson(core.Map _json) { |
784 if (_json.containsKey("nextPageToken")) { | 776 if (_json.containsKey("nextPageToken")) { |
785 nextPageToken = _json["nextPageToken"]; | 777 nextPageToken = _json["nextPageToken"]; |
786 } | 778 } |
787 if (_json.containsKey("subscriptions")) { | 779 if (_json.containsKey("subscriptions")) { |
788 subscriptions = _json["subscriptions"].map((value) => new Subscription.fro
mJson(value)).toList(); | 780 subscriptions = _json["subscriptions"].map((value) => new Subscription.fro
mJson(value)).toList(); |
789 } | 781 } |
790 } | 782 } |
791 | 783 |
792 core.Map toJson() { | 784 core.Map toJson() { |
793 var _json = new core.Map(); | 785 var _json = new core.Map(); |
794 if (nextPageToken != null) { | 786 if (nextPageToken != null) { |
795 _json["nextPageToken"] = nextPageToken; | 787 _json["nextPageToken"] = nextPageToken; |
796 } | 788 } |
797 if (subscriptions != null) { | 789 if (subscriptions != null) { |
798 _json["subscriptions"] = subscriptions.map((value) => (value).toJson()).to
List(); | 790 _json["subscriptions"] = subscriptions.map((value) => (value).toJson()).to
List(); |
799 } | 791 } |
800 return _json; | 792 return _json; |
801 } | 793 } |
802 } | 794 } |
803 | 795 |
804 | 796 |
805 /** Not documented yet. */ | |
806 class ListTopicSubscriptionsResponse { | 797 class ListTopicSubscriptionsResponse { |
807 /** Not documented yet. */ | |
808 core.String nextPageToken; | 798 core.String nextPageToken; |
809 | 799 |
810 /** Not documented yet. */ | |
811 core.List<core.String> subscriptions; | 800 core.List<core.String> subscriptions; |
812 | 801 |
813 | 802 |
814 ListTopicSubscriptionsResponse(); | 803 ListTopicSubscriptionsResponse(); |
815 | 804 |
816 ListTopicSubscriptionsResponse.fromJson(core.Map _json) { | 805 ListTopicSubscriptionsResponse.fromJson(core.Map _json) { |
817 if (_json.containsKey("nextPageToken")) { | 806 if (_json.containsKey("nextPageToken")) { |
818 nextPageToken = _json["nextPageToken"]; | 807 nextPageToken = _json["nextPageToken"]; |
819 } | 808 } |
820 if (_json.containsKey("subscriptions")) { | 809 if (_json.containsKey("subscriptions")) { |
821 subscriptions = _json["subscriptions"]; | 810 subscriptions = _json["subscriptions"]; |
822 } | 811 } |
823 } | 812 } |
824 | 813 |
825 core.Map toJson() { | 814 core.Map toJson() { |
826 var _json = new core.Map(); | 815 var _json = new core.Map(); |
827 if (nextPageToken != null) { | 816 if (nextPageToken != null) { |
828 _json["nextPageToken"] = nextPageToken; | 817 _json["nextPageToken"] = nextPageToken; |
829 } | 818 } |
830 if (subscriptions != null) { | 819 if (subscriptions != null) { |
831 _json["subscriptions"] = subscriptions; | 820 _json["subscriptions"] = subscriptions; |
832 } | 821 } |
833 return _json; | 822 return _json; |
834 } | 823 } |
835 } | 824 } |
836 | 825 |
837 | 826 |
838 /** Not documented yet. */ | |
839 class ListTopicsResponse { | 827 class ListTopicsResponse { |
840 /** Not documented yet. */ | |
841 core.String nextPageToken; | 828 core.String nextPageToken; |
842 | 829 |
843 /** Not documented yet. */ | |
844 core.List<Topic> topics; | 830 core.List<Topic> topics; |
845 | 831 |
846 | 832 |
847 ListTopicsResponse(); | 833 ListTopicsResponse(); |
848 | 834 |
849 ListTopicsResponse.fromJson(core.Map _json) { | 835 ListTopicsResponse.fromJson(core.Map _json) { |
850 if (_json.containsKey("nextPageToken")) { | 836 if (_json.containsKey("nextPageToken")) { |
851 nextPageToken = _json["nextPageToken"]; | 837 nextPageToken = _json["nextPageToken"]; |
852 } | 838 } |
853 if (_json.containsKey("topics")) { | 839 if (_json.containsKey("topics")) { |
854 topics = _json["topics"].map((value) => new Topic.fromJson(value)).toList(
); | 840 topics = _json["topics"].map((value) => new Topic.fromJson(value)).toList(
); |
855 } | 841 } |
856 } | 842 } |
857 | 843 |
858 core.Map toJson() { | 844 core.Map toJson() { |
859 var _json = new core.Map(); | 845 var _json = new core.Map(); |
860 if (nextPageToken != null) { | 846 if (nextPageToken != null) { |
861 _json["nextPageToken"] = nextPageToken; | 847 _json["nextPageToken"] = nextPageToken; |
862 } | 848 } |
863 if (topics != null) { | 849 if (topics != null) { |
864 _json["topics"] = topics.map((value) => (value).toJson()).toList(); | 850 _json["topics"] = topics.map((value) => (value).toJson()).toList(); |
865 } | 851 } |
866 return _json; | 852 return _json; |
867 } | 853 } |
868 } | 854 } |
869 | 855 |
870 | 856 |
871 /** Not documented yet. */ | |
872 class ModifyAckDeadlineRequest { | 857 class ModifyAckDeadlineRequest { |
873 /** Not documented yet. */ | |
874 core.int ackDeadlineSeconds; | 858 core.int ackDeadlineSeconds; |
875 | 859 |
876 /** Not documented yet. */ | |
877 core.String ackId; | 860 core.String ackId; |
878 | 861 |
879 | 862 |
880 ModifyAckDeadlineRequest(); | 863 ModifyAckDeadlineRequest(); |
881 | 864 |
882 ModifyAckDeadlineRequest.fromJson(core.Map _json) { | 865 ModifyAckDeadlineRequest.fromJson(core.Map _json) { |
883 if (_json.containsKey("ackDeadlineSeconds")) { | 866 if (_json.containsKey("ackDeadlineSeconds")) { |
884 ackDeadlineSeconds = _json["ackDeadlineSeconds"]; | 867 ackDeadlineSeconds = _json["ackDeadlineSeconds"]; |
885 } | 868 } |
886 if (_json.containsKey("ackId")) { | 869 if (_json.containsKey("ackId")) { |
887 ackId = _json["ackId"]; | 870 ackId = _json["ackId"]; |
888 } | 871 } |
889 } | 872 } |
890 | 873 |
891 core.Map toJson() { | 874 core.Map toJson() { |
892 var _json = new core.Map(); | 875 var _json = new core.Map(); |
893 if (ackDeadlineSeconds != null) { | 876 if (ackDeadlineSeconds != null) { |
894 _json["ackDeadlineSeconds"] = ackDeadlineSeconds; | 877 _json["ackDeadlineSeconds"] = ackDeadlineSeconds; |
895 } | 878 } |
896 if (ackId != null) { | 879 if (ackId != null) { |
897 _json["ackId"] = ackId; | 880 _json["ackId"] = ackId; |
898 } | 881 } |
899 return _json; | 882 return _json; |
900 } | 883 } |
901 } | 884 } |
902 | 885 |
903 | 886 |
904 /** Not documented yet. */ | |
905 class ModifyPushConfigRequest { | 887 class ModifyPushConfigRequest { |
906 /** Not documented yet. */ | |
907 PushConfig pushConfig; | 888 PushConfig pushConfig; |
908 | 889 |
909 | 890 |
910 ModifyPushConfigRequest(); | 891 ModifyPushConfigRequest(); |
911 | 892 |
912 ModifyPushConfigRequest.fromJson(core.Map _json) { | 893 ModifyPushConfigRequest.fromJson(core.Map _json) { |
913 if (_json.containsKey("pushConfig")) { | 894 if (_json.containsKey("pushConfig")) { |
914 pushConfig = new PushConfig.fromJson(_json["pushConfig"]); | 895 pushConfig = new PushConfig.fromJson(_json["pushConfig"]); |
915 } | 896 } |
916 } | 897 } |
917 | 898 |
918 core.Map toJson() { | 899 core.Map toJson() { |
919 var _json = new core.Map(); | 900 var _json = new core.Map(); |
920 if (pushConfig != null) { | 901 if (pushConfig != null) { |
921 _json["pushConfig"] = (pushConfig).toJson(); | 902 _json["pushConfig"] = (pushConfig).toJson(); |
922 } | 903 } |
923 return _json; | 904 return _json; |
924 } | 905 } |
925 } | 906 } |
926 | 907 |
927 | 908 |
928 /** Not documented yet. */ | |
929 class PublishRequest { | 909 class PublishRequest { |
930 /** Not documented yet. */ | |
931 core.List<PubsubMessage> messages; | 910 core.List<PubsubMessage> messages; |
932 | 911 |
933 | 912 |
934 PublishRequest(); | 913 PublishRequest(); |
935 | 914 |
936 PublishRequest.fromJson(core.Map _json) { | 915 PublishRequest.fromJson(core.Map _json) { |
937 if (_json.containsKey("messages")) { | 916 if (_json.containsKey("messages")) { |
938 messages = _json["messages"].map((value) => new PubsubMessage.fromJson(val
ue)).toList(); | 917 messages = _json["messages"].map((value) => new PubsubMessage.fromJson(val
ue)).toList(); |
939 } | 918 } |
940 } | 919 } |
941 | 920 |
942 core.Map toJson() { | 921 core.Map toJson() { |
943 var _json = new core.Map(); | 922 var _json = new core.Map(); |
944 if (messages != null) { | 923 if (messages != null) { |
945 _json["messages"] = messages.map((value) => (value).toJson()).toList(); | 924 _json["messages"] = messages.map((value) => (value).toJson()).toList(); |
946 } | 925 } |
947 return _json; | 926 return _json; |
948 } | 927 } |
949 } | 928 } |
950 | 929 |
951 | 930 |
952 /** Not documented yet. */ | |
953 class PublishResponse { | 931 class PublishResponse { |
954 /** Not documented yet. */ | |
955 core.List<core.String> messageIds; | 932 core.List<core.String> messageIds; |
956 | 933 |
957 | 934 |
958 PublishResponse(); | 935 PublishResponse(); |
959 | 936 |
960 PublishResponse.fromJson(core.Map _json) { | 937 PublishResponse.fromJson(core.Map _json) { |
961 if (_json.containsKey("messageIds")) { | 938 if (_json.containsKey("messageIds")) { |
962 messageIds = _json["messageIds"]; | 939 messageIds = _json["messageIds"]; |
963 } | 940 } |
964 } | 941 } |
965 | 942 |
966 core.Map toJson() { | 943 core.Map toJson() { |
967 var _json = new core.Map(); | 944 var _json = new core.Map(); |
968 if (messageIds != null) { | 945 if (messageIds != null) { |
969 _json["messageIds"] = messageIds; | 946 _json["messageIds"] = messageIds; |
970 } | 947 } |
971 return _json; | 948 return _json; |
972 } | 949 } |
973 } | 950 } |
974 | 951 |
975 | 952 |
976 /** Not documented yet. */ | |
977 class PubsubMessage { | 953 class PubsubMessage { |
978 /** Not documented yet. */ | |
979 core.Map<core.String, core.String> attributes; | 954 core.Map<core.String, core.String> attributes; |
980 | 955 |
981 /** Not documented yet. */ | |
982 core.String data; | 956 core.String data; |
983 | 957 |
984 core.List<core.int> get dataAsBytes { | 958 core.List<core.int> get dataAsBytes { |
985 return crypto.CryptoUtils.base64StringToBytes(data); | 959 return crypto.CryptoUtils.base64StringToBytes(data); |
986 } | 960 } |
987 | 961 |
988 void set dataAsBytes(core.List<core.int> _bytes) { | 962 void set dataAsBytes(core.List<core.int> _bytes) { |
989 data = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 963 data = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
990 } | 964 } |
991 | 965 |
992 /** Not documented yet. */ | |
993 core.String messageId; | 966 core.String messageId; |
994 | 967 |
995 | 968 |
996 PubsubMessage(); | 969 PubsubMessage(); |
997 | 970 |
998 PubsubMessage.fromJson(core.Map _json) { | 971 PubsubMessage.fromJson(core.Map _json) { |
999 if (_json.containsKey("attributes")) { | 972 if (_json.containsKey("attributes")) { |
1000 attributes = _json["attributes"]; | 973 attributes = _json["attributes"]; |
1001 } | 974 } |
1002 if (_json.containsKey("data")) { | 975 if (_json.containsKey("data")) { |
(...skipping 13 matching lines...) Expand all Loading... |
1016 _json["data"] = data; | 989 _json["data"] = data; |
1017 } | 990 } |
1018 if (messageId != null) { | 991 if (messageId != null) { |
1019 _json["messageId"] = messageId; | 992 _json["messageId"] = messageId; |
1020 } | 993 } |
1021 return _json; | 994 return _json; |
1022 } | 995 } |
1023 } | 996 } |
1024 | 997 |
1025 | 998 |
1026 /** Not documented yet. */ | |
1027 class PullRequest { | 999 class PullRequest { |
1028 /** Not documented yet. */ | |
1029 core.int maxMessages; | 1000 core.int maxMessages; |
1030 | 1001 |
1031 /** Not documented yet. */ | |
1032 core.bool returnImmediately; | 1002 core.bool returnImmediately; |
1033 | 1003 |
1034 | 1004 |
1035 PullRequest(); | 1005 PullRequest(); |
1036 | 1006 |
1037 PullRequest.fromJson(core.Map _json) { | 1007 PullRequest.fromJson(core.Map _json) { |
1038 if (_json.containsKey("maxMessages")) { | 1008 if (_json.containsKey("maxMessages")) { |
1039 maxMessages = _json["maxMessages"]; | 1009 maxMessages = _json["maxMessages"]; |
1040 } | 1010 } |
1041 if (_json.containsKey("returnImmediately")) { | 1011 if (_json.containsKey("returnImmediately")) { |
1042 returnImmediately = _json["returnImmediately"]; | 1012 returnImmediately = _json["returnImmediately"]; |
1043 } | 1013 } |
1044 } | 1014 } |
1045 | 1015 |
1046 core.Map toJson() { | 1016 core.Map toJson() { |
1047 var _json = new core.Map(); | 1017 var _json = new core.Map(); |
1048 if (maxMessages != null) { | 1018 if (maxMessages != null) { |
1049 _json["maxMessages"] = maxMessages; | 1019 _json["maxMessages"] = maxMessages; |
1050 } | 1020 } |
1051 if (returnImmediately != null) { | 1021 if (returnImmediately != null) { |
1052 _json["returnImmediately"] = returnImmediately; | 1022 _json["returnImmediately"] = returnImmediately; |
1053 } | 1023 } |
1054 return _json; | 1024 return _json; |
1055 } | 1025 } |
1056 } | 1026 } |
1057 | 1027 |
1058 | 1028 |
1059 /** Not documented yet. */ | |
1060 class PullResponse { | 1029 class PullResponse { |
1061 /** Not documented yet. */ | |
1062 core.List<ReceivedMessage> receivedMessages; | 1030 core.List<ReceivedMessage> receivedMessages; |
1063 | 1031 |
1064 | 1032 |
1065 PullResponse(); | 1033 PullResponse(); |
1066 | 1034 |
1067 PullResponse.fromJson(core.Map _json) { | 1035 PullResponse.fromJson(core.Map _json) { |
1068 if (_json.containsKey("receivedMessages")) { | 1036 if (_json.containsKey("receivedMessages")) { |
1069 receivedMessages = _json["receivedMessages"].map((value) => new ReceivedMe
ssage.fromJson(value)).toList(); | 1037 receivedMessages = _json["receivedMessages"].map((value) => new ReceivedMe
ssage.fromJson(value)).toList(); |
1070 } | 1038 } |
1071 } | 1039 } |
1072 | 1040 |
1073 core.Map toJson() { | 1041 core.Map toJson() { |
1074 var _json = new core.Map(); | 1042 var _json = new core.Map(); |
1075 if (receivedMessages != null) { | 1043 if (receivedMessages != null) { |
1076 _json["receivedMessages"] = receivedMessages.map((value) => (value).toJson
()).toList(); | 1044 _json["receivedMessages"] = receivedMessages.map((value) => (value).toJson
()).toList(); |
1077 } | 1045 } |
1078 return _json; | 1046 return _json; |
1079 } | 1047 } |
1080 } | 1048 } |
1081 | 1049 |
1082 | 1050 |
1083 /** Not documented yet. */ | |
1084 class PushConfig { | 1051 class PushConfig { |
1085 /** Not documented yet. */ | |
1086 core.Map<core.String, core.String> attributes; | 1052 core.Map<core.String, core.String> attributes; |
1087 | 1053 |
1088 /** Not documented yet. */ | |
1089 core.String pushEndpoint; | 1054 core.String pushEndpoint; |
1090 | 1055 |
1091 | 1056 |
1092 PushConfig(); | 1057 PushConfig(); |
1093 | 1058 |
1094 PushConfig.fromJson(core.Map _json) { | 1059 PushConfig.fromJson(core.Map _json) { |
1095 if (_json.containsKey("attributes")) { | 1060 if (_json.containsKey("attributes")) { |
1096 attributes = _json["attributes"]; | 1061 attributes = _json["attributes"]; |
1097 } | 1062 } |
1098 if (_json.containsKey("pushEndpoint")) { | 1063 if (_json.containsKey("pushEndpoint")) { |
1099 pushEndpoint = _json["pushEndpoint"]; | 1064 pushEndpoint = _json["pushEndpoint"]; |
1100 } | 1065 } |
1101 } | 1066 } |
1102 | 1067 |
1103 core.Map toJson() { | 1068 core.Map toJson() { |
1104 var _json = new core.Map(); | 1069 var _json = new core.Map(); |
1105 if (attributes != null) { | 1070 if (attributes != null) { |
1106 _json["attributes"] = attributes; | 1071 _json["attributes"] = attributes; |
1107 } | 1072 } |
1108 if (pushEndpoint != null) { | 1073 if (pushEndpoint != null) { |
1109 _json["pushEndpoint"] = pushEndpoint; | 1074 _json["pushEndpoint"] = pushEndpoint; |
1110 } | 1075 } |
1111 return _json; | 1076 return _json; |
1112 } | 1077 } |
1113 } | 1078 } |
1114 | 1079 |
1115 | 1080 |
1116 /** Not documented yet. */ | |
1117 class ReceivedMessage { | 1081 class ReceivedMessage { |
1118 /** Not documented yet. */ | |
1119 core.String ackId; | 1082 core.String ackId; |
1120 | 1083 |
1121 /** Not documented yet. */ | |
1122 PubsubMessage message; | 1084 PubsubMessage message; |
1123 | 1085 |
1124 | 1086 |
1125 ReceivedMessage(); | 1087 ReceivedMessage(); |
1126 | 1088 |
1127 ReceivedMessage.fromJson(core.Map _json) { | 1089 ReceivedMessage.fromJson(core.Map _json) { |
1128 if (_json.containsKey("ackId")) { | 1090 if (_json.containsKey("ackId")) { |
1129 ackId = _json["ackId"]; | 1091 ackId = _json["ackId"]; |
1130 } | 1092 } |
1131 if (_json.containsKey("message")) { | 1093 if (_json.containsKey("message")) { |
1132 message = new PubsubMessage.fromJson(_json["message"]); | 1094 message = new PubsubMessage.fromJson(_json["message"]); |
1133 } | 1095 } |
1134 } | 1096 } |
1135 | 1097 |
1136 core.Map toJson() { | 1098 core.Map toJson() { |
1137 var _json = new core.Map(); | 1099 var _json = new core.Map(); |
1138 if (ackId != null) { | 1100 if (ackId != null) { |
1139 _json["ackId"] = ackId; | 1101 _json["ackId"] = ackId; |
1140 } | 1102 } |
1141 if (message != null) { | 1103 if (message != null) { |
1142 _json["message"] = (message).toJson(); | 1104 _json["message"] = (message).toJson(); |
1143 } | 1105 } |
1144 return _json; | 1106 return _json; |
1145 } | 1107 } |
1146 } | 1108 } |
1147 | 1109 |
1148 | 1110 |
1149 /** Not documented yet. */ | |
1150 class Subscription { | 1111 class Subscription { |
1151 /** Not documented yet. */ | |
1152 core.int ackDeadlineSeconds; | 1112 core.int ackDeadlineSeconds; |
1153 | 1113 |
1154 /** Not documented yet. */ | |
1155 core.String name; | 1114 core.String name; |
1156 | 1115 |
1157 /** Not documented yet. */ | |
1158 PushConfig pushConfig; | 1116 PushConfig pushConfig; |
1159 | 1117 |
1160 /** Not documented yet. */ | |
1161 core.String topic; | 1118 core.String topic; |
1162 | 1119 |
1163 | 1120 |
1164 Subscription(); | 1121 Subscription(); |
1165 | 1122 |
1166 Subscription.fromJson(core.Map _json) { | 1123 Subscription.fromJson(core.Map _json) { |
1167 if (_json.containsKey("ackDeadlineSeconds")) { | 1124 if (_json.containsKey("ackDeadlineSeconds")) { |
1168 ackDeadlineSeconds = _json["ackDeadlineSeconds"]; | 1125 ackDeadlineSeconds = _json["ackDeadlineSeconds"]; |
1169 } | 1126 } |
1170 if (_json.containsKey("name")) { | 1127 if (_json.containsKey("name")) { |
(...skipping 19 matching lines...) Expand all Loading... |
1190 _json["pushConfig"] = (pushConfig).toJson(); | 1147 _json["pushConfig"] = (pushConfig).toJson(); |
1191 } | 1148 } |
1192 if (topic != null) { | 1149 if (topic != null) { |
1193 _json["topic"] = topic; | 1150 _json["topic"] = topic; |
1194 } | 1151 } |
1195 return _json; | 1152 return _json; |
1196 } | 1153 } |
1197 } | 1154 } |
1198 | 1155 |
1199 | 1156 |
1200 /** Not documented yet. */ | |
1201 class Topic { | 1157 class Topic { |
1202 /** Not documented yet. */ | |
1203 core.String name; | 1158 core.String name; |
1204 | 1159 |
1205 | 1160 |
1206 Topic(); | 1161 Topic(); |
1207 | 1162 |
1208 Topic.fromJson(core.Map _json) { | 1163 Topic.fromJson(core.Map _json) { |
1209 if (_json.containsKey("name")) { | 1164 if (_json.containsKey("name")) { |
1210 name = _json["name"]; | 1165 name = _json["name"]; |
1211 } | 1166 } |
1212 } | 1167 } |
1213 | 1168 |
1214 core.Map toJson() { | 1169 core.Map toJson() { |
1215 var _json = new core.Map(); | 1170 var _json = new core.Map(); |
1216 if (name != null) { | 1171 if (name != null) { |
1217 _json["name"] = name; | 1172 _json["name"] = name; |
1218 } | 1173 } |
1219 return _json; | 1174 return _json; |
1220 } | 1175 } |
1221 } | 1176 } |
1222 | |
1223 | |
OLD | NEW |