Chromium Code Reviews

Side by Side Diff: generated/googleapis_beta/lib/pubsub/v1beta2.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis_beta.pubsub.v1beta2; 3 library googleapis_beta.pubsub.v1beta2;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
11 11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
13 ApiRequestError, DetailedApiRequestError; 13 show ApiRequestError, DetailedApiRequestError;
14 14
15 const core.String USER_AGENT = 'dart-api-client pubsub/v1beta2'; 15 const core.String USER_AGENT = 'dart-api-client pubsub/v1beta2';
16 16
17 /** 17 /// Provides reliable, many-to-many, asynchronous messaging between
18 * Provides reliable, many-to-many, asynchronous messaging between applications. 18 /// applications.
19 */
20 class PubsubApi { 19 class PubsubApi {
21 /** View and manage your data across Google Cloud Platform services */ 20 /// View and manage your data across Google Cloud Platform services
22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 21 static const CloudPlatformScope =
22 "https://www.googleapis.com/auth/cloud-platform";
23 23
24 /** View and manage Pub/Sub topics and subscriptions */ 24 /// View and manage Pub/Sub topics and subscriptions
25 static const PubsubScope = "https://www.googleapis.com/auth/pubsub"; 25 static const PubsubScope = "https://www.googleapis.com/auth/pubsub";
26 26
27
28 final commons.ApiRequester _requester; 27 final commons.ApiRequester _requester;
29 28
30 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); 29 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
31 30
32 PubsubApi(http.Client client, {core.String rootUrl: "https://pubsub.googleapis .com/", core.String servicePath: ""}) : 31 PubsubApi(http.Client client,
33 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 32 {core.String rootUrl: "https://pubsub.googleapis.com/",
33 core.String servicePath: ""})
34 : _requester =
35 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
34 } 36 }
35 37
36
37 class ProjectsResourceApi { 38 class ProjectsResourceApi {
38 final commons.ApiRequester _requester; 39 final commons.ApiRequester _requester;
39 40
40 ProjectsSubscriptionsResourceApi get subscriptions => new ProjectsSubscription sResourceApi(_requester); 41 ProjectsSubscriptionsResourceApi get subscriptions =>
41 ProjectsTopicsResourceApi get topics => new ProjectsTopicsResourceApi(_request er); 42 new ProjectsSubscriptionsResourceApi(_requester);
43 ProjectsTopicsResourceApi get topics =>
44 new ProjectsTopicsResourceApi(_requester);
42 45
43 ProjectsResourceApi(commons.ApiRequester client) : 46 ProjectsResourceApi(commons.ApiRequester client) : _requester = client;
44 _requester = client;
45 } 47 }
46 48
47
48 class ProjectsSubscriptionsResourceApi { 49 class ProjectsSubscriptionsResourceApi {
49 final commons.ApiRequester _requester; 50 final commons.ApiRequester _requester;
50 51
51 ProjectsSubscriptionsResourceApi(commons.ApiRequester client) : 52 ProjectsSubscriptionsResourceApi(commons.ApiRequester client)
52 _requester = client; 53 : _requester = client;
53 54
54 /** 55 /// Acknowledges the messages associated with the `ack_ids` in the
55 * Acknowledges the messages associated with the `ack_ids` in the 56 /// `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
56 * `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages 57 /// from the subscription.
57 * from the subscription. 58 ///
58 * 59 /// Acknowledging a message whose ack deadline has expired may succeed,
59 * Acknowledging a message whose ack deadline has expired may succeed, 60 /// but such a message may be redelivered later. Acknowledging a message more
60 * but such a message may be redelivered later. Acknowledging a message more 61 /// than once will not result in an error.
61 * than once will not result in an error. 62 ///
62 * 63 /// [request] - The metadata request object.
63 * [request] - The metadata request object. 64 ///
64 * 65 /// Request parameters:
65 * Request parameters: 66 ///
66 * 67 /// [subscription] - The subscription whose message is being acknowledged.
67 * [subscription] - The subscription whose message is being acknowledged. 68 /// Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$".
68 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". 69 ///
69 * 70 /// Completes with a [Empty].
70 * Completes with a [Empty]. 71 ///
71 * 72 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
72 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 73 /// an error.
73 * error. 74 ///
74 * 75 /// If the used [http.Client] completes with an error when making a REST
75 * If the used [http.Client] completes with an error when making a REST call, 76 /// call, this method will complete with the same error.
76 * this method will complete with the same error. 77 async.Future<Empty> acknowledge(
77 */ 78 AcknowledgeRequest request, core.String subscription) {
78 async.Future<Empty> acknowledge(AcknowledgeRequest request, core.String subscr iption) {
79 var _url = null; 79 var _url = null;
80 var _queryParams = new core.Map(); 80 var _queryParams = new core.Map();
81 var _uploadMedia = null; 81 var _uploadMedia = null;
82 var _uploadOptions = null; 82 var _uploadOptions = null;
83 var _downloadOptions = commons.DownloadOptions.Metadata; 83 var _downloadOptions = commons.DownloadOptions.Metadata;
84 var _body = null; 84 var _body = null;
85 85
86 if (request != null) { 86 if (request != null) {
87 _body = convert.JSON.encode((request).toJson()); 87 _body = convert.JSON.encode((request).toJson());
88 } 88 }
89 if (subscription == null) { 89 if (subscription == null) {
90 throw new core.ArgumentError("Parameter subscription is required."); 90 throw new core.ArgumentError("Parameter subscription is required.");
91 } 91 }
92 92
93 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription') + ':acknowledge'; 93 _url = 'v1beta2/' +
94 commons.Escaper.ecapeVariableReserved('$subscription') +
95 ':acknowledge';
94 96
95 var _response = _requester.request(_url, 97 var _response = _requester.request(_url, "POST",
96 "POST", 98 body: _body,
97 body: _body, 99 queryParams: _queryParams,
98 queryParams: _queryParams, 100 uploadOptions: _uploadOptions,
99 uploadOptions: _uploadOptions, 101 uploadMedia: _uploadMedia,
100 uploadMedia: _uploadMedia, 102 downloadOptions: _downloadOptions);
101 downloadOptions: _downloadOptions);
102 return _response.then((data) => new Empty.fromJson(data)); 103 return _response.then((data) => new Empty.fromJson(data));
103 } 104 }
104 105
105 /** 106 /// Creates a subscription to a given topic.
106 * Creates a subscription to a given topic. 107 /// If the subscription already exists, returns `ALREADY_EXISTS`.
107 * If the subscription already exists, returns `ALREADY_EXISTS`. 108 /// If the corresponding topic doesn't exist, returns `NOT_FOUND`.
108 * If the corresponding topic doesn't exist, returns `NOT_FOUND`. 109 ///
109 * 110 /// If the name is not provided in the request, the server will assign a
110 * If the name is not provided in the request, the server will assign a random 111 /// random
111 * name for this subscription on the same project as the topic. Note that 112 /// name for this subscription on the same project as the topic. Note that
112 * for REST API requests, you must specify a name. 113 /// for REST API requests, you must specify a name.
113 * 114 ///
114 * [request] - The metadata request object. 115 /// [request] - The metadata request object.
115 * 116 ///
116 * Request parameters: 117 /// Request parameters:
117 * 118 ///
118 * [name] - The name of the subscription. It must have the format 119 /// [name] - The name of the subscription. It must have the format
119 * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must 120 /// `"projects/{project}/subscriptions/{subscription}"`. `{subscription}`
120 * start with a letter, and contain only letters (`[A-Za-z]`), numbers 121 /// must
121 * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), 122 /// start with a letter, and contain only letters (`[A-Za-z]`), numbers
122 * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters 123 /// (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
123 * in length, and it must not start with `"goog"`. 124 /// plus (`+`) or percent signs (`%`). It must be between 3 and 255
124 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". 125 /// characters
125 * 126 /// in length, and it must not start with `"goog"`.
126 * Completes with a [Subscription]. 127 /// Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$".
127 * 128 ///
128 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 129 /// Completes with a [Subscription].
129 * error. 130 ///
130 * 131 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
131 * If the used [http.Client] completes with an error when making a REST call, 132 /// an error.
132 * this method will complete with the same error. 133 ///
133 */ 134 /// If the used [http.Client] completes with an error when making a REST
135 /// call, this method will complete with the same error.
134 async.Future<Subscription> create(Subscription request, core.String name) { 136 async.Future<Subscription> create(Subscription request, core.String name) {
135 var _url = null; 137 var _url = null;
136 var _queryParams = new core.Map(); 138 var _queryParams = new core.Map();
137 var _uploadMedia = null; 139 var _uploadMedia = null;
138 var _uploadOptions = null; 140 var _uploadOptions = null;
139 var _downloadOptions = commons.DownloadOptions.Metadata; 141 var _downloadOptions = commons.DownloadOptions.Metadata;
140 var _body = null; 142 var _body = null;
141 143
142 if (request != null) { 144 if (request != null) {
143 _body = convert.JSON.encode((request).toJson()); 145 _body = convert.JSON.encode((request).toJson());
144 } 146 }
145 if (name == null) { 147 if (name == null) {
146 throw new core.ArgumentError("Parameter name is required."); 148 throw new core.ArgumentError("Parameter name is required.");
147 } 149 }
148 150
149 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$name'); 151 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$name');
150 152
151 var _response = _requester.request(_url, 153 var _response = _requester.request(_url, "PUT",
152 "PUT", 154 body: _body,
153 body: _body, 155 queryParams: _queryParams,
154 queryParams: _queryParams, 156 uploadOptions: _uploadOptions,
155 uploadOptions: _uploadOptions, 157 uploadMedia: _uploadMedia,
156 uploadMedia: _uploadMedia, 158 downloadOptions: _downloadOptions);
157 downloadOptions: _downloadOptions);
158 return _response.then((data) => new Subscription.fromJson(data)); 159 return _response.then((data) => new Subscription.fromJson(data));
159 } 160 }
160 161
161 /** 162 /// Deletes an existing subscription. All pending messages in the
162 * Deletes an existing subscription. All pending messages in the subscription 163 /// subscription
163 * are immediately dropped. Calls to `Pull` after deletion will return 164 /// are immediately dropped. Calls to `Pull` after deletion will return
164 * `NOT_FOUND`. After a subscription is deleted, a new one may be created with 165 /// `NOT_FOUND`. After a subscription is deleted, a new one may be created
165 * the same name, but the new one has no association with the old 166 /// with
166 * subscription, or its topic unless the same topic is specified. 167 /// the same name, but the new one has no association with the old
167 * 168 /// subscription, or its topic unless the same topic is specified.
168 * Request parameters: 169 ///
169 * 170 /// Request parameters:
170 * [subscription] - The subscription to delete. 171 ///
171 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". 172 /// [subscription] - The subscription to delete.
172 * 173 /// Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$".
173 * Completes with a [Empty]. 174 ///
174 * 175 /// Completes with a [Empty].
175 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 176 ///
176 * error. 177 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
177 * 178 /// an error.
178 * If the used [http.Client] completes with an error when making a REST call, 179 ///
179 * this method will complete with the same error. 180 /// If the used [http.Client] completes with an error when making a REST
180 */ 181 /// call, this method will complete with the same error.
181 async.Future<Empty> delete(core.String subscription) { 182 async.Future<Empty> delete(core.String subscription) {
182 var _url = null; 183 var _url = null;
183 var _queryParams = new core.Map(); 184 var _queryParams = new core.Map();
184 var _uploadMedia = null; 185 var _uploadMedia = null;
185 var _uploadOptions = null; 186 var _uploadOptions = null;
186 var _downloadOptions = commons.DownloadOptions.Metadata; 187 var _downloadOptions = commons.DownloadOptions.Metadata;
187 var _body = null; 188 var _body = null;
188 189
189 if (subscription == null) { 190 if (subscription == null) {
190 throw new core.ArgumentError("Parameter subscription is required."); 191 throw new core.ArgumentError("Parameter subscription is required.");
191 } 192 }
192 193
193 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription'); 194 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription');
194 195
195 var _response = _requester.request(_url, 196 var _response = _requester.request(_url, "DELETE",
196 "DELETE", 197 body: _body,
197 body: _body, 198 queryParams: _queryParams,
198 queryParams: _queryParams, 199 uploadOptions: _uploadOptions,
199 uploadOptions: _uploadOptions, 200 uploadMedia: _uploadMedia,
200 uploadMedia: _uploadMedia, 201 downloadOptions: _downloadOptions);
201 downloadOptions: _downloadOptions);
202 return _response.then((data) => new Empty.fromJson(data)); 202 return _response.then((data) => new Empty.fromJson(data));
203 } 203 }
204 204
205 /** 205 /// Gets the configuration details of a subscription.
206 * Gets the configuration details of a subscription. 206 ///
207 * 207 /// Request parameters:
208 * Request parameters: 208 ///
209 * 209 /// [subscription] - The name of the subscription to get.
210 * [subscription] - The name of the subscription to get. 210 /// Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$".
211 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". 211 ///
212 * 212 /// Completes with a [Subscription].
213 * Completes with a [Subscription]. 213 ///
214 * 214 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
215 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 215 /// an error.
216 * error. 216 ///
217 * 217 /// If the used [http.Client] completes with an error when making a REST
218 * If the used [http.Client] completes with an error when making a REST call, 218 /// call, this method will complete with the same error.
219 * this method will complete with the same error.
220 */
221 async.Future<Subscription> get(core.String subscription) { 219 async.Future<Subscription> get(core.String subscription) {
222 var _url = null; 220 var _url = null;
223 var _queryParams = new core.Map(); 221 var _queryParams = new core.Map();
224 var _uploadMedia = null; 222 var _uploadMedia = null;
225 var _uploadOptions = null; 223 var _uploadOptions = null;
226 var _downloadOptions = commons.DownloadOptions.Metadata; 224 var _downloadOptions = commons.DownloadOptions.Metadata;
227 var _body = null; 225 var _body = null;
228 226
229 if (subscription == null) { 227 if (subscription == null) {
230 throw new core.ArgumentError("Parameter subscription is required."); 228 throw new core.ArgumentError("Parameter subscription is required.");
231 } 229 }
232 230
233 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription'); 231 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription');
234 232
235 var _response = _requester.request(_url, 233 var _response = _requester.request(_url, "GET",
236 "GET", 234 body: _body,
237 body: _body, 235 queryParams: _queryParams,
238 queryParams: _queryParams, 236 uploadOptions: _uploadOptions,
239 uploadOptions: _uploadOptions, 237 uploadMedia: _uploadMedia,
240 uploadMedia: _uploadMedia, 238 downloadOptions: _downloadOptions);
241 downloadOptions: _downloadOptions);
242 return _response.then((data) => new Subscription.fromJson(data)); 239 return _response.then((data) => new Subscription.fromJson(data));
243 } 240 }
244 241
245 /** 242 /// Gets the access control policy for a resource.
246 * Gets the access control policy for a resource. 243 /// Returns an empty policy if the resource exists and does not have a policy
247 * Returns an empty policy if the resource exists and does not have a policy 244 /// set.
248 * set. 245 ///
249 * 246 /// Request parameters:
250 * Request parameters: 247 ///
251 * 248 /// [resource] - REQUIRED: The resource for which the policy is being
252 * [resource] - REQUIRED: The resource for which the policy is being 249 /// requested.
253 * requested. 250 /// See the operation documentation for the appropriate value for this field.
254 * See the operation documentation for the appropriate value for this field. 251 /// Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$".
255 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". 252 ///
256 * 253 /// Completes with a [Policy].
257 * Completes with a [Policy]. 254 ///
258 * 255 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
259 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 256 /// an error.
260 * error. 257 ///
261 * 258 /// If the used [http.Client] completes with an error when making a REST
262 * If the used [http.Client] completes with an error when making a REST call, 259 /// call, this method will complete with the same error.
263 * this method will complete with the same error.
264 */
265 async.Future<Policy> getIamPolicy(core.String resource) { 260 async.Future<Policy> getIamPolicy(core.String resource) {
266 var _url = null; 261 var _url = null;
267 var _queryParams = new core.Map(); 262 var _queryParams = new core.Map();
268 var _uploadMedia = null; 263 var _uploadMedia = null;
269 var _uploadOptions = null; 264 var _uploadOptions = null;
270 var _downloadOptions = commons.DownloadOptions.Metadata; 265 var _downloadOptions = commons.DownloadOptions.Metadata;
271 var _body = null; 266 var _body = null;
272 267
273 if (resource == null) { 268 if (resource == null) {
274 throw new core.ArgumentError("Parameter resource is required."); 269 throw new core.ArgumentError("Parameter resource is required.");
275 } 270 }
276 271
277 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g etIamPolicy'; 272 _url = 'v1beta2/' +
273 commons.Escaper.ecapeVariableReserved('$resource') +
274 ':getIamPolicy';
278 275
279 var _response = _requester.request(_url, 276 var _response = _requester.request(_url, "GET",
280 "GET", 277 body: _body,
281 body: _body, 278 queryParams: _queryParams,
282 queryParams: _queryParams, 279 uploadOptions: _uploadOptions,
283 uploadOptions: _uploadOptions, 280 uploadMedia: _uploadMedia,
284 uploadMedia: _uploadMedia, 281 downloadOptions: _downloadOptions);
285 downloadOptions: _downloadOptions);
286 return _response.then((data) => new Policy.fromJson(data)); 282 return _response.then((data) => new Policy.fromJson(data));
287 } 283 }
288 284
289 /** 285 /// Lists matching subscriptions.
290 * Lists matching subscriptions. 286 ///
291 * 287 /// Request parameters:
292 * Request parameters: 288 ///
293 * 289 /// [project] - The name of the cloud project that subscriptions belong to.
294 * [project] - The name of the cloud project that subscriptions belong to. 290 /// Value must have pattern "^projects/[^/]+$".
295 * Value must have pattern "^projects/[^/]+$". 291 ///
296 * 292 /// [pageToken] - The value returned by the last `ListSubscriptionsResponse`;
297 * [pageToken] - The value returned by the last `ListSubscriptionsResponse`; 293 /// indicates that
298 * indicates that 294 /// this is a continuation of a prior `ListSubscriptions` call, and that the
299 * this is a continuation of a prior `ListSubscriptions` call, and that the 295 /// system should return the next page of data.
300 * system should return the next page of data. 296 ///
301 * 297 /// [pageSize] - Maximum number of subscriptions to return.
302 * [pageSize] - Maximum number of subscriptions to return. 298 ///
303 * 299 /// Completes with a [ListSubscriptionsResponse].
304 * Completes with a [ListSubscriptionsResponse]. 300 ///
305 * 301 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
306 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 302 /// an error.
307 * error. 303 ///
308 * 304 /// If the used [http.Client] completes with an error when making a REST
309 * If the used [http.Client] completes with an error when making a REST call, 305 /// call, this method will complete with the same error.
310 * this method will complete with the same error. 306 async.Future<ListSubscriptionsResponse> list(core.String project,
311 */ 307 {core.String pageToken, core.int pageSize}) {
312 async.Future<ListSubscriptionsResponse> list(core.String project, {core.String pageToken, core.int pageSize}) {
313 var _url = null; 308 var _url = null;
314 var _queryParams = new core.Map(); 309 var _queryParams = new core.Map();
315 var _uploadMedia = null; 310 var _uploadMedia = null;
316 var _uploadOptions = null; 311 var _uploadOptions = null;
317 var _downloadOptions = commons.DownloadOptions.Metadata; 312 var _downloadOptions = commons.DownloadOptions.Metadata;
318 var _body = null; 313 var _body = null;
319 314
320 if (project == null) { 315 if (project == null) {
321 throw new core.ArgumentError("Parameter project is required."); 316 throw new core.ArgumentError("Parameter project is required.");
322 } 317 }
323 if (pageToken != null) { 318 if (pageToken != null) {
324 _queryParams["pageToken"] = [pageToken]; 319 _queryParams["pageToken"] = [pageToken];
325 } 320 }
326 if (pageSize != null) { 321 if (pageSize != null) {
327 _queryParams["pageSize"] = ["${pageSize}"]; 322 _queryParams["pageSize"] = ["${pageSize}"];
328 } 323 }
329 324
330 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$project') + '/su bscriptions'; 325 _url = 'v1beta2/' +
326 commons.Escaper.ecapeVariableReserved('$project') +
327 '/subscriptions';
331 328
332 var _response = _requester.request(_url, 329 var _response = _requester.request(_url, "GET",
333 "GET", 330 body: _body,
334 body: _body, 331 queryParams: _queryParams,
335 queryParams: _queryParams, 332 uploadOptions: _uploadOptions,
336 uploadOptions: _uploadOptions, 333 uploadMedia: _uploadMedia,
337 uploadMedia: _uploadMedia, 334 downloadOptions: _downloadOptions);
338 downloadOptions: _downloadOptions); 335 return _response
339 return _response.then((data) => new ListSubscriptionsResponse.fromJson(data) ); 336 .then((data) => new ListSubscriptionsResponse.fromJson(data));
340 } 337 }
341 338
342 /** 339 /// Modifies the ack deadline for a specific message. This method is useful
343 * Modifies the ack deadline for a specific message. This method is useful 340 /// to indicate that more time is needed to process a message by the
344 * to indicate that more time is needed to process a message by the 341 /// subscriber, or to make the message available for redelivery if the
345 * subscriber, or to make the message available for redelivery if the 342 /// processing was interrupted. Note that this does not modify the
346 * processing was interrupted. Note that this does not modify the 343 /// subscription-level `ackDeadlineSeconds` used for subsequent messages.
347 * subscription-level `ackDeadlineSeconds` used for subsequent messages. 344 ///
348 * 345 /// [request] - The metadata request object.
349 * [request] - The metadata request object. 346 ///
350 * 347 /// Request parameters:
351 * Request parameters: 348 ///
352 * 349 /// [subscription] - The name of the subscription.
353 * [subscription] - The name of the subscription. 350 /// Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$".
354 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". 351 ///
355 * 352 /// Completes with a [Empty].
356 * Completes with a [Empty]. 353 ///
357 * 354 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
358 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 355 /// an error.
359 * error. 356 ///
360 * 357 /// If the used [http.Client] completes with an error when making a REST
361 * If the used [http.Client] completes with an error when making a REST call, 358 /// call, this method will complete with the same error.
362 * this method will complete with the same error. 359 async.Future<Empty> modifyAckDeadline(
363 */ 360 ModifyAckDeadlineRequest request, core.String subscription) {
364 async.Future<Empty> modifyAckDeadline(ModifyAckDeadlineRequest request, core.S tring subscription) {
365 var _url = null; 361 var _url = null;
366 var _queryParams = new core.Map(); 362 var _queryParams = new core.Map();
367 var _uploadMedia = null; 363 var _uploadMedia = null;
368 var _uploadOptions = null; 364 var _uploadOptions = null;
369 var _downloadOptions = commons.DownloadOptions.Metadata; 365 var _downloadOptions = commons.DownloadOptions.Metadata;
370 var _body = null; 366 var _body = null;
371 367
372 if (request != null) { 368 if (request != null) {
373 _body = convert.JSON.encode((request).toJson()); 369 _body = convert.JSON.encode((request).toJson());
374 } 370 }
375 if (subscription == null) { 371 if (subscription == null) {
376 throw new core.ArgumentError("Parameter subscription is required."); 372 throw new core.ArgumentError("Parameter subscription is required.");
377 } 373 }
378 374
379 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription') + ':modifyAckDeadline'; 375 _url = 'v1beta2/' +
376 commons.Escaper.ecapeVariableReserved('$subscription') +
377 ':modifyAckDeadline';
380 378
381 var _response = _requester.request(_url, 379 var _response = _requester.request(_url, "POST",
382 "POST", 380 body: _body,
383 body: _body, 381 queryParams: _queryParams,
384 queryParams: _queryParams, 382 uploadOptions: _uploadOptions,
385 uploadOptions: _uploadOptions, 383 uploadMedia: _uploadMedia,
386 uploadMedia: _uploadMedia, 384 downloadOptions: _downloadOptions);
387 downloadOptions: _downloadOptions);
388 return _response.then((data) => new Empty.fromJson(data)); 385 return _response.then((data) => new Empty.fromJson(data));
389 } 386 }
390 387
391 /** 388 /// Modifies the `PushConfig` for a specified subscription.
392 * Modifies the `PushConfig` for a specified subscription. 389 ///
393 * 390 /// This may be used to change a push subscription to a pull one (signified
394 * This may be used to change a push subscription to a pull one (signified by 391 /// by
395 * an empty `PushConfig`) or vice versa, or change the endpoint URL and other 392 /// an empty `PushConfig`) or vice versa, or change the endpoint URL and
396 * attributes of a push subscription. Messages will accumulate for delivery 393 /// other
397 * continuously through the call regardless of changes to the `PushConfig`. 394 /// attributes of a push subscription. Messages will accumulate for delivery
398 * 395 /// continuously through the call regardless of changes to the `PushConfig`.
399 * [request] - The metadata request object. 396 ///
400 * 397 /// [request] - The metadata request object.
401 * Request parameters: 398 ///
402 * 399 /// Request parameters:
403 * [subscription] - The name of the subscription. 400 ///
404 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". 401 /// [subscription] - The name of the subscription.
405 * 402 /// Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$".
406 * Completes with a [Empty]. 403 ///
407 * 404 /// Completes with a [Empty].
408 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 405 ///
409 * error. 406 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
410 * 407 /// an error.
411 * If the used [http.Client] completes with an error when making a REST call, 408 ///
412 * this method will complete with the same error. 409 /// If the used [http.Client] completes with an error when making a REST
413 */ 410 /// call, this method will complete with the same error.
414 async.Future<Empty> modifyPushConfig(ModifyPushConfigRequest request, core.Str ing subscription) { 411 async.Future<Empty> modifyPushConfig(
412 ModifyPushConfigRequest request, core.String subscription) {
415 var _url = null; 413 var _url = null;
416 var _queryParams = new core.Map(); 414 var _queryParams = new core.Map();
417 var _uploadMedia = null; 415 var _uploadMedia = null;
418 var _uploadOptions = null; 416 var _uploadOptions = null;
419 var _downloadOptions = commons.DownloadOptions.Metadata; 417 var _downloadOptions = commons.DownloadOptions.Metadata;
420 var _body = null; 418 var _body = null;
421 419
422 if (request != null) { 420 if (request != null) {
423 _body = convert.JSON.encode((request).toJson()); 421 _body = convert.JSON.encode((request).toJson());
424 } 422 }
425 if (subscription == null) { 423 if (subscription == null) {
426 throw new core.ArgumentError("Parameter subscription is required."); 424 throw new core.ArgumentError("Parameter subscription is required.");
427 } 425 }
428 426
429 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription') + ':modifyPushConfig'; 427 _url = 'v1beta2/' +
428 commons.Escaper.ecapeVariableReserved('$subscription') +
429 ':modifyPushConfig';
430 430
431 var _response = _requester.request(_url, 431 var _response = _requester.request(_url, "POST",
432 "POST", 432 body: _body,
433 body: _body, 433 queryParams: _queryParams,
434 queryParams: _queryParams, 434 uploadOptions: _uploadOptions,
435 uploadOptions: _uploadOptions, 435 uploadMedia: _uploadMedia,
436 uploadMedia: _uploadMedia, 436 downloadOptions: _downloadOptions);
437 downloadOptions: _downloadOptions);
438 return _response.then((data) => new Empty.fromJson(data)); 437 return _response.then((data) => new Empty.fromJson(data));
439 } 438 }
440 439
441 /** 440 /// Pulls messages from the server. Returns an empty list if there are no
442 * Pulls messages from the server. Returns an empty list if there are no 441 /// messages available in the backlog. The server may return `UNAVAILABLE` if
443 * messages available in the backlog. The server may return `UNAVAILABLE` if 442 /// there are too many concurrent pull requests pending for the given
444 * there are too many concurrent pull requests pending for the given 443 /// subscription.
445 * subscription. 444 ///
446 * 445 /// [request] - The metadata request object.
447 * [request] - The metadata request object. 446 ///
448 * 447 /// Request parameters:
449 * Request parameters: 448 ///
450 * 449 /// [subscription] - The subscription from which messages should be pulled.
451 * [subscription] - The subscription from which messages should be pulled. 450 /// Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$".
452 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". 451 ///
453 * 452 /// Completes with a [PullResponse].
454 * Completes with a [PullResponse]. 453 ///
455 * 454 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
456 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 455 /// an error.
457 * error. 456 ///
458 * 457 /// If the used [http.Client] completes with an error when making a REST
459 * If the used [http.Client] completes with an error when making a REST call, 458 /// call, this method will complete with the same error.
460 * this method will complete with the same error. 459 async.Future<PullResponse> pull(
461 */ 460 PullRequest request, core.String subscription) {
462 async.Future<PullResponse> pull(PullRequest request, core.String subscription) {
463 var _url = null; 461 var _url = null;
464 var _queryParams = new core.Map(); 462 var _queryParams = new core.Map();
465 var _uploadMedia = null; 463 var _uploadMedia = null;
466 var _uploadOptions = null; 464 var _uploadOptions = null;
467 var _downloadOptions = commons.DownloadOptions.Metadata; 465 var _downloadOptions = commons.DownloadOptions.Metadata;
468 var _body = null; 466 var _body = null;
469 467
470 if (request != null) { 468 if (request != null) {
471 _body = convert.JSON.encode((request).toJson()); 469 _body = convert.JSON.encode((request).toJson());
472 } 470 }
473 if (subscription == null) { 471 if (subscription == null) {
474 throw new core.ArgumentError("Parameter subscription is required."); 472 throw new core.ArgumentError("Parameter subscription is required.");
475 } 473 }
476 474
477 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$subscription') + ':pull'; 475 _url = 'v1beta2/' +
476 commons.Escaper.ecapeVariableReserved('$subscription') +
477 ':pull';
478 478
479 var _response = _requester.request(_url, 479 var _response = _requester.request(_url, "POST",
480 "POST", 480 body: _body,
481 body: _body, 481 queryParams: _queryParams,
482 queryParams: _queryParams, 482 uploadOptions: _uploadOptions,
483 uploadOptions: _uploadOptions, 483 uploadMedia: _uploadMedia,
484 uploadMedia: _uploadMedia, 484 downloadOptions: _downloadOptions);
485 downloadOptions: _downloadOptions);
486 return _response.then((data) => new PullResponse.fromJson(data)); 485 return _response.then((data) => new PullResponse.fromJson(data));
487 } 486 }
488 487
489 /** 488 /// Sets the access control policy on the specified resource. Replaces any
490 * Sets the access control policy on the specified resource. Replaces any 489 /// existing policy.
491 * existing policy. 490 ///
492 * 491 /// [request] - The metadata request object.
493 * [request] - The metadata request object. 492 ///
494 * 493 /// Request parameters:
495 * Request parameters: 494 ///
496 * 495 /// [resource] - REQUIRED: The resource for which the policy is being
497 * [resource] - REQUIRED: The resource for which the policy is being 496 /// specified.
498 * specified. 497 /// See the operation documentation for the appropriate value for this field.
499 * See the operation documentation for the appropriate value for this field. 498 /// Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$".
500 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". 499 ///
501 * 500 /// Completes with a [Policy].
502 * Completes with a [Policy]. 501 ///
503 * 502 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
504 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 503 /// an error.
505 * error. 504 ///
506 * 505 /// If the used [http.Client] completes with an error when making a REST
507 * If the used [http.Client] completes with an error when making a REST call, 506 /// call, this method will complete with the same error.
508 * this method will complete with the same error. 507 async.Future<Policy> setIamPolicy(
509 */ 508 SetIamPolicyRequest request, core.String resource) {
510 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res ource) {
511 var _url = null; 509 var _url = null;
512 var _queryParams = new core.Map(); 510 var _queryParams = new core.Map();
513 var _uploadMedia = null; 511 var _uploadMedia = null;
514 var _uploadOptions = null; 512 var _uploadOptions = null;
515 var _downloadOptions = commons.DownloadOptions.Metadata; 513 var _downloadOptions = commons.DownloadOptions.Metadata;
516 var _body = null; 514 var _body = null;
517 515
518 if (request != null) { 516 if (request != null) {
519 _body = convert.JSON.encode((request).toJson()); 517 _body = convert.JSON.encode((request).toJson());
520 } 518 }
521 if (resource == null) { 519 if (resource == null) {
522 throw new core.ArgumentError("Parameter resource is required."); 520 throw new core.ArgumentError("Parameter resource is required.");
523 } 521 }
524 522
525 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':s etIamPolicy'; 523 _url = 'v1beta2/' +
524 commons.Escaper.ecapeVariableReserved('$resource') +
525 ':setIamPolicy';
526 526
527 var _response = _requester.request(_url, 527 var _response = _requester.request(_url, "POST",
528 "POST", 528 body: _body,
529 body: _body, 529 queryParams: _queryParams,
530 queryParams: _queryParams, 530 uploadOptions: _uploadOptions,
531 uploadOptions: _uploadOptions, 531 uploadMedia: _uploadMedia,
532 uploadMedia: _uploadMedia, 532 downloadOptions: _downloadOptions);
533 downloadOptions: _downloadOptions);
534 return _response.then((data) => new Policy.fromJson(data)); 533 return _response.then((data) => new Policy.fromJson(data));
535 } 534 }
536 535
537 /** 536 /// Returns permissions that a caller has on the specified resource.
538 * Returns permissions that a caller has on the specified resource. 537 /// If the resource does not exist, this will return an empty set of
539 * If the resource does not exist, this will return an empty set of 538 /// permissions, not a NOT_FOUND error.
540 * permissions, not a NOT_FOUND error. 539 ///
541 * 540 /// Note: This operation is designed to be used for building permission-aware
542 * Note: This operation is designed to be used for building permission-aware 541 /// UIs and command-line tools, not for authorization checking. This
543 * UIs and command-line tools, not for authorization checking. This operation 542 /// operation
544 * may "fail open" without warning. 543 /// may "fail open" without warning.
545 * 544 ///
546 * [request] - The metadata request object. 545 /// [request] - The metadata request object.
547 * 546 ///
548 * Request parameters: 547 /// Request parameters:
549 * 548 ///
550 * [resource] - REQUIRED: The resource for which the policy detail is being 549 /// [resource] - REQUIRED: The resource for which the policy detail is being
551 * requested. 550 /// requested.
552 * See the operation documentation for the appropriate value for this field. 551 /// See the operation documentation for the appropriate value for this field.
553 * Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$". 552 /// Value must have pattern "^projects/[^/]+/subscriptions/[^/]+$".
554 * 553 ///
555 * Completes with a [TestIamPermissionsResponse]. 554 /// Completes with a [TestIamPermissionsResponse].
556 * 555 ///
557 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 556 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
558 * error. 557 /// an error.
559 * 558 ///
560 * If the used [http.Client] completes with an error when making a REST call, 559 /// If the used [http.Client] completes with an error when making a REST
561 * this method will complete with the same error. 560 /// call, this method will complete with the same error.
562 */ 561 async.Future<TestIamPermissionsResponse> testIamPermissions(
563 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions Request request, core.String resource) { 562 TestIamPermissionsRequest request, core.String resource) {
564 var _url = null; 563 var _url = null;
565 var _queryParams = new core.Map(); 564 var _queryParams = new core.Map();
566 var _uploadMedia = null; 565 var _uploadMedia = null;
567 var _uploadOptions = null; 566 var _uploadOptions = null;
568 var _downloadOptions = commons.DownloadOptions.Metadata; 567 var _downloadOptions = commons.DownloadOptions.Metadata;
569 var _body = null; 568 var _body = null;
570 569
571 if (request != null) { 570 if (request != null) {
572 _body = convert.JSON.encode((request).toJson()); 571 _body = convert.JSON.encode((request).toJson());
573 } 572 }
574 if (resource == null) { 573 if (resource == null) {
575 throw new core.ArgumentError("Parameter resource is required."); 574 throw new core.ArgumentError("Parameter resource is required.");
576 } 575 }
577 576
578 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':t estIamPermissions'; 577 _url = 'v1beta2/' +
578 commons.Escaper.ecapeVariableReserved('$resource') +
579 ':testIamPermissions';
579 580
580 var _response = _requester.request(_url, 581 var _response = _requester.request(_url, "POST",
581 "POST", 582 body: _body,
582 body: _body, 583 queryParams: _queryParams,
583 queryParams: _queryParams, 584 uploadOptions: _uploadOptions,
584 uploadOptions: _uploadOptions, 585 uploadMedia: _uploadMedia,
585 uploadMedia: _uploadMedia, 586 downloadOptions: _downloadOptions);
586 downloadOptions: _downloadOptions); 587 return _response
587 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data )); 588 .then((data) => new TestIamPermissionsResponse.fromJson(data));
588 } 589 }
589
590 } 590 }
591 591
592
593 class ProjectsTopicsResourceApi { 592 class ProjectsTopicsResourceApi {
594 final commons.ApiRequester _requester; 593 final commons.ApiRequester _requester;
595 594
596 ProjectsTopicsSubscriptionsResourceApi get subscriptions => new ProjectsTopics SubscriptionsResourceApi(_requester); 595 ProjectsTopicsSubscriptionsResourceApi get subscriptions =>
596 new ProjectsTopicsSubscriptionsResourceApi(_requester);
597 597
598 ProjectsTopicsResourceApi(commons.ApiRequester client) : 598 ProjectsTopicsResourceApi(commons.ApiRequester client) : _requester = client;
599 _requester = client;
600 599
601 /** 600 /// Creates the given topic with the given name.
602 * Creates the given topic with the given name. 601 ///
603 * 602 /// [request] - The metadata request object.
604 * [request] - The metadata request object. 603 ///
605 * 604 /// Request parameters:
606 * Request parameters: 605 ///
607 * 606 /// [name] - The name of the topic. It must have the format
608 * [name] - The name of the topic. It must have the format 607 /// `"projects/{project}/topics/{topic}"`. `{topic}` must start with a
609 * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, 608 /// letter,
610 * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), 609 /// and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
611 * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent 610 /// underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
612 * signs (`%`). It must be between 3 and 255 characters in length, and it 611 /// signs (`%`). It must be between 3 and 255 characters in length, and it
613 * must not start with `"goog"`. 612 /// must not start with `"goog"`.
614 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". 613 /// Value must have pattern "^projects/[^/]+/topics/[^/]+$".
615 * 614 ///
616 * Completes with a [Topic]. 615 /// Completes with a [Topic].
617 * 616 ///
618 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 617 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
619 * error. 618 /// an error.
620 * 619 ///
621 * If the used [http.Client] completes with an error when making a REST call, 620 /// If the used [http.Client] completes with an error when making a REST
622 * this method will complete with the same error. 621 /// call, this method will complete with the same error.
623 */
624 async.Future<Topic> create(Topic request, core.String name) { 622 async.Future<Topic> create(Topic request, core.String name) {
625 var _url = null; 623 var _url = null;
626 var _queryParams = new core.Map(); 624 var _queryParams = new core.Map();
627 var _uploadMedia = null; 625 var _uploadMedia = null;
628 var _uploadOptions = null; 626 var _uploadOptions = null;
629 var _downloadOptions = commons.DownloadOptions.Metadata; 627 var _downloadOptions = commons.DownloadOptions.Metadata;
630 var _body = null; 628 var _body = null;
631 629
632 if (request != null) { 630 if (request != null) {
633 _body = convert.JSON.encode((request).toJson()); 631 _body = convert.JSON.encode((request).toJson());
634 } 632 }
635 if (name == null) { 633 if (name == null) {
636 throw new core.ArgumentError("Parameter name is required."); 634 throw new core.ArgumentError("Parameter name is required.");
637 } 635 }
638 636
639 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$name'); 637 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$name');
640 638
641 var _response = _requester.request(_url, 639 var _response = _requester.request(_url, "PUT",
642 "PUT", 640 body: _body,
643 body: _body, 641 queryParams: _queryParams,
644 queryParams: _queryParams, 642 uploadOptions: _uploadOptions,
645 uploadOptions: _uploadOptions, 643 uploadMedia: _uploadMedia,
646 uploadMedia: _uploadMedia, 644 downloadOptions: _downloadOptions);
647 downloadOptions: _downloadOptions);
648 return _response.then((data) => new Topic.fromJson(data)); 645 return _response.then((data) => new Topic.fromJson(data));
649 } 646 }
650 647
651 /** 648 /// Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
652 * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic 649 /// does not exist. After a topic is deleted, a new topic may be created with
653 * does not exist. After a topic is deleted, a new topic may be created with 650 /// the same name; this is an entirely new topic with none of the old
654 * the same name; this is an entirely new topic with none of the old 651 /// configuration or subscriptions. Existing subscriptions to this topic are
655 * configuration or subscriptions. Existing subscriptions to this topic are 652 /// not deleted, but their `topic` field is set to `_deleted-topic_`.
656 * not deleted, but their `topic` field is set to `_deleted-topic_`. 653 ///
657 * 654 /// Request parameters:
658 * Request parameters: 655 ///
659 * 656 /// [topic] - Name of the topic to delete.
660 * [topic] - Name of the topic to delete. 657 /// Value must have pattern "^projects/[^/]+/topics/[^/]+$".
661 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". 658 ///
662 * 659 /// Completes with a [Empty].
663 * Completes with a [Empty]. 660 ///
664 * 661 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
665 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 662 /// an error.
666 * error. 663 ///
667 * 664 /// If the used [http.Client] completes with an error when making a REST
668 * If the used [http.Client] completes with an error when making a REST call, 665 /// call, this method will complete with the same error.
669 * this method will complete with the same error.
670 */
671 async.Future<Empty> delete(core.String topic) { 666 async.Future<Empty> delete(core.String topic) {
672 var _url = null; 667 var _url = null;
673 var _queryParams = new core.Map(); 668 var _queryParams = new core.Map();
674 var _uploadMedia = null; 669 var _uploadMedia = null;
675 var _uploadOptions = null; 670 var _uploadOptions = null;
676 var _downloadOptions = commons.DownloadOptions.Metadata; 671 var _downloadOptions = commons.DownloadOptions.Metadata;
677 var _body = null; 672 var _body = null;
678 673
679 if (topic == null) { 674 if (topic == null) {
680 throw new core.ArgumentError("Parameter topic is required."); 675 throw new core.ArgumentError("Parameter topic is required.");
681 } 676 }
682 677
683 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic'); 678 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic');
684 679
685 var _response = _requester.request(_url, 680 var _response = _requester.request(_url, "DELETE",
686 "DELETE", 681 body: _body,
687 body: _body, 682 queryParams: _queryParams,
688 queryParams: _queryParams, 683 uploadOptions: _uploadOptions,
689 uploadOptions: _uploadOptions, 684 uploadMedia: _uploadMedia,
690 uploadMedia: _uploadMedia, 685 downloadOptions: _downloadOptions);
691 downloadOptions: _downloadOptions);
692 return _response.then((data) => new Empty.fromJson(data)); 686 return _response.then((data) => new Empty.fromJson(data));
693 } 687 }
694 688
695 /** 689 /// Gets the configuration of a topic.
696 * Gets the configuration of a topic. 690 ///
697 * 691 /// Request parameters:
698 * Request parameters: 692 ///
699 * 693 /// [topic] - The name of the topic to get.
700 * [topic] - The name of the topic to get. 694 /// Value must have pattern "^projects/[^/]+/topics/[^/]+$".
701 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". 695 ///
702 * 696 /// Completes with a [Topic].
703 * Completes with a [Topic]. 697 ///
704 * 698 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
705 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 699 /// an error.
706 * error. 700 ///
707 * 701 /// If the used [http.Client] completes with an error when making a REST
708 * If the used [http.Client] completes with an error when making a REST call, 702 /// call, this method will complete with the same error.
709 * this method will complete with the same error.
710 */
711 async.Future<Topic> get(core.String topic) { 703 async.Future<Topic> get(core.String topic) {
712 var _url = null; 704 var _url = null;
713 var _queryParams = new core.Map(); 705 var _queryParams = new core.Map();
714 var _uploadMedia = null; 706 var _uploadMedia = null;
715 var _uploadOptions = null; 707 var _uploadOptions = null;
716 var _downloadOptions = commons.DownloadOptions.Metadata; 708 var _downloadOptions = commons.DownloadOptions.Metadata;
717 var _body = null; 709 var _body = null;
718 710
719 if (topic == null) { 711 if (topic == null) {
720 throw new core.ArgumentError("Parameter topic is required."); 712 throw new core.ArgumentError("Parameter topic is required.");
721 } 713 }
722 714
723 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic'); 715 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic');
724 716
725 var _response = _requester.request(_url, 717 var _response = _requester.request(_url, "GET",
726 "GET", 718 body: _body,
727 body: _body, 719 queryParams: _queryParams,
728 queryParams: _queryParams, 720 uploadOptions: _uploadOptions,
729 uploadOptions: _uploadOptions, 721 uploadMedia: _uploadMedia,
730 uploadMedia: _uploadMedia, 722 downloadOptions: _downloadOptions);
731 downloadOptions: _downloadOptions);
732 return _response.then((data) => new Topic.fromJson(data)); 723 return _response.then((data) => new Topic.fromJson(data));
733 } 724 }
734 725
735 /** 726 /// Gets the access control policy for a resource.
736 * Gets the access control policy for a resource. 727 /// Returns an empty policy if the resource exists and does not have a policy
737 * Returns an empty policy if the resource exists and does not have a policy 728 /// set.
738 * set. 729 ///
739 * 730 /// Request parameters:
740 * Request parameters: 731 ///
741 * 732 /// [resource] - REQUIRED: The resource for which the policy is being
742 * [resource] - REQUIRED: The resource for which the policy is being 733 /// requested.
743 * requested. 734 /// See the operation documentation for the appropriate value for this field.
744 * See the operation documentation for the appropriate value for this field. 735 /// Value must have pattern "^projects/[^/]+/topics/[^/]+$".
745 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". 736 ///
746 * 737 /// Completes with a [Policy].
747 * Completes with a [Policy]. 738 ///
748 * 739 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
749 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 740 /// an error.
750 * error. 741 ///
751 * 742 /// If the used [http.Client] completes with an error when making a REST
752 * If the used [http.Client] completes with an error when making a REST call, 743 /// call, this method will complete with the same error.
753 * this method will complete with the same error.
754 */
755 async.Future<Policy> getIamPolicy(core.String resource) { 744 async.Future<Policy> getIamPolicy(core.String resource) {
756 var _url = null; 745 var _url = null;
757 var _queryParams = new core.Map(); 746 var _queryParams = new core.Map();
758 var _uploadMedia = null; 747 var _uploadMedia = null;
759 var _uploadOptions = null; 748 var _uploadOptions = null;
760 var _downloadOptions = commons.DownloadOptions.Metadata; 749 var _downloadOptions = commons.DownloadOptions.Metadata;
761 var _body = null; 750 var _body = null;
762 751
763 if (resource == null) { 752 if (resource == null) {
764 throw new core.ArgumentError("Parameter resource is required."); 753 throw new core.ArgumentError("Parameter resource is required.");
765 } 754 }
766 755
767 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g etIamPolicy'; 756 _url = 'v1beta2/' +
757 commons.Escaper.ecapeVariableReserved('$resource') +
758 ':getIamPolicy';
768 759
769 var _response = _requester.request(_url, 760 var _response = _requester.request(_url, "GET",
770 "GET", 761 body: _body,
771 body: _body, 762 queryParams: _queryParams,
772 queryParams: _queryParams, 763 uploadOptions: _uploadOptions,
773 uploadOptions: _uploadOptions, 764 uploadMedia: _uploadMedia,
774 uploadMedia: _uploadMedia, 765 downloadOptions: _downloadOptions);
775 downloadOptions: _downloadOptions);
776 return _response.then((data) => new Policy.fromJson(data)); 766 return _response.then((data) => new Policy.fromJson(data));
777 } 767 }
778 768
779 /** 769 /// Lists matching topics.
780 * Lists matching topics. 770 ///
781 * 771 /// Request parameters:
782 * Request parameters: 772 ///
783 * 773 /// [project] - The name of the cloud project that topics belong to.
784 * [project] - The name of the cloud project that topics belong to. 774 /// Value must have pattern "^projects/[^/]+$".
785 * Value must have pattern "^projects/[^/]+$". 775 ///
786 * 776 /// [pageToken] - The value returned by the last `ListTopicsResponse`;
787 * [pageToken] - The value returned by the last `ListTopicsResponse`; 777 /// indicates that this is
788 * indicates that this is 778 /// a continuation of a prior `ListTopics` call, and that the system should
789 * a continuation of a prior `ListTopics` call, and that the system should 779 /// return the next page of data.
790 * return the next page of data. 780 ///
791 * 781 /// [pageSize] - Maximum number of topics to return.
792 * [pageSize] - Maximum number of topics to return. 782 ///
793 * 783 /// Completes with a [ListTopicsResponse].
794 * Completes with a [ListTopicsResponse]. 784 ///
795 * 785 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
796 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 786 /// an error.
797 * error. 787 ///
798 * 788 /// If the used [http.Client] completes with an error when making a REST
799 * If the used [http.Client] completes with an error when making a REST call, 789 /// call, this method will complete with the same error.
800 * this method will complete with the same error. 790 async.Future<ListTopicsResponse> list(core.String project,
801 */ 791 {core.String pageToken, core.int pageSize}) {
802 async.Future<ListTopicsResponse> list(core.String project, {core.String pageTo ken, core.int pageSize}) {
803 var _url = null; 792 var _url = null;
804 var _queryParams = new core.Map(); 793 var _queryParams = new core.Map();
805 var _uploadMedia = null; 794 var _uploadMedia = null;
806 var _uploadOptions = null; 795 var _uploadOptions = null;
807 var _downloadOptions = commons.DownloadOptions.Metadata; 796 var _downloadOptions = commons.DownloadOptions.Metadata;
808 var _body = null; 797 var _body = null;
809 798
810 if (project == null) { 799 if (project == null) {
811 throw new core.ArgumentError("Parameter project is required."); 800 throw new core.ArgumentError("Parameter project is required.");
812 } 801 }
813 if (pageToken != null) { 802 if (pageToken != null) {
814 _queryParams["pageToken"] = [pageToken]; 803 _queryParams["pageToken"] = [pageToken];
815 } 804 }
816 if (pageSize != null) { 805 if (pageSize != null) {
817 _queryParams["pageSize"] = ["${pageSize}"]; 806 _queryParams["pageSize"] = ["${pageSize}"];
818 } 807 }
819 808
820 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$project') + '/to pics'; 809 _url = 'v1beta2/' +
810 commons.Escaper.ecapeVariableReserved('$project') +
811 '/topics';
821 812
822 var _response = _requester.request(_url, 813 var _response = _requester.request(_url, "GET",
823 "GET", 814 body: _body,
824 body: _body, 815 queryParams: _queryParams,
825 queryParams: _queryParams, 816 uploadOptions: _uploadOptions,
826 uploadOptions: _uploadOptions, 817 uploadMedia: _uploadMedia,
827 uploadMedia: _uploadMedia, 818 downloadOptions: _downloadOptions);
828 downloadOptions: _downloadOptions);
829 return _response.then((data) => new ListTopicsResponse.fromJson(data)); 819 return _response.then((data) => new ListTopicsResponse.fromJson(data));
830 } 820 }
831 821
832 /** 822 /// Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
833 * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic 823 /// does not exist. The message payload must not be empty; it must contain
834 * does not exist. The message payload must not be empty; it must contain 824 /// either a non-empty data field, or at least one attribute.
835 * either a non-empty data field, or at least one attribute. 825 ///
836 * 826 /// [request] - The metadata request object.
837 * [request] - The metadata request object. 827 ///
838 * 828 /// Request parameters:
839 * Request parameters: 829 ///
840 * 830 /// [topic] - The messages in the request will be published on this topic.
841 * [topic] - The messages in the request will be published on this topic. 831 /// Value must have pattern "^projects/[^/]+/topics/[^/]+$".
842 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". 832 ///
843 * 833 /// Completes with a [PublishResponse].
844 * Completes with a [PublishResponse]. 834 ///
845 * 835 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
846 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 836 /// an error.
847 * error. 837 ///
848 * 838 /// If the used [http.Client] completes with an error when making a REST
849 * If the used [http.Client] completes with an error when making a REST call, 839 /// call, this method will complete with the same error.
850 * this method will complete with the same error. 840 async.Future<PublishResponse> publish(
851 */ 841 PublishRequest request, core.String topic) {
852 async.Future<PublishResponse> publish(PublishRequest request, core.String topi c) {
853 var _url = null; 842 var _url = null;
854 var _queryParams = new core.Map(); 843 var _queryParams = new core.Map();
855 var _uploadMedia = null; 844 var _uploadMedia = null;
856 var _uploadOptions = null; 845 var _uploadOptions = null;
857 var _downloadOptions = commons.DownloadOptions.Metadata; 846 var _downloadOptions = commons.DownloadOptions.Metadata;
858 var _body = null; 847 var _body = null;
859 848
860 if (request != null) { 849 if (request != null) {
861 _body = convert.JSON.encode((request).toJson()); 850 _body = convert.JSON.encode((request).toJson());
862 } 851 }
863 if (topic == null) { 852 if (topic == null) {
864 throw new core.ArgumentError("Parameter topic is required."); 853 throw new core.ArgumentError("Parameter topic is required.");
865 } 854 }
866 855
867 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic') + ':publ ish'; 856 _url = 'v1beta2/' +
857 commons.Escaper.ecapeVariableReserved('$topic') +
858 ':publish';
868 859
869 var _response = _requester.request(_url, 860 var _response = _requester.request(_url, "POST",
870 "POST", 861 body: _body,
871 body: _body, 862 queryParams: _queryParams,
872 queryParams: _queryParams, 863 uploadOptions: _uploadOptions,
873 uploadOptions: _uploadOptions, 864 uploadMedia: _uploadMedia,
874 uploadMedia: _uploadMedia, 865 downloadOptions: _downloadOptions);
875 downloadOptions: _downloadOptions);
876 return _response.then((data) => new PublishResponse.fromJson(data)); 866 return _response.then((data) => new PublishResponse.fromJson(data));
877 } 867 }
878 868
879 /** 869 /// Sets the access control policy on the specified resource. Replaces any
880 * Sets the access control policy on the specified resource. Replaces any 870 /// existing policy.
881 * existing policy. 871 ///
882 * 872 /// [request] - The metadata request object.
883 * [request] - The metadata request object. 873 ///
884 * 874 /// Request parameters:
885 * Request parameters: 875 ///
886 * 876 /// [resource] - REQUIRED: The resource for which the policy is being
887 * [resource] - REQUIRED: The resource for which the policy is being 877 /// specified.
888 * specified. 878 /// See the operation documentation for the appropriate value for this field.
889 * See the operation documentation for the appropriate value for this field. 879 /// Value must have pattern "^projects/[^/]+/topics/[^/]+$".
890 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". 880 ///
891 * 881 /// Completes with a [Policy].
892 * Completes with a [Policy]. 882 ///
893 * 883 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
894 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 884 /// an error.
895 * error. 885 ///
896 * 886 /// If the used [http.Client] completes with an error when making a REST
897 * If the used [http.Client] completes with an error when making a REST call, 887 /// call, this method will complete with the same error.
898 * this method will complete with the same error. 888 async.Future<Policy> setIamPolicy(
899 */ 889 SetIamPolicyRequest request, core.String resource) {
900 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res ource) {
901 var _url = null; 890 var _url = null;
902 var _queryParams = new core.Map(); 891 var _queryParams = new core.Map();
903 var _uploadMedia = null; 892 var _uploadMedia = null;
904 var _uploadOptions = null; 893 var _uploadOptions = null;
905 var _downloadOptions = commons.DownloadOptions.Metadata; 894 var _downloadOptions = commons.DownloadOptions.Metadata;
906 var _body = null; 895 var _body = null;
907 896
908 if (request != null) { 897 if (request != null) {
909 _body = convert.JSON.encode((request).toJson()); 898 _body = convert.JSON.encode((request).toJson());
910 } 899 }
911 if (resource == null) { 900 if (resource == null) {
912 throw new core.ArgumentError("Parameter resource is required."); 901 throw new core.ArgumentError("Parameter resource is required.");
913 } 902 }
914 903
915 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':s etIamPolicy'; 904 _url = 'v1beta2/' +
905 commons.Escaper.ecapeVariableReserved('$resource') +
906 ':setIamPolicy';
916 907
917 var _response = _requester.request(_url, 908 var _response = _requester.request(_url, "POST",
918 "POST", 909 body: _body,
919 body: _body, 910 queryParams: _queryParams,
920 queryParams: _queryParams, 911 uploadOptions: _uploadOptions,
921 uploadOptions: _uploadOptions, 912 uploadMedia: _uploadMedia,
922 uploadMedia: _uploadMedia, 913 downloadOptions: _downloadOptions);
923 downloadOptions: _downloadOptions);
924 return _response.then((data) => new Policy.fromJson(data)); 914 return _response.then((data) => new Policy.fromJson(data));
925 } 915 }
926 916
927 /** 917 /// Returns permissions that a caller has on the specified resource.
928 * Returns permissions that a caller has on the specified resource. 918 /// If the resource does not exist, this will return an empty set of
929 * If the resource does not exist, this will return an empty set of 919 /// permissions, not a NOT_FOUND error.
930 * permissions, not a NOT_FOUND error. 920 ///
931 * 921 /// Note: This operation is designed to be used for building permission-aware
932 * Note: This operation is designed to be used for building permission-aware 922 /// UIs and command-line tools, not for authorization checking. This
933 * UIs and command-line tools, not for authorization checking. This operation 923 /// operation
934 * may "fail open" without warning. 924 /// may "fail open" without warning.
935 * 925 ///
936 * [request] - The metadata request object. 926 /// [request] - The metadata request object.
937 * 927 ///
938 * Request parameters: 928 /// Request parameters:
939 * 929 ///
940 * [resource] - REQUIRED: The resource for which the policy detail is being 930 /// [resource] - REQUIRED: The resource for which the policy detail is being
941 * requested. 931 /// requested.
942 * See the operation documentation for the appropriate value for this field. 932 /// See the operation documentation for the appropriate value for this field.
943 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". 933 /// Value must have pattern "^projects/[^/]+/topics/[^/]+$".
944 * 934 ///
945 * Completes with a [TestIamPermissionsResponse]. 935 /// Completes with a [TestIamPermissionsResponse].
946 * 936 ///
947 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 937 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
948 * error. 938 /// an error.
949 * 939 ///
950 * If the used [http.Client] completes with an error when making a REST call, 940 /// If the used [http.Client] completes with an error when making a REST
951 * this method will complete with the same error. 941 /// call, this method will complete with the same error.
952 */ 942 async.Future<TestIamPermissionsResponse> testIamPermissions(
953 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions Request request, core.String resource) { 943 TestIamPermissionsRequest request, core.String resource) {
954 var _url = null; 944 var _url = null;
955 var _queryParams = new core.Map(); 945 var _queryParams = new core.Map();
956 var _uploadMedia = null; 946 var _uploadMedia = null;
957 var _uploadOptions = null; 947 var _uploadOptions = null;
958 var _downloadOptions = commons.DownloadOptions.Metadata; 948 var _downloadOptions = commons.DownloadOptions.Metadata;
959 var _body = null; 949 var _body = null;
960 950
961 if (request != null) { 951 if (request != null) {
962 _body = convert.JSON.encode((request).toJson()); 952 _body = convert.JSON.encode((request).toJson());
963 } 953 }
964 if (resource == null) { 954 if (resource == null) {
965 throw new core.ArgumentError("Parameter resource is required."); 955 throw new core.ArgumentError("Parameter resource is required.");
966 } 956 }
967 957
968 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$resource') + ':t estIamPermissions'; 958 _url = 'v1beta2/' +
959 commons.Escaper.ecapeVariableReserved('$resource') +
960 ':testIamPermissions';
969 961
970 var _response = _requester.request(_url, 962 var _response = _requester.request(_url, "POST",
971 "POST", 963 body: _body,
972 body: _body, 964 queryParams: _queryParams,
973 queryParams: _queryParams, 965 uploadOptions: _uploadOptions,
974 uploadOptions: _uploadOptions, 966 uploadMedia: _uploadMedia,
975 uploadMedia: _uploadMedia, 967 downloadOptions: _downloadOptions);
976 downloadOptions: _downloadOptions); 968 return _response
977 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data )); 969 .then((data) => new TestIamPermissionsResponse.fromJson(data));
978 } 970 }
979
980 } 971 }
981 972
982
983 class ProjectsTopicsSubscriptionsResourceApi { 973 class ProjectsTopicsSubscriptionsResourceApi {
984 final commons.ApiRequester _requester; 974 final commons.ApiRequester _requester;
985 975
986 ProjectsTopicsSubscriptionsResourceApi(commons.ApiRequester client) : 976 ProjectsTopicsSubscriptionsResourceApi(commons.ApiRequester client)
987 _requester = client; 977 : _requester = client;
988 978
989 /** 979 /// Lists the name of the subscriptions for this topic.
990 * Lists the name of the subscriptions for this topic. 980 ///
991 * 981 /// Request parameters:
992 * Request parameters: 982 ///
993 * 983 /// [topic] - The name of the topic that subscriptions are attached to.
994 * [topic] - The name of the topic that subscriptions are attached to. 984 /// Value must have pattern "^projects/[^/]+/topics/[^/]+$".
995 * Value must have pattern "^projects/[^/]+/topics/[^/]+$". 985 ///
996 * 986 /// [pageToken] - The value returned by the last
997 * [pageToken] - The value returned by the last 987 /// `ListTopicSubscriptionsResponse`; indicates
998 * `ListTopicSubscriptionsResponse`; indicates 988 /// that this is a continuation of a prior `ListTopicSubscriptions` call, and
999 * that this is a continuation of a prior `ListTopicSubscriptions` call, and 989 /// that the system should return the next page of data.
1000 * that the system should return the next page of data. 990 ///
1001 * 991 /// [pageSize] - Maximum number of subscription names to return.
1002 * [pageSize] - Maximum number of subscription names to return. 992 ///
1003 * 993 /// Completes with a [ListTopicSubscriptionsResponse].
1004 * Completes with a [ListTopicSubscriptionsResponse]. 994 ///
1005 * 995 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1006 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 996 /// an error.
1007 * error. 997 ///
1008 * 998 /// If the used [http.Client] completes with an error when making a REST
1009 * If the used [http.Client] completes with an error when making a REST call, 999 /// call, this method will complete with the same error.
1010 * this method will complete with the same error. 1000 async.Future<ListTopicSubscriptionsResponse> list(core.String topic,
1011 */ 1001 {core.String pageToken, core.int pageSize}) {
1012 async.Future<ListTopicSubscriptionsResponse> list(core.String topic, {core.Str ing pageToken, core.int pageSize}) {
1013 var _url = null; 1002 var _url = null;
1014 var _queryParams = new core.Map(); 1003 var _queryParams = new core.Map();
1015 var _uploadMedia = null; 1004 var _uploadMedia = null;
1016 var _uploadOptions = null; 1005 var _uploadOptions = null;
1017 var _downloadOptions = commons.DownloadOptions.Metadata; 1006 var _downloadOptions = commons.DownloadOptions.Metadata;
1018 var _body = null; 1007 var _body = null;
1019 1008
1020 if (topic == null) { 1009 if (topic == null) {
1021 throw new core.ArgumentError("Parameter topic is required."); 1010 throw new core.ArgumentError("Parameter topic is required.");
1022 } 1011 }
1023 if (pageToken != null) { 1012 if (pageToken != null) {
1024 _queryParams["pageToken"] = [pageToken]; 1013 _queryParams["pageToken"] = [pageToken];
1025 } 1014 }
1026 if (pageSize != null) { 1015 if (pageSize != null) {
1027 _queryParams["pageSize"] = ["${pageSize}"]; 1016 _queryParams["pageSize"] = ["${pageSize}"];
1028 } 1017 }
1029 1018
1030 _url = 'v1beta2/' + commons.Escaper.ecapeVariableReserved('$topic') + '/subs criptions'; 1019 _url = 'v1beta2/' +
1020 commons.Escaper.ecapeVariableReserved('$topic') +
1021 '/subscriptions';
1031 1022
1032 var _response = _requester.request(_url, 1023 var _response = _requester.request(_url, "GET",
1033 "GET", 1024 body: _body,
1034 body: _body, 1025 queryParams: _queryParams,
1035 queryParams: _queryParams, 1026 uploadOptions: _uploadOptions,
1036 uploadOptions: _uploadOptions, 1027 uploadMedia: _uploadMedia,
1037 uploadMedia: _uploadMedia, 1028 downloadOptions: _downloadOptions);
1038 downloadOptions: _downloadOptions); 1029 return _response
1039 return _response.then((data) => new ListTopicSubscriptionsResponse.fromJson( data)); 1030 .then((data) => new ListTopicSubscriptionsResponse.fromJson(data));
1040 } 1031 }
1041
1042 } 1032 }
1043 1033
1044 1034 /// Request for the Acknowledge method.
1045
1046 /** Request for the Acknowledge method. */
1047 class AcknowledgeRequest { 1035 class AcknowledgeRequest {
1048 /** 1036 /// The acknowledgment ID for the messages being acknowledged that was
1049 * The acknowledgment ID for the messages being acknowledged that was returned 1037 /// returned
1050 * by the Pub/Sub system in the `Pull` response. Must not be empty. 1038 /// by the Pub/Sub system in the `Pull` response. Must not be empty.
1051 */
1052 core.List<core.String> ackIds; 1039 core.List<core.String> ackIds;
1053 1040
1054 AcknowledgeRequest(); 1041 AcknowledgeRequest();
1055 1042
1056 AcknowledgeRequest.fromJson(core.Map _json) { 1043 AcknowledgeRequest.fromJson(core.Map _json) {
1057 if (_json.containsKey("ackIds")) { 1044 if (_json.containsKey("ackIds")) {
1058 ackIds = _json["ackIds"]; 1045 ackIds = _json["ackIds"];
1059 } 1046 }
1060 } 1047 }
1061 1048
1062 core.Map<core.String, core.Object> toJson() { 1049 core.Map<core.String, core.Object> toJson() {
1063 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1050 final core.Map<core.String, core.Object> _json =
1051 new core.Map<core.String, core.Object>();
1064 if (ackIds != null) { 1052 if (ackIds != null) {
1065 _json["ackIds"] = ackIds; 1053 _json["ackIds"] = ackIds;
1066 } 1054 }
1067 return _json; 1055 return _json;
1068 } 1056 }
1069 } 1057 }
1070 1058
1071 /** Associates `members` with a `role`. */ 1059 /// Associates `members` with a `role`.
1072 class Binding { 1060 class Binding {
1073 /** 1061 /// Specifies the identities requesting access for a Cloud Platform resource.
1074 * Specifies the identities requesting access for a Cloud Platform resource. 1062 /// `members` can have the following values:
1075 * `members` can have the following values: 1063 ///
1076 * 1064 /// * `allUsers`: A special identifier that represents anyone who is
1077 * * `allUsers`: A special identifier that represents anyone who is 1065 /// on the internet; with or without a Google account.
1078 * on the internet; with or without a Google account. 1066 ///
1079 * 1067 /// * `allAuthenticatedUsers`: A special identifier that represents anyone
1080 * * `allAuthenticatedUsers`: A special identifier that represents anyone 1068 /// who is authenticated with a Google account or a service account.
1081 * who is authenticated with a Google account or a service account. 1069 ///
1082 * 1070 /// * `user:{emailid}`: An email address that represents a specific Google
1083 * * `user:{emailid}`: An email address that represents a specific Google 1071 /// account. For example, `alice@gmail.com` or `joe@example.com`.
1084 * account. For example, `alice@gmail.com` or `joe@example.com`. 1072 ///
1085 * 1073 ///
1086 * 1074 /// * `serviceAccount:{emailid}`: An email address that represents a service
1087 * * `serviceAccount:{emailid}`: An email address that represents a service 1075 /// account. For example, `my-other-app@appspot.gserviceaccount.com`.
1088 * account. For example, `my-other-app@appspot.gserviceaccount.com`. 1076 ///
1089 * 1077 /// * `group:{emailid}`: An email address that represents a Google group.
1090 * * `group:{emailid}`: An email address that represents a Google group. 1078 /// For example, `admins@example.com`.
1091 * For example, `admins@example.com`. 1079 ///
1092 * 1080 ///
1093 * 1081 /// * `domain:{domain}`: A Google Apps domain name that represents all the
1094 * * `domain:{domain}`: A Google Apps domain name that represents all the 1082 /// users of that domain. For example, `google.com` or `example.com`.
1095 * users of that domain. For example, `google.com` or `example.com`.
1096 */
1097 core.List<core.String> members; 1083 core.List<core.String> members;
1098 /** 1084
1099 * Role that is assigned to `members`. 1085 /// Role that is assigned to `members`.
1100 * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1086 /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1101 * Required 1087 /// Required
1102 */
1103 core.String role; 1088 core.String role;
1104 1089
1105 Binding(); 1090 Binding();
1106 1091
1107 Binding.fromJson(core.Map _json) { 1092 Binding.fromJson(core.Map _json) {
1108 if (_json.containsKey("members")) { 1093 if (_json.containsKey("members")) {
1109 members = _json["members"]; 1094 members = _json["members"];
1110 } 1095 }
1111 if (_json.containsKey("role")) { 1096 if (_json.containsKey("role")) {
1112 role = _json["role"]; 1097 role = _json["role"];
1113 } 1098 }
1114 } 1099 }
1115 1100
1116 core.Map<core.String, core.Object> toJson() { 1101 core.Map<core.String, core.Object> toJson() {
1117 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1102 final core.Map<core.String, core.Object> _json =
1103 new core.Map<core.String, core.Object>();
1118 if (members != null) { 1104 if (members != null) {
1119 _json["members"] = members; 1105 _json["members"] = members;
1120 } 1106 }
1121 if (role != null) { 1107 if (role != null) {
1122 _json["role"] = role; 1108 _json["role"] = role;
1123 } 1109 }
1124 return _json; 1110 return _json;
1125 } 1111 }
1126 } 1112 }
1127 1113
1128 /** 1114 /// A generic empty message that you can re-use to avoid defining duplicated
1129 * A generic empty message that you can re-use to avoid defining duplicated 1115 /// empty messages in your APIs. A typical example is to use it as the request
1130 * empty messages in your APIs. A typical example is to use it as the request 1116 /// or the response type of an API method. For instance:
1131 * or the response type of an API method. For instance: 1117 ///
1132 * 1118 /// service Foo {
1133 * service Foo { 1119 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1134 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 1120 /// }
1135 * } 1121 ///
1136 * 1122 /// The JSON representation for `Empty` is empty JSON object `{}`.
1137 * The JSON representation for `Empty` is empty JSON object `{}`.
1138 */
1139 class Empty { 1123 class Empty {
1140
1141 Empty(); 1124 Empty();
1142 1125
1143 Empty.fromJson(core.Map _json) { 1126 Empty.fromJson(core.Map _json) {}
1144 }
1145 1127
1146 core.Map<core.String, core.Object> toJson() { 1128 core.Map<core.String, core.Object> toJson() {
1147 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1129 final core.Map<core.String, core.Object> _json =
1130 new core.Map<core.String, core.Object>();
1148 return _json; 1131 return _json;
1149 } 1132 }
1150 } 1133 }
1151 1134
1152 /** Response for the `ListSubscriptions` method. */ 1135 /// Response for the `ListSubscriptions` method.
1153 class ListSubscriptionsResponse { 1136 class ListSubscriptionsResponse {
1154 /** 1137 /// If not empty, indicates that there may be more subscriptions that match
1155 * If not empty, indicates that there may be more subscriptions that match 1138 /// the request; this value should be passed in a new
1156 * the request; this value should be passed in a new 1139 /// `ListSubscriptionsRequest` to get more subscriptions.
1157 * `ListSubscriptionsRequest` to get more subscriptions.
1158 */
1159 core.String nextPageToken; 1140 core.String nextPageToken;
1160 /** The subscriptions that match the request. */ 1141
1142 /// The subscriptions that match the request.
1161 core.List<Subscription> subscriptions; 1143 core.List<Subscription> subscriptions;
1162 1144
1163 ListSubscriptionsResponse(); 1145 ListSubscriptionsResponse();
1164 1146
1165 ListSubscriptionsResponse.fromJson(core.Map _json) { 1147 ListSubscriptionsResponse.fromJson(core.Map _json) {
1166 if (_json.containsKey("nextPageToken")) { 1148 if (_json.containsKey("nextPageToken")) {
1167 nextPageToken = _json["nextPageToken"]; 1149 nextPageToken = _json["nextPageToken"];
1168 } 1150 }
1169 if (_json.containsKey("subscriptions")) { 1151 if (_json.containsKey("subscriptions")) {
1170 subscriptions = _json["subscriptions"].map((value) => new Subscription.fro mJson(value)).toList(); 1152 subscriptions = _json["subscriptions"]
1153 .map((value) => new Subscription.fromJson(value))
1154 .toList();
1171 } 1155 }
1172 } 1156 }
1173 1157
1174 core.Map<core.String, core.Object> toJson() { 1158 core.Map<core.String, core.Object> toJson() {
1175 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1159 final core.Map<core.String, core.Object> _json =
1160 new core.Map<core.String, core.Object>();
1176 if (nextPageToken != null) { 1161 if (nextPageToken != null) {
1177 _json["nextPageToken"] = nextPageToken; 1162 _json["nextPageToken"] = nextPageToken;
1178 } 1163 }
1179 if (subscriptions != null) { 1164 if (subscriptions != null) {
1180 _json["subscriptions"] = subscriptions.map((value) => (value).toJson()).to List(); 1165 _json["subscriptions"] =
1166 subscriptions.map((value) => (value).toJson()).toList();
1181 } 1167 }
1182 return _json; 1168 return _json;
1183 } 1169 }
1184 } 1170 }
1185 1171
1186 /** Response for the `ListTopicSubscriptions` method. */ 1172 /// Response for the `ListTopicSubscriptions` method.
1187 class ListTopicSubscriptionsResponse { 1173 class ListTopicSubscriptionsResponse {
1188 /** 1174 /// If not empty, indicates that there may be more subscriptions that match
1189 * If not empty, indicates that there may be more subscriptions that match 1175 /// the request; this value should be passed in a new
1190 * the request; this value should be passed in a new 1176 /// `ListTopicSubscriptionsRequest` to get more subscriptions.
1191 * `ListTopicSubscriptionsRequest` to get more subscriptions.
1192 */
1193 core.String nextPageToken; 1177 core.String nextPageToken;
1194 /** The names of the subscriptions that match the request. */ 1178
1179 /// The names of the subscriptions that match the request.
1195 core.List<core.String> subscriptions; 1180 core.List<core.String> subscriptions;
1196 1181
1197 ListTopicSubscriptionsResponse(); 1182 ListTopicSubscriptionsResponse();
1198 1183
1199 ListTopicSubscriptionsResponse.fromJson(core.Map _json) { 1184 ListTopicSubscriptionsResponse.fromJson(core.Map _json) {
1200 if (_json.containsKey("nextPageToken")) { 1185 if (_json.containsKey("nextPageToken")) {
1201 nextPageToken = _json["nextPageToken"]; 1186 nextPageToken = _json["nextPageToken"];
1202 } 1187 }
1203 if (_json.containsKey("subscriptions")) { 1188 if (_json.containsKey("subscriptions")) {
1204 subscriptions = _json["subscriptions"]; 1189 subscriptions = _json["subscriptions"];
1205 } 1190 }
1206 } 1191 }
1207 1192
1208 core.Map<core.String, core.Object> toJson() { 1193 core.Map<core.String, core.Object> toJson() {
1209 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1194 final core.Map<core.String, core.Object> _json =
1195 new core.Map<core.String, core.Object>();
1210 if (nextPageToken != null) { 1196 if (nextPageToken != null) {
1211 _json["nextPageToken"] = nextPageToken; 1197 _json["nextPageToken"] = nextPageToken;
1212 } 1198 }
1213 if (subscriptions != null) { 1199 if (subscriptions != null) {
1214 _json["subscriptions"] = subscriptions; 1200 _json["subscriptions"] = subscriptions;
1215 } 1201 }
1216 return _json; 1202 return _json;
1217 } 1203 }
1218 } 1204 }
1219 1205
1220 /** Response for the `ListTopics` method. */ 1206 /// Response for the `ListTopics` method.
1221 class ListTopicsResponse { 1207 class ListTopicsResponse {
1222 /** 1208 /// If not empty, indicates that there may be more topics that match the
1223 * If not empty, indicates that there may be more topics that match the 1209 /// request; this value should be passed in a new `ListTopicsRequest`.
1224 * request; this value should be passed in a new `ListTopicsRequest`.
1225 */
1226 core.String nextPageToken; 1210 core.String nextPageToken;
1227 /** The resulting topics. */ 1211
1212 /// The resulting topics.
1228 core.List<Topic> topics; 1213 core.List<Topic> topics;
1229 1214
1230 ListTopicsResponse(); 1215 ListTopicsResponse();
1231 1216
1232 ListTopicsResponse.fromJson(core.Map _json) { 1217 ListTopicsResponse.fromJson(core.Map _json) {
1233 if (_json.containsKey("nextPageToken")) { 1218 if (_json.containsKey("nextPageToken")) {
1234 nextPageToken = _json["nextPageToken"]; 1219 nextPageToken = _json["nextPageToken"];
1235 } 1220 }
1236 if (_json.containsKey("topics")) { 1221 if (_json.containsKey("topics")) {
1237 topics = _json["topics"].map((value) => new Topic.fromJson(value)).toList( ); 1222 topics =
1223 _json["topics"].map((value) => new Topic.fromJson(value)).toList();
1238 } 1224 }
1239 } 1225 }
1240 1226
1241 core.Map<core.String, core.Object> toJson() { 1227 core.Map<core.String, core.Object> toJson() {
1242 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1228 final core.Map<core.String, core.Object> _json =
1229 new core.Map<core.String, core.Object>();
1243 if (nextPageToken != null) { 1230 if (nextPageToken != null) {
1244 _json["nextPageToken"] = nextPageToken; 1231 _json["nextPageToken"] = nextPageToken;
1245 } 1232 }
1246 if (topics != null) { 1233 if (topics != null) {
1247 _json["topics"] = topics.map((value) => (value).toJson()).toList(); 1234 _json["topics"] = topics.map((value) => (value).toJson()).toList();
1248 } 1235 }
1249 return _json; 1236 return _json;
1250 } 1237 }
1251 } 1238 }
1252 1239
1253 /** Request for the ModifyAckDeadline method. */ 1240 /// Request for the ModifyAckDeadline method.
1254 class ModifyAckDeadlineRequest { 1241 class ModifyAckDeadlineRequest {
1255 /** 1242 /// The new ack deadline with respect to the time this request was sent to
1256 * The new ack deadline with respect to the time this request was sent to 1243 /// the Pub/Sub system. Must be >= 0. For example, if the value is 10, the
1257 * the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new 1244 /// new
1258 * ack deadline will expire 10 seconds after the `ModifyAckDeadline` call 1245 /// ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
1259 * was made. Specifying zero may immediately make the message available for 1246 /// was made. Specifying zero may immediately make the message available for
1260 * another pull request. 1247 /// another pull request.
1261 */
1262 core.int ackDeadlineSeconds; 1248 core.int ackDeadlineSeconds;
1263 /** 1249
1264 * The acknowledgment ID. Either this or ack_ids must be populated, but not 1250 /// The acknowledgment ID. Either this or ack_ids must be populated, but not
1265 * both. 1251 /// both.
1266 */
1267 core.String ackId; 1252 core.String ackId;
1268 /** List of acknowledgment IDs. */ 1253
1254 /// List of acknowledgment IDs.
1269 core.List<core.String> ackIds; 1255 core.List<core.String> ackIds;
1270 1256
1271 ModifyAckDeadlineRequest(); 1257 ModifyAckDeadlineRequest();
1272 1258
1273 ModifyAckDeadlineRequest.fromJson(core.Map _json) { 1259 ModifyAckDeadlineRequest.fromJson(core.Map _json) {
1274 if (_json.containsKey("ackDeadlineSeconds")) { 1260 if (_json.containsKey("ackDeadlineSeconds")) {
1275 ackDeadlineSeconds = _json["ackDeadlineSeconds"]; 1261 ackDeadlineSeconds = _json["ackDeadlineSeconds"];
1276 } 1262 }
1277 if (_json.containsKey("ackId")) { 1263 if (_json.containsKey("ackId")) {
1278 ackId = _json["ackId"]; 1264 ackId = _json["ackId"];
1279 } 1265 }
1280 if (_json.containsKey("ackIds")) { 1266 if (_json.containsKey("ackIds")) {
1281 ackIds = _json["ackIds"]; 1267 ackIds = _json["ackIds"];
1282 } 1268 }
1283 } 1269 }
1284 1270
1285 core.Map<core.String, core.Object> toJson() { 1271 core.Map<core.String, core.Object> toJson() {
1286 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1272 final core.Map<core.String, core.Object> _json =
1273 new core.Map<core.String, core.Object>();
1287 if (ackDeadlineSeconds != null) { 1274 if (ackDeadlineSeconds != null) {
1288 _json["ackDeadlineSeconds"] = ackDeadlineSeconds; 1275 _json["ackDeadlineSeconds"] = ackDeadlineSeconds;
1289 } 1276 }
1290 if (ackId != null) { 1277 if (ackId != null) {
1291 _json["ackId"] = ackId; 1278 _json["ackId"] = ackId;
1292 } 1279 }
1293 if (ackIds != null) { 1280 if (ackIds != null) {
1294 _json["ackIds"] = ackIds; 1281 _json["ackIds"] = ackIds;
1295 } 1282 }
1296 return _json; 1283 return _json;
1297 } 1284 }
1298 } 1285 }
1299 1286
1300 /** Request for the ModifyPushConfig method. */ 1287 /// Request for the ModifyPushConfig method.
1301 class ModifyPushConfigRequest { 1288 class ModifyPushConfigRequest {
1302 /** 1289 /// The push configuration for future deliveries.
1303 * The push configuration for future deliveries. 1290 ///
1304 * 1291 /// An empty `pushConfig` indicates that the Pub/Sub system should
1305 * An empty `pushConfig` indicates that the Pub/Sub system should 1292 /// stop pushing messages from the given subscription and allow
1306 * stop pushing messages from the given subscription and allow 1293 /// messages to be pulled and acknowledged - effectively pausing
1307 * messages to be pulled and acknowledged - effectively pausing 1294 /// the subscription if `Pull` is not called.
1308 * the subscription if `Pull` is not called.
1309 */
1310 PushConfig pushConfig; 1295 PushConfig pushConfig;
1311 1296
1312 ModifyPushConfigRequest(); 1297 ModifyPushConfigRequest();
1313 1298
1314 ModifyPushConfigRequest.fromJson(core.Map _json) { 1299 ModifyPushConfigRequest.fromJson(core.Map _json) {
1315 if (_json.containsKey("pushConfig")) { 1300 if (_json.containsKey("pushConfig")) {
1316 pushConfig = new PushConfig.fromJson(_json["pushConfig"]); 1301 pushConfig = new PushConfig.fromJson(_json["pushConfig"]);
1317 } 1302 }
1318 } 1303 }
1319 1304
1320 core.Map<core.String, core.Object> toJson() { 1305 core.Map<core.String, core.Object> toJson() {
1321 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1306 final core.Map<core.String, core.Object> _json =
1307 new core.Map<core.String, core.Object>();
1322 if (pushConfig != null) { 1308 if (pushConfig != null) {
1323 _json["pushConfig"] = (pushConfig).toJson(); 1309 _json["pushConfig"] = (pushConfig).toJson();
1324 } 1310 }
1325 return _json; 1311 return _json;
1326 } 1312 }
1327 } 1313 }
1328 1314
1329 /** 1315 /// Defines an Identity and Access Management (IAM) policy. It is used to
1330 * Defines an Identity and Access Management (IAM) policy. It is used to 1316 /// specify access control policies for Cloud Platform resources.
1331 * specify access control policies for Cloud Platform resources. 1317 ///
1332 * 1318 ///
1333 * 1319 /// A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
1334 * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of 1320 /// `members` to a `role`, where the members can be user accounts, Google
1335 * `members` to a `role`, where the members can be user accounts, Google groups, 1321 /// groups,
1336 * Google domains, and service accounts. A `role` is a named list of permissions 1322 /// Google domains, and service accounts. A `role` is a named list of
1337 * defined by IAM. 1323 /// permissions
1338 * 1324 /// defined by IAM.
1339 * **Example** 1325 ///
1340 * 1326 /// **Example**
1341 * { 1327 ///
1342 * "bindings": [ 1328 /// {
1343 * { 1329 /// "bindings": [
1344 * "role": "roles/owner", 1330 /// {
1345 * "members": [ 1331 /// "role": "roles/owner",
1346 * "user:mike@example.com", 1332 /// "members": [
1347 * "group:admins@example.com", 1333 /// "user:mike@example.com",
1348 * "domain:google.com", 1334 /// "group:admins@example.com",
1349 * "serviceAccount:my-other-app@appspot.gserviceaccount.com", 1335 /// "domain:google.com",
1350 * ] 1336 /// "serviceAccount:my-other-app@appspot.gserviceaccount.com",
1351 * }, 1337 /// ]
1352 * { 1338 /// },
1353 * "role": "roles/viewer", 1339 /// {
1354 * "members": ["user:sean@example.com"] 1340 /// "role": "roles/viewer",
1355 * } 1341 /// "members": ["user:sean@example.com"]
1356 * ] 1342 /// }
1357 * } 1343 /// ]
1358 * 1344 /// }
1359 * For a description of IAM and its features, see the 1345 ///
1360 * [IAM developer's guide](https://cloud.google.com/iam). 1346 /// For a description of IAM and its features, see the
1361 */ 1347 /// [IAM developer's guide](https://cloud.google.com/iam).
1362 class Policy { 1348 class Policy {
1363 /** 1349 /// Associates a list of `members` to a `role`.
1364 * Associates a list of `members` to a `role`. 1350 /// `bindings` with no members will result in an error.
1365 * `bindings` with no members will result in an error.
1366 */
1367 core.List<Binding> bindings; 1351 core.List<Binding> bindings;
1368 /** 1352
1369 * `etag` is used for optimistic concurrency control as a way to help 1353 /// `etag` is used for optimistic concurrency control as a way to help
1370 * prevent simultaneous updates of a policy from overwriting each other. 1354 /// prevent simultaneous updates of a policy from overwriting each other.
1371 * It is strongly suggested that systems make use of the `etag` in the 1355 /// It is strongly suggested that systems make use of the `etag` in the
1372 * read-modify-write cycle to perform policy updates in order to avoid race 1356 /// read-modify-write cycle to perform policy updates in order to avoid race
1373 * conditions: An `etag` is returned in the response to `getIamPolicy`, and 1357 /// conditions: An `etag` is returned in the response to `getIamPolicy`, and
1374 * systems are expected to put that etag in the request to `setIamPolicy` to 1358 /// systems are expected to put that etag in the request to `setIamPolicy` to
1375 * ensure that their change will be applied to the same version of the policy. 1359 /// ensure that their change will be applied to the same version of the
1376 * 1360 /// policy.
1377 * If no `etag` is provided in the call to `setIamPolicy`, then the existing 1361 ///
1378 * policy is overwritten blindly. 1362 /// If no `etag` is provided in the call to `setIamPolicy`, then the existing
1379 */ 1363 /// policy is overwritten blindly.
1380 core.String etag; 1364 core.String etag;
1381 core.List<core.int> get etagAsBytes { 1365 core.List<core.int> get etagAsBytes {
1382 return convert.BASE64.decode(etag); 1366 return convert.BASE64.decode(etag);
1383 } 1367 }
1384 1368
1385 void set etagAsBytes(core.List<core.int> _bytes) { 1369 void set etagAsBytes(core.List<core.int> _bytes) {
1386 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- "); 1370 etag =
1371 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
1387 } 1372 }
1388 /** Version of the `Policy`. The default version is 0. */ 1373
1374 /// Version of the `Policy`. The default version is 0.
1389 core.int version; 1375 core.int version;
1390 1376
1391 Policy(); 1377 Policy();
1392 1378
1393 Policy.fromJson(core.Map _json) { 1379 Policy.fromJson(core.Map _json) {
1394 if (_json.containsKey("bindings")) { 1380 if (_json.containsKey("bindings")) {
1395 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t oList(); 1381 bindings = _json["bindings"]
1382 .map((value) => new Binding.fromJson(value))
1383 .toList();
1396 } 1384 }
1397 if (_json.containsKey("etag")) { 1385 if (_json.containsKey("etag")) {
1398 etag = _json["etag"]; 1386 etag = _json["etag"];
1399 } 1387 }
1400 if (_json.containsKey("version")) { 1388 if (_json.containsKey("version")) {
1401 version = _json["version"]; 1389 version = _json["version"];
1402 } 1390 }
1403 } 1391 }
1404 1392
1405 core.Map<core.String, core.Object> toJson() { 1393 core.Map<core.String, core.Object> toJson() {
1406 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1394 final core.Map<core.String, core.Object> _json =
1395 new core.Map<core.String, core.Object>();
1407 if (bindings != null) { 1396 if (bindings != null) {
1408 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); 1397 _json["bindings"] = bindings.map((value) => (value).toJson()).toList();
1409 } 1398 }
1410 if (etag != null) { 1399 if (etag != null) {
1411 _json["etag"] = etag; 1400 _json["etag"] = etag;
1412 } 1401 }
1413 if (version != null) { 1402 if (version != null) {
1414 _json["version"] = version; 1403 _json["version"] = version;
1415 } 1404 }
1416 return _json; 1405 return _json;
1417 } 1406 }
1418 } 1407 }
1419 1408
1420 /** Request for the Publish method. */ 1409 /// Request for the Publish method.
1421 class PublishRequest { 1410 class PublishRequest {
1422 /** The messages to publish. */ 1411 /// The messages to publish.
1423 core.List<PubsubMessage> messages; 1412 core.List<PubsubMessage> messages;
1424 1413
1425 PublishRequest(); 1414 PublishRequest();
1426 1415
1427 PublishRequest.fromJson(core.Map _json) { 1416 PublishRequest.fromJson(core.Map _json) {
1428 if (_json.containsKey("messages")) { 1417 if (_json.containsKey("messages")) {
1429 messages = _json["messages"].map((value) => new PubsubMessage.fromJson(val ue)).toList(); 1418 messages = _json["messages"]
1419 .map((value) => new PubsubMessage.fromJson(value))
1420 .toList();
1430 } 1421 }
1431 } 1422 }
1432 1423
1433 core.Map<core.String, core.Object> toJson() { 1424 core.Map<core.String, core.Object> toJson() {
1434 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1425 final core.Map<core.String, core.Object> _json =
1426 new core.Map<core.String, core.Object>();
1435 if (messages != null) { 1427 if (messages != null) {
1436 _json["messages"] = messages.map((value) => (value).toJson()).toList(); 1428 _json["messages"] = messages.map((value) => (value).toJson()).toList();
1437 } 1429 }
1438 return _json; 1430 return _json;
1439 } 1431 }
1440 } 1432 }
1441 1433
1442 /** Response for the `Publish` method. */ 1434 /// Response for the `Publish` method.
1443 class PublishResponse { 1435 class PublishResponse {
1444 /** 1436 /// The server-assigned ID of each published message, in the same order as
1445 * The server-assigned ID of each published message, in the same order as 1437 /// the messages in the request. IDs are guaranteed to be unique within
1446 * the messages in the request. IDs are guaranteed to be unique within 1438 /// the topic.
1447 * the topic.
1448 */
1449 core.List<core.String> messageIds; 1439 core.List<core.String> messageIds;
1450 1440
1451 PublishResponse(); 1441 PublishResponse();
1452 1442
1453 PublishResponse.fromJson(core.Map _json) { 1443 PublishResponse.fromJson(core.Map _json) {
1454 if (_json.containsKey("messageIds")) { 1444 if (_json.containsKey("messageIds")) {
1455 messageIds = _json["messageIds"]; 1445 messageIds = _json["messageIds"];
1456 } 1446 }
1457 } 1447 }
1458 1448
1459 core.Map<core.String, core.Object> toJson() { 1449 core.Map<core.String, core.Object> toJson() {
1460 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1450 final core.Map<core.String, core.Object> _json =
1451 new core.Map<core.String, core.Object>();
1461 if (messageIds != null) { 1452 if (messageIds != null) {
1462 _json["messageIds"] = messageIds; 1453 _json["messageIds"] = messageIds;
1463 } 1454 }
1464 return _json; 1455 return _json;
1465 } 1456 }
1466 } 1457 }
1467 1458
1468 /** 1459 /// A message data and its attributes. The message payload must not be empty;
1469 * A message data and its attributes. The message payload must not be empty; 1460 /// it must contain either a non-empty data field, or at least one attribute.
1470 * it must contain either a non-empty data field, or at least one attribute.
1471 */
1472 class PubsubMessage { 1461 class PubsubMessage {
1473 /** Optional attributes for this message. */ 1462 /// Optional attributes for this message.
1474 core.Map<core.String, core.String> attributes; 1463 core.Map<core.String, core.String> attributes;
1475 /** 1464
1476 * The message payload. For JSON requests, the value of this field must be 1465 /// The message payload. For JSON requests, the value of this field must be
1477 * [base64-encoded](https://tools.ietf.org/html/rfc4648). 1466 /// [base64-encoded](https://tools.ietf.org/html/rfc4648).
1478 */
1479 core.String data; 1467 core.String data;
1480 core.List<core.int> get dataAsBytes { 1468 core.List<core.int> get dataAsBytes {
1481 return convert.BASE64.decode(data); 1469 return convert.BASE64.decode(data);
1482 } 1470 }
1483 1471
1484 void set dataAsBytes(core.List<core.int> _bytes) { 1472 void set dataAsBytes(core.List<core.int> _bytes) {
1485 data = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- "); 1473 data =
1474 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
1486 } 1475 }
1487 /** 1476
1488 * ID of this message, assigned by the server when the message is published. 1477 /// ID of this message, assigned by the server when the message is published.
1489 * Guaranteed to be unique within the topic. This value may be read by a 1478 /// Guaranteed to be unique within the topic. This value may be read by a
1490 * subscriber that receives a `PubsubMessage` via a `Pull` call or a push 1479 /// subscriber that receives a `PubsubMessage` via a `Pull` call or a push
1491 * delivery. It must not be populated by the publisher in a `Publish` call. 1480 /// delivery. It must not be populated by the publisher in a `Publish` call.
1492 */
1493 core.String messageId; 1481 core.String messageId;
1494 /** 1482
1495 * The time at which the message was published, populated by the server when 1483 /// The time at which the message was published, populated by the server when
1496 * it receives the `Publish` call. It must not be populated by the 1484 /// it receives the `Publish` call. It must not be populated by the
1497 * publisher in a `Publish` call. 1485 /// publisher in a `Publish` call.
1498 */
1499 core.String publishTime; 1486 core.String publishTime;
1500 1487
1501 PubsubMessage(); 1488 PubsubMessage();
1502 1489
1503 PubsubMessage.fromJson(core.Map _json) { 1490 PubsubMessage.fromJson(core.Map _json) {
1504 if (_json.containsKey("attributes")) { 1491 if (_json.containsKey("attributes")) {
1505 attributes = _json["attributes"]; 1492 attributes = _json["attributes"];
1506 } 1493 }
1507 if (_json.containsKey("data")) { 1494 if (_json.containsKey("data")) {
1508 data = _json["data"]; 1495 data = _json["data"];
1509 } 1496 }
1510 if (_json.containsKey("messageId")) { 1497 if (_json.containsKey("messageId")) {
1511 messageId = _json["messageId"]; 1498 messageId = _json["messageId"];
1512 } 1499 }
1513 if (_json.containsKey("publishTime")) { 1500 if (_json.containsKey("publishTime")) {
1514 publishTime = _json["publishTime"]; 1501 publishTime = _json["publishTime"];
1515 } 1502 }
1516 } 1503 }
1517 1504
1518 core.Map<core.String, core.Object> toJson() { 1505 core.Map<core.String, core.Object> toJson() {
1519 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1506 final core.Map<core.String, core.Object> _json =
1507 new core.Map<core.String, core.Object>();
1520 if (attributes != null) { 1508 if (attributes != null) {
1521 _json["attributes"] = attributes; 1509 _json["attributes"] = attributes;
1522 } 1510 }
1523 if (data != null) { 1511 if (data != null) {
1524 _json["data"] = data; 1512 _json["data"] = data;
1525 } 1513 }
1526 if (messageId != null) { 1514 if (messageId != null) {
1527 _json["messageId"] = messageId; 1515 _json["messageId"] = messageId;
1528 } 1516 }
1529 if (publishTime != null) { 1517 if (publishTime != null) {
1530 _json["publishTime"] = publishTime; 1518 _json["publishTime"] = publishTime;
1531 } 1519 }
1532 return _json; 1520 return _json;
1533 } 1521 }
1534 } 1522 }
1535 1523
1536 /** Request for the `Pull` method. */ 1524 /// Request for the `Pull` method.
1537 class PullRequest { 1525 class PullRequest {
1538 /** 1526 /// The maximum number of messages returned for this request. The Pub/Sub
1539 * The maximum number of messages returned for this request. The Pub/Sub 1527 /// system may return fewer than the number specified.
1540 * system may return fewer than the number specified.
1541 */
1542 core.int maxMessages; 1528 core.int maxMessages;
1543 /** 1529
1544 * If this is specified as true the system will respond immediately even if 1530 /// If this is specified as true the system will respond immediately even if
1545 * it is not able to return a message in the `Pull` response. Otherwise the 1531 /// it is not able to return a message in the `Pull` response. Otherwise the
1546 * system is allowed to wait until at least one message is available rather 1532 /// system is allowed to wait until at least one message is available rather
1547 * than returning no messages. The client may cancel the request if it does 1533 /// than returning no messages. The client may cancel the request if it does
1548 * not wish to wait any longer for the response. 1534 /// not wish to wait any longer for the response.
1549 */
1550 core.bool returnImmediately; 1535 core.bool returnImmediately;
1551 1536
1552 PullRequest(); 1537 PullRequest();
1553 1538
1554 PullRequest.fromJson(core.Map _json) { 1539 PullRequest.fromJson(core.Map _json) {
1555 if (_json.containsKey("maxMessages")) { 1540 if (_json.containsKey("maxMessages")) {
1556 maxMessages = _json["maxMessages"]; 1541 maxMessages = _json["maxMessages"];
1557 } 1542 }
1558 if (_json.containsKey("returnImmediately")) { 1543 if (_json.containsKey("returnImmediately")) {
1559 returnImmediately = _json["returnImmediately"]; 1544 returnImmediately = _json["returnImmediately"];
1560 } 1545 }
1561 } 1546 }
1562 1547
1563 core.Map<core.String, core.Object> toJson() { 1548 core.Map<core.String, core.Object> toJson() {
1564 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1549 final core.Map<core.String, core.Object> _json =
1550 new core.Map<core.String, core.Object>();
1565 if (maxMessages != null) { 1551 if (maxMessages != null) {
1566 _json["maxMessages"] = maxMessages; 1552 _json["maxMessages"] = maxMessages;
1567 } 1553 }
1568 if (returnImmediately != null) { 1554 if (returnImmediately != null) {
1569 _json["returnImmediately"] = returnImmediately; 1555 _json["returnImmediately"] = returnImmediately;
1570 } 1556 }
1571 return _json; 1557 return _json;
1572 } 1558 }
1573 } 1559 }
1574 1560
1575 /** Response for the `Pull` method. */ 1561 /// Response for the `Pull` method.
1576 class PullResponse { 1562 class PullResponse {
1577 /** 1563 /// Received Pub/Sub messages. The Pub/Sub system will return zero messages
1578 * Received Pub/Sub messages. The Pub/Sub system will return zero messages if 1564 /// if
1579 * there are no more available in the backlog. The Pub/Sub system may return 1565 /// there are no more available in the backlog. The Pub/Sub system may return
1580 * fewer than the `maxMessages` requested even if there are more messages 1566 /// fewer than the `maxMessages` requested even if there are more messages
1581 * available in the backlog. 1567 /// available in the backlog.
1582 */
1583 core.List<ReceivedMessage> receivedMessages; 1568 core.List<ReceivedMessage> receivedMessages;
1584 1569
1585 PullResponse(); 1570 PullResponse();
1586 1571
1587 PullResponse.fromJson(core.Map _json) { 1572 PullResponse.fromJson(core.Map _json) {
1588 if (_json.containsKey("receivedMessages")) { 1573 if (_json.containsKey("receivedMessages")) {
1589 receivedMessages = _json["receivedMessages"].map((value) => new ReceivedMe ssage.fromJson(value)).toList(); 1574 receivedMessages = _json["receivedMessages"]
1575 .map((value) => new ReceivedMessage.fromJson(value))
1576 .toList();
1590 } 1577 }
1591 } 1578 }
1592 1579
1593 core.Map<core.String, core.Object> toJson() { 1580 core.Map<core.String, core.Object> toJson() {
1594 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1581 final core.Map<core.String, core.Object> _json =
1582 new core.Map<core.String, core.Object>();
1595 if (receivedMessages != null) { 1583 if (receivedMessages != null) {
1596 _json["receivedMessages"] = receivedMessages.map((value) => (value).toJson ()).toList(); 1584 _json["receivedMessages"] =
1585 receivedMessages.map((value) => (value).toJson()).toList();
1597 } 1586 }
1598 return _json; 1587 return _json;
1599 } 1588 }
1600 } 1589 }
1601 1590
1602 /** Configuration for a push delivery endpoint. */ 1591 /// Configuration for a push delivery endpoint.
1603 class PushConfig { 1592 class PushConfig {
1604 /** 1593 /// Endpoint configuration attributes.
1605 * Endpoint configuration attributes. 1594 ///
1606 * 1595 /// Every endpoint has a set of API supported attributes that can be used to
1607 * Every endpoint has a set of API supported attributes that can be used to 1596 /// control different aspects of the message delivery.
1608 * control different aspects of the message delivery. 1597 ///
1609 * 1598 /// The currently supported attribute is `x-goog-version`, which you can
1610 * The currently supported attribute is `x-goog-version`, which you can 1599 /// use to change the format of the push message. This attribute
1611 * use to change the format of the push message. This attribute 1600 /// indicates the version of the data expected by the endpoint. This
1612 * indicates the version of the data expected by the endpoint. This 1601 /// controls the shape of the envelope (i.e. its fields and metadata).
1613 * controls the shape of the envelope (i.e. its fields and metadata). 1602 /// The endpoint version is based on the version of the Pub/Sub
1614 * The endpoint version is based on the version of the Pub/Sub 1603 /// API.
1615 * API. 1604 ///
1616 * 1605 /// If not present during the `CreateSubscription` call, it will default to
1617 * If not present during the `CreateSubscription` call, it will default to 1606 /// the version of the API used to make such call. If not present during a
1618 * the version of the API used to make such call. If not present during a 1607 /// `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
1619 * `ModifyPushConfig` call, its value will not be changed. `GetSubscription` 1608 /// calls will always return a valid version, even if the subscription was
1620 * calls will always return a valid version, even if the subscription was 1609 /// created without this attribute.
1621 * created without this attribute. 1610 ///
1622 * 1611 /// The possible values for this attribute are:
1623 * The possible values for this attribute are: 1612 ///
1624 * 1613 /// * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
1625 * * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. 1614 /// * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
1626 * * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
1627 */
1628 core.Map<core.String, core.String> attributes; 1615 core.Map<core.String, core.String> attributes;
1629 /** 1616
1630 * A URL locating the endpoint to which messages should be pushed. 1617 /// A URL locating the endpoint to which messages should be pushed.
1631 * For example, a Webhook endpoint might use "https://example.com/push". 1618 /// For example, a Webhook endpoint might use "https://example.com/push".
1632 */
1633 core.String pushEndpoint; 1619 core.String pushEndpoint;
1634 1620
1635 PushConfig(); 1621 PushConfig();
1636 1622
1637 PushConfig.fromJson(core.Map _json) { 1623 PushConfig.fromJson(core.Map _json) {
1638 if (_json.containsKey("attributes")) { 1624 if (_json.containsKey("attributes")) {
1639 attributes = _json["attributes"]; 1625 attributes = _json["attributes"];
1640 } 1626 }
1641 if (_json.containsKey("pushEndpoint")) { 1627 if (_json.containsKey("pushEndpoint")) {
1642 pushEndpoint = _json["pushEndpoint"]; 1628 pushEndpoint = _json["pushEndpoint"];
1643 } 1629 }
1644 } 1630 }
1645 1631
1646 core.Map<core.String, core.Object> toJson() { 1632 core.Map<core.String, core.Object> toJson() {
1647 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1633 final core.Map<core.String, core.Object> _json =
1634 new core.Map<core.String, core.Object>();
1648 if (attributes != null) { 1635 if (attributes != null) {
1649 _json["attributes"] = attributes; 1636 _json["attributes"] = attributes;
1650 } 1637 }
1651 if (pushEndpoint != null) { 1638 if (pushEndpoint != null) {
1652 _json["pushEndpoint"] = pushEndpoint; 1639 _json["pushEndpoint"] = pushEndpoint;
1653 } 1640 }
1654 return _json; 1641 return _json;
1655 } 1642 }
1656 } 1643 }
1657 1644
1658 /** A message and its corresponding acknowledgment ID. */ 1645 /// A message and its corresponding acknowledgment ID.
1659 class ReceivedMessage { 1646 class ReceivedMessage {
1660 /** This ID can be used to acknowledge the received message. */ 1647 /// This ID can be used to acknowledge the received message.
1661 core.String ackId; 1648 core.String ackId;
1662 /** The message. */ 1649
1650 /// The message.
1663 PubsubMessage message; 1651 PubsubMessage message;
1664 1652
1665 ReceivedMessage(); 1653 ReceivedMessage();
1666 1654
1667 ReceivedMessage.fromJson(core.Map _json) { 1655 ReceivedMessage.fromJson(core.Map _json) {
1668 if (_json.containsKey("ackId")) { 1656 if (_json.containsKey("ackId")) {
1669 ackId = _json["ackId"]; 1657 ackId = _json["ackId"];
1670 } 1658 }
1671 if (_json.containsKey("message")) { 1659 if (_json.containsKey("message")) {
1672 message = new PubsubMessage.fromJson(_json["message"]); 1660 message = new PubsubMessage.fromJson(_json["message"]);
1673 } 1661 }
1674 } 1662 }
1675 1663
1676 core.Map<core.String, core.Object> toJson() { 1664 core.Map<core.String, core.Object> toJson() {
1677 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1665 final core.Map<core.String, core.Object> _json =
1666 new core.Map<core.String, core.Object>();
1678 if (ackId != null) { 1667 if (ackId != null) {
1679 _json["ackId"] = ackId; 1668 _json["ackId"] = ackId;
1680 } 1669 }
1681 if (message != null) { 1670 if (message != null) {
1682 _json["message"] = (message).toJson(); 1671 _json["message"] = (message).toJson();
1683 } 1672 }
1684 return _json; 1673 return _json;
1685 } 1674 }
1686 } 1675 }
1687 1676
1688 /** Request message for `SetIamPolicy` method. */ 1677 /// Request message for `SetIamPolicy` method.
1689 class SetIamPolicyRequest { 1678 class SetIamPolicyRequest {
1690 /** 1679 /// REQUIRED: The complete policy to be applied to the `resource`. The size
1691 * REQUIRED: The complete policy to be applied to the `resource`. The size of 1680 /// of
1692 * the policy is limited to a few 10s of KB. An empty policy is a 1681 /// the policy is limited to a few 10s of KB. An empty policy is a
1693 * valid policy but certain Cloud Platform services (such as Projects) 1682 /// valid policy but certain Cloud Platform services (such as Projects)
1694 * might reject them. 1683 /// might reject them.
1695 */
1696 Policy policy; 1684 Policy policy;
1697 1685
1698 SetIamPolicyRequest(); 1686 SetIamPolicyRequest();
1699 1687
1700 SetIamPolicyRequest.fromJson(core.Map _json) { 1688 SetIamPolicyRequest.fromJson(core.Map _json) {
1701 if (_json.containsKey("policy")) { 1689 if (_json.containsKey("policy")) {
1702 policy = new Policy.fromJson(_json["policy"]); 1690 policy = new Policy.fromJson(_json["policy"]);
1703 } 1691 }
1704 } 1692 }
1705 1693
1706 core.Map<core.String, core.Object> toJson() { 1694 core.Map<core.String, core.Object> toJson() {
1707 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1695 final core.Map<core.String, core.Object> _json =
1696 new core.Map<core.String, core.Object>();
1708 if (policy != null) { 1697 if (policy != null) {
1709 _json["policy"] = (policy).toJson(); 1698 _json["policy"] = (policy).toJson();
1710 } 1699 }
1711 return _json; 1700 return _json;
1712 } 1701 }
1713 } 1702 }
1714 1703
1715 /** A subscription resource. */ 1704 /// A subscription resource.
1716 class Subscription { 1705 class Subscription {
1717 /** 1706 /// This value is the maximum time after a subscriber receives a message
1718 * This value is the maximum time after a subscriber receives a message 1707 /// before the subscriber should acknowledge the message. After message
1719 * before the subscriber should acknowledge the message. After message 1708 /// delivery but before the ack deadline expires and before the message is
1720 * delivery but before the ack deadline expires and before the message is 1709 /// acknowledged, it is an outstanding message and will not be delivered
1721 * acknowledged, it is an outstanding message and will not be delivered 1710 /// again during that time (on a best-effort basis).
1722 * again during that time (on a best-effort basis). 1711 ///
1723 * 1712 /// For pull subscriptions, this value is used as the initial value for the
1724 * For pull subscriptions, this value is used as the initial value for the ack 1713 /// ack
1725 * deadline. To override this value for a given message, call 1714 /// deadline. To override this value for a given message, call
1726 * `ModifyAckDeadline` with the corresponding `ack_id` if using pull. 1715 /// `ModifyAckDeadline` with the corresponding `ack_id` if using pull.
1727 * The maximum custom deadline you can specify is 600 seconds (10 minutes). 1716 /// The maximum custom deadline you can specify is 600 seconds (10 minutes).
1728 * 1717 ///
1729 * For push delivery, this value is also used to set the request timeout for 1718 /// For push delivery, this value is also used to set the request timeout for
1730 * the call to the push endpoint. 1719 /// the call to the push endpoint.
1731 * 1720 ///
1732 * If the subscriber never acknowledges the message, the Pub/Sub 1721 /// If the subscriber never acknowledges the message, the Pub/Sub
1733 * system will eventually redeliver the message. 1722 /// system will eventually redeliver the message.
1734 * 1723 ///
1735 * If this parameter is 0, a default value of 10 seconds is used. 1724 /// If this parameter is 0, a default value of 10 seconds is used.
1736 */
1737 core.int ackDeadlineSeconds; 1725 core.int ackDeadlineSeconds;
1738 /** 1726
1739 * The name of the subscription. It must have the format 1727 /// The name of the subscription. It must have the format
1740 * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must 1728 /// `"projects/{project}/subscriptions/{subscription}"`. `{subscription}`
1741 * start with a letter, and contain only letters (`[A-Za-z]`), numbers 1729 /// must
1742 * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), 1730 /// start with a letter, and contain only letters (`[A-Za-z]`), numbers
1743 * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters 1731 /// (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
1744 * in length, and it must not start with `"goog"`. 1732 /// plus (`+`) or percent signs (`%`). It must be between 3 and 255
1745 */ 1733 /// characters
1734 /// in length, and it must not start with `"goog"`.
1746 core.String name; 1735 core.String name;
1747 /** 1736
1748 * If push delivery is used with this subscription, this field is 1737 /// If push delivery is used with this subscription, this field is
1749 * used to configure it. An empty `pushConfig` signifies that the subscriber 1738 /// used to configure it. An empty `pushConfig` signifies that the subscriber
1750 * will pull and ack messages using API methods. 1739 /// will pull and ack messages using API methods.
1751 */
1752 PushConfig pushConfig; 1740 PushConfig pushConfig;
1753 /** 1741
1754 * The name of the topic from which this subscription is receiving messages. 1742 /// The name of the topic from which this subscription is receiving messages.
1755 * The value of this field will be `_deleted-topic_` if the topic has been 1743 /// The value of this field will be `_deleted-topic_` if the topic has been
1756 * deleted. 1744 /// deleted.
1757 */
1758 core.String topic; 1745 core.String topic;
1759 1746
1760 Subscription(); 1747 Subscription();
1761 1748
1762 Subscription.fromJson(core.Map _json) { 1749 Subscription.fromJson(core.Map _json) {
1763 if (_json.containsKey("ackDeadlineSeconds")) { 1750 if (_json.containsKey("ackDeadlineSeconds")) {
1764 ackDeadlineSeconds = _json["ackDeadlineSeconds"]; 1751 ackDeadlineSeconds = _json["ackDeadlineSeconds"];
1765 } 1752 }
1766 if (_json.containsKey("name")) { 1753 if (_json.containsKey("name")) {
1767 name = _json["name"]; 1754 name = _json["name"];
1768 } 1755 }
1769 if (_json.containsKey("pushConfig")) { 1756 if (_json.containsKey("pushConfig")) {
1770 pushConfig = new PushConfig.fromJson(_json["pushConfig"]); 1757 pushConfig = new PushConfig.fromJson(_json["pushConfig"]);
1771 } 1758 }
1772 if (_json.containsKey("topic")) { 1759 if (_json.containsKey("topic")) {
1773 topic = _json["topic"]; 1760 topic = _json["topic"];
1774 } 1761 }
1775 } 1762 }
1776 1763
1777 core.Map<core.String, core.Object> toJson() { 1764 core.Map<core.String, core.Object> toJson() {
1778 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1765 final core.Map<core.String, core.Object> _json =
1766 new core.Map<core.String, core.Object>();
1779 if (ackDeadlineSeconds != null) { 1767 if (ackDeadlineSeconds != null) {
1780 _json["ackDeadlineSeconds"] = ackDeadlineSeconds; 1768 _json["ackDeadlineSeconds"] = ackDeadlineSeconds;
1781 } 1769 }
1782 if (name != null) { 1770 if (name != null) {
1783 _json["name"] = name; 1771 _json["name"] = name;
1784 } 1772 }
1785 if (pushConfig != null) { 1773 if (pushConfig != null) {
1786 _json["pushConfig"] = (pushConfig).toJson(); 1774 _json["pushConfig"] = (pushConfig).toJson();
1787 } 1775 }
1788 if (topic != null) { 1776 if (topic != null) {
1789 _json["topic"] = topic; 1777 _json["topic"] = topic;
1790 } 1778 }
1791 return _json; 1779 return _json;
1792 } 1780 }
1793 } 1781 }
1794 1782
1795 /** Request message for `TestIamPermissions` method. */ 1783 /// Request message for `TestIamPermissions` method.
1796 class TestIamPermissionsRequest { 1784 class TestIamPermissionsRequest {
1797 /** 1785 /// The set of permissions to check for the `resource`. Permissions with
1798 * The set of permissions to check for the `resource`. Permissions with 1786 /// wildcards (such as '*' or 'storage.*') are not allowed. For more
1799 * wildcards (such as '*' or 'storage.*') are not allowed. For more 1787 /// information see
1800 * information see 1788 /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
1801 * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
1802 */
1803 core.List<core.String> permissions; 1789 core.List<core.String> permissions;
1804 1790
1805 TestIamPermissionsRequest(); 1791 TestIamPermissionsRequest();
1806 1792
1807 TestIamPermissionsRequest.fromJson(core.Map _json) { 1793 TestIamPermissionsRequest.fromJson(core.Map _json) {
1808 if (_json.containsKey("permissions")) { 1794 if (_json.containsKey("permissions")) {
1809 permissions = _json["permissions"]; 1795 permissions = _json["permissions"];
1810 } 1796 }
1811 } 1797 }
1812 1798
1813 core.Map<core.String, core.Object> toJson() { 1799 core.Map<core.String, core.Object> toJson() {
1814 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1800 final core.Map<core.String, core.Object> _json =
1801 new core.Map<core.String, core.Object>();
1815 if (permissions != null) { 1802 if (permissions != null) {
1816 _json["permissions"] = permissions; 1803 _json["permissions"] = permissions;
1817 } 1804 }
1818 return _json; 1805 return _json;
1819 } 1806 }
1820 } 1807 }
1821 1808
1822 /** Response message for `TestIamPermissions` method. */ 1809 /// Response message for `TestIamPermissions` method.
1823 class TestIamPermissionsResponse { 1810 class TestIamPermissionsResponse {
1824 /** 1811 /// A subset of `TestPermissionsRequest.permissions` that the caller is
1825 * A subset of `TestPermissionsRequest.permissions` that the caller is 1812 /// allowed.
1826 * allowed.
1827 */
1828 core.List<core.String> permissions; 1813 core.List<core.String> permissions;
1829 1814
1830 TestIamPermissionsResponse(); 1815 TestIamPermissionsResponse();
1831 1816
1832 TestIamPermissionsResponse.fromJson(core.Map _json) { 1817 TestIamPermissionsResponse.fromJson(core.Map _json) {
1833 if (_json.containsKey("permissions")) { 1818 if (_json.containsKey("permissions")) {
1834 permissions = _json["permissions"]; 1819 permissions = _json["permissions"];
1835 } 1820 }
1836 } 1821 }
1837 1822
1838 core.Map<core.String, core.Object> toJson() { 1823 core.Map<core.String, core.Object> toJson() {
1839 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1824 final core.Map<core.String, core.Object> _json =
1825 new core.Map<core.String, core.Object>();
1840 if (permissions != null) { 1826 if (permissions != null) {
1841 _json["permissions"] = permissions; 1827 _json["permissions"] = permissions;
1842 } 1828 }
1843 return _json; 1829 return _json;
1844 } 1830 }
1845 } 1831 }
1846 1832
1847 /** A topic resource. */ 1833 /// A topic resource.
1848 class Topic { 1834 class Topic {
1849 /** 1835 /// The name of the topic. It must have the format
1850 * The name of the topic. It must have the format 1836 /// `"projects/{project}/topics/{topic}"`. `{topic}` must start with a
1851 * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, 1837 /// letter,
1852 * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), 1838 /// and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
1853 * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent 1839 /// underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
1854 * signs (`%`). It must be between 3 and 255 characters in length, and it 1840 /// signs (`%`). It must be between 3 and 255 characters in length, and it
1855 * must not start with `"goog"`. 1841 /// must not start with `"goog"`.
1856 */
1857 core.String name; 1842 core.String name;
1858 1843
1859 Topic(); 1844 Topic();
1860 1845
1861 Topic.fromJson(core.Map _json) { 1846 Topic.fromJson(core.Map _json) {
1862 if (_json.containsKey("name")) { 1847 if (_json.containsKey("name")) {
1863 name = _json["name"]; 1848 name = _json["name"];
1864 } 1849 }
1865 } 1850 }
1866 1851
1867 core.Map<core.String, core.Object> toJson() { 1852 core.Map<core.String, core.Object> toJson() {
1868 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1853 final core.Map<core.String, core.Object> _json =
1854 new core.Map<core.String, core.Object>();
1869 if (name != null) { 1855 if (name != null) {
1870 _json["name"] = name; 1856 _json["name"] = name;
1871 } 1857 }
1872 return _json; 1858 return _json;
1873 } 1859 }
1874 } 1860 }
OLDNEW
« no previous file with comments | « generated/googleapis_beta/lib/proximitybeacon/v1beta1.dart ('k') | generated/googleapis_beta/lib/replicapool/v1beta2.dart » ('j') | no next file with comments »

Powered by Google App Engine