Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: generated/googleapis/lib/runtimeconfig/v1.dart

Issue 2485703002: Api-roll 42: 2016-11-08 (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // This is a generated file (see the discoveryapis_generator project).
2
3 library googleapis.runtimeconfig.v1;
4
5 import 'dart:core' as core;
6 import 'dart:async' as async;
7 import 'dart:convert' as convert;
8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http;
11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
13 ApiRequestError, DetailedApiRequestError;
14
15 const core.String USER_AGENT = 'dart-api-client runtimeconfig/v1';
16
17 /**
18 * Provides capabilities for dynamic configuration and coordination for
19 * applications running on Google Cloud Platform.
20 */
21 class RuntimeconfigApi {
22 /** View and manage your data across Google Cloud Platform services */
23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm";
24
25 /** Manage your Google Cloud Platform services' runtime configuration */
26 static const CloudruntimeconfigScope = "https://www.googleapis.com/auth/cloudr untimeconfig";
27
28
29 final commons.ApiRequester _requester;
30
31 OperationsResourceApi get operations => new OperationsResourceApi(_requester);
32
33 RuntimeconfigApi(http.Client client, {core.String rootUrl: "https://runtimecon fig.googleapis.com/", core.String servicePath: ""}) :
34 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
35 }
36
37
38 class OperationsResourceApi {
39 final commons.ApiRequester _requester;
40
41 OperationsResourceApi(commons.ApiRequester client) :
42 _requester = client;
43
44 /**
45 * Starts asynchronous cancellation on a long-running operation. The server
46 * makes a best effort to cancel the operation, but success is not
47 * guaranteed. If the server doesn't support this method, it returns
48 * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
49 * Operations.GetOperation or
50 * other methods to check whether the cancellation succeeded or whether the
51 * operation completed despite cancellation. On successful cancellation,
52 * the operation is not deleted; instead, it becomes an operation with
53 * an Operation.error value with a google.rpc.Status.code of 1,
54 * corresponding to `Code.CANCELLED`.
55 *
56 * [request] - The metadata request object.
57 *
58 * Request parameters:
59 *
60 * [name] - The name of the operation resource to be cancelled.
61 * Value must have pattern "^operations/.+$".
62 *
63 * Completes with a [Empty].
64 *
65 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
66 * error.
67 *
68 * If the used [http.Client] completes with an error when making a REST call,
69 * this method will complete with the same error.
70 */
71 async.Future<Empty> cancel(CancelOperationRequest request, core.String name) {
72 var _url = null;
73 var _queryParams = new core.Map();
74 var _uploadMedia = null;
75 var _uploadOptions = null;
76 var _downloadOptions = commons.DownloadOptions.Metadata;
77 var _body = null;
78
79 if (request != null) {
80 _body = convert.JSON.encode((request).toJson());
81 }
82 if (name == null) {
83 throw new core.ArgumentError("Parameter name is required.");
84 }
85
86 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':cancel';
87
88 var _response = _requester.request(_url,
89 "POST",
90 body: _body,
91 queryParams: _queryParams,
92 uploadOptions: _uploadOptions,
93 uploadMedia: _uploadMedia,
94 downloadOptions: _downloadOptions);
95 return _response.then((data) => new Empty.fromJson(data));
96 }
97
98 /**
99 * Deletes a long-running operation. This method indicates that the client is
100 * no longer interested in the operation result. It does not cancel the
101 * operation. If the server doesn't support this method, it returns
102 * `google.rpc.Code.UNIMPLEMENTED`.
103 *
104 * Request parameters:
105 *
106 * [name] - The name of the operation resource to be deleted.
107 * Value must have pattern "^operations/.+$".
108 *
109 * Completes with a [Empty].
110 *
111 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
112 * error.
113 *
114 * If the used [http.Client] completes with an error when making a REST call,
115 * this method will complete with the same error.
116 */
117 async.Future<Empty> delete(core.String name) {
118 var _url = null;
119 var _queryParams = new core.Map();
120 var _uploadMedia = null;
121 var _uploadOptions = null;
122 var _downloadOptions = commons.DownloadOptions.Metadata;
123 var _body = null;
124
125 if (name == null) {
126 throw new core.ArgumentError("Parameter name is required.");
127 }
128
129 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
130
131 var _response = _requester.request(_url,
132 "DELETE",
133 body: _body,
134 queryParams: _queryParams,
135 uploadOptions: _uploadOptions,
136 uploadMedia: _uploadMedia,
137 downloadOptions: _downloadOptions);
138 return _response.then((data) => new Empty.fromJson(data));
139 }
140
141 /**
142 * Lists operations that match the specified filter in the request. If the
143 * server doesn't support this method, it returns `UNIMPLEMENTED`.
144 *
145 * NOTE: the `name` binding below allows API services to override the binding
146 * to use different resource name schemes, such as `users / * /operations`.
147 *
148 * Request parameters:
149 *
150 * [name] - The name of the operation collection.
151 * Value must have pattern "^operations$".
152 *
153 * [pageSize] - The standard list page size.
154 *
155 * [filter] - The standard list filter.
156 *
157 * [pageToken] - The standard list page token.
158 *
159 * Completes with a [ListOperationsResponse].
160 *
161 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
162 * error.
163 *
164 * If the used [http.Client] completes with an error when making a REST call,
165 * this method will complete with the same error.
166 */
167 async.Future<ListOperationsResponse> list(core.String name, {core.int pageSize , core.String filter, core.String pageToken}) {
168 var _url = null;
169 var _queryParams = new core.Map();
170 var _uploadMedia = null;
171 var _uploadOptions = null;
172 var _downloadOptions = commons.DownloadOptions.Metadata;
173 var _body = null;
174
175 if (name == null) {
176 throw new core.ArgumentError("Parameter name is required.");
177 }
178 if (pageSize != null) {
179 _queryParams["pageSize"] = ["${pageSize}"];
180 }
181 if (filter != null) {
182 _queryParams["filter"] = [filter];
183 }
184 if (pageToken != null) {
185 _queryParams["pageToken"] = [pageToken];
186 }
187
188 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
189
190 var _response = _requester.request(_url,
191 "GET",
192 body: _body,
193 queryParams: _queryParams,
194 uploadOptions: _uploadOptions,
195 uploadMedia: _uploadMedia,
196 downloadOptions: _downloadOptions);
197 return _response.then((data) => new ListOperationsResponse.fromJson(data));
198 }
199
200 }
201
202
203
204 /** The request message for Operations.CancelOperation. */
205 class CancelOperationRequest {
206
207 CancelOperationRequest();
208
209 CancelOperationRequest.fromJson(core.Map _json) {
210 }
211
212 core.Map toJson() {
213 var _json = new core.Map();
214 return _json;
215 }
216 }
217
218 /**
219 * A generic empty message that you can re-use to avoid defining duplicated
220 * empty messages in your APIs. A typical example is to use it as the request
221 * or the response type of an API method. For instance:
222 *
223 * service Foo {
224 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
225 * }
226 *
227 * The JSON representation for `Empty` is empty JSON object `{}`.
228 */
229 class Empty {
230
231 Empty();
232
233 Empty.fromJson(core.Map _json) {
234 }
235
236 core.Map toJson() {
237 var _json = new core.Map();
238 return _json;
239 }
240 }
241
242 /** The response message for Operations.ListOperations. */
243 class ListOperationsResponse {
244 /** The standard List next-page token. */
245 core.String nextPageToken;
246 /** A list of operations that matches the specified filter in the request. */
247 core.List<Operation> operations;
248
249 ListOperationsResponse();
250
251 ListOperationsResponse.fromJson(core.Map _json) {
252 if (_json.containsKey("nextPageToken")) {
253 nextPageToken = _json["nextPageToken"];
254 }
255 if (_json.containsKey("operations")) {
256 operations = _json["operations"].map((value) => new Operation.fromJson(val ue)).toList();
257 }
258 }
259
260 core.Map toJson() {
261 var _json = new core.Map();
262 if (nextPageToken != null) {
263 _json["nextPageToken"] = nextPageToken;
264 }
265 if (operations != null) {
266 _json["operations"] = operations.map((value) => (value).toJson()).toList() ;
267 }
268 return _json;
269 }
270 }
271
272 /**
273 * This resource represents a long-running operation that is the result of a
274 * network API call.
275 */
276 class Operation {
277 /**
278 * If the value is `false`, it means the operation is still in progress.
279 * If true, the operation is completed, and either `error` or `response` is
280 * available.
281 */
282 core.bool done;
283 /** The error result of the operation in case of failure or cancellation. */
284 Status error;
285 /**
286 * Service-specific metadata associated with the operation. It typically
287 * contains progress information and common metadata such as create time.
288 * Some services might not provide such metadata. Any method that returns a
289 * long-running operation should document the metadata type, if any.
290 *
291 * The values for Object must be JSON objects. It can consist of `num`,
292 * `String`, `bool` and `null` as well as `Map` and `List` values.
293 */
294 core.Map<core.String, core.Object> metadata;
295 /**
296 * The server-assigned name, which is only unique within the same service that
297 * originally returns it. If you use the default HTTP mapping, the
298 * `name` should have the format of `operations/some/unique/name`.
299 */
300 core.String name;
301 /**
302 * The normal response of the operation in case of success. If the original
303 * method returns no data on success, such as `Delete`, the response is
304 * `google.protobuf.Empty`. If the original method is standard
305 * `Get`/`Create`/`Update`, the response should be the resource. For other
306 * methods, the response should have the type `XxxResponse`, where `Xxx`
307 * is the original method name. For example, if the original method name
308 * is `TakeSnapshot()`, the inferred response type is
309 * `TakeSnapshotResponse`.
310 *
311 * The values for Object must be JSON objects. It can consist of `num`,
312 * `String`, `bool` and `null` as well as `Map` and `List` values.
313 */
314 core.Map<core.String, core.Object> response;
315
316 Operation();
317
318 Operation.fromJson(core.Map _json) {
319 if (_json.containsKey("done")) {
320 done = _json["done"];
321 }
322 if (_json.containsKey("error")) {
323 error = new Status.fromJson(_json["error"]);
324 }
325 if (_json.containsKey("metadata")) {
326 metadata = _json["metadata"];
327 }
328 if (_json.containsKey("name")) {
329 name = _json["name"];
330 }
331 if (_json.containsKey("response")) {
332 response = _json["response"];
333 }
334 }
335
336 core.Map toJson() {
337 var _json = new core.Map();
338 if (done != null) {
339 _json["done"] = done;
340 }
341 if (error != null) {
342 _json["error"] = (error).toJson();
343 }
344 if (metadata != null) {
345 _json["metadata"] = metadata;
346 }
347 if (name != null) {
348 _json["name"] = name;
349 }
350 if (response != null) {
351 _json["response"] = response;
352 }
353 return _json;
354 }
355 }
356
357 /**
358 * The `Status` type defines a logical error model that is suitable for
359 * different
360 * programming environments, including REST APIs and RPC APIs. It is used by
361 * [gRPC](https://github.com/grpc). The error model is designed to be:
362 *
363 * - Simple to use and understand for most users
364 * - Flexible enough to meet unexpected needs
365 *
366 * # Overview
367 *
368 * The `Status` message contains three pieces of data: error code, error
369 * message,
370 * and error details. The error code should be an enum value of
371 * google.rpc.Code, but it may accept additional error codes if needed. The
372 * error message should be a developer-facing English message that helps
373 * developers *understand* and *resolve* the error. If a localized user-facing
374 * error message is needed, put the localized message in the error details or
375 * localize it in the client. The optional error details may contain arbitrary
376 * information about the error. There is a predefined set of error detail types
377 * in the package `google.rpc` which can be used for common error conditions.
378 *
379 * # Language mapping
380 *
381 * The `Status` message is the logical representation of the error model, but it
382 * is not necessarily the actual wire format. When the `Status` message is
383 * exposed in different client libraries and different wire protocols, it can be
384 * mapped differently. For example, it will likely be mapped to some exceptions
385 * in Java, but more likely mapped to some error codes in C.
386 *
387 * # Other uses
388 *
389 * The error model and the `Status` message can be used in a variety of
390 * environments, either with or without APIs, to provide a
391 * consistent developer experience across different environments.
392 *
393 * Example uses of this error model include:
394 *
395 * - Partial errors. If a service needs to return partial errors to the client,
396 * it may embed the `Status` in the normal response to indicate the partial
397 * errors.
398 *
399 * - Workflow errors. A typical workflow has multiple steps. Each step may
400 * have a `Status` message for error reporting purpose.
401 *
402 * - Batch operations. If a client uses batch request and batch response, the
403 * `Status` message should be used directly inside batch response, one for
404 * each error sub-response.
405 *
406 * - Asynchronous operations. If an API call embeds asynchronous operation
407 * results in its response, the status of those operations should be
408 * represented directly using the `Status` message.
409 *
410 * - Logging. If some API errors are stored in logs, the message `Status` could
411 * be used directly after any stripping needed for security/privacy reasons.
412 */
413 class Status {
414 /** The status code, which should be an enum value of google.rpc.Code. */
415 core.int code;
416 /**
417 * A list of messages that carry the error details. There will be a
418 * common set of message types for APIs to use.
419 *
420 * The values for Object must be JSON objects. It can consist of `num`,
421 * `String`, `bool` and `null` as well as `Map` and `List` values.
422 */
423 core.List<core.Map<core.String, core.Object>> details;
424 /**
425 * A developer-facing error message, which should be in English. Any
426 * user-facing error message should be localized and sent in the
427 * google.rpc.Status.details field, or localized by the client.
428 */
429 core.String message;
430
431 Status();
432
433 Status.fromJson(core.Map _json) {
434 if (_json.containsKey("code")) {
435 code = _json["code"];
436 }
437 if (_json.containsKey("details")) {
438 details = _json["details"];
439 }
440 if (_json.containsKey("message")) {
441 message = _json["message"];
442 }
443 }
444
445 core.Map toJson() {
446 var _json = new core.Map();
447 if (code != null) {
448 _json["code"] = code;
449 }
450 if (details != null) {
451 _json["details"] = details;
452 }
453 if (message != null) {
454 _json["message"] = message;
455 }
456 return _json;
457 }
458 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/pubsub/v1.dart ('k') | generated/googleapis/lib/servicecontrol/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698