@@ -59,153 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
59
59
return this .unknownFields ;
60
60
}
61
61
62
- private AnnotatedDataset (
63
- com .google .protobuf .CodedInputStream input ,
64
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
65
- throws com .google .protobuf .InvalidProtocolBufferException {
66
- this ();
67
- if (extensionRegistry == null ) {
68
- throw new java .lang .NullPointerException ();
69
- }
70
- int mutable_bitField0_ = 0 ;
71
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
72
- com .google .protobuf .UnknownFieldSet .newBuilder ();
73
- try {
74
- boolean done = false ;
75
- while (!done ) {
76
- int tag = input .readTag ();
77
- switch (tag ) {
78
- case 0 :
79
- done = true ;
80
- break ;
81
- case 10 :
82
- {
83
- java .lang .String s = input .readStringRequireUtf8 ();
84
-
85
- name_ = s ;
86
- break ;
87
- }
88
- case 18 :
89
- {
90
- java .lang .String s = input .readStringRequireUtf8 ();
91
-
92
- displayName_ = s ;
93
- break ;
94
- }
95
- case 24 :
96
- {
97
- int rawValue = input .readEnum ();
98
-
99
- annotationSource_ = rawValue ;
100
- break ;
101
- }
102
- case 32 :
103
- {
104
- exampleCount_ = input .readInt64 ();
105
- break ;
106
- }
107
- case 40 :
108
- {
109
- completedExampleCount_ = input .readInt64 ();
110
- break ;
111
- }
112
- case 50 :
113
- {
114
- com .google .cloud .datalabeling .v1beta1 .LabelStats .Builder subBuilder = null ;
115
- if (labelStats_ != null ) {
116
- subBuilder = labelStats_ .toBuilder ();
117
- }
118
- labelStats_ =
119
- input .readMessage (
120
- com .google .cloud .datalabeling .v1beta1 .LabelStats .parser (), extensionRegistry );
121
- if (subBuilder != null ) {
122
- subBuilder .mergeFrom (labelStats_ );
123
- labelStats_ = subBuilder .buildPartial ();
124
- }
125
-
126
- break ;
127
- }
128
- case 58 :
129
- {
130
- com .google .protobuf .Timestamp .Builder subBuilder = null ;
131
- if (createTime_ != null ) {
132
- subBuilder = createTime_ .toBuilder ();
133
- }
134
- createTime_ =
135
- input .readMessage (com .google .protobuf .Timestamp .parser (), extensionRegistry );
136
- if (subBuilder != null ) {
137
- subBuilder .mergeFrom (createTime_ );
138
- createTime_ = subBuilder .buildPartial ();
139
- }
140
-
141
- break ;
142
- }
143
- case 64 :
144
- {
145
- int rawValue = input .readEnum ();
146
-
147
- annotationType_ = rawValue ;
148
- break ;
149
- }
150
- case 74 :
151
- {
152
- java .lang .String s = input .readStringRequireUtf8 ();
153
-
154
- description_ = s ;
155
- break ;
156
- }
157
- case 82 :
158
- {
159
- com .google .cloud .datalabeling .v1beta1 .AnnotatedDatasetMetadata .Builder subBuilder =
160
- null ;
161
- if (metadata_ != null ) {
162
- subBuilder = metadata_ .toBuilder ();
163
- }
164
- metadata_ =
165
- input .readMessage (
166
- com .google .cloud .datalabeling .v1beta1 .AnnotatedDatasetMetadata .parser (),
167
- extensionRegistry );
168
- if (subBuilder != null ) {
169
- subBuilder .mergeFrom (metadata_ );
170
- metadata_ = subBuilder .buildPartial ();
171
- }
172
-
173
- break ;
174
- }
175
- case 90 :
176
- {
177
- java .lang .String s = input .readStringRequireUtf8 ();
178
- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
179
- blockingResources_ = new com .google .protobuf .LazyStringArrayList ();
180
- mutable_bitField0_ |= 0x00000001 ;
181
- }
182
- blockingResources_ .add (s );
183
- break ;
184
- }
185
- default :
186
- {
187
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
188
- done = true ;
189
- }
190
- break ;
191
- }
192
- }
193
- }
194
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
195
- throw e .setUnfinishedMessage (this );
196
- } catch (com .google .protobuf .UninitializedMessageException e ) {
197
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
198
- } catch (java .io .IOException e ) {
199
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
200
- } finally {
201
- if (((mutable_bitField0_ & 0x00000001 ) != 0 )) {
202
- blockingResources_ = blockingResources_ .getUnmodifiableView ();
203
- }
204
- this .unknownFields = unknownFields .build ();
205
- makeExtensionsImmutable ();
206
- }
207
- }
208
-
209
62
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
210
63
return com .google .cloud .datalabeling .v1beta1 .DatasetOuterClass
211
64
.internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDataset_descriptor ;
@@ -754,7 +607,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
754
607
for (int i = 0 ; i < blockingResources_ .size (); i ++) {
755
608
com .google .protobuf .GeneratedMessageV3 .writeString (output , 11 , blockingResources_ .getRaw (i ));
756
609
}
757
- unknownFields .writeTo (output );
610
+ getUnknownFields () .writeTo (output );
758
611
}
759
612
760
613
@ java .lang .Override
@@ -805,7 +658,7 @@ public int getSerializedSize() {
805
658
size += dataSize ;
806
659
size += 1 * getBlockingResourcesList ().size ();
807
660
}
808
- size += unknownFields .getSerializedSize ();
661
+ size += getUnknownFields () .getSerializedSize ();
809
662
memoizedSize = size ;
810
663
return size ;
811
664
}
@@ -841,7 +694,7 @@ public boolean equals(final java.lang.Object obj) {
841
694
if (!getMetadata ().equals (other .getMetadata ())) return false ;
842
695
}
843
696
if (!getBlockingResourcesList ().equals (other .getBlockingResourcesList ())) return false ;
844
- if (!unknownFields .equals (other .unknownFields )) return false ;
697
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
845
698
return true ;
846
699
}
847
700
@@ -882,7 +735,7 @@ public int hashCode() {
882
735
hash = (37 * hash ) + BLOCKING_RESOURCES_FIELD_NUMBER ;
883
736
hash = (53 * hash ) + getBlockingResourcesList ().hashCode ();
884
737
}
885
- hash = (29 * hash ) + unknownFields .hashCode ();
738
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
886
739
memoizedHashCode = hash ;
887
740
return hash ;
888
741
}
@@ -1014,17 +867,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1014
867
}
1015
868
1016
869
// Construct using com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.newBuilder()
1017
- private Builder () {
1018
- maybeForceBuilderInitialization ();
1019
- }
870
+ private Builder () {}
1020
871
1021
872
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
1022
873
super (parent );
1023
- maybeForceBuilderInitialization ();
1024
- }
1025
-
1026
- private void maybeForceBuilderInitialization () {
1027
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
1028
874
}
1029
875
1030
876
@ java .lang .Override
@@ -1212,7 +1058,7 @@ public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.AnnotatedDataset
1212
1058
}
1213
1059
onChanged ();
1214
1060
}
1215
- this .mergeUnknownFields (other .unknownFields );
1061
+ this .mergeUnknownFields (other .getUnknownFields () );
1216
1062
onChanged ();
1217
1063
return this ;
1218
1064
}
@@ -1227,18 +1073,98 @@ public Builder mergeFrom(
1227
1073
com .google .protobuf .CodedInputStream input ,
1228
1074
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1229
1075
throws java .io .IOException {
1230
- com .google .cloud .datalabeling .v1beta1 .AnnotatedDataset parsedMessage = null ;
1076
+ if (extensionRegistry == null ) {
1077
+ throw new java .lang .NullPointerException ();
1078
+ }
1231
1079
try {
1232
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
1080
+ boolean done = false ;
1081
+ while (!done ) {
1082
+ int tag = input .readTag ();
1083
+ switch (tag ) {
1084
+ case 0 :
1085
+ done = true ;
1086
+ break ;
1087
+ case 10 :
1088
+ {
1089
+ name_ = input .readStringRequireUtf8 ();
1090
+
1091
+ break ;
1092
+ } // case 10
1093
+ case 18 :
1094
+ {
1095
+ displayName_ = input .readStringRequireUtf8 ();
1096
+
1097
+ break ;
1098
+ } // case 18
1099
+ case 24 :
1100
+ {
1101
+ annotationSource_ = input .readEnum ();
1102
+
1103
+ break ;
1104
+ } // case 24
1105
+ case 32 :
1106
+ {
1107
+ exampleCount_ = input .readInt64 ();
1108
+
1109
+ break ;
1110
+ } // case 32
1111
+ case 40 :
1112
+ {
1113
+ completedExampleCount_ = input .readInt64 ();
1114
+
1115
+ break ;
1116
+ } // case 40
1117
+ case 50 :
1118
+ {
1119
+ input .readMessage (getLabelStatsFieldBuilder ().getBuilder (), extensionRegistry );
1120
+
1121
+ break ;
1122
+ } // case 50
1123
+ case 58 :
1124
+ {
1125
+ input .readMessage (getCreateTimeFieldBuilder ().getBuilder (), extensionRegistry );
1126
+
1127
+ break ;
1128
+ } // case 58
1129
+ case 64 :
1130
+ {
1131
+ annotationType_ = input .readEnum ();
1132
+
1133
+ break ;
1134
+ } // case 64
1135
+ case 74 :
1136
+ {
1137
+ description_ = input .readStringRequireUtf8 ();
1138
+
1139
+ break ;
1140
+ } // case 74
1141
+ case 82 :
1142
+ {
1143
+ input .readMessage (getMetadataFieldBuilder ().getBuilder (), extensionRegistry );
1144
+
1145
+ break ;
1146
+ } // case 82
1147
+ case 90 :
1148
+ {
1149
+ java .lang .String s = input .readStringRequireUtf8 ();
1150
+ ensureBlockingResourcesIsMutable ();
1151
+ blockingResources_ .add (s );
1152
+ break ;
1153
+ } // case 90
1154
+ default :
1155
+ {
1156
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
1157
+ done = true ; // was an endgroup tag
1158
+ }
1159
+ break ;
1160
+ } // default:
1161
+ } // switch (tag)
1162
+ } // while (!done)
1233
1163
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1234
- parsedMessage =
1235
- (com .google .cloud .datalabeling .v1beta1 .AnnotatedDataset ) e .getUnfinishedMessage ();
1236
1164
throw e .unwrapIOException ();
1237
1165
} finally {
1238
- if (parsedMessage != null ) {
1239
- mergeFrom (parsedMessage );
1240
- }
1241
- }
1166
+ onChanged ();
1167
+ } // finally
1242
1168
return this ;
1243
1169
}
1244
1170
@@ -2659,7 +2585,18 @@ public AnnotatedDataset parsePartialFrom(
2659
2585
com .google .protobuf .CodedInputStream input ,
2660
2586
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
2661
2587
throws com .google .protobuf .InvalidProtocolBufferException {
2662
- return new AnnotatedDataset (input , extensionRegistry );
2588
+ Builder builder = newBuilder ();
2589
+ try {
2590
+ builder .mergeFrom (input , extensionRegistry );
2591
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
2592
+ throw e .setUnfinishedMessage (builder .buildPartial ());
2593
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
2594
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
2595
+ } catch (java .io .IOException e ) {
2596
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
2597
+ .setUnfinishedMessage (builder .buildPartial ());
2598
+ }
2599
+ return builder .buildPartial ();
2663
2600
}
2664
2601
};
2665
2602
0 commit comments