@@ -50,74 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
50
50
return this .unknownFields ;
51
51
}
52
52
53
- private CostProjection (
54
- com .google .protobuf .CodedInputStream input ,
55
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
56
- throws com .google .protobuf .InvalidProtocolBufferException {
57
- this ();
58
- if (extensionRegistry == null ) {
59
- throw new java .lang .NullPointerException ();
60
- }
61
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
62
- com .google .protobuf .UnknownFieldSet .newBuilder ();
63
- try {
64
- boolean done = false ;
65
- while (!done ) {
66
- int tag = input .readTag ();
67
- switch (tag ) {
68
- case 0 :
69
- done = true ;
70
- break ;
71
- case 10 :
72
- {
73
- com .google .type .Money .Builder subBuilder = null ;
74
- if (cost_ != null ) {
75
- subBuilder = cost_ .toBuilder ();
76
- }
77
- cost_ = input .readMessage (com .google .type .Money .parser (), extensionRegistry );
78
- if (subBuilder != null ) {
79
- subBuilder .mergeFrom (cost_ );
80
- cost_ = subBuilder .buildPartial ();
81
- }
82
-
83
- break ;
84
- }
85
- case 18 :
86
- {
87
- com .google .protobuf .Duration .Builder subBuilder = null ;
88
- if (duration_ != null ) {
89
- subBuilder = duration_ .toBuilder ();
90
- }
91
- duration_ =
92
- input .readMessage (com .google .protobuf .Duration .parser (), extensionRegistry );
93
- if (subBuilder != null ) {
94
- subBuilder .mergeFrom (duration_ );
95
- duration_ = subBuilder .buildPartial ();
96
- }
97
-
98
- break ;
99
- }
100
- default :
101
- {
102
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
103
- done = true ;
104
- }
105
- break ;
106
- }
107
- }
108
- }
109
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
110
- throw e .setUnfinishedMessage (this );
111
- } catch (com .google .protobuf .UninitializedMessageException e ) {
112
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
113
- } catch (java .io .IOException e ) {
114
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
115
- } finally {
116
- this .unknownFields = unknownFields .build ();
117
- makeExtensionsImmutable ();
118
- }
119
- }
120
-
121
53
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
122
54
return com .google .cloud .recommender .v1 .RecommendationOuterClass
123
55
.internal_static_google_cloud_recommender_v1_CostProjection_descriptor ;
@@ -257,7 +189,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
257
189
if (duration_ != null ) {
258
190
output .writeMessage (2 , getDuration ());
259
191
}
260
- unknownFields .writeTo (output );
192
+ getUnknownFields () .writeTo (output );
261
193
}
262
194
263
195
@ java .lang .Override
@@ -272,7 +204,7 @@ public int getSerializedSize() {
272
204
if (duration_ != null ) {
273
205
size += com .google .protobuf .CodedOutputStream .computeMessageSize (2 , getDuration ());
274
206
}
275
- size += unknownFields .getSerializedSize ();
207
+ size += getUnknownFields () .getSerializedSize ();
276
208
memoizedSize = size ;
277
209
return size ;
278
210
}
@@ -296,7 +228,7 @@ public boolean equals(final java.lang.Object obj) {
296
228
if (hasDuration ()) {
297
229
if (!getDuration ().equals (other .getDuration ())) return false ;
298
230
}
299
- if (!unknownFields .equals (other .unknownFields )) return false ;
231
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
300
232
return true ;
301
233
}
302
234
@@ -315,7 +247,7 @@ public int hashCode() {
315
247
hash = (37 * hash ) + DURATION_FIELD_NUMBER ;
316
248
hash = (53 * hash ) + getDuration ().hashCode ();
317
249
}
318
- hash = (29 * hash ) + unknownFields .hashCode ();
250
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
319
251
memoizedHashCode = hash ;
320
252
return hash ;
321
253
}
@@ -444,17 +376,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
444
376
}
445
377
446
378
// Construct using com.google.cloud.recommender.v1.CostProjection.newBuilder()
447
- private Builder () {
448
- maybeForceBuilderInitialization ();
449
- }
379
+ private Builder () {}
450
380
451
381
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
452
382
super (parent );
453
- maybeForceBuilderInitialization ();
454
- }
455
-
456
- private void maybeForceBuilderInitialization () {
457
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
458
383
}
459
384
460
385
@ java .lang .Override
@@ -564,7 +489,7 @@ public Builder mergeFrom(com.google.cloud.recommender.v1.CostProjection other) {
564
489
if (other .hasDuration ()) {
565
490
mergeDuration (other .getDuration ());
566
491
}
567
- this .mergeUnknownFields (other .unknownFields );
492
+ this .mergeUnknownFields (other .getUnknownFields () );
568
493
onChanged ();
569
494
return this ;
570
495
}
@@ -579,17 +504,43 @@ public Builder mergeFrom(
579
504
com .google .protobuf .CodedInputStream input ,
580
505
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
581
506
throws java .io .IOException {
582
- com .google .cloud .recommender .v1 .CostProjection parsedMessage = null ;
507
+ if (extensionRegistry == null ) {
508
+ throw new java .lang .NullPointerException ();
509
+ }
583
510
try {
584
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
511
+ boolean done = false ;
512
+ while (!done ) {
513
+ int tag = input .readTag ();
514
+ switch (tag ) {
515
+ case 0 :
516
+ done = true ;
517
+ break ;
518
+ case 10 :
519
+ {
520
+ input .readMessage (getCostFieldBuilder ().getBuilder (), extensionRegistry );
521
+
522
+ break ;
523
+ } // case 10
524
+ case 18 :
525
+ {
526
+ input .readMessage (getDurationFieldBuilder ().getBuilder (), extensionRegistry );
527
+
528
+ break ;
529
+ } // case 18
530
+ default :
531
+ {
532
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
533
+ done = true ; // was an endgroup tag
534
+ }
535
+ break ;
536
+ } // default:
537
+ } // switch (tag)
538
+ } // while (!done)
585
539
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
586
- parsedMessage = (com .google .cloud .recommender .v1 .CostProjection ) e .getUnfinishedMessage ();
587
540
throw e .unwrapIOException ();
588
541
} finally {
589
- if (parsedMessage != null ) {
590
- mergeFrom (parsedMessage );
591
- }
592
- }
542
+ onChanged ();
543
+ } // finally
593
544
return this ;
594
545
}
595
546
@@ -1013,7 +964,18 @@ public CostProjection parsePartialFrom(
1013
964
com .google .protobuf .CodedInputStream input ,
1014
965
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1015
966
throws com .google .protobuf .InvalidProtocolBufferException {
1016
- return new CostProjection (input , extensionRegistry );
967
+ Builder builder = newBuilder ();
968
+ try {
969
+ builder .mergeFrom (input , extensionRegistry );
970
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
971
+ throw e .setUnfinishedMessage (builder .buildPartial ());
972
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
973
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
974
+ } catch (java .io .IOException e ) {
975
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
976
+ .setUnfinishedMessage (builder .buildPartial ());
977
+ }
978
+ return builder .buildPartial ();
1017
979
}
1018
980
};
1019
981
0 commit comments