@@ -218,6 +218,7 @@ extension ErrorDetails {
218
218
/// occurs when the Kubernetes Engine API creates VMs in the Compute Engine
219
219
/// API (compute.googleapis.com), this field would be
220
220
/// "compute.googleapis.com".
221
+ @available ( gRPCSwiftProtobuf 2 . 1 , * )
221
222
public var apiService : String
222
223
223
224
/// The metric of the violated quota. A quota metric is a named counter to
@@ -227,12 +228,14 @@ extension ErrorDetails {
227
228
///
228
229
/// For example, "compute.googleapis.com/cpus_per_vm_family",
229
230
/// "storage.googleapis.com/internet_egress_bandwidth".
231
+ @available ( gRPCSwiftProtobuf 2 . 1 , * )
230
232
public var quotaMetric : String
231
233
232
234
/// The id of the violated quota. Also know as "limit name", this is the
233
235
/// unique identifier of a quota in the context of an API service.
234
236
///
235
237
/// For example, "CPUS-PER-VM-FAMILY-per-project-region".
238
+ @available ( gRPCSwiftProtobuf 2 . 1 , * )
236
239
public var quotaID : String
237
240
238
241
/// The dimensions of the violated quota. Every non-global quota is enforced
@@ -251,14 +254,16 @@ extension ErrorDetails {
251
254
///
252
255
/// When a quota is enforced globally, the quota_dimensions would always be
253
256
/// empty.
257
+ @available ( gRPCSwiftProtobuf 2 . 1 , * )
254
258
public var quotaDimensions : [ String : String ]
255
259
256
260
/// The enforced quota value at the time of the `QuotaFailure`.
257
261
///
258
262
/// For example, if the enforced quota value at the time of the
259
263
/// `QuotaFailure` on the number of CPUs is "10", then the value of this
260
264
/// field would reflect this quantity.
261
- public var quotaValue : Int64
265
+ @available ( gRPCSwiftProtobuf 2 . 1 , * )
266
+ public var quotaValue : Int
262
267
263
268
/// The new quota value being rolled out at the time of the violation. At the
264
269
/// completion of the rollout, this value will be enforced in place of
@@ -268,7 +273,8 @@ extension ErrorDetails {
268
273
/// For example, if at the time of the violation a rollout is in progress
269
274
/// changing the number of CPUs quota from 10 to 20, 20 would be the value of
270
275
/// this field.
271
- public var futureQuotaValue : Int64 ?
276
+ @available ( gRPCSwiftProtobuf 2 . 1 , * )
277
+ public var futureQuotaValue : Int ?
272
278
273
279
public init (
274
280
subject: String ,
@@ -284,15 +290,16 @@ extension ErrorDetails {
284
290
self . futureQuotaValue = nil
285
291
}
286
292
293
+ @available ( gRPCSwiftProtobuf 2 . 1 , * )
287
294
public init (
288
295
subject: String ,
289
296
description: String ,
290
297
apiService: String ,
291
298
quotaMetric: String ,
292
299
quotaID: String ,
293
300
quotaDimensions: [ String : String ] ,
294
- quotaValue: Int64 ,
295
- futureQuotaValue: Int64 ?
301
+ quotaValue: Int ,
302
+ futureQuotaValue: Int ?
296
303
) {
297
304
self . subject = subject
298
305
self . violationDescription = description
@@ -311,9 +318,9 @@ extension ErrorDetails {
311
318
self . quotaMetric = storage. quotaMetric
312
319
self . quotaID = storage. quotaID
313
320
self . quotaDimensions = storage. quotaDimensions
314
- self . quotaValue = storage. quotaValue
321
+ self . quotaValue = Int ( storage. quotaValue)
315
322
if storage. hasFutureQuotaValue {
316
- self . futureQuotaValue = storage. futureQuotaValue
323
+ self . futureQuotaValue = Int ( storage. futureQuotaValue)
317
324
}
318
325
}
319
326
}
@@ -331,9 +338,9 @@ extension ErrorDetails {
331
338
$0. quotaMetric = violation. quotaMetric
332
339
$0. quotaID = violation. quotaID
333
340
$0. quotaDimensions = violation. quotaDimensions
334
- $0. quotaValue = violation. quotaValue
341
+ $0. quotaValue = Int64 ( violation. quotaValue)
335
342
if let futureQuotaValue = violation. futureQuotaValue {
336
- $0. futureQuotaValue = futureQuotaValue
343
+ $0. futureQuotaValue = Int64 ( futureQuotaValue)
337
344
}
338
345
}
339
346
}
@@ -484,10 +491,12 @@ extension ErrorDetails {
484
491
/// google.rpc.ErrorInfo.domain. This should be at most 63
485
492
/// characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`,
486
493
/// which represents UPPER_SNAKE_CASE.
494
+ @available ( gRPCSwiftProtobuf 2 . 1 , * )
487
495
public var reason : String
488
496
489
497
/// Provides a localized error message for field-level errors that is safe to
490
498
/// return to the API consumer.
499
+ @available ( gRPCSwiftProtobuf 2 . 1 , * )
491
500
public var localizedMessage : LocalizedMessage ?
492
501
493
502
public init (
@@ -500,6 +509,7 @@ extension ErrorDetails {
500
509
self . localizedMessage = nil
501
510
}
502
511
512
+ @available ( gRPCSwiftProtobuf 2 . 1 , * )
503
513
public init (
504
514
field: String ,
505
515
description: String ,
0 commit comments