@@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
53
53
return this .unknownFields ;
54
54
}
55
55
56
- private AggregationInfo (
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 8 :
75
- {
76
- int rawValue = input .readEnum ();
77
-
78
- aggregationLevel_ = rawValue ;
79
- break ;
80
- }
81
- case 16 :
82
- {
83
- int rawValue = input .readEnum ();
84
-
85
- aggregationInterval_ = rawValue ;
86
- break ;
87
- }
88
- case 24 :
89
- {
90
- aggregationCount_ = input .readInt32 ();
91
- break ;
92
- }
93
- default :
94
- {
95
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
96
- done = true ;
97
- }
98
- break ;
99
- }
100
- }
101
- }
102
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
103
- throw e .setUnfinishedMessage (this );
104
- } catch (com .google .protobuf .UninitializedMessageException e ) {
105
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
106
- } catch (java .io .IOException e ) {
107
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
108
- } finally {
109
- this .unknownFields = unknownFields .build ();
110
- makeExtensionsImmutable ();
111
- }
112
- }
113
-
114
56
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
115
57
return com .google .cloud .billing .v1 .CloudCatalogProto
116
58
.internal_static_google_cloud_billing_v1_AggregationInfo_descriptor ;
@@ -457,7 +399,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
457
399
if (aggregationCount_ != 0 ) {
458
400
output .writeInt32 (3 , aggregationCount_ );
459
401
}
460
- unknownFields .writeTo (output );
402
+ getUnknownFields () .writeTo (output );
461
403
}
462
404
463
405
@ java .lang .Override
@@ -481,7 +423,7 @@ public int getSerializedSize() {
481
423
if (aggregationCount_ != 0 ) {
482
424
size += com .google .protobuf .CodedOutputStream .computeInt32Size (3 , aggregationCount_ );
483
425
}
484
- size += unknownFields .getSerializedSize ();
426
+ size += getUnknownFields () .getSerializedSize ();
485
427
memoizedSize = size ;
486
428
return size ;
487
429
}
@@ -500,7 +442,7 @@ public boolean equals(final java.lang.Object obj) {
500
442
if (aggregationLevel_ != other .aggregationLevel_ ) return false ;
501
443
if (aggregationInterval_ != other .aggregationInterval_ ) return false ;
502
444
if (getAggregationCount () != other .getAggregationCount ()) return false ;
503
- if (!unknownFields .equals (other .unknownFields )) return false ;
445
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
504
446
return true ;
505
447
}
506
448
@@ -517,7 +459,7 @@ public int hashCode() {
517
459
hash = (53 * hash ) + aggregationInterval_ ;
518
460
hash = (37 * hash ) + AGGREGATION_COUNT_FIELD_NUMBER ;
519
461
hash = (53 * hash ) + getAggregationCount ();
520
- hash = (29 * hash ) + unknownFields .hashCode ();
462
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
521
463
memoizedHashCode = hash ;
522
464
return hash ;
523
465
}
@@ -646,17 +588,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
646
588
}
647
589
648
590
// Construct using com.google.cloud.billing.v1.AggregationInfo.newBuilder()
649
- private Builder () {
650
- maybeForceBuilderInitialization ();
651
- }
591
+ private Builder () {}
652
592
653
593
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
654
594
super (parent );
655
- maybeForceBuilderInitialization ();
656
- }
657
-
658
- private void maybeForceBuilderInitialization () {
659
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
660
595
}
661
596
662
597
@ java .lang .Override
@@ -756,7 +691,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.AggregationInfo other) {
756
691
if (other .getAggregationCount () != 0 ) {
757
692
setAggregationCount (other .getAggregationCount ());
758
693
}
759
- this .mergeUnknownFields (other .unknownFields );
694
+ this .mergeUnknownFields (other .getUnknownFields () );
760
695
onChanged ();
761
696
return this ;
762
697
}
@@ -771,17 +706,49 @@ public Builder mergeFrom(
771
706
com .google .protobuf .CodedInputStream input ,
772
707
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
773
708
throws java .io .IOException {
774
- com .google .cloud .billing .v1 .AggregationInfo parsedMessage = null ;
709
+ if (extensionRegistry == null ) {
710
+ throw new java .lang .NullPointerException ();
711
+ }
775
712
try {
776
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
713
+ boolean done = false ;
714
+ while (!done ) {
715
+ int tag = input .readTag ();
716
+ switch (tag ) {
717
+ case 0 :
718
+ done = true ;
719
+ break ;
720
+ case 8 :
721
+ {
722
+ aggregationLevel_ = input .readEnum ();
723
+
724
+ break ;
725
+ } // case 8
726
+ case 16 :
727
+ {
728
+ aggregationInterval_ = input .readEnum ();
729
+
730
+ break ;
731
+ } // case 16
732
+ case 24 :
733
+ {
734
+ aggregationCount_ = input .readInt32 ();
735
+
736
+ break ;
737
+ } // case 24
738
+ default :
739
+ {
740
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
741
+ done = true ; // was an endgroup tag
742
+ }
743
+ break ;
744
+ } // default:
745
+ } // switch (tag)
746
+ } // while (!done)
777
747
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
778
- parsedMessage = (com .google .cloud .billing .v1 .AggregationInfo ) e .getUnfinishedMessage ();
779
748
throw e .unwrapIOException ();
780
749
} finally {
781
- if (parsedMessage != null ) {
782
- mergeFrom (parsedMessage );
783
- }
784
- }
750
+ onChanged ();
751
+ } // finally
785
752
return this ;
786
753
}
787
754
@@ -1010,7 +977,18 @@ public AggregationInfo parsePartialFrom(
1010
977
com .google .protobuf .CodedInputStream input ,
1011
978
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1012
979
throws com .google .protobuf .InvalidProtocolBufferException {
1013
- return new AggregationInfo (input , extensionRegistry );
980
+ Builder builder = newBuilder ();
981
+ try {
982
+ builder .mergeFrom (input , extensionRegistry );
983
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
984
+ throw e .setUnfinishedMessage (builder .buildPartial ());
985
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
986
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
987
+ } catch (java .io .IOException e ) {
988
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
989
+ .setUnfinishedMessage (builder .buildPartial ());
990
+ }
991
+ return builder .buildPartial ();
1014
992
}
1015
993
};
1016
994
0 commit comments