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