@@ -50,74 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5050 return this .unknownFields ;
5151 }
5252
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-
12153 public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
12254 return com .google .cloud .recommender .v1 .RecommendationOuterClass
12355 .internal_static_google_cloud_recommender_v1_CostProjection_descriptor ;
@@ -257,7 +189,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
257189 if (duration_ != null ) {
258190 output .writeMessage (2 , getDuration ());
259191 }
260- unknownFields .writeTo (output );
192+ getUnknownFields () .writeTo (output );
261193 }
262194
263195 @ java .lang .Override
@@ -272,7 +204,7 @@ public int getSerializedSize() {
272204 if (duration_ != null ) {
273205 size += com .google .protobuf .CodedOutputStream .computeMessageSize (2 , getDuration ());
274206 }
275- size += unknownFields .getSerializedSize ();
207+ size += getUnknownFields () .getSerializedSize ();
276208 memoizedSize = size ;
277209 return size ;
278210 }
@@ -296,7 +228,7 @@ public boolean equals(final java.lang.Object obj) {
296228 if (hasDuration ()) {
297229 if (!getDuration ().equals (other .getDuration ())) return false ;
298230 }
299- if (!unknownFields .equals (other .unknownFields )) return false ;
231+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
300232 return true ;
301233 }
302234
@@ -315,7 +247,7 @@ public int hashCode() {
315247 hash = (37 * hash ) + DURATION_FIELD_NUMBER ;
316248 hash = (53 * hash ) + getDuration ().hashCode ();
317249 }
318- hash = (29 * hash ) + unknownFields .hashCode ();
250+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
319251 memoizedHashCode = hash ;
320252 return hash ;
321253 }
@@ -444,17 +376,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
444376 }
445377
446378 // Construct using com.google.cloud.recommender.v1.CostProjection.newBuilder()
447- private Builder () {
448- maybeForceBuilderInitialization ();
449- }
379+ private Builder () {}
450380
451381 private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
452382 super (parent );
453- maybeForceBuilderInitialization ();
454- }
455-
456- private void maybeForceBuilderInitialization () {
457- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
458383 }
459384
460385 @ java .lang .Override
@@ -564,7 +489,7 @@ public Builder mergeFrom(com.google.cloud.recommender.v1.CostProjection other) {
564489 if (other .hasDuration ()) {
565490 mergeDuration (other .getDuration ());
566491 }
567- this .mergeUnknownFields (other .unknownFields );
492+ this .mergeUnknownFields (other .getUnknownFields () );
568493 onChanged ();
569494 return this ;
570495 }
@@ -579,17 +504,43 @@ public Builder mergeFrom(
579504 com .google .protobuf .CodedInputStream input ,
580505 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
581506 throws java .io .IOException {
582- com .google .cloud .recommender .v1 .CostProjection parsedMessage = null ;
507+ if (extensionRegistry == null ) {
508+ throw new java .lang .NullPointerException ();
509+ }
583510 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)
585539 } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
586- parsedMessage = (com .google .cloud .recommender .v1 .CostProjection ) e .getUnfinishedMessage ();
587540 throw e .unwrapIOException ();
588541 } finally {
589- if (parsedMessage != null ) {
590- mergeFrom (parsedMessage );
591- }
592- }
542+ onChanged ();
543+ } // finally
593544 return this ;
594545 }
595546
@@ -1013,7 +964,18 @@ public CostProjection parsePartialFrom(
1013964 com .google .protobuf .CodedInputStream input ,
1014965 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1015966 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 ();
1017979 }
1018980 };
1019981
0 commit comments