@@ -52,74 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
52
52
return this .unknownFields ;
53
53
}
54
54
55
- private AddOnWidgetSet (
56
- com .google .protobuf .CodedInputStream input ,
57
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
58
- throws com .google .protobuf .InvalidProtocolBufferException {
59
- this ();
60
- if (extensionRegistry == null ) {
61
- throw new java .lang .NullPointerException ();
62
- }
63
- int mutable_bitField0_ = 0 ;
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
- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
78
- usedWidgets_ = new java .util .ArrayList <java .lang .Integer >();
79
- mutable_bitField0_ |= 0x00000001 ;
80
- }
81
- usedWidgets_ .add (rawValue );
82
- break ;
83
- }
84
- case 10 :
85
- {
86
- int length = input .readRawVarint32 ();
87
- int oldLimit = input .pushLimit (length );
88
- while (input .getBytesUntilLimit () > 0 ) {
89
- int rawValue = input .readEnum ();
90
- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
91
- usedWidgets_ = new java .util .ArrayList <java .lang .Integer >();
92
- mutable_bitField0_ |= 0x00000001 ;
93
- }
94
- usedWidgets_ .add (rawValue );
95
- }
96
- input .popLimit (oldLimit );
97
- break ;
98
- }
99
- default :
100
- {
101
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
102
- done = true ;
103
- }
104
- break ;
105
- }
106
- }
107
- }
108
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
109
- throw e .setUnfinishedMessage (this );
110
- } catch (com .google .protobuf .UninitializedMessageException e ) {
111
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
112
- } catch (java .io .IOException e ) {
113
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
114
- } finally {
115
- if (((mutable_bitField0_ & 0x00000001 ) != 0 )) {
116
- usedWidgets_ = java .util .Collections .unmodifiableList (usedWidgets_ );
117
- }
118
- this .unknownFields = unknownFields .build ();
119
- makeExtensionsImmutable ();
120
- }
121
- }
122
-
123
55
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
124
56
return com .google .apps .script .type .AddOnWidgetSetProto
125
57
.internal_static_google_apps_script_type_AddOnWidgetSet_descriptor ;
@@ -524,7 +456,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
524
456
for (int i = 0 ; i < usedWidgets_ .size (); i ++) {
525
457
output .writeEnumNoTag (usedWidgets_ .get (i ));
526
458
}
527
- unknownFields .writeTo (output );
459
+ getUnknownFields () .writeTo (output );
528
460
}
529
461
530
462
@ java .lang .Override
@@ -545,7 +477,7 @@ public int getSerializedSize() {
545
477
}
546
478
usedWidgetsMemoizedSerializedSize = dataSize ;
547
479
}
548
- size += unknownFields .getSerializedSize ();
480
+ size += getUnknownFields () .getSerializedSize ();
549
481
memoizedSize = size ;
550
482
return size ;
551
483
}
@@ -562,7 +494,7 @@ public boolean equals(final java.lang.Object obj) {
562
494
(com .google .apps .script .type .AddOnWidgetSet ) obj ;
563
495
564
496
if (!usedWidgets_ .equals (other .usedWidgets_ )) return false ;
565
- if (!unknownFields .equals (other .unknownFields )) return false ;
497
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
566
498
return true ;
567
499
}
568
500
@@ -577,7 +509,7 @@ public int hashCode() {
577
509
hash = (37 * hash ) + USED_WIDGETS_FIELD_NUMBER ;
578
510
hash = (53 * hash ) + usedWidgets_ .hashCode ();
579
511
}
580
- hash = (29 * hash ) + unknownFields .hashCode ();
512
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
581
513
memoizedHashCode = hash ;
582
514
return hash ;
583
515
}
@@ -706,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
706
638
}
707
639
708
640
// Construct using com.google.apps.script.type.AddOnWidgetSet.newBuilder()
709
- private Builder () {
710
- maybeForceBuilderInitialization ();
711
- }
641
+ private Builder () {}
712
642
713
643
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
714
644
super (parent );
715
- maybeForceBuilderInitialization ();
716
- }
717
-
718
- private void maybeForceBuilderInitialization () {
719
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
720
645
}
721
646
722
647
@ java .lang .Override
@@ -816,7 +741,7 @@ public Builder mergeFrom(com.google.apps.script.type.AddOnWidgetSet other) {
816
741
}
817
742
onChanged ();
818
743
}
819
- this .mergeUnknownFields (other .unknownFields );
744
+ this .mergeUnknownFields (other .getUnknownFields () );
820
745
onChanged ();
821
746
return this ;
822
747
}
@@ -831,17 +756,50 @@ public Builder mergeFrom(
831
756
com .google .protobuf .CodedInputStream input ,
832
757
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
833
758
throws java .io .IOException {
834
- com .google .apps .script .type .AddOnWidgetSet parsedMessage = null ;
759
+ if (extensionRegistry == null ) {
760
+ throw new java .lang .NullPointerException ();
761
+ }
835
762
try {
836
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
763
+ boolean done = false ;
764
+ while (!done ) {
765
+ int tag = input .readTag ();
766
+ switch (tag ) {
767
+ case 0 :
768
+ done = true ;
769
+ break ;
770
+ case 8 :
771
+ {
772
+ int tmpRaw = input .readEnum ();
773
+ ensureUsedWidgetsIsMutable ();
774
+ usedWidgets_ .add (tmpRaw );
775
+ break ;
776
+ } // case 8
777
+ case 10 :
778
+ {
779
+ int length = input .readRawVarint32 ();
780
+ int oldLimit = input .pushLimit (length );
781
+ while (input .getBytesUntilLimit () > 0 ) {
782
+ int tmpRaw = input .readEnum ();
783
+ ensureUsedWidgetsIsMutable ();
784
+ usedWidgets_ .add (tmpRaw );
785
+ }
786
+ input .popLimit (oldLimit );
787
+ break ;
788
+ } // case 10
789
+ default :
790
+ {
791
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
792
+ done = true ; // was an endgroup tag
793
+ }
794
+ break ;
795
+ } // default:
796
+ } // switch (tag)
797
+ } // while (!done)
837
798
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
838
- parsedMessage = (com .google .apps .script .type .AddOnWidgetSet ) e .getUnfinishedMessage ();
839
799
throw e .unwrapIOException ();
840
800
} finally {
841
- if (parsedMessage != null ) {
842
- mergeFrom (parsedMessage );
843
- }
844
- }
801
+ onChanged ();
802
+ } // finally
845
803
return this ;
846
804
}
847
805
@@ -1103,7 +1061,18 @@ public AddOnWidgetSet parsePartialFrom(
1103
1061
com .google .protobuf .CodedInputStream input ,
1104
1062
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1105
1063
throws com .google .protobuf .InvalidProtocolBufferException {
1106
- return new AddOnWidgetSet (input , extensionRegistry );
1064
+ Builder builder = newBuilder ();
1065
+ try {
1066
+ builder .mergeFrom (input , extensionRegistry );
1067
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1068
+ throw e .setUnfinishedMessage (builder .buildPartial ());
1069
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
1070
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
1071
+ } catch (java .io .IOException e ) {
1072
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
1073
+ .setUnfinishedMessage (builder .buildPartial ());
1074
+ }
1075
+ return builder .buildPartial ();
1107
1076
}
1108
1077
};
1109
1078
0 commit comments