@@ -76,88 +76,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
76
76
return this .unknownFields ;
77
77
}
78
78
79
- private Aggregation (
80
- com .google .protobuf .CodedInputStream input ,
81
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
82
- throws com .google .protobuf .InvalidProtocolBufferException {
83
- this ();
84
- if (extensionRegistry == null ) {
85
- throw new java .lang .NullPointerException ();
86
- }
87
- int mutable_bitField0_ = 0 ;
88
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
89
- com .google .protobuf .UnknownFieldSet .newBuilder ();
90
- try {
91
- boolean done = false ;
92
- while (!done ) {
93
- int tag = input .readTag ();
94
- switch (tag ) {
95
- case 0 :
96
- done = true ;
97
- break ;
98
- case 10 :
99
- {
100
- com .google .protobuf .Duration .Builder subBuilder = null ;
101
- if (alignmentPeriod_ != null ) {
102
- subBuilder = alignmentPeriod_ .toBuilder ();
103
- }
104
- alignmentPeriod_ =
105
- input .readMessage (com .google .protobuf .Duration .parser (), extensionRegistry );
106
- if (subBuilder != null ) {
107
- subBuilder .mergeFrom (alignmentPeriod_ );
108
- alignmentPeriod_ = subBuilder .buildPartial ();
109
- }
110
-
111
- break ;
112
- }
113
- case 16 :
114
- {
115
- int rawValue = input .readEnum ();
116
-
117
- perSeriesAligner_ = rawValue ;
118
- break ;
119
- }
120
- case 32 :
121
- {
122
- int rawValue = input .readEnum ();
123
-
124
- crossSeriesReducer_ = rawValue ;
125
- break ;
126
- }
127
- case 42 :
128
- {
129
- java .lang .String s = input .readStringRequireUtf8 ();
130
- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
131
- groupByFields_ = new com .google .protobuf .LazyStringArrayList ();
132
- mutable_bitField0_ |= 0x00000001 ;
133
- }
134
- groupByFields_ .add (s );
135
- break ;
136
- }
137
- default :
138
- {
139
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
140
- done = true ;
141
- }
142
- break ;
143
- }
144
- }
145
- }
146
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
147
- throw e .setUnfinishedMessage (this );
148
- } catch (com .google .protobuf .UninitializedMessageException e ) {
149
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
150
- } catch (java .io .IOException e ) {
151
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
152
- } finally {
153
- if (((mutable_bitField0_ & 0x00000001 ) != 0 )) {
154
- groupByFields_ = groupByFields_ .getUnmodifiableView ();
155
- }
156
- this .unknownFields = unknownFields .build ();
157
- makeExtensionsImmutable ();
158
- }
159
- }
160
-
161
79
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
162
80
return com .google .monitoring .v3 .CommonProto
163
81
.internal_static_google_monitoring_v3_Aggregation_descriptor ;
@@ -1692,7 +1610,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
1692
1610
for (int i = 0 ; i < groupByFields_ .size (); i ++) {
1693
1611
com .google .protobuf .GeneratedMessageV3 .writeString (output , 5 , groupByFields_ .getRaw (i ));
1694
1612
}
1695
- unknownFields .writeTo (output );
1613
+ getUnknownFields () .writeTo (output );
1696
1614
}
1697
1615
1698
1616
@ java .lang .Override
@@ -1719,7 +1637,7 @@ public int getSerializedSize() {
1719
1637
size += dataSize ;
1720
1638
size += 1 * getGroupByFieldsList ().size ();
1721
1639
}
1722
- size += unknownFields .getSerializedSize ();
1640
+ size += getUnknownFields () .getSerializedSize ();
1723
1641
memoizedSize = size ;
1724
1642
return size ;
1725
1643
}
@@ -1741,7 +1659,7 @@ public boolean equals(final java.lang.Object obj) {
1741
1659
if (perSeriesAligner_ != other .perSeriesAligner_ ) return false ;
1742
1660
if (crossSeriesReducer_ != other .crossSeriesReducer_ ) return false ;
1743
1661
if (!getGroupByFieldsList ().equals (other .getGroupByFieldsList ())) return false ;
1744
- if (!unknownFields .equals (other .unknownFields )) return false ;
1662
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
1745
1663
return true ;
1746
1664
}
1747
1665
@@ -1764,7 +1682,7 @@ public int hashCode() {
1764
1682
hash = (37 * hash ) + GROUP_BY_FIELDS_FIELD_NUMBER ;
1765
1683
hash = (53 * hash ) + getGroupByFieldsList ().hashCode ();
1766
1684
}
1767
- hash = (29 * hash ) + unknownFields .hashCode ();
1685
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
1768
1686
memoizedHashCode = hash ;
1769
1687
return hash ;
1770
1688
}
@@ -1914,17 +1832,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1914
1832
}
1915
1833
1916
1834
// Construct using com.google.monitoring.v3.Aggregation.newBuilder()
1917
- private Builder () {
1918
- maybeForceBuilderInitialization ();
1919
- }
1835
+ private Builder () {}
1920
1836
1921
1837
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
1922
1838
super (parent );
1923
- maybeForceBuilderInitialization ();
1924
- }
1925
-
1926
- private void maybeForceBuilderInitialization () {
1927
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
1928
1839
}
1929
1840
1930
1841
@ java .lang .Override
@@ -2049,7 +1960,7 @@ public Builder mergeFrom(com.google.monitoring.v3.Aggregation other) {
2049
1960
}
2050
1961
onChanged ();
2051
1962
}
2052
- this .mergeUnknownFields (other .unknownFields );
1963
+ this .mergeUnknownFields (other .getUnknownFields () );
2053
1964
onChanged ();
2054
1965
return this ;
2055
1966
}
@@ -2064,17 +1975,56 @@ public Builder mergeFrom(
2064
1975
com .google .protobuf .CodedInputStream input ,
2065
1976
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
2066
1977
throws java .io .IOException {
2067
- com .google .monitoring .v3 .Aggregation parsedMessage = null ;
1978
+ if (extensionRegistry == null ) {
1979
+ throw new java .lang .NullPointerException ();
1980
+ }
2068
1981
try {
2069
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
1982
+ boolean done = false ;
1983
+ while (!done ) {
1984
+ int tag = input .readTag ();
1985
+ switch (tag ) {
1986
+ case 0 :
1987
+ done = true ;
1988
+ break ;
1989
+ case 10 :
1990
+ {
1991
+ input .readMessage (getAlignmentPeriodFieldBuilder ().getBuilder (), extensionRegistry );
1992
+
1993
+ break ;
1994
+ } // case 10
1995
+ case 16 :
1996
+ {
1997
+ perSeriesAligner_ = input .readEnum ();
1998
+
1999
+ break ;
2000
+ } // case 16
2001
+ case 32 :
2002
+ {
2003
+ crossSeriesReducer_ = input .readEnum ();
2004
+
2005
+ break ;
2006
+ } // case 32
2007
+ case 42 :
2008
+ {
2009
+ java .lang .String s = input .readStringRequireUtf8 ();
2010
+ ensureGroupByFieldsIsMutable ();
2011
+ groupByFields_ .add (s );
2012
+ break ;
2013
+ } // case 42
2014
+ default :
2015
+ {
2016
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
2017
+ done = true ; // was an endgroup tag
2018
+ }
2019
+ break ;
2020
+ } // default:
2021
+ } // switch (tag)
2022
+ } // while (!done)
2070
2023
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
2071
- parsedMessage = (com .google .monitoring .v3 .Aggregation ) e .getUnfinishedMessage ();
2072
2024
throw e .unwrapIOException ();
2073
2025
} finally {
2074
- if (parsedMessage != null ) {
2075
- mergeFrom (parsedMessage );
2076
- }
2077
- }
2026
+ onChanged ();
2027
+ } // finally
2078
2028
return this ;
2079
2029
}
2080
2030
@@ -2974,7 +2924,18 @@ public Aggregation parsePartialFrom(
2974
2924
com .google .protobuf .CodedInputStream input ,
2975
2925
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
2976
2926
throws com .google .protobuf .InvalidProtocolBufferException {
2977
- return new Aggregation (input , extensionRegistry );
2927
+ Builder builder = newBuilder ();
2928
+ try {
2929
+ builder .mergeFrom (input , extensionRegistry );
2930
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
2931
+ throw e .setUnfinishedMessage (builder .buildPartial ());
2932
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
2933
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
2934
+ } catch (java .io .IOException e ) {
2935
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
2936
+ .setUnfinishedMessage (builder .buildPartial ());
2937
+ }
2938
+ return builder .buildPartial ();
2978
2939
}
2979
2940
};
2980
2941
0 commit comments