| OLD | NEW | 
|---|
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). | 
| 2 | 2 | 
| 3 library googleapis.cloudfunctions.v1; | 3 library googleapis.cloudfunctions.v1; | 
| 4 | 4 | 
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; | 
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; | 
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; | 
| 8 | 8 | 
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 
| 10 import 'package: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' show | 
| 13     ApiRequestError, DetailedApiRequestError; | 13     ApiRequestError, DetailedApiRequestError; | 
| 14 | 14 | 
| 15 const core.String USER_AGENT = 'dart-api-client cloudfunctions/v1'; | 15 const core.String USER_AGENT = 'dart-api-client cloudfunctions/v1'; | 
| 16 | 16 | 
| 17 /** | 17 /** | 
| 18  * API for managing lightweight user-provided functions executed in response to | 18  * API for managing lightweight user-provided functions executed in response to | 
| 19  * events. | 19  * events. | 
| 20  */ | 20  */ | 
| 21 class CloudfunctionsApi { | 21 class CloudfunctionsApi { | 
|  | 22   /** View and manage your data across Google Cloud Platform services */ | 
|  | 23   static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
     orm"; | 
|  | 24 | 
| 22 | 25 | 
| 23   final commons.ApiRequester _requester; | 26   final commons.ApiRequester _requester; | 
| 24 | 27 | 
|  | 28   OperationsResourceApi get operations => new OperationsResourceApi(_requester); | 
|  | 29   ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 
|  | 30 | 
| 25   CloudfunctionsApi(http.Client client, {core.String rootUrl: "https://cloudfunc
     tions.googleapis.com/", core.String servicePath: ""}) : | 31   CloudfunctionsApi(http.Client client, {core.String rootUrl: "https://cloudfunc
     tions.googleapis.com/", core.String servicePath: ""}) : | 
| 26       _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
     GENT); | 32       _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
     GENT); | 
| 27 } | 33 } | 
| 28 | 34 | 
| 29 | 35 | 
|  | 36 class OperationsResourceApi { | 
|  | 37   final commons.ApiRequester _requester; | 
|  | 38 | 
|  | 39   OperationsResourceApi(commons.ApiRequester client) : | 
|  | 40       _requester = client; | 
|  | 41 | 
|  | 42   /** | 
|  | 43    * Gets the latest state of a long-running operation.  Clients can use this | 
|  | 44    * method to poll the operation result at intervals as recommended by the API | 
|  | 45    * service. | 
|  | 46    * | 
|  | 47    * Request parameters: | 
|  | 48    * | 
|  | 49    * [name] - The name of the operation resource. | 
|  | 50    * Value must have pattern "^operations/[^/]+$". | 
|  | 51    * | 
|  | 52    * Completes with a [Operation]. | 
|  | 53    * | 
|  | 54    * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 
|  | 55    * error. | 
|  | 56    * | 
|  | 57    * If the used [http.Client] completes with an error when making a REST call, | 
|  | 58    * this method will complete with the same error. | 
|  | 59    */ | 
|  | 60   async.Future<Operation> get(core.String name) { | 
|  | 61     var _url = null; | 
|  | 62     var _queryParams = new core.Map(); | 
|  | 63     var _uploadMedia = null; | 
|  | 64     var _uploadOptions = null; | 
|  | 65     var _downloadOptions = commons.DownloadOptions.Metadata; | 
|  | 66     var _body = null; | 
|  | 67 | 
|  | 68     if (name == null) { | 
|  | 69       throw new core.ArgumentError("Parameter name is required."); | 
|  | 70     } | 
|  | 71 | 
|  | 72     _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 
|  | 73 | 
|  | 74     var _response = _requester.request(_url, | 
|  | 75                                        "GET", | 
|  | 76                                        body: _body, | 
|  | 77                                        queryParams: _queryParams, | 
|  | 78                                        uploadOptions: _uploadOptions, | 
|  | 79                                        uploadMedia: _uploadMedia, | 
|  | 80                                        downloadOptions: _downloadOptions); | 
|  | 81     return _response.then((data) => new Operation.fromJson(data)); | 
|  | 82   } | 
|  | 83 | 
|  | 84   /** | 
|  | 85    * Lists operations that match the specified filter in the request. If the | 
|  | 86    * server doesn't support this method, it returns `UNIMPLEMENTED`. | 
|  | 87    * | 
|  | 88    * NOTE: the `name` binding allows API services to override the binding | 
|  | 89    * to use different resource name schemes, such as `users / * /operations`. To | 
|  | 90    * override the binding, API services can add a binding such as | 
|  | 91    * `"/v1/{name=users / * }/operations"` to their service configuration. | 
|  | 92    * For backwards compatibility, the default name includes the operations | 
|  | 93    * collection id, however overriding users must ensure the name binding | 
|  | 94    * is the parent resource, without the operations collection id. | 
|  | 95    * | 
|  | 96    * Request parameters: | 
|  | 97    * | 
|  | 98    * [pageToken] - The standard list page token. | 
|  | 99    * | 
|  | 100    * [name] - The name of the operation's parent resource. | 
|  | 101    * | 
|  | 102    * [pageSize] - The standard list page size. | 
|  | 103    * | 
|  | 104    * [filter] - The standard list filter. | 
|  | 105    * | 
|  | 106    * Completes with a [ListOperationsResponse]. | 
|  | 107    * | 
|  | 108    * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 
|  | 109    * error. | 
|  | 110    * | 
|  | 111    * If the used [http.Client] completes with an error when making a REST call, | 
|  | 112    * this method will complete with the same error. | 
|  | 113    */ | 
|  | 114   async.Future<ListOperationsResponse> list({core.String pageToken, core.String 
     name, core.int pageSize, core.String filter}) { | 
|  | 115     var _url = null; | 
|  | 116     var _queryParams = new core.Map(); | 
|  | 117     var _uploadMedia = null; | 
|  | 118     var _uploadOptions = null; | 
|  | 119     var _downloadOptions = commons.DownloadOptions.Metadata; | 
|  | 120     var _body = null; | 
|  | 121 | 
|  | 122     if (pageToken != null) { | 
|  | 123       _queryParams["pageToken"] = [pageToken]; | 
|  | 124     } | 
|  | 125     if (name != null) { | 
|  | 126       _queryParams["name"] = [name]; | 
|  | 127     } | 
|  | 128     if (pageSize != null) { | 
|  | 129       _queryParams["pageSize"] = ["${pageSize}"]; | 
|  | 130     } | 
|  | 131     if (filter != null) { | 
|  | 132       _queryParams["filter"] = [filter]; | 
|  | 133     } | 
|  | 134 | 
|  | 135     _url = 'v1/operations'; | 
|  | 136 | 
|  | 137     var _response = _requester.request(_url, | 
|  | 138                                        "GET", | 
|  | 139                                        body: _body, | 
|  | 140                                        queryParams: _queryParams, | 
|  | 141                                        uploadOptions: _uploadOptions, | 
|  | 142                                        uploadMedia: _uploadMedia, | 
|  | 143                                        downloadOptions: _downloadOptions); | 
|  | 144     return _response.then((data) => new ListOperationsResponse.fromJson(data)); | 
|  | 145   } | 
|  | 146 | 
|  | 147 } | 
|  | 148 | 
|  | 149 | 
|  | 150 class ProjectsResourceApi { | 
|  | 151   final commons.ApiRequester _requester; | 
|  | 152 | 
|  | 153   ProjectsLocationsResourceApi get locations => new ProjectsLocationsResourceApi
     (_requester); | 
|  | 154 | 
|  | 155   ProjectsResourceApi(commons.ApiRequester client) : | 
|  | 156       _requester = client; | 
|  | 157 } | 
|  | 158 | 
|  | 159 | 
|  | 160 class ProjectsLocationsResourceApi { | 
|  | 161   final commons.ApiRequester _requester; | 
|  | 162 | 
|  | 163   ProjectsLocationsResourceApi(commons.ApiRequester client) : | 
|  | 164       _requester = client; | 
|  | 165 | 
|  | 166   /** | 
|  | 167    * Lists information about the supported locations for this service. | 
|  | 168    * | 
|  | 169    * Request parameters: | 
|  | 170    * | 
|  | 171    * [name] - The resource that owns the locations collection, if applicable. | 
|  | 172    * Value must have pattern "^projects/[^/]+$". | 
|  | 173    * | 
|  | 174    * [filter] - The standard list filter. | 
|  | 175    * | 
|  | 176    * [pageToken] - The standard list page token. | 
|  | 177    * | 
|  | 178    * [pageSize] - The standard list page size. | 
|  | 179    * | 
|  | 180    * Completes with a [ListLocationsResponse]. | 
|  | 181    * | 
|  | 182    * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 
|  | 183    * error. | 
|  | 184    * | 
|  | 185    * If the used [http.Client] completes with an error when making a REST call, | 
|  | 186    * this method will complete with the same error. | 
|  | 187    */ | 
|  | 188   async.Future<ListLocationsResponse> list(core.String name, {core.String filter
     , core.String pageToken, core.int pageSize}) { | 
|  | 189     var _url = null; | 
|  | 190     var _queryParams = new core.Map(); | 
|  | 191     var _uploadMedia = null; | 
|  | 192     var _uploadOptions = null; | 
|  | 193     var _downloadOptions = commons.DownloadOptions.Metadata; | 
|  | 194     var _body = null; | 
|  | 195 | 
|  | 196     if (name == null) { | 
|  | 197       throw new core.ArgumentError("Parameter name is required."); | 
|  | 198     } | 
|  | 199     if (filter != null) { | 
|  | 200       _queryParams["filter"] = [filter]; | 
|  | 201     } | 
|  | 202     if (pageToken != null) { | 
|  | 203       _queryParams["pageToken"] = [pageToken]; | 
|  | 204     } | 
|  | 205     if (pageSize != null) { | 
|  | 206       _queryParams["pageSize"] = ["${pageSize}"]; | 
|  | 207     } | 
|  | 208 | 
|  | 209     _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/locations'
     ; | 
|  | 210 | 
|  | 211     var _response = _requester.request(_url, | 
|  | 212                                        "GET", | 
|  | 213                                        body: _body, | 
|  | 214                                        queryParams: _queryParams, | 
|  | 215                                        uploadOptions: _uploadOptions, | 
|  | 216                                        uploadMedia: _uploadMedia, | 
|  | 217                                        downloadOptions: _downloadOptions); | 
|  | 218     return _response.then((data) => new ListLocationsResponse.fromJson(data)); | 
|  | 219   } | 
|  | 220 | 
|  | 221 } | 
|  | 222 | 
|  | 223 | 
|  | 224 | 
|  | 225 /** The response message for Locations.ListLocations. */ | 
|  | 226 class ListLocationsResponse { | 
|  | 227   /** A list of locations that matches the specified filter in the request. */ | 
|  | 228   core.List<Location> locations; | 
|  | 229   /** The standard List next-page token. */ | 
|  | 230   core.String nextPageToken; | 
|  | 231 | 
|  | 232   ListLocationsResponse(); | 
|  | 233 | 
|  | 234   ListLocationsResponse.fromJson(core.Map _json) { | 
|  | 235     if (_json.containsKey("locations")) { | 
|  | 236       locations = _json["locations"].map((value) => new Location.fromJson(value)
     ).toList(); | 
|  | 237     } | 
|  | 238     if (_json.containsKey("nextPageToken")) { | 
|  | 239       nextPageToken = _json["nextPageToken"]; | 
|  | 240     } | 
|  | 241   } | 
|  | 242 | 
|  | 243   core.Map<core.String, core.Object> toJson() { | 
|  | 244     final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
     ore.Object>(); | 
|  | 245     if (locations != null) { | 
|  | 246       _json["locations"] = locations.map((value) => (value).toJson()).toList(); | 
|  | 247     } | 
|  | 248     if (nextPageToken != null) { | 
|  | 249       _json["nextPageToken"] = nextPageToken; | 
|  | 250     } | 
|  | 251     return _json; | 
|  | 252   } | 
|  | 253 } | 
|  | 254 | 
|  | 255 /** The response message for Operations.ListOperations. */ | 
|  | 256 class ListOperationsResponse { | 
|  | 257   /** The standard List next-page token. */ | 
|  | 258   core.String nextPageToken; | 
|  | 259   /** A list of operations that matches the specified filter in the request. */ | 
|  | 260   core.List<Operation> operations; | 
|  | 261 | 
|  | 262   ListOperationsResponse(); | 
|  | 263 | 
|  | 264   ListOperationsResponse.fromJson(core.Map _json) { | 
|  | 265     if (_json.containsKey("nextPageToken")) { | 
|  | 266       nextPageToken = _json["nextPageToken"]; | 
|  | 267     } | 
|  | 268     if (_json.containsKey("operations")) { | 
|  | 269       operations = _json["operations"].map((value) => new Operation.fromJson(val
     ue)).toList(); | 
|  | 270     } | 
|  | 271   } | 
|  | 272 | 
|  | 273   core.Map<core.String, core.Object> toJson() { | 
|  | 274     final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
     ore.Object>(); | 
|  | 275     if (nextPageToken != null) { | 
|  | 276       _json["nextPageToken"] = nextPageToken; | 
|  | 277     } | 
|  | 278     if (operations != null) { | 
|  | 279       _json["operations"] = operations.map((value) => (value).toJson()).toList()
     ; | 
|  | 280     } | 
|  | 281     return _json; | 
|  | 282   } | 
|  | 283 } | 
|  | 284 | 
|  | 285 /** A resource that represents Google Cloud Platform location. */ | 
|  | 286 class Location { | 
|  | 287   /** | 
|  | 288    * Cross-service attributes for the location. For example | 
|  | 289    * | 
|  | 290    *     {"cloud.googleapis.com/region": "us-east1"} | 
|  | 291    */ | 
|  | 292   core.Map<core.String, core.String> labels; | 
|  | 293   /** The canonical id for this location. For example: `"us-east1"`. */ | 
|  | 294   core.String locationId; | 
|  | 295   /** | 
|  | 296    * Service-specific metadata. For example the available capacity at the given | 
|  | 297    * location. | 
|  | 298    * | 
|  | 299    * The values for Object must be JSON objects. It can consist of `num`, | 
|  | 300    * `String`, `bool` and `null` as well as `Map` and `List` values. | 
|  | 301    */ | 
|  | 302   core.Map<core.String, core.Object> metadata; | 
|  | 303   /** | 
|  | 304    * Resource name for the location, which may vary between implementations. | 
|  | 305    * For example: `"projects/example-project/locations/us-east1"` | 
|  | 306    */ | 
|  | 307   core.String name; | 
|  | 308 | 
|  | 309   Location(); | 
|  | 310 | 
|  | 311   Location.fromJson(core.Map _json) { | 
|  | 312     if (_json.containsKey("labels")) { | 
|  | 313       labels = _json["labels"]; | 
|  | 314     } | 
|  | 315     if (_json.containsKey("locationId")) { | 
|  | 316       locationId = _json["locationId"]; | 
|  | 317     } | 
|  | 318     if (_json.containsKey("metadata")) { | 
|  | 319       metadata = _json["metadata"]; | 
|  | 320     } | 
|  | 321     if (_json.containsKey("name")) { | 
|  | 322       name = _json["name"]; | 
|  | 323     } | 
|  | 324   } | 
|  | 325 | 
|  | 326   core.Map<core.String, core.Object> toJson() { | 
|  | 327     final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
     ore.Object>(); | 
|  | 328     if (labels != null) { | 
|  | 329       _json["labels"] = labels; | 
|  | 330     } | 
|  | 331     if (locationId != null) { | 
|  | 332       _json["locationId"] = locationId; | 
|  | 333     } | 
|  | 334     if (metadata != null) { | 
|  | 335       _json["metadata"] = metadata; | 
|  | 336     } | 
|  | 337     if (name != null) { | 
|  | 338       _json["name"] = name; | 
|  | 339     } | 
|  | 340     return _json; | 
|  | 341   } | 
|  | 342 } | 
|  | 343 | 
|  | 344 /** | 
|  | 345  * This resource represents a long-running operation that is the result of a | 
|  | 346  * network API call. | 
|  | 347  */ | 
|  | 348 class Operation { | 
|  | 349   /** | 
|  | 350    * If the value is `false`, it means the operation is still in progress. | 
|  | 351    * If true, the operation is completed, and either `error` or `response` is | 
|  | 352    * available. | 
|  | 353    */ | 
|  | 354   core.bool done; | 
|  | 355   /** The error result of the operation in case of failure or cancellation. */ | 
|  | 356   Status error; | 
|  | 357   /** | 
|  | 358    * Service-specific metadata associated with the operation.  It typically | 
|  | 359    * contains progress information and common metadata such as create time. | 
|  | 360    * Some services might not provide such metadata.  Any method that returns a | 
|  | 361    * long-running operation should document the metadata type, if any. | 
|  | 362    * | 
|  | 363    * The values for Object must be JSON objects. It can consist of `num`, | 
|  | 364    * `String`, `bool` and `null` as well as `Map` and `List` values. | 
|  | 365    */ | 
|  | 366   core.Map<core.String, core.Object> metadata; | 
|  | 367   /** | 
|  | 368    * The server-assigned name, which is only unique within the same service that | 
|  | 369    * originally returns it. If you use the default HTTP mapping, the | 
|  | 370    * `name` should have the format of `operations/some/unique/name`. | 
|  | 371    */ | 
|  | 372   core.String name; | 
|  | 373   /** | 
|  | 374    * The normal response of the operation in case of success.  If the original | 
|  | 375    * method returns no data on success, such as `Delete`, the response is | 
|  | 376    * `google.protobuf.Empty`.  If the original method is standard | 
|  | 377    * `Get`/`Create`/`Update`, the response should be the resource.  For other | 
|  | 378    * methods, the response should have the type `XxxResponse`, where `Xxx` | 
|  | 379    * is the original method name.  For example, if the original method name | 
|  | 380    * is `TakeSnapshot()`, the inferred response type is | 
|  | 381    * `TakeSnapshotResponse`. | 
|  | 382    * | 
|  | 383    * The values for Object must be JSON objects. It can consist of `num`, | 
|  | 384    * `String`, `bool` and `null` as well as `Map` and `List` values. | 
|  | 385    */ | 
|  | 386   core.Map<core.String, core.Object> response; | 
|  | 387 | 
|  | 388   Operation(); | 
|  | 389 | 
|  | 390   Operation.fromJson(core.Map _json) { | 
|  | 391     if (_json.containsKey("done")) { | 
|  | 392       done = _json["done"]; | 
|  | 393     } | 
|  | 394     if (_json.containsKey("error")) { | 
|  | 395       error = new Status.fromJson(_json["error"]); | 
|  | 396     } | 
|  | 397     if (_json.containsKey("metadata")) { | 
|  | 398       metadata = _json["metadata"]; | 
|  | 399     } | 
|  | 400     if (_json.containsKey("name")) { | 
|  | 401       name = _json["name"]; | 
|  | 402     } | 
|  | 403     if (_json.containsKey("response")) { | 
|  | 404       response = _json["response"]; | 
|  | 405     } | 
|  | 406   } | 
|  | 407 | 
|  | 408   core.Map<core.String, core.Object> toJson() { | 
|  | 409     final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
     ore.Object>(); | 
|  | 410     if (done != null) { | 
|  | 411       _json["done"] = done; | 
|  | 412     } | 
|  | 413     if (error != null) { | 
|  | 414       _json["error"] = (error).toJson(); | 
|  | 415     } | 
|  | 416     if (metadata != null) { | 
|  | 417       _json["metadata"] = metadata; | 
|  | 418     } | 
|  | 419     if (name != null) { | 
|  | 420       _json["name"] = name; | 
|  | 421     } | 
|  | 422     if (response != null) { | 
|  | 423       _json["response"] = response; | 
|  | 424     } | 
|  | 425     return _json; | 
|  | 426   } | 
|  | 427 } | 
| 30 | 428 | 
| 31 /** Metadata describing an Operation */ | 429 /** Metadata describing an Operation */ | 
| 32 class OperationMetadataV1Beta2 { | 430 class OperationMetadataV1Beta2 { | 
| 33   /** | 431   /** | 
| 34    * The original request that started the operation. | 432    * The original request that started the operation. | 
| 35    * | 433    * | 
| 36    * The values for Object must be JSON objects. It can consist of `num`, | 434    * The values for Object must be JSON objects. It can consist of `num`, | 
| 37    * `String`, `bool` and `null` as well as `Map` and `List` values. | 435    * `String`, `bool` and `null` as well as `Map` and `List` values. | 
| 38    */ | 436    */ | 
| 39   core.Map<core.String, core.Object> request; | 437   core.Map<core.String, core.Object> request; | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 73     } | 471     } | 
| 74     if (target != null) { | 472     if (target != null) { | 
| 75       _json["target"] = target; | 473       _json["target"] = target; | 
| 76     } | 474     } | 
| 77     if (type != null) { | 475     if (type != null) { | 
| 78       _json["type"] = type; | 476       _json["type"] = type; | 
| 79     } | 477     } | 
| 80     return _json; | 478     return _json; | 
| 81   } | 479   } | 
| 82 } | 480 } | 
|  | 481 | 
|  | 482 /** | 
|  | 483  * The `Status` type defines a logical error model that is suitable for | 
|  | 484  * different | 
|  | 485  * programming environments, including REST APIs and RPC APIs. It is used by | 
|  | 486  * [gRPC](https://github.com/grpc). The error model is designed to be: | 
|  | 487  * | 
|  | 488  * - Simple to use and understand for most users | 
|  | 489  * - Flexible enough to meet unexpected needs | 
|  | 490  * | 
|  | 491  * # Overview | 
|  | 492  * | 
|  | 493  * The `Status` message contains three pieces of data: error code, error | 
|  | 494  * message, | 
|  | 495  * and error details. The error code should be an enum value of | 
|  | 496  * google.rpc.Code, but it may accept additional error codes if needed.  The | 
|  | 497  * error message should be a developer-facing English message that helps | 
|  | 498  * developers *understand* and *resolve* the error. If a localized user-facing | 
|  | 499  * error message is needed, put the localized message in the error details or | 
|  | 500  * localize it in the client. The optional error details may contain arbitrary | 
|  | 501  * information about the error. There is a predefined set of error detail types | 
|  | 502  * in the package `google.rpc` that can be used for common error conditions. | 
|  | 503  * | 
|  | 504  * # Language mapping | 
|  | 505  * | 
|  | 506  * The `Status` message is the logical representation of the error model, but it | 
|  | 507  * is not necessarily the actual wire format. When the `Status` message is | 
|  | 508  * exposed in different client libraries and different wire protocols, it can be | 
|  | 509  * mapped differently. For example, it will likely be mapped to some exceptions | 
|  | 510  * in Java, but more likely mapped to some error codes in C. | 
|  | 511  * | 
|  | 512  * # Other uses | 
|  | 513  * | 
|  | 514  * The error model and the `Status` message can be used in a variety of | 
|  | 515  * environments, either with or without APIs, to provide a | 
|  | 516  * consistent developer experience across different environments. | 
|  | 517  * | 
|  | 518  * Example uses of this error model include: | 
|  | 519  * | 
|  | 520  * - Partial errors. If a service needs to return partial errors to the client, | 
|  | 521  *     it may embed the `Status` in the normal response to indicate the partial | 
|  | 522  *     errors. | 
|  | 523  * | 
|  | 524  * - Workflow errors. A typical workflow has multiple steps. Each step may | 
|  | 525  *     have a `Status` message for error reporting. | 
|  | 526  * | 
|  | 527  * - Batch operations. If a client uses batch request and batch response, the | 
|  | 528  *     `Status` message should be used directly inside batch response, one for | 
|  | 529  *     each error sub-response. | 
|  | 530  * | 
|  | 531  * - Asynchronous operations. If an API call embeds asynchronous operation | 
|  | 532  *     results in its response, the status of those operations should be | 
|  | 533  *     represented directly using the `Status` message. | 
|  | 534  * | 
|  | 535  * - Logging. If some API errors are stored in logs, the message `Status` could | 
|  | 536  * be used directly after any stripping needed for security/privacy reasons. | 
|  | 537  */ | 
|  | 538 class Status { | 
|  | 539   /** The status code, which should be an enum value of google.rpc.Code. */ | 
|  | 540   core.int code; | 
|  | 541   /** | 
|  | 542    * A list of messages that carry the error details.  There is a common set of | 
|  | 543    * message types for APIs to use. | 
|  | 544    * | 
|  | 545    * The values for Object must be JSON objects. It can consist of `num`, | 
|  | 546    * `String`, `bool` and `null` as well as `Map` and `List` values. | 
|  | 547    */ | 
|  | 548   core.List<core.Map<core.String, core.Object>> details; | 
|  | 549   /** | 
|  | 550    * A developer-facing error message, which should be in English. Any | 
|  | 551    * user-facing error message should be localized and sent in the | 
|  | 552    * google.rpc.Status.details field, or localized by the client. | 
|  | 553    */ | 
|  | 554   core.String message; | 
|  | 555 | 
|  | 556   Status(); | 
|  | 557 | 
|  | 558   Status.fromJson(core.Map _json) { | 
|  | 559     if (_json.containsKey("code")) { | 
|  | 560       code = _json["code"]; | 
|  | 561     } | 
|  | 562     if (_json.containsKey("details")) { | 
|  | 563       details = _json["details"]; | 
|  | 564     } | 
|  | 565     if (_json.containsKey("message")) { | 
|  | 566       message = _json["message"]; | 
|  | 567     } | 
|  | 568   } | 
|  | 569 | 
|  | 570   core.Map<core.String, core.Object> toJson() { | 
|  | 571     final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
     ore.Object>(); | 
|  | 572     if (code != null) { | 
|  | 573       _json["code"] = code; | 
|  | 574     } | 
|  | 575     if (details != null) { | 
|  | 576       _json["details"] = details; | 
|  | 577     } | 
|  | 578     if (message != null) { | 
|  | 579       _json["message"] = message; | 
|  | 580     } | 
|  | 581     return _json; | 
|  | 582   } | 
|  | 583 } | 
| OLD | NEW | 
|---|