@@ -56,73 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
56
56
return this .unknownFields ;
57
57
}
58
58
59
- private Assignment (
60
- com .google .protobuf .CodedInputStream input ,
61
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
62
- throws com .google .protobuf .InvalidProtocolBufferException {
63
- this ();
64
- if (extensionRegistry == null ) {
65
- throw new java .lang .NullPointerException ();
66
- }
67
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
68
- com .google .protobuf .UnknownFieldSet .newBuilder ();
69
- try {
70
- boolean done = false ;
71
- while (!done ) {
72
- int tag = input .readTag ();
73
- switch (tag ) {
74
- case 0 :
75
- done = true ;
76
- break ;
77
- case 10 :
78
- {
79
- java .lang .String s = input .readStringRequireUtf8 ();
80
-
81
- name_ = s ;
82
- break ;
83
- }
84
- case 24 :
85
- {
86
- int rawValue = input .readEnum ();
87
-
88
- jobType_ = rawValue ;
89
- break ;
90
- }
91
- case 34 :
92
- {
93
- java .lang .String s = input .readStringRequireUtf8 ();
94
-
95
- assignee_ = s ;
96
- break ;
97
- }
98
- case 48 :
99
- {
100
- int rawValue = input .readEnum ();
101
-
102
- state_ = rawValue ;
103
- break ;
104
- }
105
- default :
106
- {
107
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
108
- done = true ;
109
- }
110
- break ;
111
- }
112
- }
113
- }
114
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
115
- throw e .setUnfinishedMessage (this );
116
- } catch (com .google .protobuf .UninitializedMessageException e ) {
117
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
118
- } catch (java .io .IOException e ) {
119
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
120
- } finally {
121
- this .unknownFields = unknownFields .build ();
122
- makeExtensionsImmutable ();
123
- }
124
- }
125
-
126
59
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
127
60
return com .google .cloud .bigquery .reservation .v1 .ReservationProto
128
61
.internal_static_google_cloud_bigquery_reservation_v1_Assignment_descriptor ;
@@ -702,7 +635,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
702
635
.getNumber ()) {
703
636
output .writeEnum (6 , state_ );
704
637
}
705
- unknownFields .writeTo (output );
638
+ getUnknownFields () .writeTo (output );
706
639
}
707
640
708
641
@ java .lang .Override
@@ -727,7 +660,7 @@ public int getSerializedSize() {
727
660
.getNumber ()) {
728
661
size += com .google .protobuf .CodedOutputStream .computeEnumSize (6 , state_ );
729
662
}
730
- size += unknownFields .getSerializedSize ();
663
+ size += getUnknownFields () .getSerializedSize ();
731
664
memoizedSize = size ;
732
665
return size ;
733
666
}
@@ -747,7 +680,7 @@ public boolean equals(final java.lang.Object obj) {
747
680
if (!getAssignee ().equals (other .getAssignee ())) return false ;
748
681
if (jobType_ != other .jobType_ ) return false ;
749
682
if (state_ != other .state_ ) return false ;
750
- if (!unknownFields .equals (other .unknownFields )) return false ;
683
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
751
684
return true ;
752
685
}
753
686
@@ -766,7 +699,7 @@ public int hashCode() {
766
699
hash = (53 * hash ) + jobType_ ;
767
700
hash = (37 * hash ) + STATE_FIELD_NUMBER ;
768
701
hash = (53 * hash ) + state_ ;
769
- hash = (29 * hash ) + unknownFields .hashCode ();
702
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
770
703
memoizedHashCode = hash ;
771
704
return hash ;
772
705
}
@@ -896,17 +829,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
896
829
}
897
830
898
831
// Construct using com.google.cloud.bigquery.reservation.v1.Assignment.newBuilder()
899
- private Builder () {
900
- maybeForceBuilderInitialization ();
901
- }
832
+ private Builder () {}
902
833
903
834
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
904
835
super (parent );
905
- maybeForceBuilderInitialization ();
906
- }
907
-
908
- private void maybeForceBuilderInitialization () {
909
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
910
836
}
911
837
912
838
@ java .lang .Override
@@ -1015,7 +941,7 @@ public Builder mergeFrom(com.google.cloud.bigquery.reservation.v1.Assignment oth
1015
941
if (other .state_ != 0 ) {
1016
942
setStateValue (other .getStateValue ());
1017
943
}
1018
- this .mergeUnknownFields (other .unknownFields );
944
+ this .mergeUnknownFields (other .getUnknownFields () );
1019
945
onChanged ();
1020
946
return this ;
1021
947
}
@@ -1030,18 +956,55 @@ public Builder mergeFrom(
1030
956
com .google .protobuf .CodedInputStream input ,
1031
957
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1032
958
throws java .io .IOException {
1033
- com .google .cloud .bigquery .reservation .v1 .Assignment parsedMessage = null ;
959
+ if (extensionRegistry == null ) {
960
+ throw new java .lang .NullPointerException ();
961
+ }
1034
962
try {
1035
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
963
+ boolean done = false ;
964
+ while (!done ) {
965
+ int tag = input .readTag ();
966
+ switch (tag ) {
967
+ case 0 :
968
+ done = true ;
969
+ break ;
970
+ case 10 :
971
+ {
972
+ name_ = input .readStringRequireUtf8 ();
973
+
974
+ break ;
975
+ } // case 10
976
+ case 24 :
977
+ {
978
+ jobType_ = input .readEnum ();
979
+
980
+ break ;
981
+ } // case 24
982
+ case 34 :
983
+ {
984
+ assignee_ = input .readStringRequireUtf8 ();
985
+
986
+ break ;
987
+ } // case 34
988
+ case 48 :
989
+ {
990
+ state_ = input .readEnum ();
991
+
992
+ break ;
993
+ } // case 48
994
+ default :
995
+ {
996
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
997
+ done = true ; // was an endgroup tag
998
+ }
999
+ break ;
1000
+ } // default:
1001
+ } // switch (tag)
1002
+ } // while (!done)
1036
1003
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1037
- parsedMessage =
1038
- (com .google .cloud .bigquery .reservation .v1 .Assignment ) e .getUnfinishedMessage ();
1039
1004
throw e .unwrapIOException ();
1040
1005
} finally {
1041
- if (parsedMessage != null ) {
1042
- mergeFrom (parsedMessage );
1043
- }
1044
- }
1006
+ onChanged ();
1007
+ } // finally
1045
1008
return this ;
1046
1009
}
1047
1010
@@ -1505,7 +1468,18 @@ public Assignment parsePartialFrom(
1505
1468
com .google .protobuf .CodedInputStream input ,
1506
1469
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1507
1470
throws com .google .protobuf .InvalidProtocolBufferException {
1508
- return new Assignment (input , extensionRegistry );
1471
+ Builder builder = newBuilder ();
1472
+ try {
1473
+ builder .mergeFrom (input , extensionRegistry );
1474
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1475
+ throw e .setUnfinishedMessage (builder .buildPartial ());
1476
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
1477
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
1478
+ } catch (java .io .IOException e ) {
1479
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
1480
+ .setUnfinishedMessage (builder .buildPartial ());
1481
+ }
1482
+ return builder .buildPartial ();
1509
1483
}
1510
1484
};
1511
1485
0 commit comments