@@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
53
53
return this .unknownFields ;
54
54
}
55
55
56
- private AllocateQuotaRequest (
57
- com .google .protobuf .CodedInputStream input ,
58
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
59
- throws com .google .protobuf .InvalidProtocolBufferException {
60
- this ();
61
- if (extensionRegistry == null ) {
62
- throw new java .lang .NullPointerException ();
63
- }
64
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
65
- com .google .protobuf .UnknownFieldSet .newBuilder ();
66
- try {
67
- boolean done = false ;
68
- while (!done ) {
69
- int tag = input .readTag ();
70
- switch (tag ) {
71
- case 0 :
72
- done = true ;
73
- break ;
74
- case 10 :
75
- {
76
- java .lang .String s = input .readStringRequireUtf8 ();
77
-
78
- serviceName_ = s ;
79
- break ;
80
- }
81
- case 18 :
82
- {
83
- com .google .api .servicecontrol .v1 .QuotaOperation .Builder subBuilder = null ;
84
- if (allocateOperation_ != null ) {
85
- subBuilder = allocateOperation_ .toBuilder ();
86
- }
87
- allocateOperation_ =
88
- input .readMessage (
89
- com .google .api .servicecontrol .v1 .QuotaOperation .parser (), extensionRegistry );
90
- if (subBuilder != null ) {
91
- subBuilder .mergeFrom (allocateOperation_ );
92
- allocateOperation_ = subBuilder .buildPartial ();
93
- }
94
-
95
- break ;
96
- }
97
- case 34 :
98
- {
99
- java .lang .String s = input .readStringRequireUtf8 ();
100
-
101
- serviceConfigId_ = s ;
102
- break ;
103
- }
104
- default :
105
- {
106
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
107
- done = true ;
108
- }
109
- break ;
110
- }
111
- }
112
- }
113
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
114
- throw e .setUnfinishedMessage (this );
115
- } catch (com .google .protobuf .UninitializedMessageException e ) {
116
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
117
- } catch (java .io .IOException e ) {
118
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
119
- } finally {
120
- this .unknownFields = unknownFields .build ();
121
- makeExtensionsImmutable ();
122
- }
123
- }
124
-
125
56
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
126
57
return com .google .api .servicecontrol .v1 .QuotaControllerProto
127
58
.internal_static_google_api_servicecontrol_v1_AllocateQuotaRequest_descriptor ;
@@ -314,7 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
314
245
if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (serviceConfigId_ )) {
315
246
com .google .protobuf .GeneratedMessageV3 .writeString (output , 4 , serviceConfigId_ );
316
247
}
317
- unknownFields .writeTo (output );
248
+ getUnknownFields () .writeTo (output );
318
249
}
319
250
320
251
@ java .lang .Override
@@ -332,7 +263,7 @@ public int getSerializedSize() {
332
263
if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (serviceConfigId_ )) {
333
264
size += com .google .protobuf .GeneratedMessageV3 .computeStringSize (4 , serviceConfigId_ );
334
265
}
335
- size += unknownFields .getSerializedSize ();
266
+ size += getUnknownFields () .getSerializedSize ();
336
267
memoizedSize = size ;
337
268
return size ;
338
269
}
@@ -354,7 +285,7 @@ public boolean equals(final java.lang.Object obj) {
354
285
if (!getAllocateOperation ().equals (other .getAllocateOperation ())) return false ;
355
286
}
356
287
if (!getServiceConfigId ().equals (other .getServiceConfigId ())) return false ;
357
- if (!unknownFields .equals (other .unknownFields )) return false ;
288
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
358
289
return true ;
359
290
}
360
291
@@ -373,7 +304,7 @@ public int hashCode() {
373
304
}
374
305
hash = (37 * hash ) + SERVICE_CONFIG_ID_FIELD_NUMBER ;
375
306
hash = (53 * hash ) + getServiceConfigId ().hashCode ();
376
- hash = (29 * hash ) + unknownFields .hashCode ();
307
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
377
308
memoizedHashCode = hash ;
378
309
return hash ;
379
310
}
@@ -503,17 +434,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
503
434
}
504
435
505
436
// Construct using com.google.api.servicecontrol.v1.AllocateQuotaRequest.newBuilder()
506
- private Builder () {
507
- maybeForceBuilderInitialization ();
508
- }
437
+ private Builder () {}
509
438
510
439
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
511
440
super (parent );
512
- maybeForceBuilderInitialization ();
513
- }
514
-
515
- private void maybeForceBuilderInitialization () {
516
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
517
441
}
518
442
519
443
@ java .lang .Override
@@ -624,7 +548,7 @@ public Builder mergeFrom(com.google.api.servicecontrol.v1.AllocateQuotaRequest o
624
548
serviceConfigId_ = other .serviceConfigId_ ;
625
549
onChanged ();
626
550
}
627
- this .mergeUnknownFields (other .unknownFields );
551
+ this .mergeUnknownFields (other .getUnknownFields () );
628
552
onChanged ();
629
553
return this ;
630
554
}
@@ -639,18 +563,50 @@ public Builder mergeFrom(
639
563
com .google .protobuf .CodedInputStream input ,
640
564
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
641
565
throws java .io .IOException {
642
- com .google .api .servicecontrol .v1 .AllocateQuotaRequest parsedMessage = null ;
566
+ if (extensionRegistry == null ) {
567
+ throw new java .lang .NullPointerException ();
568
+ }
643
569
try {
644
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
570
+ boolean done = false ;
571
+ while (!done ) {
572
+ int tag = input .readTag ();
573
+ switch (tag ) {
574
+ case 0 :
575
+ done = true ;
576
+ break ;
577
+ case 10 :
578
+ {
579
+ serviceName_ = input .readStringRequireUtf8 ();
580
+
581
+ break ;
582
+ } // case 10
583
+ case 18 :
584
+ {
585
+ input .readMessage (
586
+ getAllocateOperationFieldBuilder ().getBuilder (), extensionRegistry );
587
+
588
+ break ;
589
+ } // case 18
590
+ case 34 :
591
+ {
592
+ serviceConfigId_ = input .readStringRequireUtf8 ();
593
+
594
+ break ;
595
+ } // case 34
596
+ default :
597
+ {
598
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
599
+ done = true ; // was an endgroup tag
600
+ }
601
+ break ;
602
+ } // default:
603
+ } // switch (tag)
604
+ } // while (!done)
645
605
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
646
- parsedMessage =
647
- (com .google .api .servicecontrol .v1 .AllocateQuotaRequest ) e .getUnfinishedMessage ();
648
606
throw e .unwrapIOException ();
649
607
} finally {
650
- if (parsedMessage != null ) {
651
- mergeFrom (parsedMessage );
652
- }
653
- }
608
+ onChanged ();
609
+ } // finally
654
610
return this ;
655
611
}
656
612
@@ -1105,7 +1061,18 @@ public AllocateQuotaRequest parsePartialFrom(
1105
1061
com .google .protobuf .CodedInputStream input ,
1106
1062
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1107
1063
throws com .google .protobuf .InvalidProtocolBufferException {
1108
- return new AllocateQuotaRequest (input , extensionRegistry );
1064
+ Builder builder = newBuilder ();
1065
+ try {
1066
+ builder .mergeFrom (input , extensionRegistry );
1067
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1068
+ throw e .setUnfinishedMessage (builder .buildPartial ());
1069
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
1070
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
1071
+ } catch (java .io .IOException e ) {
1072
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
1073
+ .setUnfinishedMessage (builder .buildPartial ());
1074
+ }
1075
+ return builder .buildPartial ();
1109
1076
}
1110
1077
};
1111
1078
0 commit comments