| 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.servicecontrol.v1; | 3 library googleapis.servicecontrol.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 servicecontrol/v1'; | 15 const core.String USER_AGENT = 'dart-api-client servicecontrol/v1'; |
| 16 | 16 |
| 17 /** | 17 /// Google Service Control provides control plane functionality to managed |
| 18 * Google Service Control provides control plane functionality to managed | 18 /// services, such as logging, monitoring, and status checks. |
| 19 * services, such as logging, monitoring, and status checks. | |
| 20 */ | |
| 21 class ServicecontrolApi { | 19 class ServicecontrolApi { |
| 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 = |
| 22 "https://www.googleapis.com/auth/cloud-platform"; |
| 24 | 23 |
| 25 /** Manage your Google Service Control data */ | 24 /// Manage your Google Service Control data |
| 26 static const ServicecontrolScope = "https://www.googleapis.com/auth/servicecon
trol"; | 25 static const ServicecontrolScope = |
| 27 | 26 "https://www.googleapis.com/auth/servicecontrol"; |
| 28 | 27 |
| 29 final commons.ApiRequester _requester; | 28 final commons.ApiRequester _requester; |
| 30 | 29 |
| 31 ServicesResourceApi get services => new ServicesResourceApi(_requester); | 30 ServicesResourceApi get services => new ServicesResourceApi(_requester); |
| 32 | 31 |
| 33 ServicecontrolApi(http.Client client, {core.String rootUrl: "https://serviceco
ntrol.googleapis.com/", core.String servicePath: ""}) : | 32 ServicecontrolApi(http.Client client, |
| 34 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 33 {core.String rootUrl: "https://servicecontrol.googleapis.com/", |
| 34 core.String servicePath: ""}) |
| 35 : _requester = |
| 36 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
| 35 } | 37 } |
| 36 | 38 |
| 37 | |
| 38 class ServicesResourceApi { | 39 class ServicesResourceApi { |
| 39 final commons.ApiRequester _requester; | 40 final commons.ApiRequester _requester; |
| 40 | 41 |
| 41 ServicesResourceApi(commons.ApiRequester client) : | 42 ServicesResourceApi(commons.ApiRequester client) : _requester = client; |
| 42 _requester = client; | |
| 43 | 43 |
| 44 /** | 44 /// Attempts to allocate quota for the specified consumer. It should be |
| 45 * Attempts to allocate quota for the specified consumer. It should be called | 45 /// called |
| 46 * before the operation is executed. | 46 /// before the operation is executed. |
| 47 * | 47 /// |
| 48 * This method requires the `servicemanagement.services.quota` | 48 /// This method requires the `servicemanagement.services.quota` |
| 49 * permission on the specified service. For more information, see | 49 /// permission on the specified service. For more information, see |
| 50 * [Google Cloud IAM](https://cloud.google.com/iam). | 50 /// [Google Cloud IAM](https://cloud.google.com/iam). |
| 51 * | 51 /// |
| 52 * **NOTE:** the client code **must** fail-open if the server returns one | 52 /// **NOTE:** the client code **must** fail-open if the server returns one |
| 53 * of the following quota errors: | 53 /// of the following quota errors: |
| 54 * - `PROJECT_STATUS_UNAVAILABLE` | 54 /// - `PROJECT_STATUS_UNAVAILABLE` |
| 55 * - `SERVICE_STATUS_UNAVAILABLE` | 55 /// - `SERVICE_STATUS_UNAVAILABLE` |
| 56 * - `BILLING_STATUS_UNAVAILABLE` | 56 /// - `BILLING_STATUS_UNAVAILABLE` |
| 57 * - `QUOTA_SYSTEM_UNAVAILABLE` | 57 /// - `QUOTA_SYSTEM_UNAVAILABLE` |
| 58 * | 58 /// |
| 59 * The server may inject above errors to prohibit any hard dependency | 59 /// The server may inject above errors to prohibit any hard dependency |
| 60 * on the quota system. | 60 /// on the quota system. |
| 61 * | 61 /// |
| 62 * [request] - The metadata request object. | 62 /// [request] - The metadata request object. |
| 63 * | 63 /// |
| 64 * Request parameters: | 64 /// Request parameters: |
| 65 * | 65 /// |
| 66 * [serviceName] - Name of the service as specified in the service | 66 /// [serviceName] - Name of the service as specified in the service |
| 67 * configuration. For example, | 67 /// configuration. For example, |
| 68 * `"pubsub.googleapis.com"`. | 68 /// `"pubsub.googleapis.com"`. |
| 69 * | 69 /// |
| 70 * See google.api.Service for the definition of a service name. | 70 /// See google.api.Service for the definition of a service name. |
| 71 * | 71 /// |
| 72 * Completes with a [AllocateQuotaResponse]. | 72 /// Completes with a [AllocateQuotaResponse]. |
| 73 * | 73 /// |
| 74 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 74 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 75 * error. | 75 /// an error. |
| 76 * | 76 /// |
| 77 * If the used [http.Client] completes with an error when making a REST call, | 77 /// If the used [http.Client] completes with an error when making a REST |
| 78 * this method will complete with the same error. | 78 /// call, this method will complete with the same error. |
| 79 */ | 79 async.Future<AllocateQuotaResponse> allocateQuota( |
| 80 async.Future<AllocateQuotaResponse> allocateQuota(AllocateQuotaRequest request
, core.String serviceName) { | 80 AllocateQuotaRequest request, core.String serviceName) { |
| 81 var _url = null; | 81 var _url = null; |
| 82 var _queryParams = new core.Map(); | 82 var _queryParams = new core.Map(); |
| 83 var _uploadMedia = null; | 83 var _uploadMedia = null; |
| 84 var _uploadOptions = null; | 84 var _uploadOptions = null; |
| 85 var _downloadOptions = commons.DownloadOptions.Metadata; | 85 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 86 var _body = null; | 86 var _body = null; |
| 87 | 87 |
| 88 if (request != null) { | 88 if (request != null) { |
| 89 _body = convert.JSON.encode((request).toJson()); | 89 _body = convert.JSON.encode((request).toJson()); |
| 90 } | 90 } |
| 91 if (serviceName == null) { | 91 if (serviceName == null) { |
| 92 throw new core.ArgumentError("Parameter serviceName is required."); | 92 throw new core.ArgumentError("Parameter serviceName is required."); |
| 93 } | 93 } |
| 94 | 94 |
| 95 _url = 'v1/services/' + commons.Escaper.ecapeVariable('$serviceName') + ':al
locateQuota'; | 95 _url = 'v1/services/' + |
| 96 commons.Escaper.ecapeVariable('$serviceName') + |
| 97 ':allocateQuota'; |
| 96 | 98 |
| 97 var _response = _requester.request(_url, | 99 var _response = _requester.request(_url, "POST", |
| 98 "POST", | 100 body: _body, |
| 99 body: _body, | 101 queryParams: _queryParams, |
| 100 queryParams: _queryParams, | 102 uploadOptions: _uploadOptions, |
| 101 uploadOptions: _uploadOptions, | 103 uploadMedia: _uploadMedia, |
| 102 uploadMedia: _uploadMedia, | 104 downloadOptions: _downloadOptions); |
| 103 downloadOptions: _downloadOptions); | |
| 104 return _response.then((data) => new AllocateQuotaResponse.fromJson(data)); | 105 return _response.then((data) => new AllocateQuotaResponse.fromJson(data)); |
| 105 } | 106 } |
| 106 | 107 |
| 107 /** | 108 /// Checks an operation with Google Service Control to decide whether |
| 108 * Checks an operation with Google Service Control to decide whether | 109 /// the given operation should proceed. It should be called before the |
| 109 * the given operation should proceed. It should be called before the | 110 /// operation is executed. |
| 110 * operation is executed. | 111 /// |
| 111 * | 112 /// If feasible, the client should cache the check results and reuse them for |
| 112 * If feasible, the client should cache the check results and reuse them for | 113 /// 60 seconds. In case of server errors, the client can rely on the cached |
| 113 * 60 seconds. In case of server errors, the client can rely on the cached | 114 /// results for longer time. |
| 114 * results for longer time. | 115 /// |
| 115 * | 116 /// NOTE: the CheckRequest has the size limit of 64KB. |
| 116 * NOTE: the `CheckRequest` has the size limit of 64KB. | 117 /// |
| 117 * | 118 /// This method requires the `servicemanagement.services.check` permission |
| 118 * This method requires the `servicemanagement.services.check` permission | 119 /// on the specified service. For more information, see |
| 119 * on the specified service. For more information, see | 120 /// [Google Cloud IAM](https://cloud.google.com/iam). |
| 120 * [Google Cloud IAM](https://cloud.google.com/iam). | 121 /// |
| 121 * | 122 /// [request] - The metadata request object. |
| 122 * [request] - The metadata request object. | 123 /// |
| 123 * | 124 /// Request parameters: |
| 124 * Request parameters: | 125 /// |
| 125 * | 126 /// [serviceName] - The service name as specified in its service |
| 126 * [serviceName] - The service name as specified in its service configuration. | 127 /// configuration. For example, |
| 127 * For example, | 128 /// `"pubsub.googleapis.com"`. |
| 128 * `"pubsub.googleapis.com"`. | 129 /// |
| 129 * | 130 /// See |
| 130 * See google.api.Service for the definition of a service name. | 131 /// [google.api.Service](https://cloud.google.com/service-management/reference
/rpc/google.api#google.api.Service) |
| 131 * | 132 /// for the definition of a service name. |
| 132 * Completes with a [CheckResponse]. | 133 /// |
| 133 * | 134 /// Completes with a [CheckResponse]. |
| 134 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 135 /// |
| 135 * error. | 136 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 136 * | 137 /// an error. |
| 137 * If the used [http.Client] completes with an error when making a REST call, | 138 /// |
| 138 * this method will complete with the same error. | 139 /// If the used [http.Client] completes with an error when making a REST |
| 139 */ | 140 /// call, this method will complete with the same error. |
| 140 async.Future<CheckResponse> check(CheckRequest request, core.String serviceNam
e) { | 141 async.Future<CheckResponse> check( |
| 142 CheckRequest request, core.String serviceName) { |
| 141 var _url = null; | 143 var _url = null; |
| 142 var _queryParams = new core.Map(); | 144 var _queryParams = new core.Map(); |
| 143 var _uploadMedia = null; | 145 var _uploadMedia = null; |
| 144 var _uploadOptions = null; | 146 var _uploadOptions = null; |
| 145 var _downloadOptions = commons.DownloadOptions.Metadata; | 147 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 146 var _body = null; | 148 var _body = null; |
| 147 | 149 |
| 148 if (request != null) { | 150 if (request != null) { |
| 149 _body = convert.JSON.encode((request).toJson()); | 151 _body = convert.JSON.encode((request).toJson()); |
| 150 } | 152 } |
| 151 if (serviceName == null) { | 153 if (serviceName == null) { |
| 152 throw new core.ArgumentError("Parameter serviceName is required."); | 154 throw new core.ArgumentError("Parameter serviceName is required."); |
| 153 } | 155 } |
| 154 | 156 |
| 155 _url = 'v1/services/' + commons.Escaper.ecapeVariable('$serviceName') + ':ch
eck'; | 157 _url = 'v1/services/' + |
| 158 commons.Escaper.ecapeVariable('$serviceName') + |
| 159 ':check'; |
| 156 | 160 |
| 157 var _response = _requester.request(_url, | 161 var _response = _requester.request(_url, "POST", |
| 158 "POST", | 162 body: _body, |
| 159 body: _body, | 163 queryParams: _queryParams, |
| 160 queryParams: _queryParams, | 164 uploadOptions: _uploadOptions, |
| 161 uploadOptions: _uploadOptions, | 165 uploadMedia: _uploadMedia, |
| 162 uploadMedia: _uploadMedia, | 166 downloadOptions: _downloadOptions); |
| 163 downloadOptions: _downloadOptions); | |
| 164 return _response.then((data) => new CheckResponse.fromJson(data)); | 167 return _response.then((data) => new CheckResponse.fromJson(data)); |
| 165 } | 168 } |
| 166 | 169 |
| 167 /** | 170 /// Signals the quota controller that service ends the ongoing usage |
| 168 * Signals the quota controller that service ends the ongoing usage | 171 /// reconciliation. |
| 169 * reconciliation. | 172 /// |
| 170 * | 173 /// This method requires the `servicemanagement.services.quota` |
| 171 * This method requires the `servicemanagement.services.quota` | 174 /// permission on the specified service. For more information, see |
| 172 * permission on the specified service. For more information, see | 175 /// [Google Cloud IAM](https://cloud.google.com/iam). |
| 173 * [Google Cloud IAM](https://cloud.google.com/iam). | 176 /// |
| 174 * | 177 /// [request] - The metadata request object. |
| 175 * [request] - The metadata request object. | 178 /// |
| 176 * | 179 /// Request parameters: |
| 177 * Request parameters: | 180 /// |
| 178 * | 181 /// [serviceName] - Name of the service as specified in the service |
| 179 * [serviceName] - Name of the service as specified in the service | 182 /// configuration. For example, |
| 180 * configuration. For example, | 183 /// `"pubsub.googleapis.com"`. |
| 181 * `"pubsub.googleapis.com"`. | 184 /// |
| 182 * | 185 /// See google.api.Service for the definition of a service name. |
| 183 * See google.api.Service for the definition of a service name. | 186 /// |
| 184 * | 187 /// Completes with a [EndReconciliationResponse]. |
| 185 * Completes with a [EndReconciliationResponse]. | 188 /// |
| 186 * | 189 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 187 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 190 /// an error. |
| 188 * error. | 191 /// |
| 189 * | 192 /// If the used [http.Client] completes with an error when making a REST |
| 190 * If the used [http.Client] completes with an error when making a REST call, | 193 /// call, this method will complete with the same error. |
| 191 * this method will complete with the same error. | 194 async.Future<EndReconciliationResponse> endReconciliation( |
| 192 */ | 195 EndReconciliationRequest request, core.String serviceName) { |
| 193 async.Future<EndReconciliationResponse> endReconciliation(EndReconciliationReq
uest request, core.String serviceName) { | |
| 194 var _url = null; | 196 var _url = null; |
| 195 var _queryParams = new core.Map(); | 197 var _queryParams = new core.Map(); |
| 196 var _uploadMedia = null; | 198 var _uploadMedia = null; |
| 197 var _uploadOptions = null; | 199 var _uploadOptions = null; |
| 198 var _downloadOptions = commons.DownloadOptions.Metadata; | 200 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 199 var _body = null; | 201 var _body = null; |
| 200 | 202 |
| 201 if (request != null) { | 203 if (request != null) { |
| 202 _body = convert.JSON.encode((request).toJson()); | 204 _body = convert.JSON.encode((request).toJson()); |
| 203 } | 205 } |
| 204 if (serviceName == null) { | 206 if (serviceName == null) { |
| 205 throw new core.ArgumentError("Parameter serviceName is required."); | 207 throw new core.ArgumentError("Parameter serviceName is required."); |
| 206 } | 208 } |
| 207 | 209 |
| 208 _url = 'v1/services/' + commons.Escaper.ecapeVariable('$serviceName') + ':en
dReconciliation'; | 210 _url = 'v1/services/' + |
| 211 commons.Escaper.ecapeVariable('$serviceName') + |
| 212 ':endReconciliation'; |
| 209 | 213 |
| 210 var _response = _requester.request(_url, | 214 var _response = _requester.request(_url, "POST", |
| 211 "POST", | 215 body: _body, |
| 212 body: _body, | 216 queryParams: _queryParams, |
| 213 queryParams: _queryParams, | 217 uploadOptions: _uploadOptions, |
| 214 uploadOptions: _uploadOptions, | 218 uploadMedia: _uploadMedia, |
| 215 uploadMedia: _uploadMedia, | 219 downloadOptions: _downloadOptions); |
| 216 downloadOptions: _downloadOptions); | 220 return _response |
| 217 return _response.then((data) => new EndReconciliationResponse.fromJson(data)
); | 221 .then((data) => new EndReconciliationResponse.fromJson(data)); |
| 218 } | 222 } |
| 219 | 223 |
| 220 /** | 224 /// Releases previously allocated quota done through AllocateQuota method. |
| 221 * Releases previously allocated quota done through AllocateQuota method. | 225 /// |
| 222 * | 226 /// This method requires the `servicemanagement.services.quota` |
| 223 * This method requires the `servicemanagement.services.quota` | 227 /// permission on the specified service. For more information, see |
| 224 * permission on the specified service. For more information, see | 228 /// [Google Cloud IAM](https://cloud.google.com/iam). |
| 225 * [Google Cloud IAM](https://cloud.google.com/iam). | 229 /// |
| 226 * | 230 /// **NOTE:** the client code **must** fail-open if the server returns one |
| 227 * **NOTE:** the client code **must** fail-open if the server returns one | 231 /// of the following quota errors: |
| 228 * of the following quota errors: | 232 /// - `PROJECT_STATUS_UNAVAILABLE` |
| 229 * - `PROJECT_STATUS_UNAVAILABLE` | 233 /// - `SERVICE_STATUS_UNAVAILABLE` |
| 230 * - `SERVICE_STATUS_UNAVAILABLE` | 234 /// - `BILLING_STATUS_UNAVAILABLE` |
| 231 * - `BILLING_STATUS_UNAVAILABLE` | 235 /// - `QUOTA_SYSTEM_UNAVAILABLE` |
| 232 * - `QUOTA_SYSTEM_UNAVAILABLE` | 236 /// |
| 233 * | 237 /// The server may inject above errors to prohibit any hard dependency |
| 234 * The server may inject above errors to prohibit any hard dependency | 238 /// on the quota system. |
| 235 * on the quota system. | 239 /// |
| 236 * | 240 /// [request] - The metadata request object. |
| 237 * [request] - The metadata request object. | 241 /// |
| 238 * | 242 /// Request parameters: |
| 239 * Request parameters: | 243 /// |
| 240 * | 244 /// [serviceName] - Name of the service as specified in the service |
| 241 * [serviceName] - Name of the service as specified in the service | 245 /// configuration. For example, |
| 242 * configuration. For example, | 246 /// `"pubsub.googleapis.com"`. |
| 243 * `"pubsub.googleapis.com"`. | 247 /// |
| 244 * | 248 /// See google.api.Service for the definition of a service name. |
| 245 * See google.api.Service for the definition of a service name. | 249 /// |
| 246 * | 250 /// Completes with a [ReleaseQuotaResponse]. |
| 247 * Completes with a [ReleaseQuotaResponse]. | 251 /// |
| 248 * | 252 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 249 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 253 /// an error. |
| 250 * error. | 254 /// |
| 251 * | 255 /// If the used [http.Client] completes with an error when making a REST |
| 252 * If the used [http.Client] completes with an error when making a REST call, | 256 /// call, this method will complete with the same error. |
| 253 * this method will complete with the same error. | 257 async.Future<ReleaseQuotaResponse> releaseQuota( |
| 254 */ | 258 ReleaseQuotaRequest request, core.String serviceName) { |
| 255 async.Future<ReleaseQuotaResponse> releaseQuota(ReleaseQuotaRequest request, c
ore.String serviceName) { | |
| 256 var _url = null; | 259 var _url = null; |
| 257 var _queryParams = new core.Map(); | 260 var _queryParams = new core.Map(); |
| 258 var _uploadMedia = null; | 261 var _uploadMedia = null; |
| 259 var _uploadOptions = null; | 262 var _uploadOptions = null; |
| 260 var _downloadOptions = commons.DownloadOptions.Metadata; | 263 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 261 var _body = null; | 264 var _body = null; |
| 262 | 265 |
| 263 if (request != null) { | 266 if (request != null) { |
| 264 _body = convert.JSON.encode((request).toJson()); | 267 _body = convert.JSON.encode((request).toJson()); |
| 265 } | 268 } |
| 266 if (serviceName == null) { | 269 if (serviceName == null) { |
| 267 throw new core.ArgumentError("Parameter serviceName is required."); | 270 throw new core.ArgumentError("Parameter serviceName is required."); |
| 268 } | 271 } |
| 269 | 272 |
| 270 _url = 'v1/services/' + commons.Escaper.ecapeVariable('$serviceName') + ':re
leaseQuota'; | 273 _url = 'v1/services/' + |
| 274 commons.Escaper.ecapeVariable('$serviceName') + |
| 275 ':releaseQuota'; |
| 271 | 276 |
| 272 var _response = _requester.request(_url, | 277 var _response = _requester.request(_url, "POST", |
| 273 "POST", | 278 body: _body, |
| 274 body: _body, | 279 queryParams: _queryParams, |
| 275 queryParams: _queryParams, | 280 uploadOptions: _uploadOptions, |
| 276 uploadOptions: _uploadOptions, | 281 uploadMedia: _uploadMedia, |
| 277 uploadMedia: _uploadMedia, | 282 downloadOptions: _downloadOptions); |
| 278 downloadOptions: _downloadOptions); | |
| 279 return _response.then((data) => new ReleaseQuotaResponse.fromJson(data)); | 283 return _response.then((data) => new ReleaseQuotaResponse.fromJson(data)); |
| 280 } | 284 } |
| 281 | 285 |
| 282 /** | 286 /// Reports operation results to Google Service Control, such as logs and |
| 283 * Reports operation results to Google Service Control, such as logs and | 287 /// metrics. It should be called after an operation is completed. |
| 284 * metrics. It should be called after an operation is completed. | 288 /// |
| 285 * | 289 /// If feasible, the client should aggregate reporting data for up to 5 |
| 286 * If feasible, the client should aggregate reporting data for up to 5 | 290 /// seconds to reduce API traffic. Limiting aggregation to 5 seconds is to |
| 287 * seconds to reduce API traffic. Limiting aggregation to 5 seconds is to | 291 /// reduce data loss during client crashes. Clients should carefully choose |
| 288 * reduce data loss during client crashes. Clients should carefully choose | 292 /// the aggregation time window to avoid data loss risk more than 0.01% |
| 289 * the aggregation time window to avoid data loss risk more than 0.01% | 293 /// for business and compliance reasons. |
| 290 * for business and compliance reasons. | 294 /// |
| 291 * | 295 /// NOTE: the ReportRequest has the size limit of 1MB. |
| 292 * NOTE: the `ReportRequest` has the size limit of 1MB. | 296 /// |
| 293 * | 297 /// This method requires the `servicemanagement.services.report` permission |
| 294 * This method requires the `servicemanagement.services.report` permission | 298 /// on the specified service. For more information, see |
| 295 * on the specified service. For more information, see | 299 /// [Google Cloud IAM](https://cloud.google.com/iam). |
| 296 * [Google Cloud IAM](https://cloud.google.com/iam). | 300 /// |
| 297 * | 301 /// [request] - The metadata request object. |
| 298 * [request] - The metadata request object. | 302 /// |
| 299 * | 303 /// Request parameters: |
| 300 * Request parameters: | 304 /// |
| 301 * | 305 /// [serviceName] - The service name as specified in its service |
| 302 * [serviceName] - The service name as specified in its service configuration. | 306 /// configuration. For example, |
| 303 * For example, | 307 /// `"pubsub.googleapis.com"`. |
| 304 * `"pubsub.googleapis.com"`. | 308 /// |
| 305 * | 309 /// See |
| 306 * See google.api.Service for the definition of a service name. | 310 /// [google.api.Service](https://cloud.google.com/service-management/reference
/rpc/google.api#google.api.Service) |
| 307 * | 311 /// for the definition of a service name. |
| 308 * Completes with a [ReportResponse]. | 312 /// |
| 309 * | 313 /// Completes with a [ReportResponse]. |
| 310 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 314 /// |
| 311 * error. | 315 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 312 * | 316 /// an error. |
| 313 * If the used [http.Client] completes with an error when making a REST call, | 317 /// |
| 314 * this method will complete with the same error. | 318 /// If the used [http.Client] completes with an error when making a REST |
| 315 */ | 319 /// call, this method will complete with the same error. |
| 316 async.Future<ReportResponse> report(ReportRequest request, core.String service
Name) { | 320 async.Future<ReportResponse> report( |
| 321 ReportRequest request, core.String serviceName) { |
| 317 var _url = null; | 322 var _url = null; |
| 318 var _queryParams = new core.Map(); | 323 var _queryParams = new core.Map(); |
| 319 var _uploadMedia = null; | 324 var _uploadMedia = null; |
| 320 var _uploadOptions = null; | 325 var _uploadOptions = null; |
| 321 var _downloadOptions = commons.DownloadOptions.Metadata; | 326 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 322 var _body = null; | 327 var _body = null; |
| 323 | 328 |
| 324 if (request != null) { | 329 if (request != null) { |
| 325 _body = convert.JSON.encode((request).toJson()); | 330 _body = convert.JSON.encode((request).toJson()); |
| 326 } | 331 } |
| 327 if (serviceName == null) { | 332 if (serviceName == null) { |
| 328 throw new core.ArgumentError("Parameter serviceName is required."); | 333 throw new core.ArgumentError("Parameter serviceName is required."); |
| 329 } | 334 } |
| 330 | 335 |
| 331 _url = 'v1/services/' + commons.Escaper.ecapeVariable('$serviceName') + ':re
port'; | 336 _url = 'v1/services/' + |
| 337 commons.Escaper.ecapeVariable('$serviceName') + |
| 338 ':report'; |
| 332 | 339 |
| 333 var _response = _requester.request(_url, | 340 var _response = _requester.request(_url, "POST", |
| 334 "POST", | 341 body: _body, |
| 335 body: _body, | 342 queryParams: _queryParams, |
| 336 queryParams: _queryParams, | 343 uploadOptions: _uploadOptions, |
| 337 uploadOptions: _uploadOptions, | 344 uploadMedia: _uploadMedia, |
| 338 uploadMedia: _uploadMedia, | 345 downloadOptions: _downloadOptions); |
| 339 downloadOptions: _downloadOptions); | |
| 340 return _response.then((data) => new ReportResponse.fromJson(data)); | 346 return _response.then((data) => new ReportResponse.fromJson(data)); |
| 341 } | 347 } |
| 342 | 348 |
| 343 /** | 349 /// Unlike rate quota, allocation quota does not get refilled periodically. |
| 344 * Unlike rate quota, allocation quota does not get refilled periodically. | 350 /// So, it is possible that the quota usage as seen by the service differs |
| 345 * So, it is possible that the quota usage as seen by the service differs from | 351 /// from |
| 346 * what the One Platform considers the usage is. This is expected to happen | 352 /// what the One Platform considers the usage is. This is expected to happen |
| 347 * only rarely, but over time this can accumulate. Services can invoke | 353 /// only rarely, but over time this can accumulate. Services can invoke |
| 348 * StartReconciliation and EndReconciliation to correct this usage drift, as | 354 /// StartReconciliation and EndReconciliation to correct this usage drift, as |
| 349 * described below: | 355 /// described below: |
| 350 * 1. Service sends StartReconciliation with a timestamp in future for each | 356 /// 1. Service sends StartReconciliation with a timestamp in future for each |
| 351 * metric that needs to be reconciled. The timestamp being in future allows | 357 /// metric that needs to be reconciled. The timestamp being in future allows |
| 352 * to account for in-flight AllocateQuota and ReleaseQuota requests for the | 358 /// to account for in-flight AllocateQuota and ReleaseQuota requests for the |
| 353 * same metric. | 359 /// same metric. |
| 354 * 2. One Platform records this timestamp and starts tracking subsequent | 360 /// 2. One Platform records this timestamp and starts tracking subsequent |
| 355 * AllocateQuota and ReleaseQuota requests until EndReconciliation is | 361 /// AllocateQuota and ReleaseQuota requests until EndReconciliation is |
| 356 * called. | 362 /// called. |
| 357 * 3. At or after the time specified in the StartReconciliation, service | 363 /// 3. At or after the time specified in the StartReconciliation, service |
| 358 * sends EndReconciliation with the usage that needs to be reconciled to. | 364 /// sends EndReconciliation with the usage that needs to be reconciled to. |
| 359 * 4. One Platform adjusts its own record of usage for that metric to the | 365 /// 4. One Platform adjusts its own record of usage for that metric to the |
| 360 * value specified in EndReconciliation by taking in to account any | 366 /// value specified in EndReconciliation by taking in to account any |
| 361 * allocation or release between StartReconciliation and EndReconciliation. | 367 /// allocation or release between StartReconciliation and EndReconciliation. |
| 362 * | 368 /// |
| 363 * Signals the quota controller that the service wants to perform a usage | 369 /// Signals the quota controller that the service wants to perform a usage |
| 364 * reconciliation as specified in the request. | 370 /// reconciliation as specified in the request. |
| 365 * | 371 /// |
| 366 * This method requires the `servicemanagement.services.quota` | 372 /// This method requires the `servicemanagement.services.quota` |
| 367 * permission on the specified service. For more information, see | 373 /// permission on the specified service. For more information, see |
| 368 * [Google Cloud IAM](https://cloud.google.com/iam). | 374 /// [Google Cloud IAM](https://cloud.google.com/iam). |
| 369 * | 375 /// |
| 370 * [request] - The metadata request object. | 376 /// [request] - The metadata request object. |
| 371 * | 377 /// |
| 372 * Request parameters: | 378 /// Request parameters: |
| 373 * | 379 /// |
| 374 * [serviceName] - Name of the service as specified in the service | 380 /// [serviceName] - Name of the service as specified in the service |
| 375 * configuration. For example, | 381 /// configuration. For example, |
| 376 * `"pubsub.googleapis.com"`. | 382 /// `"pubsub.googleapis.com"`. |
| 377 * | 383 /// |
| 378 * See google.api.Service for the definition of a service name. | 384 /// See google.api.Service for the definition of a service name. |
| 379 * | 385 /// |
| 380 * Completes with a [StartReconciliationResponse]. | 386 /// Completes with a [StartReconciliationResponse]. |
| 381 * | 387 /// |
| 382 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 388 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 383 * error. | 389 /// an error. |
| 384 * | 390 /// |
| 385 * If the used [http.Client] completes with an error when making a REST call, | 391 /// If the used [http.Client] completes with an error when making a REST |
| 386 * this method will complete with the same error. | 392 /// call, this method will complete with the same error. |
| 387 */ | 393 async.Future<StartReconciliationResponse> startReconciliation( |
| 388 async.Future<StartReconciliationResponse> startReconciliation(StartReconciliat
ionRequest request, core.String serviceName) { | 394 StartReconciliationRequest request, core.String serviceName) { |
| 389 var _url = null; | 395 var _url = null; |
| 390 var _queryParams = new core.Map(); | 396 var _queryParams = new core.Map(); |
| 391 var _uploadMedia = null; | 397 var _uploadMedia = null; |
| 392 var _uploadOptions = null; | 398 var _uploadOptions = null; |
| 393 var _downloadOptions = commons.DownloadOptions.Metadata; | 399 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 394 var _body = null; | 400 var _body = null; |
| 395 | 401 |
| 396 if (request != null) { | 402 if (request != null) { |
| 397 _body = convert.JSON.encode((request).toJson()); | 403 _body = convert.JSON.encode((request).toJson()); |
| 398 } | 404 } |
| 399 if (serviceName == null) { | 405 if (serviceName == null) { |
| 400 throw new core.ArgumentError("Parameter serviceName is required."); | 406 throw new core.ArgumentError("Parameter serviceName is required."); |
| 401 } | 407 } |
| 402 | 408 |
| 403 _url = 'v1/services/' + commons.Escaper.ecapeVariable('$serviceName') + ':st
artReconciliation'; | 409 _url = 'v1/services/' + |
| 410 commons.Escaper.ecapeVariable('$serviceName') + |
| 411 ':startReconciliation'; |
| 404 | 412 |
| 405 var _response = _requester.request(_url, | 413 var _response = _requester.request(_url, "POST", |
| 406 "POST", | 414 body: _body, |
| 407 body: _body, | 415 queryParams: _queryParams, |
| 408 queryParams: _queryParams, | 416 uploadOptions: _uploadOptions, |
| 409 uploadOptions: _uploadOptions, | 417 uploadMedia: _uploadMedia, |
| 410 uploadMedia: _uploadMedia, | 418 downloadOptions: _downloadOptions); |
| 411 downloadOptions: _downloadOptions); | 419 return _response |
| 412 return _response.then((data) => new StartReconciliationResponse.fromJson(dat
a)); | 420 .then((data) => new StartReconciliationResponse.fromJson(data)); |
| 413 } | 421 } |
| 414 | |
| 415 } | 422 } |
| 416 | 423 |
| 424 /// Request message for the AllocateQuota method. |
| 425 class AllocateQuotaRequest { |
| 426 /// Operation that describes the quota allocation. |
| 427 QuotaOperation allocateOperation; |
| 417 | 428 |
| 429 /// Allocation mode for this operation. |
| 430 /// Deprecated: use QuotaMode inside the QuotaOperation. |
| 431 /// Possible string values are: |
| 432 /// - "UNSPECIFIED" |
| 433 /// - "NORMAL" : Allocates quota for the amount specified in the service |
| 434 /// configuration or |
| 435 /// specified using the quota_metrics. If the amount is higher than the |
| 436 /// available quota, allocation error will be returned and no quota will be |
| 437 /// allocated. |
| 438 /// - "BEST_EFFORT" : Allocates quota for the amount specified in the service |
| 439 /// configuration or |
| 440 /// specified using the quota_metrics. If the amount is higher than the |
| 441 /// available quota, request does not fail but all available quota will be |
| 442 /// allocated. |
| 443 /// - "CHECK_ONLY" : Only checks if there is enough quota available and does |
| 444 /// not change the |
| 445 /// available quota. No lock is placed on the available quota either. |
| 446 core.String allocationMode; |
| 418 | 447 |
| 419 /** Request message for the AllocateQuota method. */ | 448 /// Specifies which version of service configuration should be used to |
| 420 class AllocateQuotaRequest { | 449 /// process |
| 421 /** Operation that describes the quota allocation. */ | 450 /// the request. If unspecified or no matching version can be found, the |
| 422 QuotaOperation allocateOperation; | 451 /// latest |
| 423 /** | 452 /// one will be used. |
| 424 * Allocation mode for this operation. | |
| 425 * Deprecated: use QuotaMode inside the QuotaOperation. | |
| 426 * Possible string values are: | |
| 427 * - "UNSPECIFIED" | |
| 428 * - "NORMAL" : Allocates quota for the amount specified in the service | |
| 429 * configuration or | |
| 430 * specified using the quota_metrics. If the amount is higher than the | |
| 431 * available quota, allocation error will be returned and no quota will be | |
| 432 * allocated. | |
| 433 * - "BEST_EFFORT" : Allocates quota for the amount specified in the service | |
| 434 * configuration or | |
| 435 * specified using the quota_metrics. If the amount is higher than the | |
| 436 * available quota, request does not fail but all available quota will be | |
| 437 * allocated. | |
| 438 * - "CHECK_ONLY" : Only checks if there is enough quota available and does | |
| 439 * not change the | |
| 440 * available quota. No lock is placed on the available quota either. | |
| 441 */ | |
| 442 core.String allocationMode; | |
| 443 /** | |
| 444 * Specifies which version of service configuration should be used to process | |
| 445 * the request. If unspecified or no matching version can be found, the latest | |
| 446 * one will be used. | |
| 447 */ | |
| 448 core.String serviceConfigId; | 453 core.String serviceConfigId; |
| 449 | 454 |
| 450 AllocateQuotaRequest(); | 455 AllocateQuotaRequest(); |
| 451 | 456 |
| 452 AllocateQuotaRequest.fromJson(core.Map _json) { | 457 AllocateQuotaRequest.fromJson(core.Map _json) { |
| 453 if (_json.containsKey("allocateOperation")) { | 458 if (_json.containsKey("allocateOperation")) { |
| 454 allocateOperation = new QuotaOperation.fromJson(_json["allocateOperation"]
); | 459 allocateOperation = |
| 460 new QuotaOperation.fromJson(_json["allocateOperation"]); |
| 455 } | 461 } |
| 456 if (_json.containsKey("allocationMode")) { | 462 if (_json.containsKey("allocationMode")) { |
| 457 allocationMode = _json["allocationMode"]; | 463 allocationMode = _json["allocationMode"]; |
| 458 } | 464 } |
| 459 if (_json.containsKey("serviceConfigId")) { | 465 if (_json.containsKey("serviceConfigId")) { |
| 460 serviceConfigId = _json["serviceConfigId"]; | 466 serviceConfigId = _json["serviceConfigId"]; |
| 461 } | 467 } |
| 462 } | 468 } |
| 463 | 469 |
| 464 core.Map<core.String, core.Object> toJson() { | 470 core.Map<core.String, core.Object> toJson() { |
| 465 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 471 final core.Map<core.String, core.Object> _json = |
| 472 new core.Map<core.String, core.Object>(); |
| 466 if (allocateOperation != null) { | 473 if (allocateOperation != null) { |
| 467 _json["allocateOperation"] = (allocateOperation).toJson(); | 474 _json["allocateOperation"] = (allocateOperation).toJson(); |
| 468 } | 475 } |
| 469 if (allocationMode != null) { | 476 if (allocationMode != null) { |
| 470 _json["allocationMode"] = allocationMode; | 477 _json["allocationMode"] = allocationMode; |
| 471 } | 478 } |
| 472 if (serviceConfigId != null) { | 479 if (serviceConfigId != null) { |
| 473 _json["serviceConfigId"] = serviceConfigId; | 480 _json["serviceConfigId"] = serviceConfigId; |
| 474 } | 481 } |
| 475 return _json; | 482 return _json; |
| 476 } | 483 } |
| 477 } | 484 } |
| 478 | 485 |
| 479 /** Response message for the AllocateQuota method. */ | 486 /// Response message for the AllocateQuota method. |
| 480 class AllocateQuotaResponse { | 487 class AllocateQuotaResponse { |
| 481 /** Indicates the decision of the allocate. */ | 488 /// Indicates the decision of the allocate. |
| 482 core.List<QuotaError> allocateErrors; | 489 core.List<QuotaError> allocateErrors; |
| 483 /** | 490 |
| 484 * The same operation_id value used in the AllocateQuotaRequest. Used for | 491 /// The same operation_id value used in the AllocateQuotaRequest. Used for |
| 485 * logging and diagnostics purposes. | 492 /// logging and diagnostics purposes. |
| 486 */ | |
| 487 core.String operationId; | 493 core.String operationId; |
| 488 /** | 494 |
| 489 * Quota metrics to indicate the result of allocation. Depending on the | 495 /// Quota metrics to indicate the result of allocation. Depending on the |
| 490 * request, one or more of the following metrics will be included: | 496 /// request, one or more of the following metrics will be included: |
| 491 * | 497 /// |
| 492 * 1. For rate quota, per quota group or per quota metric incremental usage | 498 /// 1. For rate quota, per quota group or per quota metric incremental usage |
| 493 * will be specified using the following delta metric: | 499 /// will be specified using the following delta metric: |
| 494 * "serviceruntime.googleapis.com/api/consumer/quota_used_count" | 500 /// "serviceruntime.googleapis.com/api/consumer/quota_used_count" |
| 495 * | 501 /// |
| 496 * 2. For allocation quota, per quota metric total usage will be specified | 502 /// 2. For allocation quota, per quota metric total usage will be specified |
| 497 * using the following gauge metric: | 503 /// using the following gauge metric: |
| 498 * "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" | 504 /// "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" |
| 499 * | 505 /// |
| 500 * 3. For both rate quota and allocation quota, the quota limit reached | 506 /// 3. For both rate quota and allocation quota, the quota limit reached |
| 501 * condition will be specified using the following boolean metric: | 507 /// condition will be specified using the following boolean metric: |
| 502 * "serviceruntime.googleapis.com/quota/exceeded" | 508 /// "serviceruntime.googleapis.com/quota/exceeded" |
| 503 * | 509 /// |
| 504 * 4. For allocation quota, value for each quota limit associated with | 510 /// 4. For allocation quota, value for each quota limit associated with |
| 505 * the metrics will be specified using the following gauge metric: | 511 /// the metrics will be specified using the following gauge metric: |
| 506 * "serviceruntime.googleapis.com/quota/limit" | 512 /// "serviceruntime.googleapis.com/quota/limit" |
| 507 */ | |
| 508 core.List<MetricValueSet> quotaMetrics; | 513 core.List<MetricValueSet> quotaMetrics; |
| 509 /** ID of the actual config used to process the request. */ | 514 |
| 515 /// ID of the actual config used to process the request. |
| 510 core.String serviceConfigId; | 516 core.String serviceConfigId; |
| 511 | 517 |
| 512 AllocateQuotaResponse(); | 518 AllocateQuotaResponse(); |
| 513 | 519 |
| 514 AllocateQuotaResponse.fromJson(core.Map _json) { | 520 AllocateQuotaResponse.fromJson(core.Map _json) { |
| 515 if (_json.containsKey("allocateErrors")) { | 521 if (_json.containsKey("allocateErrors")) { |
| 516 allocateErrors = _json["allocateErrors"].map((value) => new QuotaError.fro
mJson(value)).toList(); | 522 allocateErrors = _json["allocateErrors"] |
| 523 .map((value) => new QuotaError.fromJson(value)) |
| 524 .toList(); |
| 517 } | 525 } |
| 518 if (_json.containsKey("operationId")) { | 526 if (_json.containsKey("operationId")) { |
| 519 operationId = _json["operationId"]; | 527 operationId = _json["operationId"]; |
| 520 } | 528 } |
| 521 if (_json.containsKey("quotaMetrics")) { | 529 if (_json.containsKey("quotaMetrics")) { |
| 522 quotaMetrics = _json["quotaMetrics"].map((value) => new MetricValueSet.fro
mJson(value)).toList(); | 530 quotaMetrics = _json["quotaMetrics"] |
| 531 .map((value) => new MetricValueSet.fromJson(value)) |
| 532 .toList(); |
| 523 } | 533 } |
| 524 if (_json.containsKey("serviceConfigId")) { | 534 if (_json.containsKey("serviceConfigId")) { |
| 525 serviceConfigId = _json["serviceConfigId"]; | 535 serviceConfigId = _json["serviceConfigId"]; |
| 526 } | 536 } |
| 527 } | 537 } |
| 528 | 538 |
| 529 core.Map<core.String, core.Object> toJson() { | 539 core.Map<core.String, core.Object> toJson() { |
| 530 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 540 final core.Map<core.String, core.Object> _json = |
| 541 new core.Map<core.String, core.Object>(); |
| 531 if (allocateErrors != null) { | 542 if (allocateErrors != null) { |
| 532 _json["allocateErrors"] = allocateErrors.map((value) => (value).toJson()).
toList(); | 543 _json["allocateErrors"] = |
| 544 allocateErrors.map((value) => (value).toJson()).toList(); |
| 533 } | 545 } |
| 534 if (operationId != null) { | 546 if (operationId != null) { |
| 535 _json["operationId"] = operationId; | 547 _json["operationId"] = operationId; |
| 536 } | 548 } |
| 537 if (quotaMetrics != null) { | 549 if (quotaMetrics != null) { |
| 538 _json["quotaMetrics"] = quotaMetrics.map((value) => (value).toJson()).toLi
st(); | 550 _json["quotaMetrics"] = |
| 551 quotaMetrics.map((value) => (value).toJson()).toList(); |
| 539 } | 552 } |
| 540 if (serviceConfigId != null) { | 553 if (serviceConfigId != null) { |
| 541 _json["serviceConfigId"] = serviceConfigId; | 554 _json["serviceConfigId"] = serviceConfigId; |
| 542 } | 555 } |
| 543 return _json; | 556 return _json; |
| 544 } | 557 } |
| 545 } | 558 } |
| 546 | 559 |
| 547 /** Common audit log format for Google Cloud Platform API operations. */ | 560 /// Common audit log format for Google Cloud Platform API operations. |
| 548 class AuditLog { | 561 class AuditLog { |
| 549 /** Authentication information. */ | 562 /// Authentication information. |
| 550 AuthenticationInfo authenticationInfo; | 563 AuthenticationInfo authenticationInfo; |
| 551 /** | 564 |
| 552 * Authorization information. If there are multiple | 565 /// Authorization information. If there are multiple |
| 553 * resources or permissions involved, then there is | 566 /// resources or permissions involved, then there is |
| 554 * one AuthorizationInfo element for each {resource, permission} tuple. | 567 /// one AuthorizationInfo element for each {resource, permission} tuple. |
| 555 */ | |
| 556 core.List<AuthorizationInfo> authorizationInfo; | 568 core.List<AuthorizationInfo> authorizationInfo; |
| 557 /** | 569 |
| 558 * The name of the service method or operation. | 570 /// The name of the service method or operation. |
| 559 * For API calls, this should be the name of the API method. | 571 /// For API calls, this should be the name of the API method. |
| 560 * For example, | 572 /// For example, |
| 561 * | 573 /// |
| 562 * "google.datastore.v1.Datastore.RunQuery" | 574 /// "google.datastore.v1.Datastore.RunQuery" |
| 563 * "google.logging.v1.LoggingService.DeleteLog" | 575 /// "google.logging.v1.LoggingService.DeleteLog" |
| 564 */ | |
| 565 core.String methodName; | 576 core.String methodName; |
| 566 /** | 577 |
| 567 * The number of items returned from a List or Query API method, | 578 /// The number of items returned from a List or Query API method, |
| 568 * if applicable. | 579 /// if applicable. |
| 569 */ | |
| 570 core.String numResponseItems; | 580 core.String numResponseItems; |
| 571 /** | 581 |
| 572 * The operation request. This may not include all request parameters, | 582 /// The operation request. This may not include all request parameters, |
| 573 * such as those that are too large, privacy-sensitive, or duplicated | 583 /// such as those that are too large, privacy-sensitive, or duplicated |
| 574 * elsewhere in the log record. | 584 /// elsewhere in the log record. |
| 575 * It should never include user-generated data, such as file contents. | 585 /// It should never include user-generated data, such as file contents. |
| 576 * When the JSON object represented here has a proto equivalent, the proto | 586 /// When the JSON object represented here has a proto equivalent, the proto |
| 577 * name will be indicated in the `@type` property. | 587 /// name will be indicated in the `@type` property. |
| 578 * | 588 /// |
| 579 * The values for Object must be JSON objects. It can consist of `num`, | 589 /// The values for Object must be JSON objects. It can consist of `num`, |
| 580 * `String`, `bool` and `null` as well as `Map` and `List` values. | 590 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 581 */ | |
| 582 core.Map<core.String, core.Object> request; | 591 core.Map<core.String, core.Object> request; |
| 583 /** Metadata about the operation. */ | 592 |
| 593 /// Metadata about the operation. |
| 584 RequestMetadata requestMetadata; | 594 RequestMetadata requestMetadata; |
| 585 /** | 595 |
| 586 * The resource or collection that is the target of the operation. | 596 /// The resource or collection that is the target of the operation. |
| 587 * The name is a scheme-less URI, not including the API service name. | 597 /// The name is a scheme-less URI, not including the API service name. |
| 588 * For example: | 598 /// For example: |
| 589 * | 599 /// |
| 590 * "shelves/SHELF_ID/books" | 600 /// "shelves/SHELF_ID/books" |
| 591 * "shelves/SHELF_ID/books/BOOK_ID" | 601 /// "shelves/SHELF_ID/books/BOOK_ID" |
| 592 */ | |
| 593 core.String resourceName; | 602 core.String resourceName; |
| 594 /** | 603 |
| 595 * The operation response. This may not include all response elements, | 604 /// The operation response. This may not include all response elements, |
| 596 * such as those that are too large, privacy-sensitive, or duplicated | 605 /// such as those that are too large, privacy-sensitive, or duplicated |
| 597 * elsewhere in the log record. | 606 /// elsewhere in the log record. |
| 598 * It should never include user-generated data, such as file contents. | 607 /// It should never include user-generated data, such as file contents. |
| 599 * When the JSON object represented here has a proto equivalent, the proto | 608 /// When the JSON object represented here has a proto equivalent, the proto |
| 600 * name will be indicated in the `@type` property. | 609 /// name will be indicated in the `@type` property. |
| 601 * | 610 /// |
| 602 * The values for Object must be JSON objects. It can consist of `num`, | 611 /// The values for Object must be JSON objects. It can consist of `num`, |
| 603 * `String`, `bool` and `null` as well as `Map` and `List` values. | 612 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 604 */ | |
| 605 core.Map<core.String, core.Object> response; | 613 core.Map<core.String, core.Object> response; |
| 606 /** | 614 |
| 607 * Other service-specific data about the request, response, and other | 615 /// Other service-specific data about the request, response, and other |
| 608 * activities. | 616 /// activities. |
| 609 * | 617 /// |
| 610 * The values for Object must be JSON objects. It can consist of `num`, | 618 /// The values for Object must be JSON objects. It can consist of `num`, |
| 611 * `String`, `bool` and `null` as well as `Map` and `List` values. | 619 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 612 */ | |
| 613 core.Map<core.String, core.Object> serviceData; | 620 core.Map<core.String, core.Object> serviceData; |
| 614 /** | 621 |
| 615 * The name of the API service performing the operation. For example, | 622 /// The name of the API service performing the operation. For example, |
| 616 * `"datastore.googleapis.com"`. | 623 /// `"datastore.googleapis.com"`. |
| 617 */ | |
| 618 core.String serviceName; | 624 core.String serviceName; |
| 619 /** The status of the overall operation. */ | 625 |
| 626 /// The status of the overall operation. |
| 620 Status status; | 627 Status status; |
| 621 | 628 |
| 622 AuditLog(); | 629 AuditLog(); |
| 623 | 630 |
| 624 AuditLog.fromJson(core.Map _json) { | 631 AuditLog.fromJson(core.Map _json) { |
| 625 if (_json.containsKey("authenticationInfo")) { | 632 if (_json.containsKey("authenticationInfo")) { |
| 626 authenticationInfo = new AuthenticationInfo.fromJson(_json["authentication
Info"]); | 633 authenticationInfo = |
| 634 new AuthenticationInfo.fromJson(_json["authenticationInfo"]); |
| 627 } | 635 } |
| 628 if (_json.containsKey("authorizationInfo")) { | 636 if (_json.containsKey("authorizationInfo")) { |
| 629 authorizationInfo = _json["authorizationInfo"].map((value) => new Authoriz
ationInfo.fromJson(value)).toList(); | 637 authorizationInfo = _json["authorizationInfo"] |
| 638 .map((value) => new AuthorizationInfo.fromJson(value)) |
| 639 .toList(); |
| 630 } | 640 } |
| 631 if (_json.containsKey("methodName")) { | 641 if (_json.containsKey("methodName")) { |
| 632 methodName = _json["methodName"]; | 642 methodName = _json["methodName"]; |
| 633 } | 643 } |
| 634 if (_json.containsKey("numResponseItems")) { | 644 if (_json.containsKey("numResponseItems")) { |
| 635 numResponseItems = _json["numResponseItems"]; | 645 numResponseItems = _json["numResponseItems"]; |
| 636 } | 646 } |
| 637 if (_json.containsKey("request")) { | 647 if (_json.containsKey("request")) { |
| 638 request = _json["request"]; | 648 request = _json["request"]; |
| 639 } | 649 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 651 } | 661 } |
| 652 if (_json.containsKey("serviceName")) { | 662 if (_json.containsKey("serviceName")) { |
| 653 serviceName = _json["serviceName"]; | 663 serviceName = _json["serviceName"]; |
| 654 } | 664 } |
| 655 if (_json.containsKey("status")) { | 665 if (_json.containsKey("status")) { |
| 656 status = new Status.fromJson(_json["status"]); | 666 status = new Status.fromJson(_json["status"]); |
| 657 } | 667 } |
| 658 } | 668 } |
| 659 | 669 |
| 660 core.Map<core.String, core.Object> toJson() { | 670 core.Map<core.String, core.Object> toJson() { |
| 661 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 671 final core.Map<core.String, core.Object> _json = |
| 672 new core.Map<core.String, core.Object>(); |
| 662 if (authenticationInfo != null) { | 673 if (authenticationInfo != null) { |
| 663 _json["authenticationInfo"] = (authenticationInfo).toJson(); | 674 _json["authenticationInfo"] = (authenticationInfo).toJson(); |
| 664 } | 675 } |
| 665 if (authorizationInfo != null) { | 676 if (authorizationInfo != null) { |
| 666 _json["authorizationInfo"] = authorizationInfo.map((value) => (value).toJs
on()).toList(); | 677 _json["authorizationInfo"] = |
| 678 authorizationInfo.map((value) => (value).toJson()).toList(); |
| 667 } | 679 } |
| 668 if (methodName != null) { | 680 if (methodName != null) { |
| 669 _json["methodName"] = methodName; | 681 _json["methodName"] = methodName; |
| 670 } | 682 } |
| 671 if (numResponseItems != null) { | 683 if (numResponseItems != null) { |
| 672 _json["numResponseItems"] = numResponseItems; | 684 _json["numResponseItems"] = numResponseItems; |
| 673 } | 685 } |
| 674 if (request != null) { | 686 if (request != null) { |
| 675 _json["request"] = request; | 687 _json["request"] = request; |
| 676 } | 688 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 689 if (serviceName != null) { | 701 if (serviceName != null) { |
| 690 _json["serviceName"] = serviceName; | 702 _json["serviceName"] = serviceName; |
| 691 } | 703 } |
| 692 if (status != null) { | 704 if (status != null) { |
| 693 _json["status"] = (status).toJson(); | 705 _json["status"] = (status).toJson(); |
| 694 } | 706 } |
| 695 return _json; | 707 return _json; |
| 696 } | 708 } |
| 697 } | 709 } |
| 698 | 710 |
| 699 /** Authentication information for the operation. */ | 711 /// Authentication information for the operation. |
| 700 class AuthenticationInfo { | 712 class AuthenticationInfo { |
| 701 /** | 713 /// The authority selector specified by the requestor, if any. |
| 702 * The authority selector specified by the requestor, if any. | 714 /// It is not guaranteed that the principal was allowed to use this |
| 703 * It is not guaranteed that the principal was allowed to use this authority. | 715 /// authority. |
| 704 */ | |
| 705 core.String authoritySelector; | 716 core.String authoritySelector; |
| 706 /** | 717 |
| 707 * The email address of the authenticated user making the request. | 718 /// The email address of the authenticated user (or service account on behalf |
| 708 * For privacy reasons, the principal email address is redacted for all | 719 /// of third party principal) making the request. For privacy reasons, the |
| 709 * read-only operations that fail with a "permission denied" error. | 720 /// principal email address is redacted for all read-only operations that |
| 710 */ | 721 /// fail |
| 722 /// with a "permission denied" error. |
| 711 core.String principalEmail; | 723 core.String principalEmail; |
| 712 | 724 |
| 725 /// The third party identification (if any) of the authenticated user making |
| 726 /// the request. |
| 727 /// When the JSON object represented here has a proto equivalent, the proto |
| 728 /// name will be indicated in the `@type` property. |
| 729 /// |
| 730 /// The values for Object must be JSON objects. It can consist of `num`, |
| 731 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 732 core.Map<core.String, core.Object> thirdPartyPrincipal; |
| 733 |
| 713 AuthenticationInfo(); | 734 AuthenticationInfo(); |
| 714 | 735 |
| 715 AuthenticationInfo.fromJson(core.Map _json) { | 736 AuthenticationInfo.fromJson(core.Map _json) { |
| 716 if (_json.containsKey("authoritySelector")) { | 737 if (_json.containsKey("authoritySelector")) { |
| 717 authoritySelector = _json["authoritySelector"]; | 738 authoritySelector = _json["authoritySelector"]; |
| 718 } | 739 } |
| 719 if (_json.containsKey("principalEmail")) { | 740 if (_json.containsKey("principalEmail")) { |
| 720 principalEmail = _json["principalEmail"]; | 741 principalEmail = _json["principalEmail"]; |
| 721 } | 742 } |
| 743 if (_json.containsKey("thirdPartyPrincipal")) { |
| 744 thirdPartyPrincipal = _json["thirdPartyPrincipal"]; |
| 745 } |
| 722 } | 746 } |
| 723 | 747 |
| 724 core.Map<core.String, core.Object> toJson() { | 748 core.Map<core.String, core.Object> toJson() { |
| 725 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 749 final core.Map<core.String, core.Object> _json = |
| 750 new core.Map<core.String, core.Object>(); |
| 726 if (authoritySelector != null) { | 751 if (authoritySelector != null) { |
| 727 _json["authoritySelector"] = authoritySelector; | 752 _json["authoritySelector"] = authoritySelector; |
| 728 } | 753 } |
| 729 if (principalEmail != null) { | 754 if (principalEmail != null) { |
| 730 _json["principalEmail"] = principalEmail; | 755 _json["principalEmail"] = principalEmail; |
| 731 } | 756 } |
| 757 if (thirdPartyPrincipal != null) { |
| 758 _json["thirdPartyPrincipal"] = thirdPartyPrincipal; |
| 759 } |
| 732 return _json; | 760 return _json; |
| 733 } | 761 } |
| 734 } | 762 } |
| 735 | 763 |
| 736 /** Authorization information for the operation. */ | 764 /// Authorization information for the operation. |
| 737 class AuthorizationInfo { | 765 class AuthorizationInfo { |
| 738 /** | 766 /// Whether or not authorization for `resource` and `permission` |
| 739 * Whether or not authorization for `resource` and `permission` | 767 /// was granted. |
| 740 * was granted. | |
| 741 */ | |
| 742 core.bool granted; | 768 core.bool granted; |
| 743 /** The required IAM permission. */ | 769 |
| 770 /// The required IAM permission. |
| 744 core.String permission; | 771 core.String permission; |
| 745 /** | 772 |
| 746 * The resource being accessed, as a REST-style string. For example: | 773 /// The resource being accessed, as a REST-style string. For example: |
| 747 * | 774 /// |
| 748 * bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID | 775 /// bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID |
| 749 */ | |
| 750 core.String resource; | 776 core.String resource; |
| 751 | 777 |
| 752 AuthorizationInfo(); | 778 AuthorizationInfo(); |
| 753 | 779 |
| 754 AuthorizationInfo.fromJson(core.Map _json) { | 780 AuthorizationInfo.fromJson(core.Map _json) { |
| 755 if (_json.containsKey("granted")) { | 781 if (_json.containsKey("granted")) { |
| 756 granted = _json["granted"]; | 782 granted = _json["granted"]; |
| 757 } | 783 } |
| 758 if (_json.containsKey("permission")) { | 784 if (_json.containsKey("permission")) { |
| 759 permission = _json["permission"]; | 785 permission = _json["permission"]; |
| 760 } | 786 } |
| 761 if (_json.containsKey("resource")) { | 787 if (_json.containsKey("resource")) { |
| 762 resource = _json["resource"]; | 788 resource = _json["resource"]; |
| 763 } | 789 } |
| 764 } | 790 } |
| 765 | 791 |
| 766 core.Map<core.String, core.Object> toJson() { | 792 core.Map<core.String, core.Object> toJson() { |
| 767 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 793 final core.Map<core.String, core.Object> _json = |
| 794 new core.Map<core.String, core.Object>(); |
| 768 if (granted != null) { | 795 if (granted != null) { |
| 769 _json["granted"] = granted; | 796 _json["granted"] = granted; |
| 770 } | 797 } |
| 771 if (permission != null) { | 798 if (permission != null) { |
| 772 _json["permission"] = permission; | 799 _json["permission"] = permission; |
| 773 } | 800 } |
| 774 if (resource != null) { | 801 if (resource != null) { |
| 775 _json["resource"] = resource; | 802 _json["resource"] = resource; |
| 776 } | 803 } |
| 777 return _json; | 804 return _json; |
| 778 } | 805 } |
| 779 } | 806 } |
| 780 | 807 |
| 781 /** | 808 /// Defines the errors to be returned in |
| 782 * Defines the errors to be returned in | 809 /// google.api.servicecontrol.v1.CheckResponse.check_errors. |
| 783 * google.api.servicecontrol.v1.CheckResponse.check_errors. | |
| 784 */ | |
| 785 class CheckError { | 810 class CheckError { |
| 786 /** | 811 /// The error code. |
| 787 * The error code. | 812 /// Possible string values are: |
| 788 * Possible string values are: | 813 /// - "ERROR_CODE_UNSPECIFIED" : This is never used in `CheckResponse`. |
| 789 * - "ERROR_CODE_UNSPECIFIED" : This is never used in `CheckResponse`. | 814 /// - "NOT_FOUND" : The consumer's project id was not found. |
| 790 * - "NOT_FOUND" : The consumer's project id was not found. | 815 /// Same as google.rpc.Code.NOT_FOUND. |
| 791 * Same as google.rpc.Code.NOT_FOUND. | 816 /// - "PERMISSION_DENIED" : The consumer doesn't have access to the specified |
| 792 * - "PERMISSION_DENIED" : The consumer doesn't have access to the specified | 817 /// resource. |
| 793 * resource. | 818 /// Same as google.rpc.Code.PERMISSION_DENIED. |
| 794 * Same as google.rpc.Code.PERMISSION_DENIED. | 819 /// - "RESOURCE_EXHAUSTED" : Quota check failed. Same as |
| 795 * - "RESOURCE_EXHAUSTED" : Quota check failed. Same as | 820 /// google.rpc.Code.RESOURCE_EXHAUSTED. |
| 796 * google.rpc.Code.RESOURCE_EXHAUSTED. | 821 /// - "BUDGET_EXCEEDED" : Budget check failed. |
| 797 * - "BUDGET_EXCEEDED" : Budget check failed. | 822 /// - "DENIAL_OF_SERVICE_DETECTED" : The consumer's request has been flagged |
| 798 * - "DENIAL_OF_SERVICE_DETECTED" : The consumer's request has been flagged as | 823 /// as a DoS attack. |
| 799 * a DoS attack. | 824 /// - "LOAD_SHEDDING" : The consumer's request should be rejected in order to |
| 800 * - "LOAD_SHEDDING" : The consumer's request should be rejected in order to | 825 /// protect the service |
| 801 * protect the service | 826 /// from being overloaded. |
| 802 * from being overloaded. | 827 /// - "ABUSER_DETECTED" : The consumer has been flagged as an abuser. |
| 803 * - "ABUSER_DETECTED" : The consumer has been flagged as an abuser. | 828 /// - "SERVICE_NOT_ACTIVATED" : The consumer hasn't activated the service. |
| 804 * - "SERVICE_NOT_ACTIVATED" : The consumer hasn't activated the service. | 829 /// - "VISIBILITY_DENIED" : The consumer cannot access the service due to |
| 805 * - "VISIBILITY_DENIED" : The consumer cannot access the service due to | 830 /// visibility configuration. |
| 806 * visibility configuration. | 831 /// - "BILLING_DISABLED" : The consumer cannot access the service because |
| 807 * - "BILLING_DISABLED" : The consumer cannot access the service because | 832 /// billing is disabled. |
| 808 * billing is disabled. | 833 /// - "PROJECT_DELETED" : The consumer's project has been marked as deleted |
| 809 * - "PROJECT_DELETED" : The consumer's project has been marked as deleted | 834 /// (soft deletion). |
| 810 * (soft deletion). | 835 /// - "PROJECT_INVALID" : The consumer's project number or id does not |
| 811 * - "PROJECT_INVALID" : The consumer's project number or id does not | 836 /// represent a valid project. |
| 812 * represent a valid project. | 837 /// - "IP_ADDRESS_BLOCKED" : The IP address of the consumer is invalid for |
| 813 * - "IP_ADDRESS_BLOCKED" : The IP address of the consumer is invalid for the | 838 /// the specific consumer |
| 814 * specific consumer | 839 /// project. |
| 815 * project. | 840 /// - "REFERER_BLOCKED" : The referer address of the consumer request is |
| 816 * - "REFERER_BLOCKED" : The referer address of the consumer request is | 841 /// invalid for the specific |
| 817 * invalid for the specific | 842 /// consumer project. |
| 818 * consumer project. | 843 /// - "CLIENT_APP_BLOCKED" : The client application of the consumer request |
| 819 * - "CLIENT_APP_BLOCKED" : The client application of the consumer request is | 844 /// is invalid for the |
| 820 * invalid for the | 845 /// specific consumer project. |
| 821 * specific consumer project. | 846 /// - "API_TARGET_BLOCKED" : The API targeted by this request is invalid for |
| 822 * - "API_TARGET_BLOCKED" : The API targeted by this request is invalid for | 847 /// the specified consumer |
| 823 * the specified consumer | 848 /// project. |
| 824 * project. | 849 /// - "API_KEY_INVALID" : The consumer's API key is invalid. |
| 825 * - "API_KEY_INVALID" : The consumer's API key is invalid. | 850 /// - "API_KEY_EXPIRED" : The consumer's API Key has expired. |
| 826 * - "API_KEY_EXPIRED" : The consumer's API Key has expired. | 851 /// - "API_KEY_NOT_FOUND" : The consumer's API Key was not found in config |
| 827 * - "API_KEY_NOT_FOUND" : The consumer's API Key was not found in config | 852 /// record. |
| 828 * record. | 853 /// - "SPATULA_HEADER_INVALID" : The consumer's spatula header is invalid. |
| 829 * - "SPATULA_HEADER_INVALID" : The consumer's spatula header is invalid. | 854 /// - "LOAS_ROLE_INVALID" : The consumer's LOAS role is invalid. |
| 830 * - "LOAS_ROLE_INVALID" : The consumer's LOAS role is invalid. | 855 /// - "NO_LOAS_PROJECT" : The consumer's LOAS role has no associated project. |
| 831 * - "NO_LOAS_PROJECT" : The consumer's LOAS role has no associated project. | 856 /// - "LOAS_PROJECT_DISABLED" : The consumer's LOAS project is not `ACTIVE` |
| 832 * - "LOAS_PROJECT_DISABLED" : The consumer's LOAS project is not `ACTIVE` in | 857 /// in LoquatV2. |
| 833 * LoquatV2. | 858 /// - "SECURITY_POLICY_VIOLATED" : Request is not allowed as per security |
| 834 * - "SECURITY_POLICY_VIOLATED" : Request is not allowed as per security | 859 /// policies defined in Org Policy. |
| 835 * policies defined in Org Policy. | 860 /// - "NAMESPACE_LOOKUP_UNAVAILABLE" : The backend server for looking up |
| 836 * - "NAMESPACE_LOOKUP_UNAVAILABLE" : The backend server for looking up | 861 /// project id/number is unavailable. |
| 837 * project id/number is unavailable. | 862 /// - "SERVICE_STATUS_UNAVAILABLE" : The backend server for checking service |
| 838 * - "SERVICE_STATUS_UNAVAILABLE" : The backend server for checking service | 863 /// status is unavailable. |
| 839 * status is unavailable. | 864 /// - "BILLING_STATUS_UNAVAILABLE" : The backend server for checking billing |
| 840 * - "BILLING_STATUS_UNAVAILABLE" : The backend server for checking billing | 865 /// status is unavailable. |
| 841 * status is unavailable. | 866 /// - "QUOTA_CHECK_UNAVAILABLE" : The backend server for checking quota |
| 842 * - "QUOTA_CHECK_UNAVAILABLE" : The backend server for checking quota limits | 867 /// limits is unavailable. |
| 843 * is unavailable. | 868 /// - "LOAS_PROJECT_LOOKUP_UNAVAILABLE" : The Spanner for looking up LOAS |
| 844 * - "LOAS_PROJECT_LOOKUP_UNAVAILABLE" : The Spanner for looking up LOAS | 869 /// project is unavailable. |
| 845 * project is unavailable. | 870 /// - "CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE" : Cloud Resource Manager |
| 846 * - "CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE" : Cloud Resource Manager | 871 /// backend server is unavailable. |
| 847 * backend server is unavailable. | 872 /// - "SECURITY_POLICY_BACKEND_UNAVAILABLE" : Backend server for evaluating |
| 848 * - "SECURITY_POLICY_BACKEND_UNAVAILABLE" : Backend server for evaluating | 873 /// security policy is unavailable. |
| 849 * security policy is unavailable. | |
| 850 */ | |
| 851 core.String code; | 874 core.String code; |
| 852 /** Free-form text providing details on the error cause of the error. */ | 875 |
| 876 /// Free-form text providing details on the error cause of the error. |
| 853 core.String detail; | 877 core.String detail; |
| 854 | 878 |
| 855 CheckError(); | 879 CheckError(); |
| 856 | 880 |
| 857 CheckError.fromJson(core.Map _json) { | 881 CheckError.fromJson(core.Map _json) { |
| 858 if (_json.containsKey("code")) { | 882 if (_json.containsKey("code")) { |
| 859 code = _json["code"]; | 883 code = _json["code"]; |
| 860 } | 884 } |
| 861 if (_json.containsKey("detail")) { | 885 if (_json.containsKey("detail")) { |
| 862 detail = _json["detail"]; | 886 detail = _json["detail"]; |
| 863 } | 887 } |
| 864 } | 888 } |
| 865 | 889 |
| 866 core.Map<core.String, core.Object> toJson() { | 890 core.Map<core.String, core.Object> toJson() { |
| 867 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 891 final core.Map<core.String, core.Object> _json = |
| 892 new core.Map<core.String, core.Object>(); |
| 868 if (code != null) { | 893 if (code != null) { |
| 869 _json["code"] = code; | 894 _json["code"] = code; |
| 870 } | 895 } |
| 871 if (detail != null) { | 896 if (detail != null) { |
| 872 _json["detail"] = detail; | 897 _json["detail"] = detail; |
| 873 } | 898 } |
| 874 return _json; | 899 return _json; |
| 875 } | 900 } |
| 876 } | 901 } |
| 877 | 902 |
| 878 class CheckInfo { | 903 class CheckInfo { |
| 879 /** Consumer info of this check. */ | 904 /// Consumer info of this check. |
| 880 ConsumerInfo consumerInfo; | 905 ConsumerInfo consumerInfo; |
| 881 /** | 906 |
| 882 * A list of fields and label keys that are ignored by the server. | 907 /// A list of fields and label keys that are ignored by the server. |
| 883 * The client doesn't need to send them for following requests to improve | 908 /// The client doesn't need to send them for following requests to improve |
| 884 * performance and allow better aggregation. | 909 /// performance and allow better aggregation. |
| 885 */ | |
| 886 core.List<core.String> unusedArguments; | 910 core.List<core.String> unusedArguments; |
| 887 | 911 |
| 888 CheckInfo(); | 912 CheckInfo(); |
| 889 | 913 |
| 890 CheckInfo.fromJson(core.Map _json) { | 914 CheckInfo.fromJson(core.Map _json) { |
| 891 if (_json.containsKey("consumerInfo")) { | 915 if (_json.containsKey("consumerInfo")) { |
| 892 consumerInfo = new ConsumerInfo.fromJson(_json["consumerInfo"]); | 916 consumerInfo = new ConsumerInfo.fromJson(_json["consumerInfo"]); |
| 893 } | 917 } |
| 894 if (_json.containsKey("unusedArguments")) { | 918 if (_json.containsKey("unusedArguments")) { |
| 895 unusedArguments = _json["unusedArguments"]; | 919 unusedArguments = _json["unusedArguments"]; |
| 896 } | 920 } |
| 897 } | 921 } |
| 898 | 922 |
| 899 core.Map<core.String, core.Object> toJson() { | 923 core.Map<core.String, core.Object> toJson() { |
| 900 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 924 final core.Map<core.String, core.Object> _json = |
| 925 new core.Map<core.String, core.Object>(); |
| 901 if (consumerInfo != null) { | 926 if (consumerInfo != null) { |
| 902 _json["consumerInfo"] = (consumerInfo).toJson(); | 927 _json["consumerInfo"] = (consumerInfo).toJson(); |
| 903 } | 928 } |
| 904 if (unusedArguments != null) { | 929 if (unusedArguments != null) { |
| 905 _json["unusedArguments"] = unusedArguments; | 930 _json["unusedArguments"] = unusedArguments; |
| 906 } | 931 } |
| 907 return _json; | 932 return _json; |
| 908 } | 933 } |
| 909 } | 934 } |
| 910 | 935 |
| 911 /** Request message for the Check method. */ | 936 /// Request message for the Check method. |
| 912 class CheckRequest { | 937 class CheckRequest { |
| 913 /** The operation to be checked. */ | 938 /// The operation to be checked. |
| 914 Operation operation; | 939 Operation operation; |
| 915 /** | 940 |
| 916 * Requests the project settings to be returned as part of the check response. | 941 /// Requests the project settings to be returned as part of the check |
| 917 */ | 942 /// response. |
| 918 core.bool requestProjectSettings; | 943 core.bool requestProjectSettings; |
| 919 /** | 944 |
| 920 * Specifies which version of service configuration should be used to process | 945 /// Specifies which version of service configuration should be used to |
| 921 * the request. | 946 /// process |
| 922 * | 947 /// the request. |
| 923 * If unspecified or no matching version can be found, the | 948 /// |
| 924 * latest one will be used. | 949 /// If unspecified or no matching version can be found, the |
| 925 */ | 950 /// latest one will be used. |
| 926 core.String serviceConfigId; | 951 core.String serviceConfigId; |
| 927 /** | 952 |
| 928 * Indicates if service activation check should be skipped for this request. | 953 /// Indicates if service activation check should be skipped for this request. |
| 929 * Default behavior is to perform the check and apply relevant quota. | 954 /// Default behavior is to perform the check and apply relevant quota. |
| 930 */ | |
| 931 core.bool skipActivationCheck; | 955 core.bool skipActivationCheck; |
| 932 | 956 |
| 933 CheckRequest(); | 957 CheckRequest(); |
| 934 | 958 |
| 935 CheckRequest.fromJson(core.Map _json) { | 959 CheckRequest.fromJson(core.Map _json) { |
| 936 if (_json.containsKey("operation")) { | 960 if (_json.containsKey("operation")) { |
| 937 operation = new Operation.fromJson(_json["operation"]); | 961 operation = new Operation.fromJson(_json["operation"]); |
| 938 } | 962 } |
| 939 if (_json.containsKey("requestProjectSettings")) { | 963 if (_json.containsKey("requestProjectSettings")) { |
| 940 requestProjectSettings = _json["requestProjectSettings"]; | 964 requestProjectSettings = _json["requestProjectSettings"]; |
| 941 } | 965 } |
| 942 if (_json.containsKey("serviceConfigId")) { | 966 if (_json.containsKey("serviceConfigId")) { |
| 943 serviceConfigId = _json["serviceConfigId"]; | 967 serviceConfigId = _json["serviceConfigId"]; |
| 944 } | 968 } |
| 945 if (_json.containsKey("skipActivationCheck")) { | 969 if (_json.containsKey("skipActivationCheck")) { |
| 946 skipActivationCheck = _json["skipActivationCheck"]; | 970 skipActivationCheck = _json["skipActivationCheck"]; |
| 947 } | 971 } |
| 948 } | 972 } |
| 949 | 973 |
| 950 core.Map<core.String, core.Object> toJson() { | 974 core.Map<core.String, core.Object> toJson() { |
| 951 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 975 final core.Map<core.String, core.Object> _json = |
| 976 new core.Map<core.String, core.Object>(); |
| 952 if (operation != null) { | 977 if (operation != null) { |
| 953 _json["operation"] = (operation).toJson(); | 978 _json["operation"] = (operation).toJson(); |
| 954 } | 979 } |
| 955 if (requestProjectSettings != null) { | 980 if (requestProjectSettings != null) { |
| 956 _json["requestProjectSettings"] = requestProjectSettings; | 981 _json["requestProjectSettings"] = requestProjectSettings; |
| 957 } | 982 } |
| 958 if (serviceConfigId != null) { | 983 if (serviceConfigId != null) { |
| 959 _json["serviceConfigId"] = serviceConfigId; | 984 _json["serviceConfigId"] = serviceConfigId; |
| 960 } | 985 } |
| 961 if (skipActivationCheck != null) { | 986 if (skipActivationCheck != null) { |
| 962 _json["skipActivationCheck"] = skipActivationCheck; | 987 _json["skipActivationCheck"] = skipActivationCheck; |
| 963 } | 988 } |
| 964 return _json; | 989 return _json; |
| 965 } | 990 } |
| 966 } | 991 } |
| 967 | 992 |
| 968 /** Response message for the Check method. */ | 993 /// Response message for the Check method. |
| 969 class CheckResponse { | 994 class CheckResponse { |
| 970 /** | 995 /// Indicate the decision of the check. |
| 971 * Indicate the decision of the check. | 996 /// |
| 972 * | 997 /// If no check errors are present, the service should process the operation. |
| 973 * If no check errors are present, the service should process the operation. | 998 /// Otherwise the service should use the list of errors to determine the |
| 974 * Otherwise the service should use the list of errors to determine the | 999 /// appropriate action. |
| 975 * appropriate action. | |
| 976 */ | |
| 977 core.List<CheckError> checkErrors; | 1000 core.List<CheckError> checkErrors; |
| 978 /** | 1001 |
| 979 * Feedback data returned from the server during processing a Check request. | 1002 /// Feedback data returned from the server during processing a Check request. |
| 980 */ | |
| 981 CheckInfo checkInfo; | 1003 CheckInfo checkInfo; |
| 982 /** | 1004 |
| 983 * The same operation_id value used in the CheckRequest. | 1005 /// The same operation_id value used in the CheckRequest. |
| 984 * Used for logging and diagnostics purposes. | 1006 /// Used for logging and diagnostics purposes. |
| 985 */ | |
| 986 core.String operationId; | 1007 core.String operationId; |
| 987 /** Quota information for the check request associated with this response. */ | 1008 |
| 1009 /// Quota information for the check request associated with this response. |
| 988 QuotaInfo quotaInfo; | 1010 QuotaInfo quotaInfo; |
| 989 /** The actual config id used to process the request. */ | 1011 |
| 1012 /// The actual config id used to process the request. |
| 990 core.String serviceConfigId; | 1013 core.String serviceConfigId; |
| 991 | 1014 |
| 992 CheckResponse(); | 1015 CheckResponse(); |
| 993 | 1016 |
| 994 CheckResponse.fromJson(core.Map _json) { | 1017 CheckResponse.fromJson(core.Map _json) { |
| 995 if (_json.containsKey("checkErrors")) { | 1018 if (_json.containsKey("checkErrors")) { |
| 996 checkErrors = _json["checkErrors"].map((value) => new CheckError.fromJson(
value)).toList(); | 1019 checkErrors = _json["checkErrors"] |
| 1020 .map((value) => new CheckError.fromJson(value)) |
| 1021 .toList(); |
| 997 } | 1022 } |
| 998 if (_json.containsKey("checkInfo")) { | 1023 if (_json.containsKey("checkInfo")) { |
| 999 checkInfo = new CheckInfo.fromJson(_json["checkInfo"]); | 1024 checkInfo = new CheckInfo.fromJson(_json["checkInfo"]); |
| 1000 } | 1025 } |
| 1001 if (_json.containsKey("operationId")) { | 1026 if (_json.containsKey("operationId")) { |
| 1002 operationId = _json["operationId"]; | 1027 operationId = _json["operationId"]; |
| 1003 } | 1028 } |
| 1004 if (_json.containsKey("quotaInfo")) { | 1029 if (_json.containsKey("quotaInfo")) { |
| 1005 quotaInfo = new QuotaInfo.fromJson(_json["quotaInfo"]); | 1030 quotaInfo = new QuotaInfo.fromJson(_json["quotaInfo"]); |
| 1006 } | 1031 } |
| 1007 if (_json.containsKey("serviceConfigId")) { | 1032 if (_json.containsKey("serviceConfigId")) { |
| 1008 serviceConfigId = _json["serviceConfigId"]; | 1033 serviceConfigId = _json["serviceConfigId"]; |
| 1009 } | 1034 } |
| 1010 } | 1035 } |
| 1011 | 1036 |
| 1012 core.Map<core.String, core.Object> toJson() { | 1037 core.Map<core.String, core.Object> toJson() { |
| 1013 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1038 final core.Map<core.String, core.Object> _json = |
| 1039 new core.Map<core.String, core.Object>(); |
| 1014 if (checkErrors != null) { | 1040 if (checkErrors != null) { |
| 1015 _json["checkErrors"] = checkErrors.map((value) => (value).toJson()).toList
(); | 1041 _json["checkErrors"] = |
| 1042 checkErrors.map((value) => (value).toJson()).toList(); |
| 1016 } | 1043 } |
| 1017 if (checkInfo != null) { | 1044 if (checkInfo != null) { |
| 1018 _json["checkInfo"] = (checkInfo).toJson(); | 1045 _json["checkInfo"] = (checkInfo).toJson(); |
| 1019 } | 1046 } |
| 1020 if (operationId != null) { | 1047 if (operationId != null) { |
| 1021 _json["operationId"] = operationId; | 1048 _json["operationId"] = operationId; |
| 1022 } | 1049 } |
| 1023 if (quotaInfo != null) { | 1050 if (quotaInfo != null) { |
| 1024 _json["quotaInfo"] = (quotaInfo).toJson(); | 1051 _json["quotaInfo"] = (quotaInfo).toJson(); |
| 1025 } | 1052 } |
| 1026 if (serviceConfigId != null) { | 1053 if (serviceConfigId != null) { |
| 1027 _json["serviceConfigId"] = serviceConfigId; | 1054 _json["serviceConfigId"] = serviceConfigId; |
| 1028 } | 1055 } |
| 1029 return _json; | 1056 return _json; |
| 1030 } | 1057 } |
| 1031 } | 1058 } |
| 1032 | 1059 |
| 1033 /** `ConsumerInfo` provides information about the consumer project. */ | 1060 /// `ConsumerInfo` provides information about the consumer project. |
| 1034 class ConsumerInfo { | 1061 class ConsumerInfo { |
| 1035 /** | 1062 /// The Google cloud project number, e.g. 1234567890. A value of 0 indicates |
| 1036 * The Google cloud project number, e.g. 1234567890. A value of 0 indicates | 1063 /// no project number is found. |
| 1037 * no project number is found. | |
| 1038 */ | |
| 1039 core.String projectNumber; | 1064 core.String projectNumber; |
| 1040 | 1065 |
| 1041 ConsumerInfo(); | 1066 ConsumerInfo(); |
| 1042 | 1067 |
| 1043 ConsumerInfo.fromJson(core.Map _json) { | 1068 ConsumerInfo.fromJson(core.Map _json) { |
| 1044 if (_json.containsKey("projectNumber")) { | 1069 if (_json.containsKey("projectNumber")) { |
| 1045 projectNumber = _json["projectNumber"]; | 1070 projectNumber = _json["projectNumber"]; |
| 1046 } | 1071 } |
| 1047 } | 1072 } |
| 1048 | 1073 |
| 1049 core.Map<core.String, core.Object> toJson() { | 1074 core.Map<core.String, core.Object> toJson() { |
| 1050 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1075 final core.Map<core.String, core.Object> _json = |
| 1076 new core.Map<core.String, core.Object>(); |
| 1051 if (projectNumber != null) { | 1077 if (projectNumber != null) { |
| 1052 _json["projectNumber"] = projectNumber; | 1078 _json["projectNumber"] = projectNumber; |
| 1053 } | 1079 } |
| 1054 return _json; | 1080 return _json; |
| 1055 } | 1081 } |
| 1056 } | 1082 } |
| 1057 | 1083 |
| 1058 /** | 1084 /// Distribution represents a frequency distribution of double-valued sample |
| 1059 * Distribution represents a frequency distribution of double-valued sample | 1085 /// points. It contains the size of the population of sample points plus |
| 1060 * points. It contains the size of the population of sample points plus | 1086 /// additional optional information: |
| 1061 * additional optional information: | 1087 /// |
| 1062 * | 1088 /// - the arithmetic mean of the samples |
| 1063 * - the arithmetic mean of the samples | 1089 /// - the minimum and maximum of the samples |
| 1064 * - the minimum and maximum of the samples | 1090 /// - the sum-squared-deviation of the samples, used to compute variance |
| 1065 * - the sum-squared-deviation of the samples, used to compute variance | 1091 /// - a histogram of the values of the sample points |
| 1066 * - a histogram of the values of the sample points | |
| 1067 */ | |
| 1068 class Distribution { | 1092 class Distribution { |
| 1069 /** | 1093 /// The number of samples in each histogram bucket. `bucket_counts` are |
| 1070 * The number of samples in each histogram bucket. `bucket_counts` are | 1094 /// optional. If present, they must sum to the `count` value. |
| 1071 * optional. If present, they must sum to the `count` value. | 1095 /// |
| 1072 * | 1096 /// The buckets are defined below in `bucket_option`. There are N buckets. |
| 1073 * The buckets are defined below in `bucket_option`. There are N buckets. | 1097 /// `bucket_counts[0]` is the number of samples in the underflow bucket. |
| 1074 * `bucket_counts[0]` is the number of samples in the underflow bucket. | 1098 /// `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples |
| 1075 * `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples | 1099 /// in each of the finite buckets. And `bucket_counts[N] is the number |
| 1076 * in each of the finite buckets. And `bucket_counts[N] is the number | 1100 /// of samples in the overflow bucket. See the comments of `bucket_option` |
| 1077 * of samples in the overflow bucket. See the comments of `bucket_option` | 1101 /// below for more details. |
| 1078 * below for more details. | 1102 /// |
| 1079 * | 1103 /// Any suffix of trailing zeros may be omitted. |
| 1080 * Any suffix of trailing zeros may be omitted. | |
| 1081 */ | |
| 1082 core.List<core.String> bucketCounts; | 1104 core.List<core.String> bucketCounts; |
| 1083 /** The total number of samples in the distribution. Must be >= 0. */ | 1105 |
| 1106 /// The total number of samples in the distribution. Must be >= 0. |
| 1084 core.String count; | 1107 core.String count; |
| 1085 /** Buckets with arbitrary user-provided width. */ | 1108 |
| 1109 /// Buckets with arbitrary user-provided width. |
| 1086 ExplicitBuckets explicitBuckets; | 1110 ExplicitBuckets explicitBuckets; |
| 1087 /** Buckets with exponentially growing width. */ | 1111 |
| 1112 /// Buckets with exponentially growing width. |
| 1088 ExponentialBuckets exponentialBuckets; | 1113 ExponentialBuckets exponentialBuckets; |
| 1089 /** Buckets with constant width. */ | 1114 |
| 1115 /// Buckets with constant width. |
| 1090 LinearBuckets linearBuckets; | 1116 LinearBuckets linearBuckets; |
| 1091 /** The maximum of the population of values. Ignored if `count` is zero. */ | 1117 |
| 1118 /// The maximum of the population of values. Ignored if `count` is zero. |
| 1092 core.double maximum; | 1119 core.double maximum; |
| 1093 /** | 1120 |
| 1094 * The arithmetic mean of the samples in the distribution. If `count` is | 1121 /// The arithmetic mean of the samples in the distribution. If `count` is |
| 1095 * zero then this field must be zero. | 1122 /// zero then this field must be zero. |
| 1096 */ | |
| 1097 core.double mean; | 1123 core.double mean; |
| 1098 /** The minimum of the population of values. Ignored if `count` is zero. */ | 1124 |
| 1125 /// The minimum of the population of values. Ignored if `count` is zero. |
| 1099 core.double minimum; | 1126 core.double minimum; |
| 1100 /** | 1127 |
| 1101 * The sum of squared deviations from the mean: | 1128 /// The sum of squared deviations from the mean: |
| 1102 * Sum[i=1..count]((x_i - mean)^2) | 1129 /// Sum[i=1..count]((x_i - mean)^2) |
| 1103 * where each x_i is a sample values. If `count` is zero then this field | 1130 /// where each x_i is a sample values. If `count` is zero then this field |
| 1104 * must be zero, otherwise validation of the request fails. | 1131 /// must be zero, otherwise validation of the request fails. |
| 1105 */ | |
| 1106 core.double sumOfSquaredDeviation; | 1132 core.double sumOfSquaredDeviation; |
| 1107 | 1133 |
| 1108 Distribution(); | 1134 Distribution(); |
| 1109 | 1135 |
| 1110 Distribution.fromJson(core.Map _json) { | 1136 Distribution.fromJson(core.Map _json) { |
| 1111 if (_json.containsKey("bucketCounts")) { | 1137 if (_json.containsKey("bucketCounts")) { |
| 1112 bucketCounts = _json["bucketCounts"]; | 1138 bucketCounts = _json["bucketCounts"]; |
| 1113 } | 1139 } |
| 1114 if (_json.containsKey("count")) { | 1140 if (_json.containsKey("count")) { |
| 1115 count = _json["count"]; | 1141 count = _json["count"]; |
| 1116 } | 1142 } |
| 1117 if (_json.containsKey("explicitBuckets")) { | 1143 if (_json.containsKey("explicitBuckets")) { |
| 1118 explicitBuckets = new ExplicitBuckets.fromJson(_json["explicitBuckets"]); | 1144 explicitBuckets = new ExplicitBuckets.fromJson(_json["explicitBuckets"]); |
| 1119 } | 1145 } |
| 1120 if (_json.containsKey("exponentialBuckets")) { | 1146 if (_json.containsKey("exponentialBuckets")) { |
| 1121 exponentialBuckets = new ExponentialBuckets.fromJson(_json["exponentialBuc
kets"]); | 1147 exponentialBuckets = |
| 1148 new ExponentialBuckets.fromJson(_json["exponentialBuckets"]); |
| 1122 } | 1149 } |
| 1123 if (_json.containsKey("linearBuckets")) { | 1150 if (_json.containsKey("linearBuckets")) { |
| 1124 linearBuckets = new LinearBuckets.fromJson(_json["linearBuckets"]); | 1151 linearBuckets = new LinearBuckets.fromJson(_json["linearBuckets"]); |
| 1125 } | 1152 } |
| 1126 if (_json.containsKey("maximum")) { | 1153 if (_json.containsKey("maximum")) { |
| 1127 maximum = _json["maximum"]; | 1154 maximum = _json["maximum"]; |
| 1128 } | 1155 } |
| 1129 if (_json.containsKey("mean")) { | 1156 if (_json.containsKey("mean")) { |
| 1130 mean = _json["mean"]; | 1157 mean = _json["mean"]; |
| 1131 } | 1158 } |
| 1132 if (_json.containsKey("minimum")) { | 1159 if (_json.containsKey("minimum")) { |
| 1133 minimum = _json["minimum"]; | 1160 minimum = _json["minimum"]; |
| 1134 } | 1161 } |
| 1135 if (_json.containsKey("sumOfSquaredDeviation")) { | 1162 if (_json.containsKey("sumOfSquaredDeviation")) { |
| 1136 sumOfSquaredDeviation = _json["sumOfSquaredDeviation"]; | 1163 sumOfSquaredDeviation = _json["sumOfSquaredDeviation"]; |
| 1137 } | 1164 } |
| 1138 } | 1165 } |
| 1139 | 1166 |
| 1140 core.Map<core.String, core.Object> toJson() { | 1167 core.Map<core.String, core.Object> toJson() { |
| 1141 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1168 final core.Map<core.String, core.Object> _json = |
| 1169 new core.Map<core.String, core.Object>(); |
| 1142 if (bucketCounts != null) { | 1170 if (bucketCounts != null) { |
| 1143 _json["bucketCounts"] = bucketCounts; | 1171 _json["bucketCounts"] = bucketCounts; |
| 1144 } | 1172 } |
| 1145 if (count != null) { | 1173 if (count != null) { |
| 1146 _json["count"] = count; | 1174 _json["count"] = count; |
| 1147 } | 1175 } |
| 1148 if (explicitBuckets != null) { | 1176 if (explicitBuckets != null) { |
| 1149 _json["explicitBuckets"] = (explicitBuckets).toJson(); | 1177 _json["explicitBuckets"] = (explicitBuckets).toJson(); |
| 1150 } | 1178 } |
| 1151 if (exponentialBuckets != null) { | 1179 if (exponentialBuckets != null) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1164 _json["minimum"] = minimum; | 1192 _json["minimum"] = minimum; |
| 1165 } | 1193 } |
| 1166 if (sumOfSquaredDeviation != null) { | 1194 if (sumOfSquaredDeviation != null) { |
| 1167 _json["sumOfSquaredDeviation"] = sumOfSquaredDeviation; | 1195 _json["sumOfSquaredDeviation"] = sumOfSquaredDeviation; |
| 1168 } | 1196 } |
| 1169 return _json; | 1197 return _json; |
| 1170 } | 1198 } |
| 1171 } | 1199 } |
| 1172 | 1200 |
| 1173 class EndReconciliationRequest { | 1201 class EndReconciliationRequest { |
| 1174 /** Operation that describes the quota reconciliation. */ | 1202 /// Operation that describes the quota reconciliation. |
| 1175 QuotaOperation reconciliationOperation; | 1203 QuotaOperation reconciliationOperation; |
| 1176 /** | 1204 |
| 1177 * Specifies which version of service configuration should be used to process | 1205 /// Specifies which version of service configuration should be used to |
| 1178 * the request. If unspecified or no matching version can be found, the latest | 1206 /// process |
| 1179 * one will be used. | 1207 /// the request. If unspecified or no matching version can be found, the |
| 1180 */ | 1208 /// latest |
| 1209 /// one will be used. |
| 1181 core.String serviceConfigId; | 1210 core.String serviceConfigId; |
| 1182 | 1211 |
| 1183 EndReconciliationRequest(); | 1212 EndReconciliationRequest(); |
| 1184 | 1213 |
| 1185 EndReconciliationRequest.fromJson(core.Map _json) { | 1214 EndReconciliationRequest.fromJson(core.Map _json) { |
| 1186 if (_json.containsKey("reconciliationOperation")) { | 1215 if (_json.containsKey("reconciliationOperation")) { |
| 1187 reconciliationOperation = new QuotaOperation.fromJson(_json["reconciliatio
nOperation"]); | 1216 reconciliationOperation = |
| 1217 new QuotaOperation.fromJson(_json["reconciliationOperation"]); |
| 1188 } | 1218 } |
| 1189 if (_json.containsKey("serviceConfigId")) { | 1219 if (_json.containsKey("serviceConfigId")) { |
| 1190 serviceConfigId = _json["serviceConfigId"]; | 1220 serviceConfigId = _json["serviceConfigId"]; |
| 1191 } | 1221 } |
| 1192 } | 1222 } |
| 1193 | 1223 |
| 1194 core.Map<core.String, core.Object> toJson() { | 1224 core.Map<core.String, core.Object> toJson() { |
| 1195 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1225 final core.Map<core.String, core.Object> _json = |
| 1226 new core.Map<core.String, core.Object>(); |
| 1196 if (reconciliationOperation != null) { | 1227 if (reconciliationOperation != null) { |
| 1197 _json["reconciliationOperation"] = (reconciliationOperation).toJson(); | 1228 _json["reconciliationOperation"] = (reconciliationOperation).toJson(); |
| 1198 } | 1229 } |
| 1199 if (serviceConfigId != null) { | 1230 if (serviceConfigId != null) { |
| 1200 _json["serviceConfigId"] = serviceConfigId; | 1231 _json["serviceConfigId"] = serviceConfigId; |
| 1201 } | 1232 } |
| 1202 return _json; | 1233 return _json; |
| 1203 } | 1234 } |
| 1204 } | 1235 } |
| 1205 | 1236 |
| 1206 class EndReconciliationResponse { | 1237 class EndReconciliationResponse { |
| 1207 /** | 1238 /// The same operation_id value used in the EndReconciliationRequest. Used |
| 1208 * The same operation_id value used in the EndReconciliationRequest. Used for | 1239 /// for |
| 1209 * logging and diagnostics purposes. | 1240 /// logging and diagnostics purposes. |
| 1210 */ | |
| 1211 core.String operationId; | 1241 core.String operationId; |
| 1212 /** | 1242 |
| 1213 * Metric values as tracked by One Platform before the adjustment was made. | 1243 /// Metric values as tracked by One Platform before the adjustment was made. |
| 1214 * The following metrics will be included: | 1244 /// The following metrics will be included: |
| 1215 * | 1245 /// |
| 1216 * 1. Per quota metric total usage will be specified using the following gauge | 1246 /// 1. Per quota metric total usage will be specified using the following |
| 1217 * metric: | 1247 /// gauge |
| 1218 * "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" | 1248 /// metric: |
| 1219 * | 1249 /// "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" |
| 1220 * 2. Value for each quota limit associated with the metrics will be specified | 1250 /// |
| 1221 * using the following gauge metric: | 1251 /// 2. Value for each quota limit associated with the metrics will be |
| 1222 * "serviceruntime.googleapis.com/quota/limit" | 1252 /// specified |
| 1223 * | 1253 /// using the following gauge metric: |
| 1224 * 3. Delta value of the usage after the reconciliation for limits associated | 1254 /// "serviceruntime.googleapis.com/quota/limit" |
| 1225 * with the metrics will be specified using the following metric: | 1255 /// |
| 1226 * "serviceruntime.googleapis.com/allocation/reconciliation_delta" | 1256 /// 3. Delta value of the usage after the reconciliation for limits |
| 1227 * The delta value is defined as: | 1257 /// associated |
| 1228 * new_usage_from_client - existing_value_in_spanner. | 1258 /// with the metrics will be specified using the following metric: |
| 1229 * This metric is not defined in serviceruntime.yaml or in Cloud Monarch. | 1259 /// "serviceruntime.googleapis.com/allocation/reconciliation_delta" |
| 1230 * This metric is meant for callers' use only. Since this metric is not | 1260 /// The delta value is defined as: |
| 1231 * defined in the monitoring backend, reporting on this metric will result in | 1261 /// new_usage_from_client - existing_value_in_spanner. |
| 1232 * an error. | 1262 /// This metric is not defined in serviceruntime.yaml or in Cloud Monarch. |
| 1233 */ | 1263 /// This metric is meant for callers' use only. Since this metric is not |
| 1264 /// defined in the monitoring backend, reporting on this metric will result |
| 1265 /// in |
| 1266 /// an error. |
| 1234 core.List<MetricValueSet> quotaMetrics; | 1267 core.List<MetricValueSet> quotaMetrics; |
| 1235 /** Indicates the decision of the reconciliation end. */ | 1268 |
| 1269 /// Indicates the decision of the reconciliation end. |
| 1236 core.List<QuotaError> reconciliationErrors; | 1270 core.List<QuotaError> reconciliationErrors; |
| 1237 /** ID of the actual config used to process the request. */ | 1271 |
| 1272 /// ID of the actual config used to process the request. |
| 1238 core.String serviceConfigId; | 1273 core.String serviceConfigId; |
| 1239 | 1274 |
| 1240 EndReconciliationResponse(); | 1275 EndReconciliationResponse(); |
| 1241 | 1276 |
| 1242 EndReconciliationResponse.fromJson(core.Map _json) { | 1277 EndReconciliationResponse.fromJson(core.Map _json) { |
| 1243 if (_json.containsKey("operationId")) { | 1278 if (_json.containsKey("operationId")) { |
| 1244 operationId = _json["operationId"]; | 1279 operationId = _json["operationId"]; |
| 1245 } | 1280 } |
| 1246 if (_json.containsKey("quotaMetrics")) { | 1281 if (_json.containsKey("quotaMetrics")) { |
| 1247 quotaMetrics = _json["quotaMetrics"].map((value) => new MetricValueSet.fro
mJson(value)).toList(); | 1282 quotaMetrics = _json["quotaMetrics"] |
| 1283 .map((value) => new MetricValueSet.fromJson(value)) |
| 1284 .toList(); |
| 1248 } | 1285 } |
| 1249 if (_json.containsKey("reconciliationErrors")) { | 1286 if (_json.containsKey("reconciliationErrors")) { |
| 1250 reconciliationErrors = _json["reconciliationErrors"].map((value) => new Qu
otaError.fromJson(value)).toList(); | 1287 reconciliationErrors = _json["reconciliationErrors"] |
| 1288 .map((value) => new QuotaError.fromJson(value)) |
| 1289 .toList(); |
| 1251 } | 1290 } |
| 1252 if (_json.containsKey("serviceConfigId")) { | 1291 if (_json.containsKey("serviceConfigId")) { |
| 1253 serviceConfigId = _json["serviceConfigId"]; | 1292 serviceConfigId = _json["serviceConfigId"]; |
| 1254 } | 1293 } |
| 1255 } | 1294 } |
| 1256 | 1295 |
| 1257 core.Map<core.String, core.Object> toJson() { | 1296 core.Map<core.String, core.Object> toJson() { |
| 1258 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1297 final core.Map<core.String, core.Object> _json = |
| 1298 new core.Map<core.String, core.Object>(); |
| 1259 if (operationId != null) { | 1299 if (operationId != null) { |
| 1260 _json["operationId"] = operationId; | 1300 _json["operationId"] = operationId; |
| 1261 } | 1301 } |
| 1262 if (quotaMetrics != null) { | 1302 if (quotaMetrics != null) { |
| 1263 _json["quotaMetrics"] = quotaMetrics.map((value) => (value).toJson()).toLi
st(); | 1303 _json["quotaMetrics"] = |
| 1304 quotaMetrics.map((value) => (value).toJson()).toList(); |
| 1264 } | 1305 } |
| 1265 if (reconciliationErrors != null) { | 1306 if (reconciliationErrors != null) { |
| 1266 _json["reconciliationErrors"] = reconciliationErrors.map((value) => (value
).toJson()).toList(); | 1307 _json["reconciliationErrors"] = |
| 1308 reconciliationErrors.map((value) => (value).toJson()).toList(); |
| 1267 } | 1309 } |
| 1268 if (serviceConfigId != null) { | 1310 if (serviceConfigId != null) { |
| 1269 _json["serviceConfigId"] = serviceConfigId; | 1311 _json["serviceConfigId"] = serviceConfigId; |
| 1270 } | 1312 } |
| 1271 return _json; | 1313 return _json; |
| 1272 } | 1314 } |
| 1273 } | 1315 } |
| 1274 | 1316 |
| 1275 /** Describing buckets with arbitrary user-provided width. */ | 1317 /// Describing buckets with arbitrary user-provided width. |
| 1276 class ExplicitBuckets { | 1318 class ExplicitBuckets { |
| 1277 /** | 1319 /// 'bound' is a list of strictly increasing boundaries between |
| 1278 * 'bound' is a list of strictly increasing boundaries between | 1320 /// buckets. Note that a list of length N-1 defines N buckets because |
| 1279 * buckets. Note that a list of length N-1 defines N buckets because | 1321 /// of fenceposting. See comments on `bucket_options` for details. |
| 1280 * of fenceposting. See comments on `bucket_options` for details. | 1322 /// |
| 1281 * | 1323 /// The i'th finite bucket covers the interval |
| 1282 * The i'th finite bucket covers the interval | 1324 /// [bound[i-1], bound[i]) |
| 1283 * [bound[i-1], bound[i]) | 1325 /// where i ranges from 1 to bound_size() - 1. Note that there are no |
| 1284 * where i ranges from 1 to bound_size() - 1. Note that there are no | 1326 /// finite buckets at all if 'bound' only contains a single element; in |
| 1285 * finite buckets at all if 'bound' only contains a single element; in | 1327 /// that special case the single bound defines the boundary between the |
| 1286 * that special case the single bound defines the boundary between the | 1328 /// underflow and overflow buckets. |
| 1287 * underflow and overflow buckets. | 1329 /// |
| 1288 * | 1330 /// bucket number lower bound upper bound |
| 1289 * bucket number lower bound upper bound | 1331 /// i == 0 (underflow) -inf bound[i] |
| 1290 * i == 0 (underflow) -inf bound[i] | 1332 /// 0 < i < bound_size() bound[i-1] bound[i] |
| 1291 * 0 < i < bound_size() bound[i-1] bound[i] | 1333 /// i == bound_size() (overflow) bound[i-1] +inf |
| 1292 * i == bound_size() (overflow) bound[i-1] +inf | |
| 1293 */ | |
| 1294 core.List<core.double> bounds; | 1334 core.List<core.double> bounds; |
| 1295 | 1335 |
| 1296 ExplicitBuckets(); | 1336 ExplicitBuckets(); |
| 1297 | 1337 |
| 1298 ExplicitBuckets.fromJson(core.Map _json) { | 1338 ExplicitBuckets.fromJson(core.Map _json) { |
| 1299 if (_json.containsKey("bounds")) { | 1339 if (_json.containsKey("bounds")) { |
| 1300 bounds = _json["bounds"]; | 1340 bounds = _json["bounds"]; |
| 1301 } | 1341 } |
| 1302 } | 1342 } |
| 1303 | 1343 |
| 1304 core.Map<core.String, core.Object> toJson() { | 1344 core.Map<core.String, core.Object> toJson() { |
| 1305 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1345 final core.Map<core.String, core.Object> _json = |
| 1346 new core.Map<core.String, core.Object>(); |
| 1306 if (bounds != null) { | 1347 if (bounds != null) { |
| 1307 _json["bounds"] = bounds; | 1348 _json["bounds"] = bounds; |
| 1308 } | 1349 } |
| 1309 return _json; | 1350 return _json; |
| 1310 } | 1351 } |
| 1311 } | 1352 } |
| 1312 | 1353 |
| 1313 /** Describing buckets with exponentially growing width. */ | 1354 /// Describing buckets with exponentially growing width. |
| 1314 class ExponentialBuckets { | 1355 class ExponentialBuckets { |
| 1315 /** | 1356 /// The i'th exponential bucket covers the interval |
| 1316 * The i'th exponential bucket covers the interval | 1357 /// [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1317 * [scale * growth_factor^(i-1), scale * growth_factor^i) | 1358 /// where i ranges from 1 to num_finite_buckets inclusive. |
| 1318 * where i ranges from 1 to num_finite_buckets inclusive. | 1359 /// Must be larger than 1.0. |
| 1319 * Must be larger than 1.0. | |
| 1320 */ | |
| 1321 core.double growthFactor; | 1360 core.double growthFactor; |
| 1322 /** | 1361 |
| 1323 * The number of finite buckets. With the underflow and overflow buckets, | 1362 /// The number of finite buckets. With the underflow and overflow buckets, |
| 1324 * the total number of buckets is `num_finite_buckets` + 2. | 1363 /// the total number of buckets is `num_finite_buckets` + 2. |
| 1325 * See comments on `bucket_options` for details. | 1364 /// See comments on `bucket_options` for details. |
| 1326 */ | |
| 1327 core.int numFiniteBuckets; | 1365 core.int numFiniteBuckets; |
| 1328 /** | 1366 |
| 1329 * The i'th exponential bucket covers the interval | 1367 /// The i'th exponential bucket covers the interval |
| 1330 * [scale * growth_factor^(i-1), scale * growth_factor^i) | 1368 /// [scale * growth_factor^(i-1), scale * growth_factor^i) |
| 1331 * where i ranges from 1 to num_finite_buckets inclusive. | 1369 /// where i ranges from 1 to num_finite_buckets inclusive. |
| 1332 * Must be > 0. | 1370 /// Must be > 0. |
| 1333 */ | |
| 1334 core.double scale; | 1371 core.double scale; |
| 1335 | 1372 |
| 1336 ExponentialBuckets(); | 1373 ExponentialBuckets(); |
| 1337 | 1374 |
| 1338 ExponentialBuckets.fromJson(core.Map _json) { | 1375 ExponentialBuckets.fromJson(core.Map _json) { |
| 1339 if (_json.containsKey("growthFactor")) { | 1376 if (_json.containsKey("growthFactor")) { |
| 1340 growthFactor = _json["growthFactor"]; | 1377 growthFactor = _json["growthFactor"]; |
| 1341 } | 1378 } |
| 1342 if (_json.containsKey("numFiniteBuckets")) { | 1379 if (_json.containsKey("numFiniteBuckets")) { |
| 1343 numFiniteBuckets = _json["numFiniteBuckets"]; | 1380 numFiniteBuckets = _json["numFiniteBuckets"]; |
| 1344 } | 1381 } |
| 1345 if (_json.containsKey("scale")) { | 1382 if (_json.containsKey("scale")) { |
| 1346 scale = _json["scale"]; | 1383 scale = _json["scale"]; |
| 1347 } | 1384 } |
| 1348 } | 1385 } |
| 1349 | 1386 |
| 1350 core.Map<core.String, core.Object> toJson() { | 1387 core.Map<core.String, core.Object> toJson() { |
| 1351 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1388 final core.Map<core.String, core.Object> _json = |
| 1389 new core.Map<core.String, core.Object>(); |
| 1352 if (growthFactor != null) { | 1390 if (growthFactor != null) { |
| 1353 _json["growthFactor"] = growthFactor; | 1391 _json["growthFactor"] = growthFactor; |
| 1354 } | 1392 } |
| 1355 if (numFiniteBuckets != null) { | 1393 if (numFiniteBuckets != null) { |
| 1356 _json["numFiniteBuckets"] = numFiniteBuckets; | 1394 _json["numFiniteBuckets"] = numFiniteBuckets; |
| 1357 } | 1395 } |
| 1358 if (scale != null) { | 1396 if (scale != null) { |
| 1359 _json["scale"] = scale; | 1397 _json["scale"] = scale; |
| 1360 } | 1398 } |
| 1361 return _json; | 1399 return _json; |
| 1362 } | 1400 } |
| 1363 } | 1401 } |
| 1364 | 1402 |
| 1365 /** Describing buckets with constant width. */ | 1403 /// Describing buckets with constant width. |
| 1366 class LinearBuckets { | 1404 class LinearBuckets { |
| 1367 /** | 1405 /// The number of finite buckets. With the underflow and overflow buckets, |
| 1368 * The number of finite buckets. With the underflow and overflow buckets, | 1406 /// the total number of buckets is `num_finite_buckets` + 2. |
| 1369 * the total number of buckets is `num_finite_buckets` + 2. | 1407 /// See comments on `bucket_options` for details. |
| 1370 * See comments on `bucket_options` for details. | |
| 1371 */ | |
| 1372 core.int numFiniteBuckets; | 1408 core.int numFiniteBuckets; |
| 1373 /** | 1409 |
| 1374 * The i'th linear bucket covers the interval | 1410 /// The i'th linear bucket covers the interval |
| 1375 * [offset + (i-1) * width, offset + i * width) | 1411 /// [offset + (i-1) * width, offset + i * width) |
| 1376 * where i ranges from 1 to num_finite_buckets, inclusive. | 1412 /// where i ranges from 1 to num_finite_buckets, inclusive. |
| 1377 */ | |
| 1378 core.double offset; | 1413 core.double offset; |
| 1379 /** | 1414 |
| 1380 * The i'th linear bucket covers the interval | 1415 /// The i'th linear bucket covers the interval |
| 1381 * [offset + (i-1) * width, offset + i * width) | 1416 /// [offset + (i-1) * width, offset + i * width) |
| 1382 * where i ranges from 1 to num_finite_buckets, inclusive. | 1417 /// where i ranges from 1 to num_finite_buckets, inclusive. |
| 1383 * Must be strictly positive. | 1418 /// Must be strictly positive. |
| 1384 */ | |
| 1385 core.double width; | 1419 core.double width; |
| 1386 | 1420 |
| 1387 LinearBuckets(); | 1421 LinearBuckets(); |
| 1388 | 1422 |
| 1389 LinearBuckets.fromJson(core.Map _json) { | 1423 LinearBuckets.fromJson(core.Map _json) { |
| 1390 if (_json.containsKey("numFiniteBuckets")) { | 1424 if (_json.containsKey("numFiniteBuckets")) { |
| 1391 numFiniteBuckets = _json["numFiniteBuckets"]; | 1425 numFiniteBuckets = _json["numFiniteBuckets"]; |
| 1392 } | 1426 } |
| 1393 if (_json.containsKey("offset")) { | 1427 if (_json.containsKey("offset")) { |
| 1394 offset = _json["offset"]; | 1428 offset = _json["offset"]; |
| 1395 } | 1429 } |
| 1396 if (_json.containsKey("width")) { | 1430 if (_json.containsKey("width")) { |
| 1397 width = _json["width"]; | 1431 width = _json["width"]; |
| 1398 } | 1432 } |
| 1399 } | 1433 } |
| 1400 | 1434 |
| 1401 core.Map<core.String, core.Object> toJson() { | 1435 core.Map<core.String, core.Object> toJson() { |
| 1402 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1436 final core.Map<core.String, core.Object> _json = |
| 1437 new core.Map<core.String, core.Object>(); |
| 1403 if (numFiniteBuckets != null) { | 1438 if (numFiniteBuckets != null) { |
| 1404 _json["numFiniteBuckets"] = numFiniteBuckets; | 1439 _json["numFiniteBuckets"] = numFiniteBuckets; |
| 1405 } | 1440 } |
| 1406 if (offset != null) { | 1441 if (offset != null) { |
| 1407 _json["offset"] = offset; | 1442 _json["offset"] = offset; |
| 1408 } | 1443 } |
| 1409 if (width != null) { | 1444 if (width != null) { |
| 1410 _json["width"] = width; | 1445 _json["width"] = width; |
| 1411 } | 1446 } |
| 1412 return _json; | 1447 return _json; |
| 1413 } | 1448 } |
| 1414 } | 1449 } |
| 1415 | 1450 |
| 1416 /** An individual log entry. */ | 1451 /// An individual log entry. |
| 1417 class LogEntry { | 1452 class LogEntry { |
| 1418 /** | 1453 /// A unique ID for the log entry used for deduplication. If omitted, |
| 1419 * A unique ID for the log entry used for deduplication. If omitted, | 1454 /// the implementation will generate one based on operation_id. |
| 1420 * the implementation will generate one based on operation_id. | |
| 1421 */ | |
| 1422 core.String insertId; | 1455 core.String insertId; |
| 1423 /** | 1456 |
| 1424 * A set of user-defined (key, value) data that provides additional | 1457 /// A set of user-defined (key, value) data that provides additional |
| 1425 * information about the log entry. | 1458 /// information about the log entry. |
| 1426 */ | |
| 1427 core.Map<core.String, core.String> labels; | 1459 core.Map<core.String, core.String> labels; |
| 1428 /** | 1460 |
| 1429 * Required. The log to which this log entry belongs. Examples: `"syslog"`, | 1461 /// Required. The log to which this log entry belongs. Examples: `"syslog"`, |
| 1430 * `"book_log"`. | 1462 /// `"book_log"`. |
| 1431 */ | |
| 1432 core.String name; | 1463 core.String name; |
| 1433 /** | 1464 |
| 1434 * The log entry payload, represented as a protocol buffer that is | 1465 /// The log entry payload, represented as a protocol buffer that is |
| 1435 * expressed as a JSON object. You can only pass `protoPayload` | 1466 /// expressed as a JSON object. The only accepted type currently is |
| 1436 * values that belong to a set of approved types. | 1467 /// AuditLog. |
| 1437 * | 1468 /// |
| 1438 * The values for Object must be JSON objects. It can consist of `num`, | 1469 /// The values for Object must be JSON objects. It can consist of `num`, |
| 1439 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1470 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1440 */ | |
| 1441 core.Map<core.String, core.Object> protoPayload; | 1471 core.Map<core.String, core.Object> protoPayload; |
| 1442 /** | 1472 |
| 1443 * The severity of the log entry. The default value is | 1473 /// The severity of the log entry. The default value is |
| 1444 * `LogSeverity.DEFAULT`. | 1474 /// `LogSeverity.DEFAULT`. |
| 1445 * Possible string values are: | 1475 /// Possible string values are: |
| 1446 * - "DEFAULT" : (0) The log entry has no assigned severity level. | 1476 /// - "DEFAULT" : (0) The log entry has no assigned severity level. |
| 1447 * - "DEBUG" : (100) Debug or trace information. | 1477 /// - "DEBUG" : (100) Debug or trace information. |
| 1448 * - "INFO" : (200) Routine information, such as ongoing status or | 1478 /// - "INFO" : (200) Routine information, such as ongoing status or |
| 1449 * performance. | 1479 /// performance. |
| 1450 * - "NOTICE" : (300) Normal but significant events, such as start up, shut | 1480 /// - "NOTICE" : (300) Normal but significant events, such as start up, shut |
| 1451 * down, or | 1481 /// down, or |
| 1452 * a configuration change. | 1482 /// a configuration change. |
| 1453 * - "WARNING" : (400) Warning events might cause problems. | 1483 /// - "WARNING" : (400) Warning events might cause problems. |
| 1454 * - "ERROR" : (500) Error events are likely to cause problems. | 1484 /// - "ERROR" : (500) Error events are likely to cause problems. |
| 1455 * - "CRITICAL" : (600) Critical events cause more severe problems or outages. | 1485 /// - "CRITICAL" : (600) Critical events cause more severe problems or |
| 1456 * - "ALERT" : (700) A person must take an action immediately. | 1486 /// outages. |
| 1457 * - "EMERGENCY" : (800) One or more systems are unusable. | 1487 /// - "ALERT" : (700) A person must take an action immediately. |
| 1458 */ | 1488 /// - "EMERGENCY" : (800) One or more systems are unusable. |
| 1459 core.String severity; | 1489 core.String severity; |
| 1460 /** | 1490 |
| 1461 * The log entry payload, represented as a structure that | 1491 /// The log entry payload, represented as a structure that |
| 1462 * is expressed as a JSON object. | 1492 /// is expressed as a JSON object. |
| 1463 * | 1493 /// |
| 1464 * The values for Object must be JSON objects. It can consist of `num`, | 1494 /// The values for Object must be JSON objects. It can consist of `num`, |
| 1465 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1495 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1466 */ | |
| 1467 core.Map<core.String, core.Object> structPayload; | 1496 core.Map<core.String, core.Object> structPayload; |
| 1468 /** The log entry payload, represented as a Unicode string (UTF-8). */ | 1497 |
| 1498 /// The log entry payload, represented as a Unicode string (UTF-8). |
| 1469 core.String textPayload; | 1499 core.String textPayload; |
| 1470 /** | 1500 |
| 1471 * The time the event described by the log entry occurred. If | 1501 /// The time the event described by the log entry occurred. If |
| 1472 * omitted, defaults to operation start time. | 1502 /// omitted, defaults to operation start time. |
| 1473 */ | |
| 1474 core.String timestamp; | 1503 core.String timestamp; |
| 1475 | 1504 |
| 1476 LogEntry(); | 1505 LogEntry(); |
| 1477 | 1506 |
| 1478 LogEntry.fromJson(core.Map _json) { | 1507 LogEntry.fromJson(core.Map _json) { |
| 1479 if (_json.containsKey("insertId")) { | 1508 if (_json.containsKey("insertId")) { |
| 1480 insertId = _json["insertId"]; | 1509 insertId = _json["insertId"]; |
| 1481 } | 1510 } |
| 1482 if (_json.containsKey("labels")) { | 1511 if (_json.containsKey("labels")) { |
| 1483 labels = _json["labels"]; | 1512 labels = _json["labels"]; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1496 } | 1525 } |
| 1497 if (_json.containsKey("textPayload")) { | 1526 if (_json.containsKey("textPayload")) { |
| 1498 textPayload = _json["textPayload"]; | 1527 textPayload = _json["textPayload"]; |
| 1499 } | 1528 } |
| 1500 if (_json.containsKey("timestamp")) { | 1529 if (_json.containsKey("timestamp")) { |
| 1501 timestamp = _json["timestamp"]; | 1530 timestamp = _json["timestamp"]; |
| 1502 } | 1531 } |
| 1503 } | 1532 } |
| 1504 | 1533 |
| 1505 core.Map<core.String, core.Object> toJson() { | 1534 core.Map<core.String, core.Object> toJson() { |
| 1506 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1535 final core.Map<core.String, core.Object> _json = |
| 1536 new core.Map<core.String, core.Object>(); |
| 1507 if (insertId != null) { | 1537 if (insertId != null) { |
| 1508 _json["insertId"] = insertId; | 1538 _json["insertId"] = insertId; |
| 1509 } | 1539 } |
| 1510 if (labels != null) { | 1540 if (labels != null) { |
| 1511 _json["labels"] = labels; | 1541 _json["labels"] = labels; |
| 1512 } | 1542 } |
| 1513 if (name != null) { | 1543 if (name != null) { |
| 1514 _json["name"] = name; | 1544 _json["name"] = name; |
| 1515 } | 1545 } |
| 1516 if (protoPayload != null) { | 1546 if (protoPayload != null) { |
| 1517 _json["protoPayload"] = protoPayload; | 1547 _json["protoPayload"] = protoPayload; |
| 1518 } | 1548 } |
| 1519 if (severity != null) { | 1549 if (severity != null) { |
| 1520 _json["severity"] = severity; | 1550 _json["severity"] = severity; |
| 1521 } | 1551 } |
| 1522 if (structPayload != null) { | 1552 if (structPayload != null) { |
| 1523 _json["structPayload"] = structPayload; | 1553 _json["structPayload"] = structPayload; |
| 1524 } | 1554 } |
| 1525 if (textPayload != null) { | 1555 if (textPayload != null) { |
| 1526 _json["textPayload"] = textPayload; | 1556 _json["textPayload"] = textPayload; |
| 1527 } | 1557 } |
| 1528 if (timestamp != null) { | 1558 if (timestamp != null) { |
| 1529 _json["timestamp"] = timestamp; | 1559 _json["timestamp"] = timestamp; |
| 1530 } | 1560 } |
| 1531 return _json; | 1561 return _json; |
| 1532 } | 1562 } |
| 1533 } | 1563 } |
| 1534 | 1564 |
| 1535 /** Represents a single metric value. */ | 1565 /// Represents a single metric value. |
| 1536 class MetricValue { | 1566 class MetricValue { |
| 1537 /** A boolean value. */ | 1567 /// A boolean value. |
| 1538 core.bool boolValue; | 1568 core.bool boolValue; |
| 1539 /** A distribution value. */ | 1569 |
| 1570 /// A distribution value. |
| 1540 Distribution distributionValue; | 1571 Distribution distributionValue; |
| 1541 /** A double precision floating point value. */ | 1572 |
| 1573 /// A double precision floating point value. |
| 1542 core.double doubleValue; | 1574 core.double doubleValue; |
| 1543 /** | 1575 |
| 1544 * The end of the time period over which this metric value's measurement | 1576 /// The end of the time period over which this metric value's measurement |
| 1545 * applies. | 1577 /// applies. |
| 1546 */ | |
| 1547 core.String endTime; | 1578 core.String endTime; |
| 1548 /** A signed 64-bit integer value. */ | 1579 |
| 1580 /// A signed 64-bit integer value. |
| 1549 core.String int64Value; | 1581 core.String int64Value; |
| 1550 /** | 1582 |
| 1551 * The labels describing the metric value. | 1583 /// The labels describing the metric value. |
| 1552 * See comments on google.api.servicecontrol.v1.Operation.labels for | 1584 /// See comments on google.api.servicecontrol.v1.Operation.labels for |
| 1553 * the overriding relationship. | 1585 /// the overriding relationship. |
| 1554 */ | |
| 1555 core.Map<core.String, core.String> labels; | 1586 core.Map<core.String, core.String> labels; |
| 1556 /** A money value. */ | 1587 |
| 1588 /// A money value. |
| 1557 Money moneyValue; | 1589 Money moneyValue; |
| 1558 /** | 1590 |
| 1559 * The start of the time period over which this metric value's measurement | 1591 /// The start of the time period over which this metric value's measurement |
| 1560 * applies. The time period has different semantics for different metric | 1592 /// applies. The time period has different semantics for different metric |
| 1561 * types (cumulative, delta, and gauge). See the metric definition | 1593 /// types (cumulative, delta, and gauge). See the metric definition |
| 1562 * documentation in the service configuration for details. | 1594 /// documentation in the service configuration for details. |
| 1563 */ | |
| 1564 core.String startTime; | 1595 core.String startTime; |
| 1565 /** A text string value. */ | 1596 |
| 1597 /// A text string value. |
| 1566 core.String stringValue; | 1598 core.String stringValue; |
| 1567 | 1599 |
| 1568 MetricValue(); | 1600 MetricValue(); |
| 1569 | 1601 |
| 1570 MetricValue.fromJson(core.Map _json) { | 1602 MetricValue.fromJson(core.Map _json) { |
| 1571 if (_json.containsKey("boolValue")) { | 1603 if (_json.containsKey("boolValue")) { |
| 1572 boolValue = _json["boolValue"]; | 1604 boolValue = _json["boolValue"]; |
| 1573 } | 1605 } |
| 1574 if (_json.containsKey("distributionValue")) { | 1606 if (_json.containsKey("distributionValue")) { |
| 1575 distributionValue = new Distribution.fromJson(_json["distributionValue"]); | 1607 distributionValue = new Distribution.fromJson(_json["distributionValue"]); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1591 } | 1623 } |
| 1592 if (_json.containsKey("startTime")) { | 1624 if (_json.containsKey("startTime")) { |
| 1593 startTime = _json["startTime"]; | 1625 startTime = _json["startTime"]; |
| 1594 } | 1626 } |
| 1595 if (_json.containsKey("stringValue")) { | 1627 if (_json.containsKey("stringValue")) { |
| 1596 stringValue = _json["stringValue"]; | 1628 stringValue = _json["stringValue"]; |
| 1597 } | 1629 } |
| 1598 } | 1630 } |
| 1599 | 1631 |
| 1600 core.Map<core.String, core.Object> toJson() { | 1632 core.Map<core.String, core.Object> toJson() { |
| 1601 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>(); |
| 1602 if (boolValue != null) { | 1635 if (boolValue != null) { |
| 1603 _json["boolValue"] = boolValue; | 1636 _json["boolValue"] = boolValue; |
| 1604 } | 1637 } |
| 1605 if (distributionValue != null) { | 1638 if (distributionValue != null) { |
| 1606 _json["distributionValue"] = (distributionValue).toJson(); | 1639 _json["distributionValue"] = (distributionValue).toJson(); |
| 1607 } | 1640 } |
| 1608 if (doubleValue != null) { | 1641 if (doubleValue != null) { |
| 1609 _json["doubleValue"] = doubleValue; | 1642 _json["doubleValue"] = doubleValue; |
| 1610 } | 1643 } |
| 1611 if (endTime != null) { | 1644 if (endTime != null) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1623 if (startTime != null) { | 1656 if (startTime != null) { |
| 1624 _json["startTime"] = startTime; | 1657 _json["startTime"] = startTime; |
| 1625 } | 1658 } |
| 1626 if (stringValue != null) { | 1659 if (stringValue != null) { |
| 1627 _json["stringValue"] = stringValue; | 1660 _json["stringValue"] = stringValue; |
| 1628 } | 1661 } |
| 1629 return _json; | 1662 return _json; |
| 1630 } | 1663 } |
| 1631 } | 1664 } |
| 1632 | 1665 |
| 1633 /** | 1666 /// Represents a set of metric values in the same metric. |
| 1634 * Represents a set of metric values in the same metric. | 1667 /// Each metric value in the set should have a unique combination of start |
| 1635 * Each metric value in the set should have a unique combination of start time, | 1668 /// time, |
| 1636 * end time, and label values. | 1669 /// end time, and label values. |
| 1637 */ | |
| 1638 class MetricValueSet { | 1670 class MetricValueSet { |
| 1639 /** The metric name defined in the service configuration. */ | 1671 /// The metric name defined in the service configuration. |
| 1640 core.String metricName; | 1672 core.String metricName; |
| 1641 /** The values in this metric. */ | 1673 |
| 1674 /// The values in this metric. |
| 1642 core.List<MetricValue> metricValues; | 1675 core.List<MetricValue> metricValues; |
| 1643 | 1676 |
| 1644 MetricValueSet(); | 1677 MetricValueSet(); |
| 1645 | 1678 |
| 1646 MetricValueSet.fromJson(core.Map _json) { | 1679 MetricValueSet.fromJson(core.Map _json) { |
| 1647 if (_json.containsKey("metricName")) { | 1680 if (_json.containsKey("metricName")) { |
| 1648 metricName = _json["metricName"]; | 1681 metricName = _json["metricName"]; |
| 1649 } | 1682 } |
| 1650 if (_json.containsKey("metricValues")) { | 1683 if (_json.containsKey("metricValues")) { |
| 1651 metricValues = _json["metricValues"].map((value) => new MetricValue.fromJs
on(value)).toList(); | 1684 metricValues = _json["metricValues"] |
| 1685 .map((value) => new MetricValue.fromJson(value)) |
| 1686 .toList(); |
| 1652 } | 1687 } |
| 1653 } | 1688 } |
| 1654 | 1689 |
| 1655 core.Map<core.String, core.Object> toJson() { | 1690 core.Map<core.String, core.Object> toJson() { |
| 1656 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1691 final core.Map<core.String, core.Object> _json = |
| 1692 new core.Map<core.String, core.Object>(); |
| 1657 if (metricName != null) { | 1693 if (metricName != null) { |
| 1658 _json["metricName"] = metricName; | 1694 _json["metricName"] = metricName; |
| 1659 } | 1695 } |
| 1660 if (metricValues != null) { | 1696 if (metricValues != null) { |
| 1661 _json["metricValues"] = metricValues.map((value) => (value).toJson()).toLi
st(); | 1697 _json["metricValues"] = |
| 1698 metricValues.map((value) => (value).toJson()).toList(); |
| 1662 } | 1699 } |
| 1663 return _json; | 1700 return _json; |
| 1664 } | 1701 } |
| 1665 } | 1702 } |
| 1666 | 1703 |
| 1667 /** Represents an amount of money with its currency type. */ | 1704 /// Represents an amount of money with its currency type. |
| 1668 class Money { | 1705 class Money { |
| 1669 /** The 3-letter currency code defined in ISO 4217. */ | 1706 /// The 3-letter currency code defined in ISO 4217. |
| 1670 core.String currencyCode; | 1707 core.String currencyCode; |
| 1671 /** | 1708 |
| 1672 * Number of nano (10^-9) units of the amount. | 1709 /// Number of nano (10^-9) units of the amount. |
| 1673 * The value must be between -999,999,999 and +999,999,999 inclusive. | 1710 /// The value must be between -999,999,999 and +999,999,999 inclusive. |
| 1674 * If `units` is positive, `nanos` must be positive or zero. | 1711 /// If `units` is positive, `nanos` must be positive or zero. |
| 1675 * If `units` is zero, `nanos` can be positive, zero, or negative. | 1712 /// If `units` is zero, `nanos` can be positive, zero, or negative. |
| 1676 * If `units` is negative, `nanos` must be negative or zero. | 1713 /// If `units` is negative, `nanos` must be negative or zero. |
| 1677 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. | 1714 /// For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 1678 */ | |
| 1679 core.int nanos; | 1715 core.int nanos; |
| 1680 /** | 1716 |
| 1681 * The whole units of the amount. | 1717 /// The whole units of the amount. |
| 1682 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. | 1718 /// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 1683 */ | |
| 1684 core.String units; | 1719 core.String units; |
| 1685 | 1720 |
| 1686 Money(); | 1721 Money(); |
| 1687 | 1722 |
| 1688 Money.fromJson(core.Map _json) { | 1723 Money.fromJson(core.Map _json) { |
| 1689 if (_json.containsKey("currencyCode")) { | 1724 if (_json.containsKey("currencyCode")) { |
| 1690 currencyCode = _json["currencyCode"]; | 1725 currencyCode = _json["currencyCode"]; |
| 1691 } | 1726 } |
| 1692 if (_json.containsKey("nanos")) { | 1727 if (_json.containsKey("nanos")) { |
| 1693 nanos = _json["nanos"]; | 1728 nanos = _json["nanos"]; |
| 1694 } | 1729 } |
| 1695 if (_json.containsKey("units")) { | 1730 if (_json.containsKey("units")) { |
| 1696 units = _json["units"]; | 1731 units = _json["units"]; |
| 1697 } | 1732 } |
| 1698 } | 1733 } |
| 1699 | 1734 |
| 1700 core.Map<core.String, core.Object> toJson() { | 1735 core.Map<core.String, core.Object> toJson() { |
| 1701 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1736 final core.Map<core.String, core.Object> _json = |
| 1737 new core.Map<core.String, core.Object>(); |
| 1702 if (currencyCode != null) { | 1738 if (currencyCode != null) { |
| 1703 _json["currencyCode"] = currencyCode; | 1739 _json["currencyCode"] = currencyCode; |
| 1704 } | 1740 } |
| 1705 if (nanos != null) { | 1741 if (nanos != null) { |
| 1706 _json["nanos"] = nanos; | 1742 _json["nanos"] = nanos; |
| 1707 } | 1743 } |
| 1708 if (units != null) { | 1744 if (units != null) { |
| 1709 _json["units"] = units; | 1745 _json["units"] = units; |
| 1710 } | 1746 } |
| 1711 return _json; | 1747 return _json; |
| 1712 } | 1748 } |
| 1713 } | 1749 } |
| 1714 | 1750 |
| 1715 /** Represents information regarding an operation. */ | 1751 /// Represents information regarding an operation. |
| 1716 class Operation { | 1752 class Operation { |
| 1717 /** | 1753 /// Identity of the consumer who is using the service. |
| 1718 * Identity of the consumer who is using the service. | 1754 /// This field should be filled in for the operations initiated by a |
| 1719 * This field should be filled in for the operations initiated by a | 1755 /// consumer, but not for service-initiated operations that are |
| 1720 * consumer, but not for service-initiated operations that are | 1756 /// not related to a specific consumer. |
| 1721 * not related to a specific consumer. | 1757 /// |
| 1722 * | 1758 /// This can be in one of the following formats: |
| 1723 * This can be in one of the following formats: | 1759 /// project:<project_id>, |
| 1724 * project:<project_id>, | 1760 /// project_number:<project_number>, |
| 1725 * project_number:<project_number>, | 1761 /// api_key:<api_key>. |
| 1726 * api_key:<api_key>. | |
| 1727 */ | |
| 1728 core.String consumerId; | 1762 core.String consumerId; |
| 1729 /** | 1763 |
| 1730 * End time of the operation. | 1764 /// End time of the operation. |
| 1731 * Required when the operation is used in ServiceController.Report, | 1765 /// Required when the operation is used in ServiceController.Report, |
| 1732 * but optional when the operation is used in ServiceController.Check. | 1766 /// but optional when the operation is used in ServiceController.Check. |
| 1733 */ | |
| 1734 core.String endTime; | 1767 core.String endTime; |
| 1735 /** | 1768 |
| 1736 * DO NOT USE. This is an experimental field. | 1769 /// DO NOT USE. This is an experimental field. |
| 1737 * Possible string values are: | 1770 /// Possible string values are: |
| 1738 * - "LOW" : The API implementation may cache and aggregate the data. | 1771 /// - "LOW" : The API implementation may cache and aggregate the data. |
| 1739 * The data may be lost when rare and unexpected system failures occur. | 1772 /// The data may be lost when rare and unexpected system failures occur. |
| 1740 * - "HIGH" : The API implementation doesn't cache and aggregate the data. | 1773 /// - "HIGH" : The API implementation doesn't cache and aggregate the data. |
| 1741 * If the method returns successfully, it's guaranteed that the data has | 1774 /// If the method returns successfully, it's guaranteed that the data has |
| 1742 * been persisted in durable storage. | 1775 /// been persisted in durable storage. |
| 1743 * - "DEBUG" : In addition to the behavior described in HIGH, DEBUG enables | 1776 /// - "DEBUG" : In addition to the behavior described in HIGH, DEBUG enables |
| 1744 * additional validation logic that is only useful during the onboarding | 1777 /// additional validation logic that is only useful during the onboarding |
| 1745 * process. This is only available to Google internal services and | 1778 /// process. This is only available to Google internal services and |
| 1746 * the service must be whitelisted by chemist-dev@google.com in order | 1779 /// the service must be whitelisted by chemist-dev@google.com in order |
| 1747 * to use this level. | 1780 /// to use this level. |
| 1748 */ | |
| 1749 core.String importance; | 1781 core.String importance; |
| 1750 /** | 1782 |
| 1751 * Labels describing the operation. Only the following labels are allowed: | 1783 /// Labels describing the operation. Only the following labels are allowed: |
| 1752 * | 1784 /// |
| 1753 * - Labels describing monitored resources as defined in | 1785 /// - Labels describing monitored resources as defined in |
| 1754 * the service configuration. | 1786 /// the service configuration. |
| 1755 * - Default labels of metric values. When specified, labels defined in the | 1787 /// - Default labels of metric values. When specified, labels defined in the |
| 1756 * metric value override these default. | 1788 /// metric value override these default. |
| 1757 * - The following labels defined by Google Cloud Platform: | 1789 /// - The following labels defined by Google Cloud Platform: |
| 1758 * - `cloud.googleapis.com/location` describing the location where the | 1790 /// - `cloud.googleapis.com/location` describing the location where the |
| 1759 * operation happened, | 1791 /// operation happened, |
| 1760 * - `servicecontrol.googleapis.com/user_agent` describing the user agent | 1792 /// - `servicecontrol.googleapis.com/user_agent` describing the user agent |
| 1761 * of the API request, | 1793 /// of the API request, |
| 1762 * - `servicecontrol.googleapis.com/service_agent` describing the service | 1794 /// - `servicecontrol.googleapis.com/service_agent` describing the service |
| 1763 * used to handle the API request (e.g. ESP), | 1795 /// used to handle the API request (e.g. ESP), |
| 1764 * - `servicecontrol.googleapis.com/platform` describing the platform | 1796 /// - `servicecontrol.googleapis.com/platform` describing the platform |
| 1765 * where the API is served (e.g. GAE, GCE, GKE). | 1797 /// where the API is served (e.g. GAE, GCE, GKE). |
| 1766 */ | |
| 1767 core.Map<core.String, core.String> labels; | 1798 core.Map<core.String, core.String> labels; |
| 1768 /** Represents information to be logged. */ | 1799 |
| 1800 /// Represents information to be logged. |
| 1769 core.List<LogEntry> logEntries; | 1801 core.List<LogEntry> logEntries; |
| 1770 /** | 1802 |
| 1771 * Represents information about this operation. Each MetricValueSet | 1803 /// Represents information about this operation. Each MetricValueSet |
| 1772 * corresponds to a metric defined in the service configuration. | 1804 /// corresponds to a metric defined in the service configuration. |
| 1773 * The data type used in the MetricValueSet must agree with | 1805 /// The data type used in the MetricValueSet must agree with |
| 1774 * the data type specified in the metric definition. | 1806 /// the data type specified in the metric definition. |
| 1775 * | 1807 /// |
| 1776 * Within a single operation, it is not allowed to have more than one | 1808 /// Within a single operation, it is not allowed to have more than one |
| 1777 * MetricValue instances that have the same metric names and identical | 1809 /// MetricValue instances that have the same metric names and identical |
| 1778 * label value combinations. If a request has such duplicated MetricValue | 1810 /// label value combinations. If a request has such duplicated MetricValue |
| 1779 * instances, the entire request is rejected with | 1811 /// instances, the entire request is rejected with |
| 1780 * an invalid argument error. | 1812 /// an invalid argument error. |
| 1781 */ | |
| 1782 core.List<MetricValueSet> metricValueSets; | 1813 core.List<MetricValueSet> metricValueSets; |
| 1783 /** | 1814 |
| 1784 * Identity of the operation. This must be unique within the scope of the | 1815 /// Identity of the operation. This must be unique within the scope of the |
| 1785 * service that generated the operation. If the service calls | 1816 /// service that generated the operation. If the service calls |
| 1786 * Check() and Report() on the same operation, the two calls should carry | 1817 /// Check() and Report() on the same operation, the two calls should carry |
| 1787 * the same id. | 1818 /// the same id. |
| 1788 * | 1819 /// |
| 1789 * UUID version 4 is recommended, though not required. | 1820 /// UUID version 4 is recommended, though not required. |
| 1790 * In scenarios where an operation is computed from existing information | 1821 /// In scenarios where an operation is computed from existing information |
| 1791 * and an idempotent id is desirable for deduplication purpose, UUID version 5 | 1822 /// and an idempotent id is desirable for deduplication purpose, UUID version |
| 1792 * is recommended. See RFC 4122 for details. | 1823 /// 5 |
| 1793 */ | 1824 /// is recommended. See RFC 4122 for details. |
| 1794 core.String operationId; | 1825 core.String operationId; |
| 1795 /** Fully qualified name of the operation. Reserved for future use. */ | 1826 |
| 1827 /// Fully qualified name of the operation. Reserved for future use. |
| 1796 core.String operationName; | 1828 core.String operationName; |
| 1797 /** | 1829 |
| 1798 * Represents the properties needed for quota check. Applicable only if this | 1830 /// Represents the properties needed for quota check. Applicable only if this |
| 1799 * operation is for a quota check request. | 1831 /// operation is for a quota check request. |
| 1800 */ | |
| 1801 QuotaProperties quotaProperties; | 1832 QuotaProperties quotaProperties; |
| 1802 /** | 1833 |
| 1803 * The resource name of the parent of a resource in the resource hierarchy. | 1834 /// The resource name of the parent of a resource in the resource hierarchy. |
| 1804 * | 1835 /// |
| 1805 * This can be in one of the following formats: | 1836 /// This can be in one of the following formats: |
| 1806 * - “projects/<project-id or project-number>” | 1837 /// - “projects/<project-id or project-number>” |
| 1807 * - “folders/<folder-id>” | 1838 /// - “folders/<folder-id>” |
| 1808 * - “organizations/<organization-id>” | 1839 /// - “organizations/<organization-id>” |
| 1809 */ | |
| 1810 core.String resourceContainer; | 1840 core.String resourceContainer; |
| 1811 /** Required. Start time of the operation. */ | 1841 |
| 1842 /// DO NOT USE. |
| 1843 /// This field is not ready for use yet. |
| 1844 core.List<core.String> resourceContainers; |
| 1845 |
| 1846 /// Required. Start time of the operation. |
| 1812 core.String startTime; | 1847 core.String startTime; |
| 1813 /** | 1848 |
| 1814 * User defined labels for the resource that this operation is associated | 1849 /// User defined labels for the resource that this operation is associated |
| 1815 * with. | 1850 /// with. |
| 1816 */ | |
| 1817 core.Map<core.String, core.String> userLabels; | 1851 core.Map<core.String, core.String> userLabels; |
| 1818 | 1852 |
| 1819 Operation(); | 1853 Operation(); |
| 1820 | 1854 |
| 1821 Operation.fromJson(core.Map _json) { | 1855 Operation.fromJson(core.Map _json) { |
| 1822 if (_json.containsKey("consumerId")) { | 1856 if (_json.containsKey("consumerId")) { |
| 1823 consumerId = _json["consumerId"]; | 1857 consumerId = _json["consumerId"]; |
| 1824 } | 1858 } |
| 1825 if (_json.containsKey("endTime")) { | 1859 if (_json.containsKey("endTime")) { |
| 1826 endTime = _json["endTime"]; | 1860 endTime = _json["endTime"]; |
| 1827 } | 1861 } |
| 1828 if (_json.containsKey("importance")) { | 1862 if (_json.containsKey("importance")) { |
| 1829 importance = _json["importance"]; | 1863 importance = _json["importance"]; |
| 1830 } | 1864 } |
| 1831 if (_json.containsKey("labels")) { | 1865 if (_json.containsKey("labels")) { |
| 1832 labels = _json["labels"]; | 1866 labels = _json["labels"]; |
| 1833 } | 1867 } |
| 1834 if (_json.containsKey("logEntries")) { | 1868 if (_json.containsKey("logEntries")) { |
| 1835 logEntries = _json["logEntries"].map((value) => new LogEntry.fromJson(valu
e)).toList(); | 1869 logEntries = _json["logEntries"] |
| 1870 .map((value) => new LogEntry.fromJson(value)) |
| 1871 .toList(); |
| 1836 } | 1872 } |
| 1837 if (_json.containsKey("metricValueSets")) { | 1873 if (_json.containsKey("metricValueSets")) { |
| 1838 metricValueSets = _json["metricValueSets"].map((value) => new MetricValueS
et.fromJson(value)).toList(); | 1874 metricValueSets = _json["metricValueSets"] |
| 1875 .map((value) => new MetricValueSet.fromJson(value)) |
| 1876 .toList(); |
| 1839 } | 1877 } |
| 1840 if (_json.containsKey("operationId")) { | 1878 if (_json.containsKey("operationId")) { |
| 1841 operationId = _json["operationId"]; | 1879 operationId = _json["operationId"]; |
| 1842 } | 1880 } |
| 1843 if (_json.containsKey("operationName")) { | 1881 if (_json.containsKey("operationName")) { |
| 1844 operationName = _json["operationName"]; | 1882 operationName = _json["operationName"]; |
| 1845 } | 1883 } |
| 1846 if (_json.containsKey("quotaProperties")) { | 1884 if (_json.containsKey("quotaProperties")) { |
| 1847 quotaProperties = new QuotaProperties.fromJson(_json["quotaProperties"]); | 1885 quotaProperties = new QuotaProperties.fromJson(_json["quotaProperties"]); |
| 1848 } | 1886 } |
| 1849 if (_json.containsKey("resourceContainer")) { | 1887 if (_json.containsKey("resourceContainer")) { |
| 1850 resourceContainer = _json["resourceContainer"]; | 1888 resourceContainer = _json["resourceContainer"]; |
| 1851 } | 1889 } |
| 1890 if (_json.containsKey("resourceContainers")) { |
| 1891 resourceContainers = _json["resourceContainers"]; |
| 1892 } |
| 1852 if (_json.containsKey("startTime")) { | 1893 if (_json.containsKey("startTime")) { |
| 1853 startTime = _json["startTime"]; | 1894 startTime = _json["startTime"]; |
| 1854 } | 1895 } |
| 1855 if (_json.containsKey("userLabels")) { | 1896 if (_json.containsKey("userLabels")) { |
| 1856 userLabels = _json["userLabels"]; | 1897 userLabels = _json["userLabels"]; |
| 1857 } | 1898 } |
| 1858 } | 1899 } |
| 1859 | 1900 |
| 1860 core.Map<core.String, core.Object> toJson() { | 1901 core.Map<core.String, core.Object> toJson() { |
| 1861 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1902 final core.Map<core.String, core.Object> _json = |
| 1903 new core.Map<core.String, core.Object>(); |
| 1862 if (consumerId != null) { | 1904 if (consumerId != null) { |
| 1863 _json["consumerId"] = consumerId; | 1905 _json["consumerId"] = consumerId; |
| 1864 } | 1906 } |
| 1865 if (endTime != null) { | 1907 if (endTime != null) { |
| 1866 _json["endTime"] = endTime; | 1908 _json["endTime"] = endTime; |
| 1867 } | 1909 } |
| 1868 if (importance != null) { | 1910 if (importance != null) { |
| 1869 _json["importance"] = importance; | 1911 _json["importance"] = importance; |
| 1870 } | 1912 } |
| 1871 if (labels != null) { | 1913 if (labels != null) { |
| 1872 _json["labels"] = labels; | 1914 _json["labels"] = labels; |
| 1873 } | 1915 } |
| 1874 if (logEntries != null) { | 1916 if (logEntries != null) { |
| 1875 _json["logEntries"] = logEntries.map((value) => (value).toJson()).toList()
; | 1917 _json["logEntries"] = |
| 1918 logEntries.map((value) => (value).toJson()).toList(); |
| 1876 } | 1919 } |
| 1877 if (metricValueSets != null) { | 1920 if (metricValueSets != null) { |
| 1878 _json["metricValueSets"] = metricValueSets.map((value) => (value).toJson()
).toList(); | 1921 _json["metricValueSets"] = |
| 1922 metricValueSets.map((value) => (value).toJson()).toList(); |
| 1879 } | 1923 } |
| 1880 if (operationId != null) { | 1924 if (operationId != null) { |
| 1881 _json["operationId"] = operationId; | 1925 _json["operationId"] = operationId; |
| 1882 } | 1926 } |
| 1883 if (operationName != null) { | 1927 if (operationName != null) { |
| 1884 _json["operationName"] = operationName; | 1928 _json["operationName"] = operationName; |
| 1885 } | 1929 } |
| 1886 if (quotaProperties != null) { | 1930 if (quotaProperties != null) { |
| 1887 _json["quotaProperties"] = (quotaProperties).toJson(); | 1931 _json["quotaProperties"] = (quotaProperties).toJson(); |
| 1888 } | 1932 } |
| 1889 if (resourceContainer != null) { | 1933 if (resourceContainer != null) { |
| 1890 _json["resourceContainer"] = resourceContainer; | 1934 _json["resourceContainer"] = resourceContainer; |
| 1891 } | 1935 } |
| 1936 if (resourceContainers != null) { |
| 1937 _json["resourceContainers"] = resourceContainers; |
| 1938 } |
| 1892 if (startTime != null) { | 1939 if (startTime != null) { |
| 1893 _json["startTime"] = startTime; | 1940 _json["startTime"] = startTime; |
| 1894 } | 1941 } |
| 1895 if (userLabels != null) { | 1942 if (userLabels != null) { |
| 1896 _json["userLabels"] = userLabels; | 1943 _json["userLabels"] = userLabels; |
| 1897 } | 1944 } |
| 1898 return _json; | 1945 return _json; |
| 1899 } | 1946 } |
| 1900 } | 1947 } |
| 1901 | 1948 |
| 1902 class QuotaError { | 1949 class QuotaError { |
| 1903 /** | 1950 /// Error code. |
| 1904 * Error code. | 1951 /// Possible string values are: |
| 1905 * Possible string values are: | 1952 /// - "UNSPECIFIED" : This is never used. |
| 1906 * - "UNSPECIFIED" : This is never used. | 1953 /// - "RESOURCE_EXHAUSTED" : Quota allocation failed. |
| 1907 * - "RESOURCE_EXHAUSTED" : Quota allocation failed. | 1954 /// Same as google.rpc.Code.RESOURCE_EXHAUSTED. |
| 1908 * Same as google.rpc.Code.RESOURCE_EXHAUSTED. | 1955 /// - "OUT_OF_RANGE" : Quota release failed. This error is ONLY returned on |
| 1909 * - "OUT_OF_RANGE" : Quota release failed. This error is ONLY returned on a | 1956 /// a NORMAL release. |
| 1910 * NORMAL release. | 1957 /// More formally: if a user requests a release of 10 tokens, but only |
| 1911 * More formally: if a user requests a release of 10 tokens, but only | 1958 /// 5 tokens were previously allocated, in a BEST_EFFORT release, this will |
| 1912 * 5 tokens were previously allocated, in a BEST_EFFORT release, this will | 1959 /// be considered a success, 5 tokens will be released, and the result will |
| 1913 * be considered a success, 5 tokens will be released, and the result will | 1960 /// be "Ok". If this is done in NORMAL mode, no tokens will be released, |
| 1914 * be "Ok". If this is done in NORMAL mode, no tokens will be released, | 1961 /// and an OUT_OF_RANGE error will be returned. |
| 1915 * and an OUT_OF_RANGE error will be returned. | 1962 /// Same as google.rpc.Code.OUT_OF_RANGE. |
| 1916 * Same as google.rpc.Code.OUT_OF_RANGE. | 1963 /// - "BILLING_NOT_ACTIVE" : Consumer cannot access the service because the |
| 1917 * - "BILLING_NOT_ACTIVE" : Consumer cannot access the service because the | 1964 /// service requires active |
| 1918 * service requires active | 1965 /// billing. |
| 1919 * billing. | 1966 /// - "PROJECT_DELETED" : Consumer's project has been marked as deleted (soft |
| 1920 * - "PROJECT_DELETED" : Consumer's project has been marked as deleted (soft | 1967 /// deletion). |
| 1921 * deletion). | 1968 /// - "API_KEY_INVALID" : Specified API key is invalid. |
| 1922 * - "API_KEY_INVALID" : Specified API key is invalid. | 1969 /// - "API_KEY_EXPIRED" : Specified API Key has expired. |
| 1923 * - "API_KEY_EXPIRED" : Specified API Key has expired. | 1970 /// - "SPATULA_HEADER_INVALID" : Consumer's spatula header is invalid. |
| 1924 * - "SPATULA_HEADER_INVALID" : Consumer's spatula header is invalid. | 1971 /// - "LOAS_ROLE_INVALID" : The consumer's LOAS role is invalid. |
| 1925 * - "LOAS_ROLE_INVALID" : The consumer's LOAS role is invalid. | 1972 /// - "NO_LOAS_PROJECT" : The consumer's LOAS role has no associated project. |
| 1926 * - "NO_LOAS_PROJECT" : The consumer's LOAS role has no associated project. | 1973 /// - "PROJECT_STATUS_UNAVAILABLE" : The backend server for looking up |
| 1927 * - "PROJECT_STATUS_UNAVAILABLE" : The backend server for looking up project | 1974 /// project id/number is unavailable. |
| 1928 * id/number is unavailable. | 1975 /// - "SERVICE_STATUS_UNAVAILABLE" : The backend server for checking service |
| 1929 * - "SERVICE_STATUS_UNAVAILABLE" : The backend server for checking service | 1976 /// status is unavailable. |
| 1930 * status is unavailable. | 1977 /// - "BILLING_STATUS_UNAVAILABLE" : The backend server for checking billing |
| 1931 * - "BILLING_STATUS_UNAVAILABLE" : The backend server for checking billing | 1978 /// status is unavailable. |
| 1932 * status is unavailable. | 1979 /// - "QUOTA_SYSTEM_UNAVAILABLE" : The backend server for checking quota |
| 1933 * - "QUOTA_SYSTEM_UNAVAILABLE" : The backend server for checking quota limits | 1980 /// limits is unavailable. |
| 1934 * is unavailable. | |
| 1935 */ | |
| 1936 core.String code; | 1981 core.String code; |
| 1937 /** Free-form text that provides details on the cause of the error. */ | 1982 |
| 1983 /// Free-form text that provides details on the cause of the error. |
| 1938 core.String description; | 1984 core.String description; |
| 1939 /** | 1985 |
| 1940 * Subject to whom this error applies. See the specific enum for more details | 1986 /// Subject to whom this error applies. See the specific enum for more |
| 1941 * on this field. For example, "clientip:<ip address of client>" or | 1987 /// details |
| 1942 * "project:<Google developer project id>". | 1988 /// on this field. For example, "clientip:<ip address of client>" or |
| 1943 */ | 1989 /// "project:<Google developer project id>". |
| 1944 core.String subject; | 1990 core.String subject; |
| 1945 | 1991 |
| 1946 QuotaError(); | 1992 QuotaError(); |
| 1947 | 1993 |
| 1948 QuotaError.fromJson(core.Map _json) { | 1994 QuotaError.fromJson(core.Map _json) { |
| 1949 if (_json.containsKey("code")) { | 1995 if (_json.containsKey("code")) { |
| 1950 code = _json["code"]; | 1996 code = _json["code"]; |
| 1951 } | 1997 } |
| 1952 if (_json.containsKey("description")) { | 1998 if (_json.containsKey("description")) { |
| 1953 description = _json["description"]; | 1999 description = _json["description"]; |
| 1954 } | 2000 } |
| 1955 if (_json.containsKey("subject")) { | 2001 if (_json.containsKey("subject")) { |
| 1956 subject = _json["subject"]; | 2002 subject = _json["subject"]; |
| 1957 } | 2003 } |
| 1958 } | 2004 } |
| 1959 | 2005 |
| 1960 core.Map<core.String, core.Object> toJson() { | 2006 core.Map<core.String, core.Object> toJson() { |
| 1961 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2007 final core.Map<core.String, core.Object> _json = |
| 2008 new core.Map<core.String, core.Object>(); |
| 1962 if (code != null) { | 2009 if (code != null) { |
| 1963 _json["code"] = code; | 2010 _json["code"] = code; |
| 1964 } | 2011 } |
| 1965 if (description != null) { | 2012 if (description != null) { |
| 1966 _json["description"] = description; | 2013 _json["description"] = description; |
| 1967 } | 2014 } |
| 1968 if (subject != null) { | 2015 if (subject != null) { |
| 1969 _json["subject"] = subject; | 2016 _json["subject"] = subject; |
| 1970 } | 2017 } |
| 1971 return _json; | 2018 return _json; |
| 1972 } | 2019 } |
| 1973 } | 2020 } |
| 1974 | 2021 |
| 1975 /** Contains the quota information for a quota check response. */ | 2022 /// Contains the quota information for a quota check response. |
| 1976 class QuotaInfo { | 2023 class QuotaInfo { |
| 1977 /** | 2024 /// Quota Metrics that have exceeded quota limits. |
| 1978 * Quota Metrics that have exceeded quota limits. | 2025 /// For QuotaGroup-based quota, this is QuotaGroup.name |
| 1979 * For QuotaGroup-based quota, this is QuotaGroup.name | 2026 /// For QuotaLimit-based quota, this is QuotaLimit.name |
| 1980 * For QuotaLimit-based quota, this is QuotaLimit.name | 2027 /// See: google.api.Quota |
| 1981 * See: google.api.Quota | 2028 /// Deprecated: Use quota_metrics to get per quota group limit exceeded |
| 1982 * Deprecated: Use quota_metrics to get per quota group limit exceeded status. | 2029 /// status. |
| 1983 */ | |
| 1984 core.List<core.String> limitExceeded; | 2030 core.List<core.String> limitExceeded; |
| 1985 /** | 2031 |
| 1986 * Map of quota group name to the actual number of tokens consumed. If the | 2032 /// Map of quota group name to the actual number of tokens consumed. If the |
| 1987 * quota check was not successful, then this will not be populated due to no | 2033 /// quota check was not successful, then this will not be populated due to no |
| 1988 * quota consumption. | 2034 /// quota consumption. |
| 1989 * | 2035 /// |
| 1990 * We are not merging this field with 'quota_metrics' field because of the | 2036 /// We are not merging this field with 'quota_metrics' field because of the |
| 1991 * complexity of scaling in Chemist client code base. For simplicity, we will | 2037 /// complexity of scaling in Chemist client code base. For simplicity, we |
| 1992 * keep this field for Castor (that scales quota usage) and 'quota_metrics' | 2038 /// will |
| 1993 * for SuperQuota (that doesn't scale quota usage). | 2039 /// keep this field for Castor (that scales quota usage) and 'quota_metrics' |
| 1994 */ | 2040 /// for SuperQuota (that doesn't scale quota usage). |
| 1995 core.Map<core.String, core.int> quotaConsumed; | 2041 core.Map<core.String, core.int> quotaConsumed; |
| 1996 /** | 2042 |
| 1997 * Quota metrics to indicate the usage. Depending on the check request, one or | 2043 /// Quota metrics to indicate the usage. Depending on the check request, one |
| 1998 * more of the following metrics will be included: | 2044 /// or |
| 1999 * | 2045 /// more of the following metrics will be included: |
| 2000 * 1. For rate quota, per quota group or per quota metric incremental usage | 2046 /// |
| 2001 * will be specified using the following delta metric: | 2047 /// 1. For rate quota, per quota group or per quota metric incremental usage |
| 2002 * "serviceruntime.googleapis.com/api/consumer/quota_used_count" | 2048 /// will be specified using the following delta metric: |
| 2003 * | 2049 /// "serviceruntime.googleapis.com/api/consumer/quota_used_count" |
| 2004 * 2. For allocation quota, per quota metric total usage will be specified | 2050 /// |
| 2005 * using the following gauge metric: | 2051 /// 2. For allocation quota, per quota metric total usage will be specified |
| 2006 * "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" | 2052 /// using the following gauge metric: |
| 2007 * | 2053 /// "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" |
| 2008 * 3. For both rate quota and allocation quota, the quota limit reached | 2054 /// |
| 2009 * condition will be specified using the following boolean metric: | 2055 /// 3. For both rate quota and allocation quota, the quota limit reached |
| 2010 * "serviceruntime.googleapis.com/quota/exceeded" | 2056 /// condition will be specified using the following boolean metric: |
| 2011 */ | 2057 /// "serviceruntime.googleapis.com/quota/exceeded" |
| 2012 core.List<MetricValueSet> quotaMetrics; | 2058 core.List<MetricValueSet> quotaMetrics; |
| 2013 | 2059 |
| 2014 QuotaInfo(); | 2060 QuotaInfo(); |
| 2015 | 2061 |
| 2016 QuotaInfo.fromJson(core.Map _json) { | 2062 QuotaInfo.fromJson(core.Map _json) { |
| 2017 if (_json.containsKey("limitExceeded")) { | 2063 if (_json.containsKey("limitExceeded")) { |
| 2018 limitExceeded = _json["limitExceeded"]; | 2064 limitExceeded = _json["limitExceeded"]; |
| 2019 } | 2065 } |
| 2020 if (_json.containsKey("quotaConsumed")) { | 2066 if (_json.containsKey("quotaConsumed")) { |
| 2021 quotaConsumed = _json["quotaConsumed"]; | 2067 quotaConsumed = _json["quotaConsumed"]; |
| 2022 } | 2068 } |
| 2023 if (_json.containsKey("quotaMetrics")) { | 2069 if (_json.containsKey("quotaMetrics")) { |
| 2024 quotaMetrics = _json["quotaMetrics"].map((value) => new MetricValueSet.fro
mJson(value)).toList(); | 2070 quotaMetrics = _json["quotaMetrics"] |
| 2071 .map((value) => new MetricValueSet.fromJson(value)) |
| 2072 .toList(); |
| 2025 } | 2073 } |
| 2026 } | 2074 } |
| 2027 | 2075 |
| 2028 core.Map<core.String, core.Object> toJson() { | 2076 core.Map<core.String, core.Object> toJson() { |
| 2029 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2077 final core.Map<core.String, core.Object> _json = |
| 2078 new core.Map<core.String, core.Object>(); |
| 2030 if (limitExceeded != null) { | 2079 if (limitExceeded != null) { |
| 2031 _json["limitExceeded"] = limitExceeded; | 2080 _json["limitExceeded"] = limitExceeded; |
| 2032 } | 2081 } |
| 2033 if (quotaConsumed != null) { | 2082 if (quotaConsumed != null) { |
| 2034 _json["quotaConsumed"] = quotaConsumed; | 2083 _json["quotaConsumed"] = quotaConsumed; |
| 2035 } | 2084 } |
| 2036 if (quotaMetrics != null) { | 2085 if (quotaMetrics != null) { |
| 2037 _json["quotaMetrics"] = quotaMetrics.map((value) => (value).toJson()).toLi
st(); | 2086 _json["quotaMetrics"] = |
| 2087 quotaMetrics.map((value) => (value).toJson()).toList(); |
| 2038 } | 2088 } |
| 2039 return _json; | 2089 return _json; |
| 2040 } | 2090 } |
| 2041 } | 2091 } |
| 2042 | 2092 |
| 2043 /** Represents information regarding a quota operation. */ | 2093 /// Represents information regarding a quota operation. |
| 2044 class QuotaOperation { | 2094 class QuotaOperation { |
| 2045 /** | 2095 /// Identity of the consumer for whom this quota operation is being |
| 2046 * Identity of the consumer for whom this quota operation is being performed. | 2096 /// performed. |
| 2047 * | 2097 /// |
| 2048 * This can be in one of the following formats: | 2098 /// This can be in one of the following formats: |
| 2049 * project:<project_id>, | 2099 /// project:<project_id>, |
| 2050 * project_number:<project_number>, | 2100 /// project_number:<project_number>, |
| 2051 * api_key:<api_key>. | 2101 /// api_key:<api_key>. |
| 2052 */ | |
| 2053 core.String consumerId; | 2102 core.String consumerId; |
| 2054 /** Labels describing the operation. */ | 2103 |
| 2104 /// Labels describing the operation. |
| 2055 core.Map<core.String, core.String> labels; | 2105 core.Map<core.String, core.String> labels; |
| 2056 /** | 2106 |
| 2057 * Fully qualified name of the API method for which this quota operation is | 2107 /// Fully qualified name of the API method for which this quota operation is |
| 2058 * requested. This name is used for matching quota rules or metric rules and | 2108 /// requested. This name is used for matching quota rules or metric rules and |
| 2059 * billing status rules defined in service configuration. This field is not | 2109 /// billing status rules defined in service configuration. This field is not |
| 2060 * required if the quota operation is performed on non-API resources. | 2110 /// required if the quota operation is performed on non-API resources. |
| 2061 * | 2111 /// |
| 2062 * Example of an RPC method name: | 2112 /// Example of an RPC method name: |
| 2063 * google.example.library.v1.LibraryService.CreateShelf | 2113 /// google.example.library.v1.LibraryService.CreateShelf |
| 2064 */ | |
| 2065 core.String methodName; | 2114 core.String methodName; |
| 2066 /** | 2115 |
| 2067 * Identity of the operation. This is expected to be unique within the scope | 2116 /// Identity of the operation. This is expected to be unique within the scope |
| 2068 * of the service that generated the operation, and guarantees idempotency in | 2117 /// of the service that generated the operation, and guarantees idempotency |
| 2069 * case of retries. | 2118 /// in |
| 2070 * | 2119 /// case of retries. |
| 2071 * UUID version 4 is recommended, though not required. In scenarios where an | 2120 /// |
| 2072 * operation is computed from existing information and an idempotent id is | 2121 /// UUID version 4 is recommended, though not required. In scenarios where an |
| 2073 * desirable for deduplication purpose, UUID version 5 is recommended. See | 2122 /// operation is computed from existing information and an idempotent id is |
| 2074 * RFC 4122 for details. | 2123 /// desirable for deduplication purpose, UUID version 5 is recommended. See |
| 2075 */ | 2124 /// RFC 4122 for details. |
| 2076 core.String operationId; | 2125 core.String operationId; |
| 2077 /** | 2126 |
| 2078 * Represents information about this operation. Each MetricValueSet | 2127 /// Represents information about this operation. Each MetricValueSet |
| 2079 * corresponds to a metric defined in the service configuration. | 2128 /// corresponds to a metric defined in the service configuration. |
| 2080 * The data type used in the MetricValueSet must agree with | 2129 /// The data type used in the MetricValueSet must agree with |
| 2081 * the data type specified in the metric definition. | 2130 /// the data type specified in the metric definition. |
| 2082 * | 2131 /// |
| 2083 * Within a single operation, it is not allowed to have more than one | 2132 /// Within a single operation, it is not allowed to have more than one |
| 2084 * MetricValue instances that have the same metric names and identical | 2133 /// MetricValue instances that have the same metric names and identical |
| 2085 * label value combinations. If a request has such duplicated MetricValue | 2134 /// label value combinations. If a request has such duplicated MetricValue |
| 2086 * instances, the entire request is rejected with | 2135 /// instances, the entire request is rejected with |
| 2087 * an invalid argument error. | 2136 /// an invalid argument error. |
| 2088 */ | |
| 2089 core.List<MetricValueSet> quotaMetrics; | 2137 core.List<MetricValueSet> quotaMetrics; |
| 2090 /** | 2138 |
| 2091 * Quota mode for this operation. | 2139 /// Quota mode for this operation. |
| 2092 * Possible string values are: | 2140 /// Possible string values are: |
| 2093 * - "UNSPECIFIED" | 2141 /// - "UNSPECIFIED" |
| 2094 * - "NORMAL" : For AllocateQuota request, allocates quota for the amount | 2142 /// - "NORMAL" : For AllocateQuota request, allocates quota for the amount |
| 2095 * specified in | 2143 /// specified in |
| 2096 * the service configuration or specified using the quota metrics. If the | 2144 /// the service configuration or specified using the quota metrics. If the |
| 2097 * amount is higher than the available quota, allocation error will be | 2145 /// amount is higher than the available quota, allocation error will be |
| 2098 * returned and no quota will be allocated. | 2146 /// returned and no quota will be allocated. |
| 2099 * For ReleaseQuota request, this mode is supported only for precise quota | 2147 /// For ReleaseQuota request, this mode is supported only for precise quota |
| 2100 * limits. In this case, this operation releases quota for the amount | 2148 /// limits. In this case, this operation releases quota for the amount |
| 2101 * specified in the service configuration or specified using the quota | 2149 /// specified in the service configuration or specified using the quota |
| 2102 * metrics. If the release can make used quota negative, release error | 2150 /// metrics. If the release can make used quota negative, release error |
| 2103 * will be returned and no quota will be released. | 2151 /// will be returned and no quota will be released. |
| 2104 * - "BEST_EFFORT" : For AllocateQuota request, this mode is supported only | 2152 /// - "BEST_EFFORT" : For AllocateQuota request, this mode is supported only |
| 2105 * for imprecise | 2153 /// for imprecise |
| 2106 * quota limits. In this case, the operation allocates quota for the amount | 2154 /// quota limits. In this case, the operation allocates quota for the amount |
| 2107 * specified in the service configuration or specified using the quota | 2155 /// specified in the service configuration or specified using the quota |
| 2108 * metrics. If the amount is higher than the available quota, request does | 2156 /// metrics. If the amount is higher than the available quota, request does |
| 2109 * not fail but all available quota will be allocated. | 2157 /// not fail but all available quota will be allocated. |
| 2110 * For ReleaseQuota request, this mode is supported for both precise quota | 2158 /// For ReleaseQuota request, this mode is supported for both precise quota |
| 2111 * limits and imprecise quota limits. In this case, this operation releases | 2159 /// limits and imprecise quota limits. In this case, this operation releases |
| 2112 * quota for the amount specified in the service configuration or specified | 2160 /// quota for the amount specified in the service configuration or specified |
| 2113 * using the quota metrics. If the release can make used quota | 2161 /// using the quota metrics. If the release can make used quota |
| 2114 * negative, request does not fail but only the used quota will be | 2162 /// negative, request does not fail but only the used quota will be |
| 2115 * released. After the ReleaseQuota request completes, the used quota | 2163 /// released. After the ReleaseQuota request completes, the used quota |
| 2116 * will be 0, and never goes to negative. | 2164 /// will be 0, and never goes to negative. |
| 2117 * - "CHECK_ONLY" : For AllocateQuota request, only checks if there is enough | 2165 /// - "CHECK_ONLY" : For AllocateQuota request, only checks if there is |
| 2118 * quota | 2166 /// enough quota |
| 2119 * available and does not change the available quota. No lock is placed on | 2167 /// available and does not change the available quota. No lock is placed on |
| 2120 * the available quota either. Not supported for ReleaseQuota request. | 2168 /// the available quota either. Not supported for ReleaseQuota request. |
| 2121 */ | |
| 2122 core.String quotaMode; | 2169 core.String quotaMode; |
| 2123 | 2170 |
| 2124 QuotaOperation(); | 2171 QuotaOperation(); |
| 2125 | 2172 |
| 2126 QuotaOperation.fromJson(core.Map _json) { | 2173 QuotaOperation.fromJson(core.Map _json) { |
| 2127 if (_json.containsKey("consumerId")) { | 2174 if (_json.containsKey("consumerId")) { |
| 2128 consumerId = _json["consumerId"]; | 2175 consumerId = _json["consumerId"]; |
| 2129 } | 2176 } |
| 2130 if (_json.containsKey("labels")) { | 2177 if (_json.containsKey("labels")) { |
| 2131 labels = _json["labels"]; | 2178 labels = _json["labels"]; |
| 2132 } | 2179 } |
| 2133 if (_json.containsKey("methodName")) { | 2180 if (_json.containsKey("methodName")) { |
| 2134 methodName = _json["methodName"]; | 2181 methodName = _json["methodName"]; |
| 2135 } | 2182 } |
| 2136 if (_json.containsKey("operationId")) { | 2183 if (_json.containsKey("operationId")) { |
| 2137 operationId = _json["operationId"]; | 2184 operationId = _json["operationId"]; |
| 2138 } | 2185 } |
| 2139 if (_json.containsKey("quotaMetrics")) { | 2186 if (_json.containsKey("quotaMetrics")) { |
| 2140 quotaMetrics = _json["quotaMetrics"].map((value) => new MetricValueSet.fro
mJson(value)).toList(); | 2187 quotaMetrics = _json["quotaMetrics"] |
| 2188 .map((value) => new MetricValueSet.fromJson(value)) |
| 2189 .toList(); |
| 2141 } | 2190 } |
| 2142 if (_json.containsKey("quotaMode")) { | 2191 if (_json.containsKey("quotaMode")) { |
| 2143 quotaMode = _json["quotaMode"]; | 2192 quotaMode = _json["quotaMode"]; |
| 2144 } | 2193 } |
| 2145 } | 2194 } |
| 2146 | 2195 |
| 2147 core.Map<core.String, core.Object> toJson() { | 2196 core.Map<core.String, core.Object> toJson() { |
| 2148 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2197 final core.Map<core.String, core.Object> _json = |
| 2198 new core.Map<core.String, core.Object>(); |
| 2149 if (consumerId != null) { | 2199 if (consumerId != null) { |
| 2150 _json["consumerId"] = consumerId; | 2200 _json["consumerId"] = consumerId; |
| 2151 } | 2201 } |
| 2152 if (labels != null) { | 2202 if (labels != null) { |
| 2153 _json["labels"] = labels; | 2203 _json["labels"] = labels; |
| 2154 } | 2204 } |
| 2155 if (methodName != null) { | 2205 if (methodName != null) { |
| 2156 _json["methodName"] = methodName; | 2206 _json["methodName"] = methodName; |
| 2157 } | 2207 } |
| 2158 if (operationId != null) { | 2208 if (operationId != null) { |
| 2159 _json["operationId"] = operationId; | 2209 _json["operationId"] = operationId; |
| 2160 } | 2210 } |
| 2161 if (quotaMetrics != null) { | 2211 if (quotaMetrics != null) { |
| 2162 _json["quotaMetrics"] = quotaMetrics.map((value) => (value).toJson()).toLi
st(); | 2212 _json["quotaMetrics"] = |
| 2213 quotaMetrics.map((value) => (value).toJson()).toList(); |
| 2163 } | 2214 } |
| 2164 if (quotaMode != null) { | 2215 if (quotaMode != null) { |
| 2165 _json["quotaMode"] = quotaMode; | 2216 _json["quotaMode"] = quotaMode; |
| 2166 } | 2217 } |
| 2167 return _json; | 2218 return _json; |
| 2168 } | 2219 } |
| 2169 } | 2220 } |
| 2170 | 2221 |
| 2171 /** Represents the properties needed for quota operations. */ | 2222 /// Represents the properties needed for quota operations. |
| 2172 class QuotaProperties { | 2223 class QuotaProperties { |
| 2173 /** | 2224 /// LimitType IDs that should be used for checking quota. Key in this map |
| 2174 * LimitType IDs that should be used for checking quota. Key in this map | 2225 /// should be a valid LimitType string, and the value is the ID to be used. |
| 2175 * should be a valid LimitType string, and the value is the ID to be used. For | 2226 /// For |
| 2176 * example, an entry <USER, 123> will cause all user quota limits to use 123 | 2227 /// example, an entry <USER, 123> will cause all user quota limits to use 123 |
| 2177 * as the user ID. See google/api/quota.proto for the definition of LimitType. | 2228 /// as the user ID. See google/api/quota.proto for the definition of |
| 2178 * CLIENT_PROJECT: Not supported. | 2229 /// LimitType. |
| 2179 * USER: Value of this entry will be used for enforcing user-level quota | 2230 /// CLIENT_PROJECT: Not supported. |
| 2180 * limits. If none specified, caller IP passed in the | 2231 /// USER: Value of this entry will be used for enforcing user-level quota |
| 2181 * servicecontrol.googleapis.com/caller_ip label will be used instead. | 2232 /// limits. If none specified, caller IP passed in the |
| 2182 * If the server cannot resolve a value for this LimitType, an error | 2233 /// servicecontrol.googleapis.com/caller_ip label will be used instead. |
| 2183 * will be thrown. No validation will be performed on this ID. | 2234 /// If the server cannot resolve a value for this LimitType, an error |
| 2184 * Deprecated: use servicecontrol.googleapis.com/user label to send user ID. | 2235 /// will be thrown. No validation will be performed on this ID. |
| 2185 */ | 2236 /// Deprecated: use servicecontrol.googleapis.com/user label to send user ID. |
| 2186 core.Map<core.String, core.String> limitByIds; | 2237 core.Map<core.String, core.String> limitByIds; |
| 2187 /** | 2238 |
| 2188 * Quota mode for this operation. | 2239 /// Quota mode for this operation. |
| 2189 * Possible string values are: | 2240 /// Possible string values are: |
| 2190 * - "ACQUIRE" : Decreases available quota by the cost specified for the | 2241 /// - "ACQUIRE" : Decreases available quota by the cost specified for the |
| 2191 * operation. | 2242 /// operation. |
| 2192 * If cost is higher than available quota, operation fails and returns | 2243 /// If cost is higher than available quota, operation fails and returns |
| 2193 * error. | 2244 /// error. |
| 2194 * - "ACQUIRE_BEST_EFFORT" : Decreases available quota by the cost specified | 2245 /// - "ACQUIRE_BEST_EFFORT" : Decreases available quota by the cost specified |
| 2195 * for the operation. | 2246 /// for the operation. |
| 2196 * If cost is higher than available quota, operation does not fail and | 2247 /// If cost is higher than available quota, operation does not fail and |
| 2197 * available quota goes down to zero but it returns error. | 2248 /// available quota goes down to zero but it returns error. |
| 2198 * - "CHECK" : Does not change any available quota. Only checks if there is | 2249 /// - "CHECK" : Does not change any available quota. Only checks if there is |
| 2199 * enough | 2250 /// enough |
| 2200 * quota. | 2251 /// quota. |
| 2201 * No lock is placed on the checked tokens neither. | 2252 /// No lock is placed on the checked tokens neither. |
| 2202 * - "RELEASE" : Increases available quota by the operation cost specified for | 2253 /// - "RELEASE" : Increases available quota by the operation cost specified |
| 2203 * the | 2254 /// for the |
| 2204 * operation. | 2255 /// operation. |
| 2205 */ | |
| 2206 core.String quotaMode; | 2256 core.String quotaMode; |
| 2207 | 2257 |
| 2208 QuotaProperties(); | 2258 QuotaProperties(); |
| 2209 | 2259 |
| 2210 QuotaProperties.fromJson(core.Map _json) { | 2260 QuotaProperties.fromJson(core.Map _json) { |
| 2211 if (_json.containsKey("limitByIds")) { | 2261 if (_json.containsKey("limitByIds")) { |
| 2212 limitByIds = _json["limitByIds"]; | 2262 limitByIds = _json["limitByIds"]; |
| 2213 } | 2263 } |
| 2214 if (_json.containsKey("quotaMode")) { | 2264 if (_json.containsKey("quotaMode")) { |
| 2215 quotaMode = _json["quotaMode"]; | 2265 quotaMode = _json["quotaMode"]; |
| 2216 } | 2266 } |
| 2217 } | 2267 } |
| 2218 | 2268 |
| 2219 core.Map<core.String, core.Object> toJson() { | 2269 core.Map<core.String, core.Object> toJson() { |
| 2220 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2270 final core.Map<core.String, core.Object> _json = |
| 2271 new core.Map<core.String, core.Object>(); |
| 2221 if (limitByIds != null) { | 2272 if (limitByIds != null) { |
| 2222 _json["limitByIds"] = limitByIds; | 2273 _json["limitByIds"] = limitByIds; |
| 2223 } | 2274 } |
| 2224 if (quotaMode != null) { | 2275 if (quotaMode != null) { |
| 2225 _json["quotaMode"] = quotaMode; | 2276 _json["quotaMode"] = quotaMode; |
| 2226 } | 2277 } |
| 2227 return _json; | 2278 return _json; |
| 2228 } | 2279 } |
| 2229 } | 2280 } |
| 2230 | 2281 |
| 2231 /** Request message for the ReleaseQuota method. */ | 2282 /// Request message for the ReleaseQuota method. |
| 2232 class ReleaseQuotaRequest { | 2283 class ReleaseQuotaRequest { |
| 2233 /** Operation that describes the quota release. */ | 2284 /// Operation that describes the quota release. |
| 2234 QuotaOperation releaseOperation; | 2285 QuotaOperation releaseOperation; |
| 2235 /** | 2286 |
| 2236 * Specifies which version of service configuration should be used to process | 2287 /// Specifies which version of service configuration should be used to |
| 2237 * the request. If unspecified or no matching version can be found, the latest | 2288 /// process |
| 2238 * one will be used. | 2289 /// the request. If unspecified or no matching version can be found, the |
| 2239 */ | 2290 /// latest |
| 2291 /// one will be used. |
| 2240 core.String serviceConfigId; | 2292 core.String serviceConfigId; |
| 2241 | 2293 |
| 2242 ReleaseQuotaRequest(); | 2294 ReleaseQuotaRequest(); |
| 2243 | 2295 |
| 2244 ReleaseQuotaRequest.fromJson(core.Map _json) { | 2296 ReleaseQuotaRequest.fromJson(core.Map _json) { |
| 2245 if (_json.containsKey("releaseOperation")) { | 2297 if (_json.containsKey("releaseOperation")) { |
| 2246 releaseOperation = new QuotaOperation.fromJson(_json["releaseOperation"]); | 2298 releaseOperation = new QuotaOperation.fromJson(_json["releaseOperation"]); |
| 2247 } | 2299 } |
| 2248 if (_json.containsKey("serviceConfigId")) { | 2300 if (_json.containsKey("serviceConfigId")) { |
| 2249 serviceConfigId = _json["serviceConfigId"]; | 2301 serviceConfigId = _json["serviceConfigId"]; |
| 2250 } | 2302 } |
| 2251 } | 2303 } |
| 2252 | 2304 |
| 2253 core.Map<core.String, core.Object> toJson() { | 2305 core.Map<core.String, core.Object> toJson() { |
| 2254 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2306 final core.Map<core.String, core.Object> _json = |
| 2307 new core.Map<core.String, core.Object>(); |
| 2255 if (releaseOperation != null) { | 2308 if (releaseOperation != null) { |
| 2256 _json["releaseOperation"] = (releaseOperation).toJson(); | 2309 _json["releaseOperation"] = (releaseOperation).toJson(); |
| 2257 } | 2310 } |
| 2258 if (serviceConfigId != null) { | 2311 if (serviceConfigId != null) { |
| 2259 _json["serviceConfigId"] = serviceConfigId; | 2312 _json["serviceConfigId"] = serviceConfigId; |
| 2260 } | 2313 } |
| 2261 return _json; | 2314 return _json; |
| 2262 } | 2315 } |
| 2263 } | 2316 } |
| 2264 | 2317 |
| 2265 /** Response message for the ReleaseQuota method. */ | 2318 /// Response message for the ReleaseQuota method. |
| 2266 class ReleaseQuotaResponse { | 2319 class ReleaseQuotaResponse { |
| 2267 /** | 2320 /// The same operation_id value used in the ReleaseQuotaRequest. Used for |
| 2268 * The same operation_id value used in the ReleaseQuotaRequest. Used for | 2321 /// logging and diagnostics purposes. |
| 2269 * logging and diagnostics purposes. | |
| 2270 */ | |
| 2271 core.String operationId; | 2322 core.String operationId; |
| 2272 /** | 2323 |
| 2273 * Quota metrics to indicate the result of release. Depending on the | 2324 /// Quota metrics to indicate the result of release. Depending on the |
| 2274 * request, one or more of the following metrics will be included: | 2325 /// request, one or more of the following metrics will be included: |
| 2275 * | 2326 /// |
| 2276 * 1. For rate quota, per quota group or per quota metric released amount | 2327 /// 1. For rate quota, per quota group or per quota metric released amount |
| 2277 * will be specified using the following delta metric: | 2328 /// will be specified using the following delta metric: |
| 2278 * "serviceruntime.googleapis.com/api/consumer/quota_refund_count" | 2329 /// "serviceruntime.googleapis.com/api/consumer/quota_refund_count" |
| 2279 * | 2330 /// |
| 2280 * 2. For allocation quota, per quota metric total usage will be specified | 2331 /// 2. For allocation quota, per quota metric total usage will be specified |
| 2281 * using the following gauge metric: | 2332 /// using the following gauge metric: |
| 2282 * "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" | 2333 /// "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" |
| 2283 * | 2334 /// |
| 2284 * 3. For allocation quota, value for each quota limit associated with | 2335 /// 3. For allocation quota, value for each quota limit associated with |
| 2285 * the metrics will be specified using the following gauge metric: | 2336 /// the metrics will be specified using the following gauge metric: |
| 2286 * "serviceruntime.googleapis.com/quota/limit" | 2337 /// "serviceruntime.googleapis.com/quota/limit" |
| 2287 */ | |
| 2288 core.List<MetricValueSet> quotaMetrics; | 2338 core.List<MetricValueSet> quotaMetrics; |
| 2289 /** Indicates the decision of the release. */ | 2339 |
| 2340 /// Indicates the decision of the release. |
| 2290 core.List<QuotaError> releaseErrors; | 2341 core.List<QuotaError> releaseErrors; |
| 2291 /** ID of the actual config used to process the request. */ | 2342 |
| 2343 /// ID of the actual config used to process the request. |
| 2292 core.String serviceConfigId; | 2344 core.String serviceConfigId; |
| 2293 | 2345 |
| 2294 ReleaseQuotaResponse(); | 2346 ReleaseQuotaResponse(); |
| 2295 | 2347 |
| 2296 ReleaseQuotaResponse.fromJson(core.Map _json) { | 2348 ReleaseQuotaResponse.fromJson(core.Map _json) { |
| 2297 if (_json.containsKey("operationId")) { | 2349 if (_json.containsKey("operationId")) { |
| 2298 operationId = _json["operationId"]; | 2350 operationId = _json["operationId"]; |
| 2299 } | 2351 } |
| 2300 if (_json.containsKey("quotaMetrics")) { | 2352 if (_json.containsKey("quotaMetrics")) { |
| 2301 quotaMetrics = _json["quotaMetrics"].map((value) => new MetricValueSet.fro
mJson(value)).toList(); | 2353 quotaMetrics = _json["quotaMetrics"] |
| 2354 .map((value) => new MetricValueSet.fromJson(value)) |
| 2355 .toList(); |
| 2302 } | 2356 } |
| 2303 if (_json.containsKey("releaseErrors")) { | 2357 if (_json.containsKey("releaseErrors")) { |
| 2304 releaseErrors = _json["releaseErrors"].map((value) => new QuotaError.fromJ
son(value)).toList(); | 2358 releaseErrors = _json["releaseErrors"] |
| 2359 .map((value) => new QuotaError.fromJson(value)) |
| 2360 .toList(); |
| 2305 } | 2361 } |
| 2306 if (_json.containsKey("serviceConfigId")) { | 2362 if (_json.containsKey("serviceConfigId")) { |
| 2307 serviceConfigId = _json["serviceConfigId"]; | 2363 serviceConfigId = _json["serviceConfigId"]; |
| 2308 } | 2364 } |
| 2309 } | 2365 } |
| 2310 | 2366 |
| 2311 core.Map<core.String, core.Object> toJson() { | 2367 core.Map<core.String, core.Object> toJson() { |
| 2312 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2368 final core.Map<core.String, core.Object> _json = |
| 2369 new core.Map<core.String, core.Object>(); |
| 2313 if (operationId != null) { | 2370 if (operationId != null) { |
| 2314 _json["operationId"] = operationId; | 2371 _json["operationId"] = operationId; |
| 2315 } | 2372 } |
| 2316 if (quotaMetrics != null) { | 2373 if (quotaMetrics != null) { |
| 2317 _json["quotaMetrics"] = quotaMetrics.map((value) => (value).toJson()).toLi
st(); | 2374 _json["quotaMetrics"] = |
| 2375 quotaMetrics.map((value) => (value).toJson()).toList(); |
| 2318 } | 2376 } |
| 2319 if (releaseErrors != null) { | 2377 if (releaseErrors != null) { |
| 2320 _json["releaseErrors"] = releaseErrors.map((value) => (value).toJson()).to
List(); | 2378 _json["releaseErrors"] = |
| 2379 releaseErrors.map((value) => (value).toJson()).toList(); |
| 2321 } | 2380 } |
| 2322 if (serviceConfigId != null) { | 2381 if (serviceConfigId != null) { |
| 2323 _json["serviceConfigId"] = serviceConfigId; | 2382 _json["serviceConfigId"] = serviceConfigId; |
| 2324 } | 2383 } |
| 2325 return _json; | 2384 return _json; |
| 2326 } | 2385 } |
| 2327 } | 2386 } |
| 2328 | 2387 |
| 2329 /** Represents the processing error of one `Operation` in the request. */ | 2388 /// Represents the processing error of one Operation in the request. |
| 2330 class ReportError { | 2389 class ReportError { |
| 2331 /** The Operation.operation_id value from the request. */ | 2390 /// The Operation.operation_id value from the request. |
| 2332 core.String operationId; | 2391 core.String operationId; |
| 2333 /** Details of the error when processing the `Operation`. */ | 2392 |
| 2393 /// Details of the error when processing the Operation. |
| 2334 Status status; | 2394 Status status; |
| 2335 | 2395 |
| 2336 ReportError(); | 2396 ReportError(); |
| 2337 | 2397 |
| 2338 ReportError.fromJson(core.Map _json) { | 2398 ReportError.fromJson(core.Map _json) { |
| 2339 if (_json.containsKey("operationId")) { | 2399 if (_json.containsKey("operationId")) { |
| 2340 operationId = _json["operationId"]; | 2400 operationId = _json["operationId"]; |
| 2341 } | 2401 } |
| 2342 if (_json.containsKey("status")) { | 2402 if (_json.containsKey("status")) { |
| 2343 status = new Status.fromJson(_json["status"]); | 2403 status = new Status.fromJson(_json["status"]); |
| 2344 } | 2404 } |
| 2345 } | 2405 } |
| 2346 | 2406 |
| 2347 core.Map<core.String, core.Object> toJson() { | 2407 core.Map<core.String, core.Object> toJson() { |
| 2348 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2408 final core.Map<core.String, core.Object> _json = |
| 2409 new core.Map<core.String, core.Object>(); |
| 2349 if (operationId != null) { | 2410 if (operationId != null) { |
| 2350 _json["operationId"] = operationId; | 2411 _json["operationId"] = operationId; |
| 2351 } | 2412 } |
| 2352 if (status != null) { | 2413 if (status != null) { |
| 2353 _json["status"] = (status).toJson(); | 2414 _json["status"] = (status).toJson(); |
| 2354 } | 2415 } |
| 2355 return _json; | 2416 return _json; |
| 2356 } | 2417 } |
| 2357 } | 2418 } |
| 2358 | 2419 |
| 2359 class ReportInfo { | 2420 class ReportInfo { |
| 2360 /** The Operation.operation_id value from the request. */ | 2421 /// The Operation.operation_id value from the request. |
| 2361 core.String operationId; | 2422 core.String operationId; |
| 2362 /** Quota usage info when processing the `Operation`. */ | 2423 |
| 2424 /// Quota usage info when processing the `Operation`. |
| 2363 QuotaInfo quotaInfo; | 2425 QuotaInfo quotaInfo; |
| 2364 | 2426 |
| 2365 ReportInfo(); | 2427 ReportInfo(); |
| 2366 | 2428 |
| 2367 ReportInfo.fromJson(core.Map _json) { | 2429 ReportInfo.fromJson(core.Map _json) { |
| 2368 if (_json.containsKey("operationId")) { | 2430 if (_json.containsKey("operationId")) { |
| 2369 operationId = _json["operationId"]; | 2431 operationId = _json["operationId"]; |
| 2370 } | 2432 } |
| 2371 if (_json.containsKey("quotaInfo")) { | 2433 if (_json.containsKey("quotaInfo")) { |
| 2372 quotaInfo = new QuotaInfo.fromJson(_json["quotaInfo"]); | 2434 quotaInfo = new QuotaInfo.fromJson(_json["quotaInfo"]); |
| 2373 } | 2435 } |
| 2374 } | 2436 } |
| 2375 | 2437 |
| 2376 core.Map<core.String, core.Object> toJson() { | 2438 core.Map<core.String, core.Object> toJson() { |
| 2377 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2439 final core.Map<core.String, core.Object> _json = |
| 2440 new core.Map<core.String, core.Object>(); |
| 2378 if (operationId != null) { | 2441 if (operationId != null) { |
| 2379 _json["operationId"] = operationId; | 2442 _json["operationId"] = operationId; |
| 2380 } | 2443 } |
| 2381 if (quotaInfo != null) { | 2444 if (quotaInfo != null) { |
| 2382 _json["quotaInfo"] = (quotaInfo).toJson(); | 2445 _json["quotaInfo"] = (quotaInfo).toJson(); |
| 2383 } | 2446 } |
| 2384 return _json; | 2447 return _json; |
| 2385 } | 2448 } |
| 2386 } | 2449 } |
| 2387 | 2450 |
| 2388 /** Request message for the Report method. */ | 2451 /// Request message for the Report method. |
| 2389 class ReportRequest { | 2452 class ReportRequest { |
| 2390 /** | 2453 /// Operations to be reported. |
| 2391 * Operations to be reported. | 2454 /// |
| 2392 * | 2455 /// Typically the service should report one operation per request. |
| 2393 * Typically the service should report one operation per request. | 2456 /// Putting multiple operations into a single request is allowed, but should |
| 2394 * Putting multiple operations into a single request is allowed, but should | 2457 /// be used only when multiple operations are natually available at the time |
| 2395 * be used only when multiple operations are natually available at the time | 2458 /// of the report. |
| 2396 * of the report. | 2459 /// |
| 2397 * | 2460 /// If multiple operations are in a single request, the total request size |
| 2398 * If multiple operations are in a single request, the total request size | 2461 /// should be no larger than 1MB. See ReportResponse.report_errors for |
| 2399 * should be no larger than 1MB. See ReportResponse.report_errors for | 2462 /// partial failure behavior. |
| 2400 * partial failure behavior. | |
| 2401 */ | |
| 2402 core.List<Operation> operations; | 2463 core.List<Operation> operations; |
| 2403 /** | 2464 |
| 2404 * Specifies which version of service config should be used to process the | 2465 /// Specifies which version of service config should be used to process the |
| 2405 * request. | 2466 /// request. |
| 2406 * | 2467 /// |
| 2407 * If unspecified or no matching version can be found, the | 2468 /// If unspecified or no matching version can be found, the |
| 2408 * latest one will be used. | 2469 /// latest one will be used. |
| 2409 */ | |
| 2410 core.String serviceConfigId; | 2470 core.String serviceConfigId; |
| 2411 | 2471 |
| 2412 ReportRequest(); | 2472 ReportRequest(); |
| 2413 | 2473 |
| 2414 ReportRequest.fromJson(core.Map _json) { | 2474 ReportRequest.fromJson(core.Map _json) { |
| 2415 if (_json.containsKey("operations")) { | 2475 if (_json.containsKey("operations")) { |
| 2416 operations = _json["operations"].map((value) => new Operation.fromJson(val
ue)).toList(); | 2476 operations = _json["operations"] |
| 2477 .map((value) => new Operation.fromJson(value)) |
| 2478 .toList(); |
| 2417 } | 2479 } |
| 2418 if (_json.containsKey("serviceConfigId")) { | 2480 if (_json.containsKey("serviceConfigId")) { |
| 2419 serviceConfigId = _json["serviceConfigId"]; | 2481 serviceConfigId = _json["serviceConfigId"]; |
| 2420 } | 2482 } |
| 2421 } | 2483 } |
| 2422 | 2484 |
| 2423 core.Map<core.String, core.Object> toJson() { | 2485 core.Map<core.String, core.Object> toJson() { |
| 2424 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2486 final core.Map<core.String, core.Object> _json = |
| 2487 new core.Map<core.String, core.Object>(); |
| 2425 if (operations != null) { | 2488 if (operations != null) { |
| 2426 _json["operations"] = operations.map((value) => (value).toJson()).toList()
; | 2489 _json["operations"] = |
| 2490 operations.map((value) => (value).toJson()).toList(); |
| 2427 } | 2491 } |
| 2428 if (serviceConfigId != null) { | 2492 if (serviceConfigId != null) { |
| 2429 _json["serviceConfigId"] = serviceConfigId; | 2493 _json["serviceConfigId"] = serviceConfigId; |
| 2430 } | 2494 } |
| 2431 return _json; | 2495 return _json; |
| 2432 } | 2496 } |
| 2433 } | 2497 } |
| 2434 | 2498 |
| 2435 /** Response message for the Report method. */ | 2499 /// Response message for the Report method. |
| 2436 class ReportResponse { | 2500 class ReportResponse { |
| 2437 /** | 2501 /// Partial failures, one for each `Operation` in the request that failed |
| 2438 * Partial failures, one for each `Operation` in the request that failed | 2502 /// processing. There are three possible combinations of the RPC status: |
| 2439 * processing. There are three possible combinations of the RPC status: | 2503 /// |
| 2440 * | 2504 /// 1. The combination of a successful RPC status and an empty |
| 2441 * 1. The combination of a successful RPC status and an empty `report_errors` | 2505 /// `report_errors` |
| 2442 * list indicates a complete success where all `Operations` in the | 2506 /// list indicates a complete success where all `Operations` in the |
| 2443 * request are processed successfully. | 2507 /// request are processed successfully. |
| 2444 * 2. The combination of a successful RPC status and a non-empty | 2508 /// 2. The combination of a successful RPC status and a non-empty |
| 2445 * `report_errors` list indicates a partial success where some | 2509 /// `report_errors` list indicates a partial success where some |
| 2446 * `Operations` in the request succeeded. Each | 2510 /// `Operations` in the request succeeded. Each |
| 2447 * `Operation` that failed processing has a corresponding item | 2511 /// `Operation` that failed processing has a corresponding item |
| 2448 * in this list. | 2512 /// in this list. |
| 2449 * 3. A failed RPC status indicates a general non-deterministic failure. | 2513 /// 3. A failed RPC status indicates a general non-deterministic failure. |
| 2450 * When this happens, it's impossible to know which of the | 2514 /// When this happens, it's impossible to know which of the |
| 2451 * 'Operations' in the request succeeded or failed. | 2515 /// 'Operations' in the request succeeded or failed. |
| 2452 */ | |
| 2453 core.List<ReportError> reportErrors; | 2516 core.List<ReportError> reportErrors; |
| 2454 /** | 2517 |
| 2455 * Quota usage for each quota release `Operation` request. | 2518 /// Quota usage for each quota release `Operation` request. |
| 2456 * | 2519 /// |
| 2457 * Fully or partially failed quota release request may or may not be present | 2520 /// Fully or partially failed quota release request may or may not be present |
| 2458 * in `report_quota_info`. For example, a failed quota release request will | 2521 /// in `report_quota_info`. For example, a failed quota release request will |
| 2459 * have the current quota usage info when precise quota library returns the | 2522 /// have the current quota usage info when precise quota library returns the |
| 2460 * info. A deadline exceeded quota request will not have quota usage info. | 2523 /// info. A deadline exceeded quota request will not have quota usage info. |
| 2461 * | 2524 /// |
| 2462 * If there is no quota release request, report_quota_info will be empty. | 2525 /// If there is no quota release request, report_quota_info will be empty. |
| 2463 */ | |
| 2464 core.List<ReportInfo> reportInfos; | 2526 core.List<ReportInfo> reportInfos; |
| 2465 /** The actual config id used to process the request. */ | 2527 |
| 2528 /// The actual config id used to process the request. |
| 2466 core.String serviceConfigId; | 2529 core.String serviceConfigId; |
| 2467 | 2530 |
| 2468 ReportResponse(); | 2531 ReportResponse(); |
| 2469 | 2532 |
| 2470 ReportResponse.fromJson(core.Map _json) { | 2533 ReportResponse.fromJson(core.Map _json) { |
| 2471 if (_json.containsKey("reportErrors")) { | 2534 if (_json.containsKey("reportErrors")) { |
| 2472 reportErrors = _json["reportErrors"].map((value) => new ReportError.fromJs
on(value)).toList(); | 2535 reportErrors = _json["reportErrors"] |
| 2536 .map((value) => new ReportError.fromJson(value)) |
| 2537 .toList(); |
| 2473 } | 2538 } |
| 2474 if (_json.containsKey("reportInfos")) { | 2539 if (_json.containsKey("reportInfos")) { |
| 2475 reportInfos = _json["reportInfos"].map((value) => new ReportInfo.fromJson(
value)).toList(); | 2540 reportInfos = _json["reportInfos"] |
| 2541 .map((value) => new ReportInfo.fromJson(value)) |
| 2542 .toList(); |
| 2476 } | 2543 } |
| 2477 if (_json.containsKey("serviceConfigId")) { | 2544 if (_json.containsKey("serviceConfigId")) { |
| 2478 serviceConfigId = _json["serviceConfigId"]; | 2545 serviceConfigId = _json["serviceConfigId"]; |
| 2479 } | 2546 } |
| 2480 } | 2547 } |
| 2481 | 2548 |
| 2482 core.Map<core.String, core.Object> toJson() { | 2549 core.Map<core.String, core.Object> toJson() { |
| 2483 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2550 final core.Map<core.String, core.Object> _json = |
| 2551 new core.Map<core.String, core.Object>(); |
| 2484 if (reportErrors != null) { | 2552 if (reportErrors != null) { |
| 2485 _json["reportErrors"] = reportErrors.map((value) => (value).toJson()).toLi
st(); | 2553 _json["reportErrors"] = |
| 2554 reportErrors.map((value) => (value).toJson()).toList(); |
| 2486 } | 2555 } |
| 2487 if (reportInfos != null) { | 2556 if (reportInfos != null) { |
| 2488 _json["reportInfos"] = reportInfos.map((value) => (value).toJson()).toList
(); | 2557 _json["reportInfos"] = |
| 2558 reportInfos.map((value) => (value).toJson()).toList(); |
| 2489 } | 2559 } |
| 2490 if (serviceConfigId != null) { | 2560 if (serviceConfigId != null) { |
| 2491 _json["serviceConfigId"] = serviceConfigId; | 2561 _json["serviceConfigId"] = serviceConfigId; |
| 2492 } | 2562 } |
| 2493 return _json; | 2563 return _json; |
| 2494 } | 2564 } |
| 2495 } | 2565 } |
| 2496 | 2566 |
| 2497 /** Metadata about the request. */ | 2567 /// Metadata about the request. |
| 2498 class RequestMetadata { | 2568 class RequestMetadata { |
| 2499 /** | 2569 /// The IP address of the caller. |
| 2500 * The IP address of the caller. | 2570 /// For caller from internet, this will be public IPv4 or IPv6 address. |
| 2501 * For caller from internet, this will be public IPv4 or IPv6 address. | 2571 /// For caller from GCE VM with external IP address, this will be the VM's |
| 2502 * For caller from GCE VM with external IP address, this will be the VM's | 2572 /// external IP address. For caller from GCE VM without external IP address, |
| 2503 * external IP address. For caller from GCE VM without external IP address, if | 2573 /// if |
| 2504 * the VM is in the same GCP organization (or project) as the accessed | 2574 /// the VM is in the same GCP organization (or project) as the accessed |
| 2505 * resource, `caller_ip` will be the GCE VM's internal IPv4 address, otherwise | 2575 /// resource, `caller_ip` will be the GCE VM's internal IPv4 address, |
| 2506 * it will be redacted to "gce-internal-ip". | 2576 /// otherwise |
| 2507 * See https://cloud.google.com/compute/docs/vpc/ for more information. | 2577 /// it will be redacted to "gce-internal-ip". |
| 2508 */ | 2578 /// See https://cloud.google.com/compute/docs/vpc/ for more information. |
| 2509 core.String callerIp; | 2579 core.String callerIp; |
| 2510 /** | 2580 |
| 2511 * The user agent of the caller. | 2581 /// The user agent of the caller. |
| 2512 * This information is not authenticated and should be treated accordingly. | 2582 /// This information is not authenticated and should be treated accordingly. |
| 2513 * For example: | 2583 /// For example: |
| 2514 * | 2584 /// |
| 2515 * + `google-api-python-client/1.4.0`: | 2585 /// + `google-api-python-client/1.4.0`: |
| 2516 * The request was made by the Google API client for Python. | 2586 /// The request was made by the Google API client for Python. |
| 2517 * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: | 2587 /// + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: |
| 2518 * The request was made by the Google Cloud SDK CLI (gcloud). | 2588 /// The request was made by the Google Cloud SDK CLI (gcloud). |
| 2519 * + `AppEngine-Google; (+http://code.google.com/appengine; appid: | 2589 /// + `AppEngine-Google; (+http://code.google.com/appengine; appid: |
| 2520 * s~my-project`: | 2590 /// s~my-project`: |
| 2521 * The request was made from the `my-project` App Engine app. | 2591 /// The request was made from the `my-project` App Engine app. |
| 2522 * NOLINT | 2592 /// NOLINT |
| 2523 */ | |
| 2524 core.String callerSuppliedUserAgent; | 2593 core.String callerSuppliedUserAgent; |
| 2525 | 2594 |
| 2526 RequestMetadata(); | 2595 RequestMetadata(); |
| 2527 | 2596 |
| 2528 RequestMetadata.fromJson(core.Map _json) { | 2597 RequestMetadata.fromJson(core.Map _json) { |
| 2529 if (_json.containsKey("callerIp")) { | 2598 if (_json.containsKey("callerIp")) { |
| 2530 callerIp = _json["callerIp"]; | 2599 callerIp = _json["callerIp"]; |
| 2531 } | 2600 } |
| 2532 if (_json.containsKey("callerSuppliedUserAgent")) { | 2601 if (_json.containsKey("callerSuppliedUserAgent")) { |
| 2533 callerSuppliedUserAgent = _json["callerSuppliedUserAgent"]; | 2602 callerSuppliedUserAgent = _json["callerSuppliedUserAgent"]; |
| 2534 } | 2603 } |
| 2535 } | 2604 } |
| 2536 | 2605 |
| 2537 core.Map<core.String, core.Object> toJson() { | 2606 core.Map<core.String, core.Object> toJson() { |
| 2538 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2607 final core.Map<core.String, core.Object> _json = |
| 2608 new core.Map<core.String, core.Object>(); |
| 2539 if (callerIp != null) { | 2609 if (callerIp != null) { |
| 2540 _json["callerIp"] = callerIp; | 2610 _json["callerIp"] = callerIp; |
| 2541 } | 2611 } |
| 2542 if (callerSuppliedUserAgent != null) { | 2612 if (callerSuppliedUserAgent != null) { |
| 2543 _json["callerSuppliedUserAgent"] = callerSuppliedUserAgent; | 2613 _json["callerSuppliedUserAgent"] = callerSuppliedUserAgent; |
| 2544 } | 2614 } |
| 2545 return _json; | 2615 return _json; |
| 2546 } | 2616 } |
| 2547 } | 2617 } |
| 2548 | 2618 |
| 2549 class StartReconciliationRequest { | 2619 class StartReconciliationRequest { |
| 2550 /** Operation that describes the quota reconciliation. */ | 2620 /// Operation that describes the quota reconciliation. |
| 2551 QuotaOperation reconciliationOperation; | 2621 QuotaOperation reconciliationOperation; |
| 2552 /** | 2622 |
| 2553 * Specifies which version of service configuration should be used to process | 2623 /// Specifies which version of service configuration should be used to |
| 2554 * the request. If unspecified or no matching version can be found, the latest | 2624 /// process |
| 2555 * one will be used. | 2625 /// the request. If unspecified or no matching version can be found, the |
| 2556 */ | 2626 /// latest |
| 2627 /// one will be used. |
| 2557 core.String serviceConfigId; | 2628 core.String serviceConfigId; |
| 2558 | 2629 |
| 2559 StartReconciliationRequest(); | 2630 StartReconciliationRequest(); |
| 2560 | 2631 |
| 2561 StartReconciliationRequest.fromJson(core.Map _json) { | 2632 StartReconciliationRequest.fromJson(core.Map _json) { |
| 2562 if (_json.containsKey("reconciliationOperation")) { | 2633 if (_json.containsKey("reconciliationOperation")) { |
| 2563 reconciliationOperation = new QuotaOperation.fromJson(_json["reconciliatio
nOperation"]); | 2634 reconciliationOperation = |
| 2635 new QuotaOperation.fromJson(_json["reconciliationOperation"]); |
| 2564 } | 2636 } |
| 2565 if (_json.containsKey("serviceConfigId")) { | 2637 if (_json.containsKey("serviceConfigId")) { |
| 2566 serviceConfigId = _json["serviceConfigId"]; | 2638 serviceConfigId = _json["serviceConfigId"]; |
| 2567 } | 2639 } |
| 2568 } | 2640 } |
| 2569 | 2641 |
| 2570 core.Map<core.String, core.Object> toJson() { | 2642 core.Map<core.String, core.Object> toJson() { |
| 2571 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2643 final core.Map<core.String, core.Object> _json = |
| 2644 new core.Map<core.String, core.Object>(); |
| 2572 if (reconciliationOperation != null) { | 2645 if (reconciliationOperation != null) { |
| 2573 _json["reconciliationOperation"] = (reconciliationOperation).toJson(); | 2646 _json["reconciliationOperation"] = (reconciliationOperation).toJson(); |
| 2574 } | 2647 } |
| 2575 if (serviceConfigId != null) { | 2648 if (serviceConfigId != null) { |
| 2576 _json["serviceConfigId"] = serviceConfigId; | 2649 _json["serviceConfigId"] = serviceConfigId; |
| 2577 } | 2650 } |
| 2578 return _json; | 2651 return _json; |
| 2579 } | 2652 } |
| 2580 } | 2653 } |
| 2581 | 2654 |
| 2582 class StartReconciliationResponse { | 2655 class StartReconciliationResponse { |
| 2583 /** | 2656 /// The same operation_id value used in the StartReconciliationRequest. Used |
| 2584 * The same operation_id value used in the StartReconciliationRequest. Used | 2657 /// for logging and diagnostics purposes. |
| 2585 * for logging and diagnostics purposes. | |
| 2586 */ | |
| 2587 core.String operationId; | 2658 core.String operationId; |
| 2588 /** | 2659 |
| 2589 * Metric values as tracked by One Platform before the start of | 2660 /// Metric values as tracked by One Platform before the start of |
| 2590 * reconciliation. The following metrics will be included: | 2661 /// reconciliation. The following metrics will be included: |
| 2591 * | 2662 /// |
| 2592 * 1. Per quota metric total usage will be specified using the following gauge | 2663 /// 1. Per quota metric total usage will be specified using the following |
| 2593 * metric: | 2664 /// gauge |
| 2594 * "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" | 2665 /// metric: |
| 2595 * | 2666 /// "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" |
| 2596 * 2. Value for each quota limit associated with the metrics will be specified | 2667 /// |
| 2597 * using the following gauge metric: | 2668 /// 2. Value for each quota limit associated with the metrics will be |
| 2598 * "serviceruntime.googleapis.com/quota/limit" | 2669 /// specified |
| 2599 */ | 2670 /// using the following gauge metric: |
| 2671 /// "serviceruntime.googleapis.com/quota/limit" |
| 2600 core.List<MetricValueSet> quotaMetrics; | 2672 core.List<MetricValueSet> quotaMetrics; |
| 2601 /** Indicates the decision of the reconciliation start. */ | 2673 |
| 2674 /// Indicates the decision of the reconciliation start. |
| 2602 core.List<QuotaError> reconciliationErrors; | 2675 core.List<QuotaError> reconciliationErrors; |
| 2603 /** ID of the actual config used to process the request. */ | 2676 |
| 2677 /// ID of the actual config used to process the request. |
| 2604 core.String serviceConfigId; | 2678 core.String serviceConfigId; |
| 2605 | 2679 |
| 2606 StartReconciliationResponse(); | 2680 StartReconciliationResponse(); |
| 2607 | 2681 |
| 2608 StartReconciliationResponse.fromJson(core.Map _json) { | 2682 StartReconciliationResponse.fromJson(core.Map _json) { |
| 2609 if (_json.containsKey("operationId")) { | 2683 if (_json.containsKey("operationId")) { |
| 2610 operationId = _json["operationId"]; | 2684 operationId = _json["operationId"]; |
| 2611 } | 2685 } |
| 2612 if (_json.containsKey("quotaMetrics")) { | 2686 if (_json.containsKey("quotaMetrics")) { |
| 2613 quotaMetrics = _json["quotaMetrics"].map((value) => new MetricValueSet.fro
mJson(value)).toList(); | 2687 quotaMetrics = _json["quotaMetrics"] |
| 2688 .map((value) => new MetricValueSet.fromJson(value)) |
| 2689 .toList(); |
| 2614 } | 2690 } |
| 2615 if (_json.containsKey("reconciliationErrors")) { | 2691 if (_json.containsKey("reconciliationErrors")) { |
| 2616 reconciliationErrors = _json["reconciliationErrors"].map((value) => new Qu
otaError.fromJson(value)).toList(); | 2692 reconciliationErrors = _json["reconciliationErrors"] |
| 2693 .map((value) => new QuotaError.fromJson(value)) |
| 2694 .toList(); |
| 2617 } | 2695 } |
| 2618 if (_json.containsKey("serviceConfigId")) { | 2696 if (_json.containsKey("serviceConfigId")) { |
| 2619 serviceConfigId = _json["serviceConfigId"]; | 2697 serviceConfigId = _json["serviceConfigId"]; |
| 2620 } | 2698 } |
| 2621 } | 2699 } |
| 2622 | 2700 |
| 2623 core.Map<core.String, core.Object> toJson() { | 2701 core.Map<core.String, core.Object> toJson() { |
| 2624 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2702 final core.Map<core.String, core.Object> _json = |
| 2703 new core.Map<core.String, core.Object>(); |
| 2625 if (operationId != null) { | 2704 if (operationId != null) { |
| 2626 _json["operationId"] = operationId; | 2705 _json["operationId"] = operationId; |
| 2627 } | 2706 } |
| 2628 if (quotaMetrics != null) { | 2707 if (quotaMetrics != null) { |
| 2629 _json["quotaMetrics"] = quotaMetrics.map((value) => (value).toJson()).toLi
st(); | 2708 _json["quotaMetrics"] = |
| 2709 quotaMetrics.map((value) => (value).toJson()).toList(); |
| 2630 } | 2710 } |
| 2631 if (reconciliationErrors != null) { | 2711 if (reconciliationErrors != null) { |
| 2632 _json["reconciliationErrors"] = reconciliationErrors.map((value) => (value
).toJson()).toList(); | 2712 _json["reconciliationErrors"] = |
| 2713 reconciliationErrors.map((value) => (value).toJson()).toList(); |
| 2633 } | 2714 } |
| 2634 if (serviceConfigId != null) { | 2715 if (serviceConfigId != null) { |
| 2635 _json["serviceConfigId"] = serviceConfigId; | 2716 _json["serviceConfigId"] = serviceConfigId; |
| 2636 } | 2717 } |
| 2637 return _json; | 2718 return _json; |
| 2638 } | 2719 } |
| 2639 } | 2720 } |
| 2640 | 2721 |
| 2641 /** | 2722 /// The `Status` type defines a logical error model that is suitable for |
| 2642 * The `Status` type defines a logical error model that is suitable for | 2723 /// different |
| 2643 * different | 2724 /// programming environments, including REST APIs and RPC APIs. It is used by |
| 2644 * programming environments, including REST APIs and RPC APIs. It is used by | 2725 /// [gRPC](https://github.com/grpc). The error model is designed to be: |
| 2645 * [gRPC](https://github.com/grpc). The error model is designed to be: | 2726 /// |
| 2646 * | 2727 /// - Simple to use and understand for most users |
| 2647 * - Simple to use and understand for most users | 2728 /// - Flexible enough to meet unexpected needs |
| 2648 * - Flexible enough to meet unexpected needs | 2729 /// |
| 2649 * | 2730 /// # Overview |
| 2650 * # Overview | 2731 /// |
| 2651 * | 2732 /// The `Status` message contains three pieces of data: error code, error |
| 2652 * The `Status` message contains three pieces of data: error code, error | 2733 /// message, |
| 2653 * message, | 2734 /// and error details. The error code should be an enum value of |
| 2654 * and error details. The error code should be an enum value of | 2735 /// google.rpc.Code, but it may accept additional error codes if needed. The |
| 2655 * google.rpc.Code, but it may accept additional error codes if needed. The | 2736 /// error message should be a developer-facing English message that helps |
| 2656 * error message should be a developer-facing English message that helps | 2737 /// developers *understand* and *resolve* the error. If a localized user-facing |
| 2657 * developers *understand* and *resolve* the error. If a localized user-facing | 2738 /// error message is needed, put the localized message in the error details or |
| 2658 * error message is needed, put the localized message in the error details or | 2739 /// localize it in the client. The optional error details may contain arbitrary |
| 2659 * localize it in the client. The optional error details may contain arbitrary | 2740 /// information about the error. There is a predefined set of error detail |
| 2660 * information about the error. There is a predefined set of error detail types | 2741 /// types |
| 2661 * in the package `google.rpc` that can be used for common error conditions. | 2742 /// in the package `google.rpc` that can be used for common error conditions. |
| 2662 * | 2743 /// |
| 2663 * # Language mapping | 2744 /// # Language mapping |
| 2664 * | 2745 /// |
| 2665 * The `Status` message is the logical representation of the error model, but it | 2746 /// The `Status` message is the logical representation of the error model, but |
| 2666 * is not necessarily the actual wire format. When the `Status` message is | 2747 /// it |
| 2667 * exposed in different client libraries and different wire protocols, it can be | 2748 /// is not necessarily the actual wire format. When the `Status` message is |
| 2668 * mapped differently. For example, it will likely be mapped to some exceptions | 2749 /// exposed in different client libraries and different wire protocols, it can |
| 2669 * in Java, but more likely mapped to some error codes in C. | 2750 /// be |
| 2670 * | 2751 /// mapped differently. For example, it will likely be mapped to some |
| 2671 * # Other uses | 2752 /// exceptions |
| 2672 * | 2753 /// in Java, but more likely mapped to some error codes in C. |
| 2673 * The error model and the `Status` message can be used in a variety of | 2754 /// |
| 2674 * environments, either with or without APIs, to provide a | 2755 /// # Other uses |
| 2675 * consistent developer experience across different environments. | 2756 /// |
| 2676 * | 2757 /// The error model and the `Status` message can be used in a variety of |
| 2677 * Example uses of this error model include: | 2758 /// environments, either with or without APIs, to provide a |
| 2678 * | 2759 /// consistent developer experience across different environments. |
| 2679 * - Partial errors. If a service needs to return partial errors to the client, | 2760 /// |
| 2680 * it may embed the `Status` in the normal response to indicate the partial | 2761 /// Example uses of this error model include: |
| 2681 * errors. | 2762 /// |
| 2682 * | 2763 /// - Partial errors. If a service needs to return partial errors to the |
| 2683 * - Workflow errors. A typical workflow has multiple steps. Each step may | 2764 /// client, |
| 2684 * have a `Status` message for error reporting. | 2765 /// it may embed the `Status` in the normal response to indicate the partial |
| 2685 * | 2766 /// errors. |
| 2686 * - Batch operations. If a client uses batch request and batch response, the | 2767 /// |
| 2687 * `Status` message should be used directly inside batch response, one for | 2768 /// - Workflow errors. A typical workflow has multiple steps. Each step may |
| 2688 * each error sub-response. | 2769 /// have a `Status` message for error reporting. |
| 2689 * | 2770 /// |
| 2690 * - Asynchronous operations. If an API call embeds asynchronous operation | 2771 /// - Batch operations. If a client uses batch request and batch response, the |
| 2691 * results in its response, the status of those operations should be | 2772 /// `Status` message should be used directly inside batch response, one for |
| 2692 * represented directly using the `Status` message. | 2773 /// each error sub-response. |
| 2693 * | 2774 /// |
| 2694 * - Logging. If some API errors are stored in logs, the message `Status` could | 2775 /// - Asynchronous operations. If an API call embeds asynchronous operation |
| 2695 * be used directly after any stripping needed for security/privacy reasons. | 2776 /// results in its response, the status of those operations should be |
| 2696 */ | 2777 /// represented directly using the `Status` message. |
| 2778 /// |
| 2779 /// - Logging. If some API errors are stored in logs, the message `Status` |
| 2780 /// could |
| 2781 /// be used directly after any stripping needed for security/privacy reasons. |
| 2697 class Status { | 2782 class Status { |
| 2698 /** The status code, which should be an enum value of google.rpc.Code. */ | 2783 /// The status code, which should be an enum value of google.rpc.Code. |
| 2699 core.int code; | 2784 core.int code; |
| 2700 /** | 2785 |
| 2701 * A list of messages that carry the error details. There is a common set of | 2786 /// A list of messages that carry the error details. There is a common set |
| 2702 * message types for APIs to use. | 2787 /// of |
| 2703 * | 2788 /// message types for APIs to use. |
| 2704 * The values for Object must be JSON objects. It can consist of `num`, | 2789 /// |
| 2705 * `String`, `bool` and `null` as well as `Map` and `List` values. | 2790 /// The values for Object must be JSON objects. It can consist of `num`, |
| 2706 */ | 2791 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 2707 core.List<core.Map<core.String, core.Object>> details; | 2792 core.List<core.Map<core.String, core.Object>> details; |
| 2708 /** | 2793 |
| 2709 * A developer-facing error message, which should be in English. Any | 2794 /// A developer-facing error message, which should be in English. Any |
| 2710 * user-facing error message should be localized and sent in the | 2795 /// user-facing error message should be localized and sent in the |
| 2711 * google.rpc.Status.details field, or localized by the client. | 2796 /// google.rpc.Status.details field, or localized by the client. |
| 2712 */ | |
| 2713 core.String message; | 2797 core.String message; |
| 2714 | 2798 |
| 2715 Status(); | 2799 Status(); |
| 2716 | 2800 |
| 2717 Status.fromJson(core.Map _json) { | 2801 Status.fromJson(core.Map _json) { |
| 2718 if (_json.containsKey("code")) { | 2802 if (_json.containsKey("code")) { |
| 2719 code = _json["code"]; | 2803 code = _json["code"]; |
| 2720 } | 2804 } |
| 2721 if (_json.containsKey("details")) { | 2805 if (_json.containsKey("details")) { |
| 2722 details = _json["details"]; | 2806 details = _json["details"]; |
| 2723 } | 2807 } |
| 2724 if (_json.containsKey("message")) { | 2808 if (_json.containsKey("message")) { |
| 2725 message = _json["message"]; | 2809 message = _json["message"]; |
| 2726 } | 2810 } |
| 2727 } | 2811 } |
| 2728 | 2812 |
| 2729 core.Map<core.String, core.Object> toJson() { | 2813 core.Map<core.String, core.Object> toJson() { |
| 2730 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2814 final core.Map<core.String, core.Object> _json = |
| 2815 new core.Map<core.String, core.Object>(); |
| 2731 if (code != null) { | 2816 if (code != null) { |
| 2732 _json["code"] = code; | 2817 _json["code"] = code; |
| 2733 } | 2818 } |
| 2734 if (details != null) { | 2819 if (details != null) { |
| 2735 _json["details"] = details; | 2820 _json["details"] = details; |
| 2736 } | 2821 } |
| 2737 if (message != null) { | 2822 if (message != null) { |
| 2738 _json["message"] = message; | 2823 _json["message"] = message; |
| 2739 } | 2824 } |
| 2740 return _json; | 2825 return _json; |
| 2741 } | 2826 } |
| 2742 } | 2827 } |
| OLD | NEW |