@@ -53,103 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5353 return this .unknownFields ;
5454 }
5555
56- private CommonMetadata (
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- int mutable_bitField0_ = 0 ;
65- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
66- com .google .protobuf .UnknownFieldSet .newBuilder ();
67- try {
68- boolean done = false ;
69- while (!done ) {
70- int tag = input .readTag ();
71- switch (tag ) {
72- case 0 :
73- done = true ;
74- break ;
75- case 10 :
76- {
77- com .google .protobuf .Timestamp .Builder subBuilder = null ;
78- if (startTime_ != null ) {
79- subBuilder = startTime_ .toBuilder ();
80- }
81- startTime_ =
82- input .readMessage (com .google .protobuf .Timestamp .parser (), extensionRegistry );
83- if (subBuilder != null ) {
84- subBuilder .mergeFrom (startTime_ );
85- startTime_ = subBuilder .buildPartial ();
86- }
87-
88- break ;
89- }
90- case 18 :
91- {
92- com .google .protobuf .Timestamp .Builder subBuilder = null ;
93- if (endTime_ != null ) {
94- subBuilder = endTime_ .toBuilder ();
95- }
96- endTime_ =
97- input .readMessage (com .google .protobuf .Timestamp .parser (), extensionRegistry );
98- if (subBuilder != null ) {
99- subBuilder .mergeFrom (endTime_ );
100- endTime_ = subBuilder .buildPartial ();
101- }
102-
103- break ;
104- }
105- case 24 :
106- {
107- int rawValue = input .readEnum ();
108-
109- operationType_ = rawValue ;
110- break ;
111- }
112- case 34 :
113- {
114- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
115- labels_ =
116- com .google .protobuf .MapField .newMapField (LabelsDefaultEntryHolder .defaultEntry );
117- mutable_bitField0_ |= 0x00000001 ;
118- }
119- com .google .protobuf .MapEntry <java .lang .String , java .lang .String > labels__ =
120- input .readMessage (
121- LabelsDefaultEntryHolder .defaultEntry .getParserForType (), extensionRegistry );
122- labels_ .getMutableMap ().put (labels__ .getKey (), labels__ .getValue ());
123- break ;
124- }
125- case 40 :
126- {
127- int rawValue = input .readEnum ();
128-
129- state_ = rawValue ;
130- break ;
131- }
132- default :
133- {
134- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
135- done = true ;
136- }
137- break ;
138- }
139- }
140- }
141- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
142- throw e .setUnfinishedMessage (this );
143- } catch (com .google .protobuf .UninitializedMessageException e ) {
144- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
145- } catch (java .io .IOException e ) {
146- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
147- } finally {
148- this .unknownFields = unknownFields .build ();
149- makeExtensionsImmutable ();
150- }
151- }
152-
15356 public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
15457 return com .google .datastore .admin .v1 .DatastoreAdminProto
15558 .internal_static_google_datastore_admin_v1_CommonMetadata_descriptor ;
@@ -747,7 +650,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
747650 != com .google .datastore .admin .v1 .CommonMetadata .State .STATE_UNSPECIFIED .getNumber ()) {
748651 output .writeEnum (5 , state_ );
749652 }
750- unknownFields .writeTo (output );
653+ getUnknownFields () .writeTo (output );
751654 }
752655
753656 @ java .lang .Override
@@ -780,7 +683,7 @@ public int getSerializedSize() {
780683 != com .google .datastore .admin .v1 .CommonMetadata .State .STATE_UNSPECIFIED .getNumber ()) {
781684 size += com .google .protobuf .CodedOutputStream .computeEnumSize (5 , state_ );
782685 }
783- size += unknownFields .getSerializedSize ();
686+ size += getUnknownFields () .getSerializedSize ();
784687 memoizedSize = size ;
785688 return size ;
786689 }
@@ -807,7 +710,7 @@ public boolean equals(final java.lang.Object obj) {
807710 if (operationType_ != other .operationType_ ) return false ;
808711 if (!internalGetLabels ().equals (other .internalGetLabels ())) return false ;
809712 if (state_ != other .state_ ) return false ;
810- if (!unknownFields .equals (other .unknownFields )) return false ;
713+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
811714 return true ;
812715 }
813716
@@ -834,7 +737,7 @@ public int hashCode() {
834737 }
835738 hash = (37 * hash ) + STATE_FIELD_NUMBER ;
836739 hash = (53 * hash ) + state_ ;
837- hash = (29 * hash ) + unknownFields .hashCode ();
740+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
838741 memoizedHashCode = hash ;
839742 return hash ;
840743 }
@@ -983,17 +886,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
983886 }
984887
985888 // Construct using com.google.datastore.admin.v1.CommonMetadata.newBuilder()
986- private Builder () {
987- maybeForceBuilderInitialization ();
988- }
889+ private Builder () {}
989890
990891 private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
991892 super (parent );
992- maybeForceBuilderInitialization ();
993- }
994-
995- private void maybeForceBuilderInitialization () {
996- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
997893 }
998894
999895 @ java .lang .Override
@@ -1120,7 +1016,7 @@ public Builder mergeFrom(com.google.datastore.admin.v1.CommonMetadata other) {
11201016 if (other .state_ != 0 ) {
11211017 setStateValue (other .getStateValue ());
11221018 }
1123- this .mergeUnknownFields (other .unknownFields );
1019+ this .mergeUnknownFields (other .getUnknownFields () );
11241020 onChanged ();
11251021 return this ;
11261022 }
@@ -1135,17 +1031,66 @@ public Builder mergeFrom(
11351031 com .google .protobuf .CodedInputStream input ,
11361032 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
11371033 throws java .io .IOException {
1138- com .google .datastore .admin .v1 .CommonMetadata parsedMessage = null ;
1034+ if (extensionRegistry == null ) {
1035+ throw new java .lang .NullPointerException ();
1036+ }
11391037 try {
1140- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
1038+ boolean done = false ;
1039+ while (!done ) {
1040+ int tag = input .readTag ();
1041+ switch (tag ) {
1042+ case 0 :
1043+ done = true ;
1044+ break ;
1045+ case 10 :
1046+ {
1047+ input .readMessage (getStartTimeFieldBuilder ().getBuilder (), extensionRegistry );
1048+
1049+ break ;
1050+ } // case 10
1051+ case 18 :
1052+ {
1053+ input .readMessage (getEndTimeFieldBuilder ().getBuilder (), extensionRegistry );
1054+
1055+ break ;
1056+ } // case 18
1057+ case 24 :
1058+ {
1059+ operationType_ = input .readEnum ();
1060+
1061+ break ;
1062+ } // case 24
1063+ case 34 :
1064+ {
1065+ com .google .protobuf .MapEntry <java .lang .String , java .lang .String > labels__ =
1066+ input .readMessage (
1067+ LabelsDefaultEntryHolder .defaultEntry .getParserForType (),
1068+ extensionRegistry );
1069+ internalGetMutableLabels ()
1070+ .getMutableMap ()
1071+ .put (labels__ .getKey (), labels__ .getValue ());
1072+ break ;
1073+ } // case 34
1074+ case 40 :
1075+ {
1076+ state_ = input .readEnum ();
1077+
1078+ break ;
1079+ } // case 40
1080+ default :
1081+ {
1082+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
1083+ done = true ; // was an endgroup tag
1084+ }
1085+ break ;
1086+ } // default:
1087+ } // switch (tag)
1088+ } // while (!done)
11411089 } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1142- parsedMessage = (com .google .datastore .admin .v1 .CommonMetadata ) e .getUnfinishedMessage ();
11431090 throw e .unwrapIOException ();
11441091 } finally {
1145- if (parsedMessage != null ) {
1146- mergeFrom (parsedMessage );
1147- }
1148- }
1092+ onChanged ();
1093+ } // finally
11491094 return this ;
11501095 }
11511096
@@ -1895,7 +1840,18 @@ public CommonMetadata parsePartialFrom(
18951840 com .google .protobuf .CodedInputStream input ,
18961841 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
18971842 throws com .google .protobuf .InvalidProtocolBufferException {
1898- return new CommonMetadata (input , extensionRegistry );
1843+ Builder builder = newBuilder ();
1844+ try {
1845+ builder .mergeFrom (input , extensionRegistry );
1846+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1847+ throw e .setUnfinishedMessage (builder .buildPartial ());
1848+ } catch (com .google .protobuf .UninitializedMessageException e ) {
1849+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
1850+ } catch (java .io .IOException e ) {
1851+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
1852+ .setUnfinishedMessage (builder .buildPartial ());
1853+ }
1854+ return builder .buildPartial ();
18991855 }
19001856 };
19011857
0 commit comments